@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@300;400;500;600;700;800&display=swap');

/* ==========================================
   CSS CUSTOM PROPERTIES (DESIGN SYSTEM)
   ========================================== */
:root {
  --primary: #0a8491;         /* Deep Teal - Clinical, Sterile, Professional */
  --primary-dark: #075a63;    /* Hover State Teal */
  --primary-light: #e6f7f8;   /* Soft Background Teal */
  --secondary: #0f172a;       /* Slate 900 - Premium Contrast Dark Blue */
  --secondary-light: #1e293b; /* Slate 800 */
  --accent: #00e5ff;          /* Electric Cyan - High-Tech Highlights */
  --gold: #f59e0b;            /* Gold - Trust & Excellence */
  --text: #334155;            /* Slate 700 - Body Text */
  --text-muted: #64748b;      /* Slate 500 - Secondary/Muted Text */
  --bg-light: #f8fafc;        /* Slate 50 - Background */
  --bg-white: #ffffff;        
  
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  
  --shadow-sm: 0 2px 4px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 10px 20px -5px rgba(15, 23, 42, 0.08), 0 4px 6px -2px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 20px 25px -5px rgba(15, 23, 42, 0.1), 0 10px 10px -5px rgba(15, 23, 42, 0.04);
  --shadow-glass: 0 8px 32px 0 rgba(10, 132, 145, 0.08);
  
  --border-radius-sm: 8px;
  --border-radius-md: 16px;
  --border-radius-lg: 24px;
  --border-radius-full: 9999px;
  
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --max-width: 1200px;
}

/* ==========================================
   BASE RESET & TYPOGRAPHY
   ========================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-body);
  color: var(--text);
  background-color: var(--bg-light);
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--secondary);
  font-weight: 700;
  line-height: 1.25;
}

h1 { font-size: 3rem; }
h2 { font-size: 2.25rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.25rem; }

p {
  margin-bottom: 1.25rem;
}

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

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

ul, ol {
  list-style: none;
}

/* ==========================================
   UTILITY CLASSES & LAYOUT
   ========================================== */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 5rem 0;
}

.section-dark {
  background-color: var(--secondary);
  color: #f8fafc;
}

.section-dark h2, .section-dark h3, .section-dark h4 {
  color: #ffffff;
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 3.5rem;
}

.section-subtitle {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--primary);
  font-weight: 700;
  margin-bottom: 0.75rem;
  display: inline-block;
}

.section-dark .section-subtitle {
  color: var(--accent);
}

.section-title {
  position: relative;
  padding-bottom: 1rem;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background-color: var(--primary);
  border-radius: var(--border-radius-full);
}

.section-dark .section-title::after {
  background-color: var(--accent);
}

