/* =========================================================
   Ferrum Car – Global Reset
========================================================= */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg-primary: #1a1a1a;
  --bg-secondary: #2d2d2d;
  --bg-tertiary: #3a3a3a;
  --border-color: #4a4a4a;
  --text-primary: #ffffff;
  --text-secondary: #d1d5db;
  --text-muted: #9ca3af;
  --accent-color: #ef4444;
  --accent-hover: #dc2626;
  --accent-red: #ef4444;
}

[data-theme="light"] {
  --bg-primary: #ffffff;
  --bg-secondary: #f9fafb;
  --bg-tertiary: #f3f4f6;
  --border-color: #e5e7eb;
  --text-primary: #111827;
  --text-secondary: #374151;
  --text-muted: #6b7280;
  --accent-color: #ef4444;
  --accent-hover: #f97373;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  transition: background-color 0.3s ease, color 0.3s ease;
  line-height: 1.6;
}

h1, h2, h3 {
  line-height: 1.2;
}

p {
  margin-bottom: 0.75rem;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
}

/* =========================================================
   HEADER: logo + tel/mail + menüü
========================================================= */

.site-header {
  background: var(--bg-primary);
  transition: background-color 0.3s ease;
}

.site-header .container {
  padding-top: 30px;
  padding-bottom: 20px;
}

/* kogu headeri paigutus */
.header-layout {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
}

/* vasak blokk: logo + kontaktid */
.left-block {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

.logo-container {
  display: flex;
  flex-direction: column;
}

.logo {
  display: block;
  width: 160px;
  height: auto;
  min-height: 80px;
  background-image: url('../assets/logo-160.webp');
  background-size: 160px auto;
  background-repeat: no-repeat;
  background-position: center;
  animation: carDrive 12s ease-in-out forwards;
  /* Kaitse alla laadimise vastu */
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  pointer-events: auto;
}

/* Retina display support */
@media (min-resolution: 2dppx) {
  .logo {
    background-image: url('../assets/logo-320.webp');
  }
}

@keyframes carDrive {
  0% {
    transform: translateX(0);
  }
  40% {
    transform: translateX(-100vw);
  }
  40.01% {
    transform: translateX(100vw);
  }
  80% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(0);
  }
}

.logo-secondary {
  display: block;
  width: 160px;
  height: auto;
  min-height: 80px;
  background-image: url('../assets/logo2-160.webp');
  background-size: 160px auto;
  background-repeat: no-repeat;
  background-position: center;
  margin-top: -40px;
  animation: logoDrop 1.5s ease-out forwards;
  /* Kaitse alla laadimise vastu */
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  pointer-events: auto;
}

/* Retina display support */
@media (min-resolution: 2dppx) {
  .logo-secondary {
    background-image: url('../assets/logo2-320.webp');
  }
}

@keyframes logoDrop {
  0% {
    transform: translateY(-200px);
    opacity: 0;
  }
  60% {
    transform: translateY(10px);
    opacity: 1;
  }
  80% {
    transform: translateY(-5px);
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

/* kontaktid vertikaalselt logo kõrval */
.header-contacts-vertical {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

/* kontaktikastide üldstiil */
.hc-item {
  display: inline-block;
  padding: 8px 16px;
  min-width: 190px;
  border-radius: 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-size: 0.9rem;
  text-decoration: none;
  transition: 0.2s;
}

.hc-item:hover {
  background: var(--bg-tertiary);
  border-color: var(--accent-hover);
  color: var(--accent-hover);
}

/* vajadusel veidi kompaktsem, praegu lihtsalt alias */
.hc-item.small {
  font-size: 0.9rem;
}

/* paremal olev menüü - horisontaalne */
.main-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 0.95rem;
  position: relative;
}

/* menüülingid */
.main-nav > a {
  color: var(--text-primary);
  text-decoration: none;
  padding: 8px 0;
  font-weight: 500;
  transition: color 0.2s;
  position: relative;
}

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

.main-nav > a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-color);
  transition: width 0.3s;
}

.main-nav > a:hover::after {
  width: 100%;
}

/* Dropdown wrapper */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-toggle {
  color: var(--text-primary);
  text-decoration: none;
  padding: 8px 0;
  font-weight: 500;
  cursor: pointer;
  display: inline-block;
  transition: color 0.2s;
  user-select: none;
}

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

