/* ==========================================================================
   Kohila Hambakliinik - Main Stylesheet
   ========================================================================== */

/* ---------- Google Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ---------- CSS Custom Properties ---------- */
:root {
  --primary: #0D9488;
  --primary-dark: #0B7C72;
  --primary-light: #14B8A6;
  --text: #1A1A2E;
  --text-light: #64748B;
  --bg: #FFFFFF;
  --bg-alt: #F8FAFB;
  --bg-dark: #1A1A2E;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --transition: 0.3s ease;
}

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition);
}

ul, ol {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
}

h1 {
  font-size: 2.75rem;
}

h2 {
  font-size: 2rem;
}

h3 {
  font-size: 1.5rem;
}

h4 {
  font-size: 1.25rem;
}

p {
  margin-bottom: 1rem;
  color: var(--text-light);
}

p:last-child {
  margin-bottom: 0;
}

/* ---------- Layout ---------- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 5rem 0;
}

.section-alt {
  background-color: var(--bg-alt);
}

/* ---------- Section Header ---------- */
.section-header {
  text-align: center;
  margin-bottom: 3rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.section-header h2 {
  margin-bottom: 0.75rem;
  position: relative;
  display: inline-block;
}

.section-header h2::after {
  content: '';
  display: block;
  width: 50px;
  height: 3px;
  background-color: var(--primary);
  margin: 0.75rem auto 0;
  border-radius: 2px;
}

.section-header p {
  font-size: 1.05rem;
  color: var(--text-light);
  margin-top: 0.5rem;
}

/* ==========================================================================
   Header
   ========================================================================== */
.header {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  background-color: var(--bg);
  z-index: 1000;
  transition: box-shadow var(--transition);
}

.header.scrolled {
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 75px;
}

.header-logo img {
  max-height: 45px;
  width: auto;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.nav-links a {
  font-size: 0.925rem;
  font-weight: 500;
  color: var(--text);
  position: relative;
  padding: 0.25rem 0;
  transition: color var(--transition);
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 2px;
  background-color: var(--primary);
  transition: width var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.header-phone {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.925rem;
  color: var(--primary);
  white-space: nowrap;
}

.header-phone svg,
.header-phone i {
  font-size: 1rem;
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  gap: 5px;
  cursor: pointer;
  z-index: 1001;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--text);
  border-radius: 2px;
  transition: all var(--transition);
}

.header.nav-open .menu-toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.header.nav-open .menu-toggle span:nth-child(2) {
  opacity: 0;
}

.header.nav-open .menu-toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: #fff;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(26, 26, 46, 0.75) 0%,
    rgba(13, 148, 136, 0.45) 100%
  );
  z-index: 1;
}

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

.hero h1 {
  font-size: 3rem;
  color: #fff;
  margin-bottom: 1rem;
  max-width: 750px;
  margin-left: auto;
  margin-right: auto;
}

.hero p {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.9);
  max-width: 600px;
  margin: 0 auto 2rem;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Hero Sub (subpages) */
.hero-sub {
  position: relative;
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-light) 100%);
}

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

.hero-sub h1 {
  font-size: 2.5rem;
  color: #fff;
  margin-bottom: 0.5rem;
}

.hero-sub p {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.85);
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  cursor: pointer;
  border: 2px solid transparent;
  line-height: 1.4;
}

.btn-primary {
  background-color: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.35);
}

.btn-outline {
  background-color: transparent;
  color: var(--primary);
  border-color: var(--primary);
}

.btn-outline:hover {
  background-color: var(--primary);
  color: #fff;
  transform: translateY(-1px);
}

.btn-white {
  background-color: #fff;
  color: var(--primary);
  border-color: #fff;
}

.btn-white:hover {
  background-color: rgba(255, 255, 255, 0.9);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-outline-white {
  background-color: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.7);
}

.btn-outline-white:hover {
  background-color: #fff;
  color: var(--primary);
  border-color: #fff;
}

/* ==========================================================================
   Service Cards
   ========================================================================== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

.service-card {
  background-color: var(--bg);
  border-radius: var(--radius-md);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  text-align: center;
}

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

.service-card-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background-color: rgba(13, 148, 136, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  color: var(--primary);
  font-size: 1.5rem;
}

.service-card-icon img {
  width: 28px;
  height: 28px;
}

.service-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
}

.service-card p {
  font-size: 0.925rem;
  color: var(--text-light);
}

.service-card .btn {
  margin-top: 1.25rem;
  font-size: 0.875rem;
  padding: 0.5rem 1.25rem;
}

/* ==========================================================================
   Team Cards
   ========================================================================== */
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.team-card {
  text-align: center;
  padding: 2rem 1.5rem;
}