.text-gradient {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.bg-teal-gradient {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
}

/* ==========================================
   BUTTONS
   ========================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.8rem;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  border-radius: var(--border-radius-full);
  border: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition-smooth);
  gap: 0.5rem;
}

.btn-primary {
  background-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(10, 132, 145, 0.3);
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(10, 132, 145, 0.4);
}

.btn-secondary {
  background-color: var(--secondary);
  color: #ffffff;
}

.btn-secondary:hover {
  background-color: var(--secondary-light);
  transform: translateY(-2px);
}

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

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

.btn-white {
  background-color: #ffffff;
  color: var(--primary);
  box-shadow: var(--shadow-md);
}

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

.btn-accent {
  background-color: var(--accent);
  color: var(--secondary);
  font-weight: 700;
}

.btn-accent:hover {
  background-color: #00b0ff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 229, 255, 0.4);
}

/* ==========================================
   INFO TOP BAR & HEADER / NAVIGATION
   ========================================== */
.top-bar {
  background-color: var(--secondary);
  color: #e2e8f0;
  font-size: 0.85rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.top-bar-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.top-bar-info {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.info-item a {
  color: #ffffff;
  font-weight: 500;
}

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

.top-bar-socials {
  display: flex;
  gap: 1rem;
}

.top-bar-socials a:hover {
  color: var(--accent);
}

/* Main Header */
.main-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
}

.main-header.scrolled {
  background-color: #ffffff;
  box-shadow: var(--shadow-md);
  padding: 0.25rem 0;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-img {
  height: 48px;
  width: auto;
  border-radius: var(--border-radius-sm);
  flex-shrink: 0;
}

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

.logo-title {
  font-size: 1.3rem;
  color: var(--primary);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.5px;
}

.logo-tagline {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

/* Navigation Links */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.8rem;
}

.nav-link {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--secondary);
  position: relative;
  padding: 0.5rem 0;
}

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

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

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

.header-cta {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 20px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 1100;
  flex-shrink: 0;
}

.hamburger span {
  width: 100%;
  height: 3px;
  background-color: var(--secondary);
  border-radius: 3px;
  transition: var(--transition-smooth);
  transform-origin: left center;
}

/* Mobile Drawer Menu */
.mobile-nav {
  position: fixed;
  top: 0;
  right: -100%;
  width: 300px;
  height: 100vh;
  background-color: var(--bg-white);
  box-shadow: -10px 0 30px rgba(0,0,0,0.1);
  z-index: 1050;
  padding: 6rem 2rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  transition: var(--transition-smooth);
}

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

.mobile-nav .nav-link {
  font-size: 1.15rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid #f1f5f9;
}

.mobile-nav-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(4px);
  z-index: 1040;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-nav-backdrop.show {
  display: block;
  opacity: 1;
}

/* Hamburger active transformation */
.hamburger.active span:nth-child(1) {
  transform: rotate(45deg);
}
.hamburger.active span:nth-child(2) {
  width: 0%;
  opacity: 0;
}
.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg);
}

/* ==========================================
   FOOTER SECTION
   ========================================== */
.footer {
  background-color: var(--secondary);
  color: #94a3b8;
  padding: 5rem 0 2rem;
  border-top: 4px solid var(--primary);
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 3rem;
  margin-bottom: 4rem;
}

.footer-brand .logo-title {
  color: #ffffff;
}

.footer-brand .logo-tagline {
  color: #64748b;
}

.footer-desc {
  margin-top: 1.5rem;
  font-size: 0.95rem;
  line-height: 1.7;
}

.footer-socials {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.footer-socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--border-radius-full);
  background-color: rgba(255, 255, 255, 0.05);
  color: #cbd5e1;
}

.footer-socials a:hover {
  background-color: var(--primary);
  color: #ffffff;
  transform: translateY(-3px);
}

.footer-title {
  font-family: var(--font-heading);
  color: #ffffff;
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 1.75rem;
  position: relative;
  padding-bottom: 0.75rem;
}

.footer-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 30px;
  height: 2px;
  background-color: var(--primary);
}

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

.footer-links a {
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-links a::before {
  content: '→';
  color: var(--primary);
  font-weight: bold;
  transition: var(--transition-smooth);
}

.footer-links a:hover {
  color: #ffffff;
  padding-left: 5px;
}

.footer-links a:hover::before {
  color: var(--accent);
}

.footer-hours-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  font-size: 0.9rem;
}

.footer-hour-row {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px dashed rgba(255,255,255,0.08);
  padding-bottom: 0.5rem;
}

.footer-hour-row span:last-child {
  color: #ffffff;
  font-weight: 500;
}

.footer-hour-row.highlight span {
  color: var(--accent);
  font-weight: 600;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
}

.footer-bottom-links {
  display: flex;
  gap: 1.5rem;
}

.footer-bottom-links a:hover {
  color: #ffffff;
}

/* ==========================================
   FLOATING BUTTONS
   ========================================== */
.floating-actions {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  z-index: 999;
}

.float-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: var(--border-radius-full);
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
  transition: var(--transition-smooth);
  color: #ffffff;
}

.float-btn:hover {
  transform: scale(1.1) translateY(-3px);
}

.float-btn.whatsapp {
  background-color: #25d366;
}

.float-btn.call {
  background-color: var(--primary);
}