.nav-dropdown-toggle::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-color);
  transition: width 0.3s;
}

.nav-dropdown:hover .nav-dropdown-toggle::after {
  width: 100%;
}

/* Dropdown menüü */
.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 8px;
  min-width: 220px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
  z-index: 1000;
  margin-top: 8px;
}

.nav-dropdown:hover .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown-menu a {
  color: var(--text-primary);
  text-decoration: none;
  padding: 10px 14px;
  border-radius: 6px;
  background: transparent;
  font-size: 0.9rem;
  transition: 0.2s;
  display: block;
}

.nav-dropdown-menu a:hover {
  background: var(--bg-tertiary);
  color: var(--accent-color);
}

/* teema nupp */
.theme-toggle-btn {
  border: none;
  background: transparent;
  font-size: 1.3rem;
  cursor: pointer;
  padding: 4px 8px;
  margin-left: 8px;
  margin-top: 10px; /* Liigutab nupu allapoole */
}

/* =========================================================
   HERO
========================================================= */

.hero {
  position: relative;
  min-height: 600px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--bg-primary);
}

.hero-bg-image {
  position: absolute;
  inset: 0;
  background-image: url('../assets/hero-images/index.jpg');
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  z-index: 0;
}

.hero-bg-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(26, 26, 26, 0.85) 0%, rgba(26, 26, 26, 0.65) 100%);
  z-index: 1;
}

[data-theme="light"] .hero-bg-image::after {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.88) 0%, rgba(255, 255, 255, 0.70) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 100px 0;
}

.hero-text-center {
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
}

.hero-title {
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hero-title-accent {
  font-size: 4.5rem;
  font-weight: 700;
  color: var(--accent-color);
  text-transform: uppercase;
  letter-spacing: 2px;
}

.hero-title-main {
  font-size: 4rem;
  font-weight: 600;
  color: var(--text-primary);
}

[data-theme="light"] .hero-title-accent {
  color: var(--accent-color);
}

[data-theme="light"] .hero-title-main {
  color: #1a1a1a;
}

.hero-subtitle {
  font-size: 1.5rem;
  color: var(--text-secondary);
  margin-bottom: 30px;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 0;
}

.insurance-partners-section {
  margin-top: 60px;
  text-align: center;
}

.insurance-partners-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 30px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.insurance-logos {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 40px;
  flex-wrap: nowrap;
  margin-top: 0;
  margin-bottom: 30px;
  padding-top: 0;
}

.insurance-cta {
  margin-top: 20px;
}

.insurance-logo {
  height: 60px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
  opacity: 0.95;
  transition: opacity 0.3s ease;
}

.insurance-logo:hover {
  opacity: 1;
}

/* CTA nupud - uus stiil */

.btn-primary-new {
  display: inline-block;
  background: var(--accent-color);
  color: #1a1a1a;
  padding: 14px 32px;
  border-radius: 4px;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.btn-primary-new:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.55);
}