.team-card-photo {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 1.25rem;
  box-shadow: var(--shadow-md);
}

.team-card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Initials placeholder */
.team-card-initials {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background-color: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  font-weight: 700;
  margin: 0 auto 1.25rem;
}

.team-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.25rem;
}

.team-card p {
  font-size: 0.9rem;
  color: var(--text-light);
}

/* ==========================================================================
   Contact Section
   ========================================================================== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: stretch;
}

.contact-info-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.contact-info-icon {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 50%;
  background-color: rgba(13, 148, 136, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 1.1rem;
}

.contact-info-item h4 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.contact-info-item p {
  font-size: 0.925rem;
  color: var(--text-light);
}

.contact-map {
  border-radius: var(--radius-md);
  overflow: hidden;
  min-height: 400px;
  box-shadow: var(--shadow-sm);
}

.contact-map iframe {
  width: 100%;
  height: 100%;
  min-height: 400px;
  border: none;
  display: block;
}

/* ==========================================================================
   FAQ Accordion
   ========================================================================== */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid #E2E8F0;
}

.faq-item:first-child {
  border-top: 1px solid #E2E8F0;
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  gap: 1rem;
  transition: color var(--transition);
}

.faq-question:hover {
  color: var(--primary);
}

.faq-question-icon {
  width: 28px;
  height: 28px;
  min-width: 28px;
  border-radius: 50%;
  background-color: var(--bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--text-light);
  transition: all var(--transition);
}

.faq-item.active .faq-question-icon {
  background-color: var(--primary);
  color: #fff;
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s ease;
}

.faq-answer-inner {
  padding: 0 0 1.25rem;
}

.faq-answer-inner p {
  font-size: 0.95rem;
  color: var(--text-light);
  line-height: 1.7;
}

.faq-item.active .faq-answer {
  max-height: 500px;
}

/* ==========================================================================
   Sub Navigation (KKK subpages)
   ========================================================================== */
.sub-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  padding: 1.5rem 0;
}

.sub-nav a {
  display: inline-block;
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-light);
  background-color: var(--bg-alt);
  border-radius: 50px;
  transition: all var(--transition);
}

.sub-nav a:hover {
  color: var(--primary);
  background-color: rgba(13, 148, 136, 0.1);
}

.sub-nav a.active {
  background-color: var(--primary);
  color: #fff;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  background-color: var(--bg-dark);
  color: rgba(255, 255, 255, 0.75);
  padding: 4rem 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
}

.footer h4 {
  color: #fff;
  font-size: 1.1rem;
  margin-bottom: 1.25rem;
}

.footer p {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
  line-height: 1.7;
}

.footer-logo {
  max-height: 40px;
  margin-bottom: 1rem;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-links a {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
  transition: color var(--transition);
}

.footer-links a:hover {
  color: var(--primary-light);
}

.footer-contact-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
}

.footer-contact-item i,
.footer-contact-item svg {
  color: var(--primary-light);
  width: 18px;
  text-align: center;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1.25rem 0;
  text-align: center;
}

.footer-bottom p {
  font-size: 0.825rem;
  color: rgba(255, 255, 255, 0.4);
}

/* ==========================================================================
   Partner Logos
   ========================================================================== */
.partners {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  padding: 2rem 0;
}

.partners img {
  max-height: 60px;
  width: auto;
  filter: grayscale(100%);
  opacity: 0.6;
  transition: all var(--transition);
}

.partners img:hover {
  filter: grayscale(0%);
  opacity: 1;
}

/* ==========================================================================
   Page Content (long-form)
   ========================================================================== */
.page-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

.page-content h2 {
  font-size: 1.75rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.page-content h3 {
  font-size: 1.3rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.page-content p {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-light);
  margin-bottom: 1.25rem;
}

.page-content ul,
.page-content ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}

.page-content ul {
  list-style: disc;
}

.page-content ol {
  list-style: decimal;
}

.page-content li {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-light);
  margin-bottom: 0.4rem;
}