/* ==========================================
   SCROLL ANIMATIONS UTILITIES
   ========================================== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-left.active {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(50px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-right.active {
  opacity: 1;
  transform: translateX(0);
}

/* ==========================================
   RESPONSIVE MEDIA QUERIES (FULL MOBILE FIXES)
   ========================================== */
@media (max-width: 1024px) {
  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
  }
}

@media (max-width: 992px) {
  .detail-grid {
    grid-template-columns: 1fr !important;
  }
  .contact-grid {
    grid-template-columns: 1fr !important;
  }
  .contact-main-grid {
    grid-template-columns: 1fr !important;
  }
  .about-story {
    grid-template-columns: 1fr !important;
  }
  .doctor-grid {
    grid-template-columns: 1fr !important;
  }
  .infra-grid {
    grid-template-columns: 1fr !important;
  }
  .contact-cards-grid {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 768px) {
  h1 { font-size: 2rem !important; }
  h2 { font-size: 1.65rem !important; }
  h3 { font-size: 1.35rem !important; }
  h4 { font-size: 1.15rem !important; }
  
  .section {
    padding: 3rem 0;
  }
  
  /* Hiding the top-bar completely on mobile prevents wrapping/overlaps */
  .top-bar {
    display: none !important;
  }
  
  .nav-menu, .header-cta-btn {
    display: none !important;
  }
  
  .hamburger {
    display: flex !important;
  }
  
  /* Optimize Header/Logo Text on Mobile */
  .logo-link {
    max-width: 70%;
  }

  .logo-text {
    max-width: calc(100vw - 120px) !important; /* leaves space for logo image and hamburger to avoid overlaps */
  }

  .logo-title {
    font-size: 1.05rem !important;
  }
  
  .logo-tagline {
    font-size: 0.55rem !important;
    letter-spacing: 0.2px !important;
  }
  
  .logo-img {
    height: 38px !important;
  }
  
  /* Card Padding Reductions on Mobile */
  .stat-card {
    padding: 1.5rem 1.25rem !important;
  }

  .tech-card {
    padding: 1.25rem 1rem !important;
  }

  .review-card {
    padding: 1.5rem 1.25rem !important;
  }

  .contact-form-box {
    padding: 1.75rem 1.25rem !important;
  }

  /* Grid stacks for all pages */
  .services-overview-grid {
    grid-template-columns: 1fr !important;
  }

  .tech-grid {
    grid-template-columns: 1fr !important;
  }

  .reviews-grid {
    grid-template-columns: 1fr !important;
  }

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

  .stats-grid {
    grid-template-columns: 1fr !important;
  }

  .tech-list {
    grid-template-columns: 1fr !important;
  }

  .benefit-grid {
    grid-template-columns: 1fr !important;
  }

  .cosmetic-services-grid {
    grid-template-columns: 1fr !important;
  }
  
  .footer-top {
    grid-template-columns: 1fr !important;
    gap: 2rem;
  }
  
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
  
  .footer-bottom-links {
    justify-content: center;
  }
  
  .floating-actions {
    bottom: 1.5rem;
    right: 1.5rem;
  }
  
  .float-btn {
    width: 48px;
    height: 48px;
  }

  /* Adjust subpage images size on mobile */
  .general-service-block img {
    height: 200px !important;
  }

  .detail-main img.main-service-img {
    height: 220px !important;
  }

  .gallery-item {
    height: 180px !important;
  }
}

@media (max-width: 576px) {
  .form-row {
    grid-template-columns: 1fr !important;
    gap: 0 !important;
  }
  .form-group {
    margin-bottom: 1rem !important;
  }
}

@media (max-width: 480px) {
  h1 { font-size: 1.75rem !important; }
  h2 { font-size: 1.45rem !important; }
  h3 { font-size: 1.2rem !important; }

  .container {
    padding: 0 1rem !important;
  }

  .gallery-grid {
    grid-template-columns: 1fr !important;
  }
  
  .infra-images {
    grid-template-columns: 1fr !important;
  }

  .appointment-box {
    padding: 1.5rem 1rem !important;
  }
}
