/* site.css - Senzory vlhkosti
 * Design inspirovaný sensorinnovation.no
 */

:root {
  /* Light theme - inspired by sensorinnovation.no */
  --bg: #efeff0;
  --bg-dark: #080124;
  --panel: #ffffff;
  --text: #1a1a2e;
  --text-light: #ffffff;
  --muted: #5a5a6e;
  --line: rgba(0,0,0,0.08);
  --line-light: rgba(255,255,255,0.15);

  /* Orange accent like sensorinnovation.no */
  --accent: #f89728;
  --accent-hover: #e8871a;
  --accent2: #ff6b35;

  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 4px 20px rgba(0,0,0,0.08);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.12);

  --maxw: 1140px;
  --pad: 20px;

  --font: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-display: 'Poppins', var(--font);
}

*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  height: 100%;
  margin: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--pad);
}

main {
  min-height: 60vh;
}

/* Hero background image - homepage (tall) */
.hero {
  background-color: var(--bg-dark);
  background-image:
    radial-gradient(ellipse 80% 40% at 50% 0%, rgba(248,151,40,0.18), transparent),
    radial-gradient(ellipse 50% 70% at 88% 40%, rgba(99,102,241,0.1), transparent),
    linear-gradient(to bottom, rgba(8,1,36,0.5) 0%, rgba(8,1,36,0.35) 45%, rgba(8,1,36,0.92) 100%),
    url('../img/hero-bg.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Hero background image - subpages (short) */
.page-hero,
.page-hero--small {
  background-color: var(--bg-dark);
  background-image:
    linear-gradient(to bottom, rgba(8,1,36,0.55) 0%, rgba(8,1,36,0.4) 45%, rgba(8,1,36,0.95) 100%),
    url('../img/hero-bg-short.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Page card for content pages */
.page-card {
  background: var(--panel);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 32px;
  margin: 40px 0;
}

.page-title {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 20px;
  color: var(--text);
}

.content p, .content li {
  color: var(--muted);
  line-height: 1.7;
}

.content a {
  color: var(--accent);
  text-decoration: none;
}

.content a:hover {
  text-decoration: underline;
}

/* Admin adjustments */
body.is-admin {
  background: #f5f5f7;
}

body.is-admin main {
  padding-top: 20px;
}

/* Wave SVG dividers */
.wave-divider {
  width: 100%;
  height: auto;
  display: block;
  margin: -1px 0;
}

.page-hero .wave-divider,
.hero .wave-top {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 80px;
  margin: 0;
}

.wave-divider--flip {
  transform: rotate(180deg);
}

/* ===========================================
   Navigation
   =========================================== */
.nav {
  display: flex;
  gap: 16px;
  padding: 16px 24px;
  align-items: center;
  background: var(--bg-dark);
}

.nav a {
  text-decoration: none;
  color: var(--text-light);
}

.nav a:hover {
  color: var(--accent);
}

/* ===========================================
   Buttons
   =========================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg-dark);
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
}

.btn-secondary {
  background: var(--panel);
  color: var(--text);
  box-shadow: var(--shadow);
}

.btn-secondary:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--text-light);
  border: 2px solid rgba(255,255,255,0.3);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ===========================================
   Forms
   =========================================== */
.form {
  display: grid;
  gap: 16px;
  max-width: 600px;
}

.form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 500;
  color: var(--text);
}

.form label.checkbox {
  flex-direction: row;
  align-items: center;
  font-weight: normal;
}

input, textarea, select {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(248,151,40,0.15);
}

.checkbox {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

/* ===========================================
   Page Hero (common for content pages)
   =========================================== */
.page-hero {
  color: var(--text-light);
  padding: 60px 0 120px;
  text-align: center;
  position: relative;
}

.page-hero h1 {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 800;
  margin: 0 0 16px;
  text-shadow: 0 2px 20px rgba(0,0,0,0.6), 0 0 40px rgba(8,1,36,0.8);
}

.page-hero p {
  font-size: 1.1rem;
  opacity: 1;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
  text-shadow: 0 1px 10px rgba(0,0,0,0.5), 0 0 30px rgba(8,1,36,0.7);
}

/* ===========================================
   CTA Section (common)
   =========================================== */
.cta-section {
  padding: 60px 0;
  background: var(--panel);
}

.cta-content {
  text-align: center;
  max-width: 500px;
  margin: 0 auto;
}

.cta-content h2 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0 0 12px;
  color: var(--text);
}

.cta-content p {
  color: var(--muted);
  margin: 0 0 28px;
  line-height: 1.6;
}

.cta-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===========================================
   No Results (empty state)
   =========================================== */
.no-results {
  text-align: center;
  padding: 60px 24px;
  background: var(--panel);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.no-results-icon {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #fff3e6, #ffe8cc);
  border-radius: 20px;
  color: var(--accent);
  margin: 0 auto 24px;
}

.no-results p {
  color: var(--muted);
  margin: 0 0 24px;
  font-size: 1.1rem;
}

/* ===========================================
   Section Styles
   =========================================== */
.section-title {
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 700;
  text-align: center;
  margin: 0 0 12px;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.section-subtitle {
  text-align: center;
  color: var(--muted);
  font-size: 1.1rem;
  margin: 0 0 48px;
}

/* ===========================================
   Cards (generic)
   =========================================== */
.card {
  background: var(--panel);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* ===========================================
   Grid layouts
   =========================================== */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

@media (max-width: 900px) {
  .grid-3 { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .grid-2 { grid-template-columns: 1fr; }
}

/* ===========================================
   Utility classes
   =========================================== */
.text-center { text-align: center; }
.text-muted { color: var(--muted); }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mt-4 { margin-top: 1rem; }
.mb-4 { margin-bottom: 1rem; }