.page-content blockquote {
  border-left: 4px solid var(--primary);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  background-color: var(--bg-alt);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.page-content blockquote p {
  color: var(--text);
  font-style: italic;
}

.page-content img {
  border-radius: var(--radius-md);
  margin: 1.5rem 0;
}

/* ==========================================================================
   Highlight Section (image + text side-by-side)
   ========================================================================== */
.highlight {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.highlight-image {
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.highlight-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.highlight-content h2 {
  margin-bottom: 1rem;
}

.highlight-content p {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-light);
}

.highlight-content .btn {
  margin-top: 1.5rem;
}

/* Alternating layout */
.highlight-reverse .highlight-image {
  order: 2;
}

.highlight-reverse .highlight-content {
  order: 1;
}

/* ==========================================================================
   Animations
   ========================================================================== */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger delays for grid children */
.fade-in-stagger > *:nth-child(1) { transition-delay: 0s; }
.fade-in-stagger > *:nth-child(2) { transition-delay: 0.1s; }
.fade-in-stagger > *:nth-child(3) { transition-delay: 0.2s; }
.fade-in-stagger > *:nth-child(4) { transition-delay: 0.3s; }
.fade-in-stagger > *:nth-child(5) { transition-delay: 0.4s; }
.fade-in-stagger > *:nth-child(6) { transition-delay: 0.5s; }
.fade-in-stagger > *:nth-child(7) { transition-delay: 0.6s; }
.fade-in-stagger > *:nth-child(8) { transition-delay: 0.7s; }
.fade-in-stagger > *:nth-child(9) { transition-delay: 0.8s; }

/* ==========================================================================
   Utility Classes
   ========================================================================== */
.text-center { text-align: center; }
.text-primary { color: var(--primary); }
.text-white { color: #fff; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

/* ==========================================================================
   Responsive — Tablet (max-width: 1024px)
   ========================================================================== */
@media (max-width: 1024px) {
  h1 {
    font-size: 2.25rem;
  }

  h2 {
    font-size: 1.75rem;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

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

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

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }

  .highlight {
    gap: 2rem;
  }
}

/* ==========================================================================
   Responsive — Mobile (max-width: 768px)
   ========================================================================== */
@media (max-width: 768px) {
  html {
    font-size: 15px;
  }

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  h3 {
    font-size: 1.25rem;
  }

  .section {
    padding: 3.5rem 0;
  }

  .section-header {
    margin-bottom: 2rem;
  }

  /* Header Mobile */
  .menu-toggle {
    display: flex;
  }

  .header-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 320px;
    height: 100vh;
    background-color: var(--bg);
    flex-direction: column;
    align-items: flex-start;
    padding: 5rem 2rem 2rem;
    gap: 1.5rem;
    box-shadow: -4px 0 30px rgba(0, 0, 0, 0.1);
    transition: right 0.35s ease;
    overflow-y: auto;
  }

  .header.nav-open .header-nav {
    right: 0;
  }

  .nav-links {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    width: 100%;
  }

  .nav-links a {
    display: block;
    width: 100%;
    padding: 0.75rem 0;
    font-size: 1rem;
    border-bottom: 1px solid #F1F5F9;
  }

  .nav-links a::after {
    display: none;
  }

  .header-phone {
    margin-top: 1rem;
    font-size: 1rem;
  }

  /* Hero Mobile */
  .hero {
    min-height: 85vh;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .hero-sub {
    min-height: 220px;
  }

  .hero-sub h1 {
    font-size: 1.75rem;
  }

  /* Grids Mobile */
  .services-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .team-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

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

  .contact-map {
    min-height: 300px;
  }

  .contact-map iframe {
    min-height: 300px;
  }

  .highlight {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .highlight-reverse .highlight-image {
    order: 0;
  }

  .highlight-reverse .highlight-content {
    order: 0;
  }

  /* Footer Mobile */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  /* Partners Mobile */
  .partners {
    gap: 1.5rem;
  }

  .partners img {
    max-height: 45px;
  }

  /* Page Content Mobile */
  .page-content {
    padding: 2rem 1rem;
  }

  /* Sub Nav Mobile */
  .sub-nav {
    gap: 0.4rem;
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding: 1rem 0;
    -webkit-overflow-scrolling: touch;
  }

  .sub-nav a {
    white-space: nowrap;
    flex-shrink: 0;
  }
}

/* Mobile overlay when menu is open */
.header.nav-open::before {
  content: '';
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 999;
}

.header-nav {
  z-index: 1000;
}
