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

:root {
  --primary: #0284c7; /* Vibrant blue */
  --primary-light: #38bdf8;
  --primary-dark: #0369a1;
  --accent: #0ea5e9;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --bg-main: #f8fafc;
  --bg-card: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.5);
  --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  background-image: 
    radial-gradient(at 0% 0%, hsla(199,89%,80%,1) 0, transparent 50%), 
    radial-gradient(at 100% 0%, hsla(210,100%,85%,1) 0, transparent 50%);
  background-attachment: fixed;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-bottom: 60px; /* Space for sticky footer */
}

/* Glassmorphism Utilities */
.glass {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: 16px;
}

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

/* Header & Navbar */
#header-placeholder {
  display: contents; /* Allows header to stick correctly relative to body */
}

header {
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 1rem 0;
  background: white; /* Make header white for the logo */
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
  transition: var(--transition);
}

header.scrolled {
  background: #ffffff;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.nav-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--primary-dark);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo span {
  color: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-main);
  font-weight: 500;
  position: relative;
  padding: 0.5rem 0;
  transition: var(--transition);
}

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

.btn-contact {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  color: white !important;
  padding: 0.75rem 1.5rem !important;
  border-radius: 999px;
  font-weight: 600 !important;
  box-shadow: 0 4px 15px rgba(2, 132, 199, 0.3);
  transition: var(--transition);
  display: inline-block;
  text-decoration: none;
}

.btn-contact:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(2, 132, 199, 0.4);
}

.btn-white {
  background: white !important;
  color: var(--primary-dark) !important;
  box-shadow: 0 4px 15px rgba(255, 255, 255, 0.3);
}

.btn-white:hover {
  box-shadow: 0 6px 20px rgba(255, 255, 255, 0.5);
  transform: translateY(-2px);
}

/* Dropdown */
.dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 240px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  padding: 1rem 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: var(--transition);
  list-style: none;
  z-index: 10;
  white-space: nowrap; /* Prevent normal dropdown from wrapping text */
}

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

.dropdown-menu li {
  margin-bottom: 0;
}

.dropdown-menu a {
  display: block;
  padding: 0.75rem 1.5rem;
  color: #475569;
}

.dropdown-menu a:hover {
  background: rgba(2, 132, 199, 0.05);
  color: var(--primary);
  padding-left: 2rem;
}

/* Mega Menu */
.mega-dropdown {
  position: static; /* Relative to the nav container */
}

.mega-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: white;
  width: 700px;
  max-width: 90vw;
  box-shadow: 0 20px 50px rgba(0,0,0,0.15);
  border-radius: 16px;
  padding: 2rem;
  display: flex;
  gap: 2rem;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 100;
  border: 1px solid rgba(0,0,0,0.05);
}

.mega-dropdown:hover .mega-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.mega-links {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  border-right: 1px solid #e2e8f0;
  padding-right: 2rem;
}

.mega-links a {
  padding: 0.75rem 1rem;
  display: block;
  color: #475569;
  font-weight: 500;
  border-radius: 8px;
  transition: all 0.2s;
  white-space: nowrap;
}

.mega-links a:hover {
  background: rgba(2, 132, 199, 0.05);
  color: var(--primary);
  padding-left: 1.5rem;
}

.mega-preview {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.mega-preview img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  transition: all 0.3s;
}

.mega-preview p {
  color: #64748b;
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0;
}

/* Hero Section */
.hero {
  padding: 8rem 0 6rem;
  text-align: center;
  position: relative;
  animation: fadeUp 1s ease-out;
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 1.5rem;
  line-height: 1.1;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--text-main) 0%, var(--primary-dark) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 800px;
  margin: 0 auto 3rem;
  font-weight: 400;
  letter-spacing: -0.01em;
}

/* Services Grid */
.services {
  padding: 4rem 0;
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 3rem;
  color: var(--primary-dark);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.card {
  padding: 2.5rem;
  text-align: center;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

.card:hover::before {
  transform: scaleX(1);
}

.card-icon {
  width: 64px;
  height: 64px;
  background: rgba(2, 132, 199, 0.1);
  color: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin-bottom: 1.5rem;
  transition: var(--transition);
}

.card:hover .card-icon {
  background: var(--primary);
  color: white;
  transform: scale(1.1) rotate(5deg);
}

.card h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--text-main);
}

.card p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
}

.card-link:hover {
  gap: 0.75rem;
  color: var(--primary-dark);
}

/* Footer */
footer {
  margin-top: auto;
  background: #0f172a;
  color: white;
  padding: 4rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  margin-bottom: 3rem;
}

.footer-col h4 {
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
  color: var(--primary-light);
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 0.75rem;
}

.footer-col a {
  color: #cbd5e1;
  text-decoration: none;
  transition: var(--transition);
}

.footer-col a:hover {
  color: white;
  padding-left: 5px;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
}