.btn-ghost-new {
  display: inline-block;
  padding: 14px 32px;
  border-radius: 4px;
  border: 2px solid var(--accent-color);
  color: var(--accent-color);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 600;
  background: transparent;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.btn-ghost-new:hover {
  background: var(--accent-color);
  color: #1a1a1a;
  transform: translateY(-2px);
}

/* Vanad nupud - jätame alles tagasiühilduvuse jaoks */
.btn-primary {
  display: inline-block;
  background: var(--accent-red);
  color: #ffffff;
  padding: 10px 18px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.btn-primary:hover {
  background: #f97373;
}

.btn-ghost {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.9rem;
  background: transparent;
  cursor: pointer;
  transition: 0.2s;
  font-family: inherit;
}

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

/* hero meta */

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.hero-meta span {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: var(--bg-primary);
}

/* hero parempoolne kaart */

.hero-visual {
  display: none;
}

@media (min-width: 900px) {
  .hero-visual {
    display: block;
  }
  
  .hero-visual img {
    width: 100%;
    height: auto;
    border-radius: 14px;
    object-fit: cover;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  }
}

.hero-card {
  background: var(--bg-secondary);
  border-radius: 18px;
  border: 1px solid var(--border-color);
  padding: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.45);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.hero-card-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.hero-card-text {
  font-size: 0.9rem;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.hero-card-list {
  margin-left: 18px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.hero-card-list li {
  margin-bottom: 4px;
}

/* =========================================================
   TEENUSED SEKTSIOON - uus stiil
========================================================= */

.services-section {
  padding: 80px 0;
  background: var(--bg-primary);
}

[data-theme="light"] .services-section {
  background: #ffffff;
}

.section-heading {
  text-align: center;
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 50px;
  letter-spacing: 2px;
}

[data-theme="light"] .section-heading {
  color: #1a1a1a;
}

.services-grid-new {
  display: grid;
  gap: 30px;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 1fr;
}

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

.service-card-new {
  background: var(--bg-secondary);
  border-radius: 8px;
  padding: 35px 25px;
  text-align: center;
  transition: all 0.3s ease;
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
}

[data-theme="light"] .service-card-new {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
}

.service-card-new:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 35px rgba(0, 188, 212, 0.2);
  border-color: var(--accent-color);
}

.service-icon {
  font-size: 3rem;
  margin-bottom: 20px;
}

.service-card-new h3 {
  font-size: 1.3rem;
  margin-bottom: 15px;
  color: var(--text-primary);
  font-weight: 600;
}

[data-theme="light"] .service-card-new h3 {
  color: #1a1a1a;
}

.service-card-new p {
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.6;
}

.service-card-wide {
  grid-column: span 2;
}

.service-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 30px;
  line-height: 1.6;
}

.service-sections {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  text-align: left;
  margin-top: 20px;
}

.service-section {
  display: flex;
  flex-direction: column;
}

.service-section-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent-color);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.service-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.service-section li {
  color: var(--text-primary);
  font-size: 0.9rem;
  padding: 8px 0;
  border-top: 1px solid var(--border-color);
  line-height: 1.5;
}

.service-section li:first-child {
  border-top: none;
}

@media (max-width: 900px) {
  .service-card-wide {
    grid-column: span 1;
  }

  .service-sections {
    grid-template-columns: 1fr;
    gap: 25px;
  }
}

.service-card-new ul {
  list-style: none;
  padding: 0;
  margin: 0 0 auto 0;
  flex-grow: 1;
}

.service-card-new li {
  color: var(--text-secondary);
  padding: 8px 0;
  border-top: 1px solid var(--border-color);
  font-size: 0.95rem;
}

.service-card-new li:first-child {
  border-top: none;
}

/* =========================================================
   AVALehe PÕHITEENUSED - vanad
========================================================= */

.home-services {
  padding: 40px 0 10px;
}

.home-services-lead {
  max-width: 40rem;
  color: var(--text-primary);
  margin-bottom: 22px;
}

.home-services-grid {
  display: grid;
  gap: 16px;
}

@media (min-width: 900px) {
  .home-services-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.home-service-card {
  background: var(--bg-secondary);
  border-radius: 14px;
  border: 1px solid var(--border-color);
  padding: 16px;
  font-size: 0.9rem;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.home-service-card h3 {
  font-size: 1rem;
  margin-bottom: 6px;
}

.home-service-card p {
  color: var(--text-primary);
  margin-bottom: 8px;
}

.home-service-card ul {
  margin-left: 18px;
}

.home-service-card li {
  margin-bottom: 3px;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

/* =========================================================
   TERE TULEMAST SEKTSIOON 
========================================================= */

.welcome-section {
  padding: 80px 0;
  background: #f5f5f5;
}

[data-theme="light"] .welcome-section {
  background: #f9fafb;
}

.welcome-header {
  text-align: center;
  margin-bottom: 50px;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: #2d2d2d;
  margin-bottom: 10px;
  letter-spacing: 2px;
}

[data-theme="light"] .section-title {
  color: #1a1a1a;
}

.section-subtitle {
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--accent-color);
  margin-bottom: 8px;
  text-transform: uppercase;
}

.section-tagline {
  font-size: 1.3rem;
  color: #555;
  font-weight: 400;
}

[data-theme="light"] .section-tagline {
  color: #374151;
}

.welcome-content {
  max-width: 800px;
  margin: 0 auto 60px;
  text-align: center;
}

.welcome-content p {
  font-size: 1.05rem;
  line-height: 1.8;
  color: #444;
  margin-bottom: 20px;
}

[data-theme="light"] .welcome-content p {
  color: #374151;
}

.stats-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  max-width: 1000px;
  margin: 0 auto;
}

.stat-item {
  text-align: center;
  padding: 30px 20px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.stat-number {
  font-size: 3rem;
  font-weight: 800;
  color: var(--accent-color);
  margin-bottom: 8px;
}

.stat-label {
  font-size: 0.95rem;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

[data-theme="light"] .stat-item {
  background: #ffffff;
}

/* =========================================================
   Teenuste alamleht (3×3 GRID)
========================================================= */

.services-grid {
  display: grid;
  gap: 16px;
  margin-top: 22px;
}

@media (min-width: 900px) {
  .services-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.service-block {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.35);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.service-block h2 {
  font-size: 1.05rem;
  margin-bottom: 6px;
  font-weight: 600;
}

.service-block p {
  margin-bottom: 10px;
  color: var(--text-primary);
  font-size: 0.9rem;
}

.service-block ul {
  margin-left: 16px;
}

.service-block li {
  margin-bottom: 4px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* =========================================================
   Kontaktilehe stiil
========================================================= */

.contact-grid {
  display: grid;
  gap: 32px;
}

@media (min-width: 768px) {
  .contact-grid {
    grid-template-columns: 1.1fr 1.1fr;
  }
}

.contact-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 30px;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

[data-theme="light"] .contact-box {
  background: white;
  border: 1px solid #e5e7eb;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.contact-box h2 {
  font-size: 1.3rem;
  margin-bottom: 20px;
  color: var(--accent-color);
  font-weight: 600;
}

.contact-box a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color 0.2s;
}

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

.form-field {
  margin-bottom: 14px;
}

.form-field label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 500;
}

[data-theme="light"] .form-field label {
  color: #374151;
}

.form-field input,
.form-field textarea {
  width: 100%;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 12px 14px;
  font-size: 0.95rem;
  color: var(--text-primary);
  transition: all 0.2s ease;
  font-family: inherit;
}

[data-theme="light"] .form-field input,
[data-theme="light"] .form-field textarea {
  background: #f9fafb;
  border: 1px solid #d1d5db;
  color: #1a1a1a;
}

.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(0, 188, 212, 0.1);
}

.form-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Contact CTA Section */
.contact-cta {
  padding: 40px 0 50px;
  background: var(--bg-secondary);
  margin-top: 40px;
  text-align: center;
}

.contact-cta h2 {
  margin-bottom: 8px;
  color: var(--text-primary);
  font-size: 2rem;
}

.contact-cta p {
  color: var(--text-secondary);
  margin-bottom: 16px;
  font-size: 1.1rem;
}

button[type="submit"] {
  width: 100%;
  background: var(--accent-color);
  color: #1a1a1a;
  padding: 14px 32px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 10px;
}

button[type="submit"]:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 188, 212, 0.3);
}

/* =========================================================
   Footer
========================================================= */

.site-footer {
  padding: 16px 0;
  font-size: 0.8rem;
  color: var(--text-muted);
  background: var(--bg-primary);
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Kontaktilehel rohkem õhku ülemise teksti alla */
.page-main h1 {
  margin-bottom: 8px;
}

.page-main h1 + p,
.page-main h1 + .home-services-lead,
.page-main h1 + .section-intro {
  margin-top: 8px;
  margin-bottom: 26px;
}

/* =========================================================
   Tehtud tööd – galerii
========================================================= */

.gallery-grid {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

@media (min-width: 700px) {
  .gallery-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1200px) {
  .gallery-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.gallery-item {
  display: block;
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.gallery-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35);
  padding-bottom: 10px;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  display: flex;
  flex-direction: column;
}

.gallery-card .gallery-item {
  border: none;
  border-radius: 0;
  box-shadow: none;
  margin: 0;
  position: relative;
  width: 100%;
  padding-bottom: 75%; /* 4:3 aspect ratio */
  overflow: hidden;
  background: var(--bg-secondary);
}

.gallery-caption {
  color: var(--text-primary);
  font-size: 0.9rem;
  padding: 10px 8px;
  text-align: center;
  margin: 0;
}

.gallery-item img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  image-orientation: from-image;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.gallery-item:hover img {
  transform: scale(1.03);
  opacity: 0.95;
}

/* Lightbox */

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease;
}

.lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.lightbox-inner {
  max-width: 90vw;
  max-height: 80vh;
  text-align: center;
}

.lightbox-image {
  max-width: 100%;
  max-height: 70vh;
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}

.lightbox-caption {
  margin-top: 10px;
  color: var(--text-primary);
  font-size: 0.9rem;
}

/* nupud */

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid #4b5563;
  color: #f9fafb;
  border-radius: 999px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.4rem;
}

.lightbox-close {
  top: 20px;
  right: 20px;
}

.lightbox-prev {
  left: 20px;
}

.lightbox-next {
  right: 20px;
}

.lightbox-prev,
.lightbox-next {
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(31, 41, 55, 0.95);
}

/* =========================================================
   MEIST / PLUSSID SEKTSIOON
========================================================= */

.about-section {
  padding: 80px 0;
  background: var(--bg-secondary);
}

[data-theme="light"] .about-section {
  background: #f5f5f5;
}

.about-content {
  max-width: 800px;
  margin: 0 auto 50px;
  text-align: center;
}

.about-content p {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

[data-theme="light"] .about-content p {
  color: #374151;
}

.benefits-grid {
  display: grid;
  gap: 25px;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  margin-top: 40px;
}

.benefit-item {
  background: var(--bg-primary);
  padding: 30px 25px;
  border-radius: 8px;
  text-align: center;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

[data-theme="light"] .benefit-item {
  background: white;
  border: 1px solid #e5e7eb;
}

.benefit-item:hover {
  transform: translateY(-5px);
  border-color: var(--accent-color);
  box-shadow: 0 10px 25px rgba(0, 188, 212, 0.15);
}

.benefit-icon {
  font-size: 2.5rem;
  color: var(--accent-color);
  margin-bottom: 15px;
}

.benefit-item h4 {
  font-size: 1.2rem;
  color: var(--text-primary);
  margin-bottom: 10px;
  font-weight: 600;
}

[data-theme="light"] .benefit-item h4 {
  color: #1a1a1a;
}

.benefit-item p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.5;
}

/* =========================================================
   TEENUSE DETAILI LEHED
========================================================= */

.service-detail-hero {
  padding: 60px 0 40px;
  background: var(--bg-secondary);
  border-bottom: 3px solid var(--accent-color);
}

[data-theme="light"] .service-detail-hero {
  background: #f9fafb;
}

.service-detail-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
}

[data-theme="light"] .service-detail-title {
  color: #1a1a1a;
}

.service-detail-subtitle {
  font-size: 1.2rem;
  color: var(--text-secondary);
}

.service-detail-content {
  padding: 60px 0;
}

.service-detail-grid {
  display: grid;
  gap: 50px;
  grid-template-columns: 1fr;
}

@media (min-width: 900px) {
  .service-detail-grid {
    grid-template-columns: 1.2fr 1fr;
    align-items: start;
  }
}

.service-detail-text h2 {
  font-size: 2rem;
  color: var(--text-primary);
  margin-bottom: 20px;
  font-weight: 700;
}

[data-theme="light"] .service-detail-text h2 {
  color: #1a1a1a;
}

.service-detail-text h3 {
  font-size: 1.4rem;
  color: var(--accent-color);
  margin: 30px 0 15px;
  font-weight: 600;
}

.service-detail-text p {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.service-list {
  list-style: none;
  padding: 0;
  margin: 20px 0;
}

.service-list li {
  padding: 12px 0 12px 30px;
  color: var(--text-primary);
  font-size: 1.05rem;
  position: relative;
}

.service-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent-color);
  font-weight: bold;
  font-size: 1.2rem;
}

.service-sections-detail {
  display: flex;
  flex-direction: column;
  gap: 40px;
  margin-top: 20px;
}

.service-section-detail {
  display: flex;
  flex-direction: column;
}

.service-section-title-detail {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent-color);
  margin-bottom: 15px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.service-detail-image {
  position: sticky;
  top: 100px;
}

.service-detail-image img {
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

/* Teema nupu stiil */
#theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* =========================================================
   MOBILE RESPONSIVE STYLES
========================================================= */

@media (max-width: 768px) {
  /* Header */
  .site-header .container {
    flex-direction: column;
    gap: 20px;
    padding: 15px 20px;
  }

  .logo {
    width: 120px;
    height: auto;
    min-height: 60px;
    background-size: 120px auto;
    /* Mobile kasutab ikka 160px faili, aga skaleerib 120px-ks */
  }

  .logo-secondary {
    margin-top: -30px;
    width: 120px;
    height: auto;
    min-height: 60px;
    background-size: 120px auto;
    /* Mobile kasutab ikka 160px faili, aga skaleerib 120px-ks */
  }

  .header-contact {
    flex-direction: column;
    gap: 10px;
    width: 100%;
  }

  .hc-item {
    font-size: 0.9rem;
    padding: 8px 12px;
  }

  /* Navigation - hamburger menu oleks parem, aga jätame lihtsamaks */
  .main-nav {
    flex-direction: column;
    width: 100%;
    gap: 0;
    align-items: stretch;
  }

  .main-nav > a,
  .nav-dropdown-toggle {
    font-size: 1rem;
    padding: 15px 20px;
    text-align: left;
    width: 100%;
    border-bottom: 1px solid var(--border-color);
  }

  .main-nav > a:first-child,
  .nav-dropdown:first-child .nav-dropdown-toggle {
    border-top: 1px solid var(--border-color);
  }

  .nav-dropdown {
    display: flex;
    flex-direction: column;
  }

  .nav-dropdown-menu {
    position: static;
    width: 100%;
    box-shadow: none;
    border: none;
    margin: 0;
    padding: 0;
    padding-left: 20px;
    display: none;
  }

  .nav-dropdown.active .nav-dropdown-menu {
    display: block;
  }

  .nav-dropdown-menu a {
    padding: 10px 20px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.95rem;
  }

  /* Hero */
  .hero {
    min-height: 60vh;
    padding: 40px 0;
  }

  .hero-title-accent {
    font-size: 2.5rem;
  }

  .hero-title-main {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1.1rem;
  }

  .hero-actions {
    flex-direction: column;
    gap: 15px;
    width: 100%;
  }

  .btn-primary-new,
  .btn-ghost-new {
    width: 100%;
    text-align: center;
  }

  .insurance-partners-section {
    margin-top: 40px;
  }

  .insurance-partners-title {
    font-size: 1rem;
    margin-bottom: 20px;
  }

  .insurance-logos {
    gap: 20px;
    margin-top: 0;
    margin-bottom: 20px;
    flex-wrap: wrap;
  }

  .insurance-logo {
    height: 45px;
    max-width: 120px;
  }

  .insurance-cta {
    margin-top: 15px;
  }

  /* Welcome Section */
  .section-title {
    font-size: 2rem;
  }

  .section-subtitle {
    font-size: 1.8rem;
  }

  .welcome-content p {
    font-size: 1rem;
  }

  /* Stats Grid */
  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 15px;
  }

  .stat-number {
    font-size: 2.5rem;
  }

  .stat-label {
    font-size: 0.9rem;
  }

  /* Services Grid */
  .services-grid-new {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .service-card-new {
    padding: 25px 20px;
  }

  .service-icon {
    font-size: 2.5rem;
  }

  .service-card-new h3 {
    font-size: 1.2rem;
  }

  /* Service Detail */
  .service-detail-hero {
    padding: 40px 0 30px;
  }

  .service-detail-title {
    font-size: 2rem;
  }

  .service-detail-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .service-detail-text h2 {
    font-size: 1.8rem;
  }

  .service-detail-text h3 {
    font-size: 1.2rem;
  }

  /* Contact */
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .contact-box {
    padding: 25px;
  }

  .contact-box iframe {
    height: 400px !important;
    min-height: 400px;
  }

  /* Gallery */
  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  /* Footer */
  .site-footer {
    padding: 25px 0;
    font-size: 0.9rem;
  }

  /* Container padding */
  .container {
    padding: 0 20px;
  }
}

/* Tablet adjustments */
@media (min-width: 769px) and (max-width: 1024px) {
  .hero-title-accent {
    font-size: 3.5rem;
  }

  .hero-title-main {
    font-size: 3rem;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .services-grid-new {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }
}