/* Page Headers */
.page-header {
  padding: 6rem 0 4rem;
  text-align: center;
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.1) 0%, rgba(14, 165, 233, 0.05) 100%);
  margin-bottom: 4rem;
}

.page-header h1 {
  font-size: 3rem;
  color: var(--primary-dark);
  margin-bottom: 1rem;
}

/* Content Typography Improvements */
.content-section {
  max-width: 800px;
  margin: 0 auto 6rem;
  background: white;
  padding: 3.5rem;
  border-radius: 24px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.04);
  animation: fadeUp 1s ease-out;
}

.content-section h2 {
  color: var(--primary-dark);
  margin-bottom: 1.5rem;
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.content-section p {
  margin-bottom: 1.75rem;
  color: #475569;
  font-size: 1.15rem;
  line-height: 1.8;
}

.content-section ul {
  margin-bottom: 2rem;
  padding-left: 1.5rem;
  color: #475569;
  font-size: 1.15rem;
  line-height: 1.8;
}

.content-section li {
  margin-bottom: 0.75rem;
}

/* Animations */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.card {
  animation: fadeUp 0.8s ease-out backwards;
}
.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.2s; }
.card:nth-child(3) { animation-delay: 0.3s; }
.card:nth-child(4) { animation-delay: 0.4s; }
.card:nth-child(5) { animation-delay: 0.5s; }
.card:nth-child(6) { animation-delay: 0.6s; }

/* Global CTA Banner */
.cta-banner {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  padding: 5rem 0;
  margin-top: 4rem;
  border-radius: 24px;
  margin-left: 2rem;
  margin-right: 2rem;
  margin-bottom: -3rem; /* Overlap with footer slightly */
  position: relative;
  z-index: 10;
  box-shadow: 0 20px 40px rgba(2, 132, 199, 0.2);
}

/* Exit Intent Popup */
.exit-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s ease;
  padding: 1rem;
  box-sizing: border-box;
}

.exit-popup-overlay.active {
  opacity: 1;
  visibility: visible;
}

.exit-popup-content {
  background: white;
  width: 100%;
  max-width: 500px;
  border-radius: 20px;
  padding: 3rem 2rem;
  text-align: center;
  position: relative;
  transform: translateY(20px) scale(0.95);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  box-sizing: border-box;
}

.exit-popup-overlay.active .exit-popup-content {
  transform: translateY(0) scale(1);
}

.exit-popup-close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #64748b;
  cursor: pointer;
  transition: color 0.3s;
}

.exit-popup-close:hover {
  color: #ef4444;
}

.exit-popup-icon {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  display: inline-block;
  animation: float 3s ease-in-out infinite;
}

.exit-popup-title {
  font-size: 1.8rem;
  color: var(--primary-dark);
  margin-bottom: 1rem;
  font-weight: 800;
}

.exit-popup-text {
  color: #475569;
  font-size: 1.05rem;
  line-height: 1.6;
  margin-bottom: 2rem;
}

.exit-popup-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.exit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 1rem;
  border-radius: 12px;
  color: white;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  transition: all 0.3s ease;
}

.exit-btn-phone { background: var(--primary); }
.exit-btn-phone:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: 0 10px 15px -3px rgba(2, 132, 199, 0.3); }
.exit-btn-wa { background: #25D366; }
.exit-btn-wa:hover { background: #128C7E; transform: translateY(-2px); box-shadow: 0 10px 15px -3px rgba(37, 211, 102, 0.3); }

@media (min-width: 480px) {
  .exit-popup-actions {
    flex-direction: row;
  }
  .exit-btn {
    flex: 1;
  }
}

/* Bottom Action Bar */
.bottom-action-bar {
  position: fixed !important;
  bottom: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 60px !important;
  display: flex !important;
  z-index: 99999 !important;
  box-shadow: 0 -4px 15px rgba(0,0,0,0.1);
  background: white;
}

.action-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: white;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  transition: background 0.3s;
}

.btn-p { background-color: var(--primary); }
.btn-p:hover { background-color: var(--primary-dark); }
.btn-w { background-color: #25D366; }
.btn-w:hover { background-color: #128C7E; }

/* Mobile Menu */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 2rem;
  color: var(--primary-dark);
  cursor: pointer;
  z-index: 1001;
}

@media (min-width: 769px) {
  .mobile-close-btn, .mobile-menu-header {
    display: none !important;
  }
}

/* Responsive */
@media (max-width: 768px) {
  /* Footer Accordion */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
  
  .footer-col {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  
  .footer-col:last-child {
    border-bottom: none;
  }

  .footer-col > h4 {
    cursor: pointer;
    position: relative;
    padding: 1.25rem 2rem 1.25rem 0;
    margin-bottom: 0;
    display: flex;
    align-items: center;
  }
  
  .footer-col > h4::after {
    content: "▼";
    position: absolute;
    right: 0.5rem;
    font-size: 0.8rem;
    color: var(--primary);
    transition: transform 0.3s ease;
  }
  
  .footer-col.active > h4::after {
    transform: rotate(180deg);
  }
  
  .footer-col-content {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s ease, opacity 0.4s ease, padding 0.4s ease;
  }
  
  .footer-col.active .footer-col-content {
    max-height: 600px;
    opacity: 1;
    padding-bottom: 1.5rem;
  }

  #site-logo {
    max-height: 50px !important;
  }

  .nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
  }

  .mobile-menu-btn {
    display: block;
    margin-left: auto;
  }


  
  .nav-wrapper nav {
    display: none;
  }
  
  .nav-wrapper nav.active-mobile {
    display: block;
  }
  
  .mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.5);
    z-index: 990; /* Must be below header's 1000 */
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
  }
  
  .mobile-overlay.active {
    opacity: 1;
    visibility: visible;
  }

  .nav-links {
    position: fixed;
    top: 0;
    left: -100%;
    right: auto;
    width: 100vw;
    max-width: 100vw;
    height: 100vh;
    background: #ffffff;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 0;
    margin: 0;
    gap: 0;
    overflow-y: auto;
    z-index: 1001;
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    box-shadow: 10px 0 30px rgba(0,0,0,0.15);
  }
  
  .nav-links.active {
    left: 0;
  }

  .mobile-menu-header {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    height: 4.5rem;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 0 0 1.5rem;
    z-index: 10;
    box-sizing: border-box;
  }
  
  .mobile-menu-title {
    color: white;
    font-size: 1.3rem;
    font-weight: 700;
  }

  .mobile-close-btn {
    width: 4.5rem;
    height: 4.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    font-size: 2rem;
    color: white;
    cursor: pointer;
  }
  
  .nav-links > li:nth-of-type(1) > a::before { content: "🏠"; margin-right: 12px; }
  .nav-links > li:nth-of-type(2) > a::before { content: "🏢"; margin-right: 12px; }
  .nav-links > li:nth-of-type(3) > a::before { content: "👨‍⚕️"; margin-right: 12px; }
  .nav-links > li:nth-of-type(4) > a::before { content: "🧹"; margin-right: 12px; }
  .nav-links > li:nth-of-type(5) > a::before { content: "❓"; margin-right: 12px; }
  .nav-links > li:nth-of-type(6) > a::before { content: "📞"; margin-right: 12px; }

  .nav-links li {
    width: 100%;
    text-align: left;
    margin-bottom: 0;
  }

  .nav-links > li > a {
    font-size: 1.05rem;
    padding: 0.65rem 1.5rem;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    border: none;
    border-bottom: 1px solid #e2e8f0;
    border-radius: 0;
    color: #475569;
    font-weight: 500;
  }
  
  /* Reset arrow location to right for dropdowns */
  .dropdown > a::after {
    margin-left: auto;
  }

  /* Reset mega menus for mobile */
  .mega-menu, .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    box-shadow: none;
    border: none;
    background: transparent;
    transform: none;
    width: 100%;
    max-width: 100%;
    padding: 0 0 0 1rem; /* Indent submenus */
    display: none;
  }

  .dropdown:hover .mega-menu,
  .dropdown:hover .dropdown-menu,
  .mega-dropdown:hover .mega-menu,
  .dropdown.mobile-open .mega-menu,
  .dropdown.mobile-open .dropdown-menu,
  .mega-dropdown.mobile-open .mega-menu {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    transform: none;
  }

  .dropdown-menu a, .mega-links a {
    text-align: left;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    white-space: normal;
    border: none;
    border-bottom: 1px solid #f1f5f9;
    border-radius: 0;
  }
  .dropdown-menu li:last-child a, .mega-links a:last-child {
    border-bottom: none;
  }

  .mega-links {
    border-right: none;
    padding-right: 0;
    width: 100%;
    align-items: flex-start;
  }

  .mega-preview { display: none; }

  .hero h1 { font-size: 2.5rem; }
  .section-title { font-size: 2rem; }
  .content-section { padding: 2rem; }
}

/* Utilities */
.text-center { text-align: center; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mt-4 { margin-top: 1rem; }

/* Contact Specific */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}
.contact-info {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}
.contact-icon {
  font-size: 2rem;
  color: var(--primary);
}
@media (max-width: 768px) {
  .contact-grid { grid-template-columns: 1fr; }
  .cta-banner {
    margin-left: 1rem;
    margin-right: 1rem;
    padding: 4rem 1.5rem;
  }
  .floating-actions {
    bottom: 20px;
    left: 20px;
  }
  .fab-btn {
    width: 50px;
    height: 50px;
  }
  .fab-btn svg {
    width: 24px;
    height: 24px;
  }
}
