/* ==========================================================================
   CSS SYSTEM - ODONTOLOGÍA INTEGRAL (GOLDEN RATIO DRIVEN)
   ========================================================================== */

:root {
  /* Golden Ratio Constant */
  --phi: 1.618;

  /* Color Palette - Premium, Medical Trust & Elegance */
  --c-primary: #524364;      /* Dark Mauve / Plum - Trust, Medical */
  --c-secondary: #A084B7;    /* Lavanda / Lila - Premium, Softness */
  --c-secondary-hover: #886A9E;
  --c-accent: #F9F5FB;       /* Very light lavender - Cleanliness */
  --c-white: #FFFFFF;
  --c-text: #3A3240;         /* Dark Slate with purple tint */
  --c-text-muted: #756D7A;
  --c-light: #F6EDFA;        /* Subtle cool lilac for alt bg */

  /* Typography Scale (Golden Ratio based) */
  --font-sans: 'Inter', sans-serif;
  --font-serif: 'Playfair Display', serif;
  
  --text-hero: calc(1rem * 4.236); /* ~67px */
  --text-h2: calc(1rem * 2.618);   /* ~42px */
  --text-h3: calc(1rem * 1.618);   /* ~26px */
  --text-body: 1rem;               /* 16px */
  --text-small: calc(1rem / 1.618);/* ~10px */

  /* Spacing Scale (Golden Ratio based) */
  --sp-xs: calc(1rem / 1.618); /* ~10px */
  --sp-sm: 1rem;               /* 16px */
  --sp-md: calc(1rem * 1.618); /* ~26px */
  --sp-lg: calc(1rem * 2.618); /* ~42px */
  --sp-xl: calc(1rem * 4.236); /* ~67px */
  --sp-xxl: calc(1rem * 6.854);/* ~110px */

  /* Transitions & Shadows */
  --t-fast: 0.3s ease;
  --t-smooth: 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-sm: 0 4px 10px rgba(0,0,0,0.05);
  --shadow-md: 0 10px 30px rgba(0,0,0,0.08);
  --shadow-gold: 0 10px 30px rgba(160, 132, 183, 0.15);
}

/* ==========================================================================
   RESET & GLOBAL
   ========================================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: var(--font-sans);
  color: var(--c-text);
  background-color: var(--c-white);
  line-height: var(--phi);
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  color: var(--c-primary);
  margin-bottom: var(--sp-sm);
  line-height: 1.2;
}

h1 { font-size: var(--text-hero); }
h2 { font-size: var(--text-h2); margin-bottom: var(--sp-md); }
h3 { font-size: var(--text-h3); }

p {
  margin-bottom: var(--sp-sm);
}

a {
  text-decoration: none;
  color: var(--c-primary);
  transition: var(--t-fast);
}

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

/* ==========================================================================
   LAYOUT & CONTAINERS
   ========================================================================== */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

.section-padding {
  padding: var(--sp-xxl) 0;
}

.pt-header {
  padding-top: calc(var(--sp-xxl) + 90px); /* Offset for fixed header */
}

.bg-light { background-color: var(--c-light); }
.bg-primary { background-color: var(--c-primary); color: var(--c-white); }
.bg-accent { background-color: var(--c-accent); }

.text-center { text-align: center; }
.text-white { color: var(--c-white); }
.text-muted { color: var(--c-text-muted); }

/* Golden Ratio Splits (61.8% / 38.2%) */
.split-golden {
  display: grid;
  grid-template-columns: 1.618fr 1fr;
  gap: var(--sp-xl);
  align-items: center;
}

.split-golden-reverse {
  display: grid;
  grid-template-columns: 1fr 1.618fr;
  gap: var(--sp-xl);
  align-items: center;
}

.golden-width {
  max-width: 61.8%;
}
.mx-auto {
  margin-left: auto;
  margin-right: auto;
}

/* ==========================================================================
   COMPONENTS
   ========================================================================== */

/* Buttons */
.btn {
  display: inline-block;
  padding: var(--sp-xs) var(--sp-md);
  font-family: var(--font-sans);
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--t-fast);
  text-align: center;
}

.btn-primary {
  background-color: var(--c-secondary);
  color: var(--c-white);
}
.btn-primary:hover {
  background-color: var(--c-secondary-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-gold);
}

.btn-secondary {
  background-color: transparent;
  color: var(--c-primary);
  border-color: var(--c-primary);
}
.btn-secondary:hover {
  background-color: var(--c-primary);
  color: var(--c-white);
}

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

.btn-text {
  color: var(--c-secondary);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  margin-top: var(--sp-sm);
}
.btn-text:hover {
  color: var(--c-primary);
  transform: translateX(5px);
}

.w-100 { width: 100%; }
.mt-4 { margin-top: var(--sp-lg); }
.mt-5 { margin-top: var(--sp-xl); }
.mb-4 { margin-bottom: var(--sp-lg); }
.mb-5 { margin-bottom: var(--sp-xl); }

/* ==========================================================================
   HEADER & NAVIGATION
   ========================================================================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  box-shadow: 0 2px 20px rgba(0,0,0,0.05);
  transition: var(--t-fast);
}

.navbar-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 90px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon-box {
  width: auto;
  height: 50px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.logo-icon-box img {
  width: auto;
  height: 100%;
  object-fit: contain;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

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

.logo-title {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--c-primary);
  line-height: 1;
  white-space: nowrap;
}

.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: var(--sp-md);
}

.nav-links a {
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--c-text);
  position: relative;
}

.nav-links a:not(.btn-nav)::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0%;
  height: 2px;
  background-color: var(--c-secondary);
  transition: var(--t-fast);
}

.nav-links a:not(.btn-nav):hover::after {
  width: 100%;
}

.btn-nav {
  background-color: var(--c-primary);
  color: var(--c-white) !important;
  padding: 8px 20px;
  border-radius: 20px;
}
.btn-nav:hover {
  background-color: var(--c-secondary);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
}
.hamburger span {
  width: 30px;
  height: 2px;
  background-color: var(--c-primary);
  transition: var(--t-fast);
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -20%;
  right: -10%;
  width: 50%;
  height: 100%;
  background: var(--c-accent);
  border-radius: 50%;
  z-index: -1;
  filter: blur(80px);
  opacity: 0.7;
}

.hero-content .subtitle {
  color: var(--c-secondary);
  font-weight: 600;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.hero-content .description {
  font-size: 1.1rem;
  color: var(--c-text-muted);
  margin-bottom: var(--sp-lg);
}

.hero-actions {
  display: flex;
  gap: var(--sp-sm);
}

.image-wrapper {
  position: relative;
}

.golden-frame {
  position: relative;
  padding-bottom: 120%; /* creates a tall aspect ratio */
  border-radius: 8px;
  overflow: hidden;
}

.golden-frame img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gold-border {
  border: 4px solid var(--c-secondary);
  padding: 10px;
  background: var(--c-white);
  padding-bottom: calc(120% + 20px);
}

/* ==========================================================================
   LA ESPECIALISTA
   ========================================================================== */
.experience-badge {
  position: absolute;
  bottom: -20px;
  right: -20px;
  background: var(--c-secondary);
  color: var(--c-white);
  width: 120px;
  height: 120px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  box-shadow: var(--shadow-md);
  z-index: 10;
}
.experience-badge .years {
  font-size: 2rem;
  font-weight: 700;
  font-family: var(--font-serif);
  line-height: 1;
}
.experience-badge .text {
  font-size: 0.8rem;
  text-align: center;
  line-height: 1.2;
}

.highlight-text {
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--c-primary);
  margin-bottom: var(--sp-md);
}

.education ul {
  list-style: none;
  margin-bottom: var(--sp-md);
}
.education ul li {
  margin-bottom: var(--sp-xs);
  position: relative;
  padding-left: var(--sp-md);
}
.education ul li::before {
  content: '•';
  color: var(--c-secondary);
  font-size: 1.5rem;
  position: absolute;
  left: 0;
  top: -4px;
}

/* ==========================================================================
   SERVICIOS
   ========================================================================== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--sp-lg);
  margin-top: var(--sp-xl);
}

.service-card {
  background: var(--c-white);
  padding: var(--sp-lg);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  transition: var(--t-smooth);
  border-bottom: 3px solid transparent;
}
.service-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-md);
  border-bottom-color: var(--c-secondary);
}

.service-icon {
  color: var(--c-secondary);
  margin-bottom: var(--sp-sm);
}

/* ==========================================================================
   ATENCIÓN A DOMICILIO
   ========================================================================== */
.features-box ul {
  list-style: none;
  margin: var(--sp-md) 0;
}
.features-box ul li {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  margin-bottom: var(--sp-sm);
  font-size: 1.1rem;
}
.features-box ul li svg {
  width: 24px;
  height: 24px;
  color: var(--c-secondary);
}

.inline-icon {
  display: inline-block;
  vertical-align: middle;
  margin-right: 4px;
  color: var(--c-secondary);
}

/* Abstract Golden Spiral Representation */
.golden-spiral-graphic {
  position: relative;
  width: 100%;
  aspect-ratio: 1.618 / 1;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.rect {
  border: 1px solid rgba(160, 132, 183, 0.3); /* secondary color faint */
  position: absolute;
}
.r1 { width: 100%; height: 100%; }
.r2 { width: 61.8%; height: 100%; right: 0; border-left: 1px solid rgba(160,132,183,0.3); border-bottom: 1px solid rgba(160,132,183,0.3); }
.r3 { width: 100%; height: 61.8%; top: 0; }
.r4 { width: 61.8%; height: 100%; left: 0; }
.r5 { width: 100%; height: 61.8%; bottom: 0; }

.spiral-text {
  font-family: var(--font-serif);
  font-size: var(--text-h2);
  color: var(--c-secondary);
  text-align: center;
  z-index: 2;
  line-height: 1.1;
  text-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

/* ==========================================================================
   PARA PROFESIONALES
   ========================================================================== */
.profesionales-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-lg);
  margin-top: var(--sp-xl);
}

.prof-card {
  background: var(--c-white);
  padding: var(--sp-xl) var(--sp-lg);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
}

.prof-card.highlight {
  background: var(--c-primary);
  color: var(--c-white);
}

.prof-card.highlight h3 {
  color: var(--c-secondary);
}

.prof-icon {
  color: var(--c-secondary);
  margin-bottom: var(--sp-md);
}

.prof-card ul {
  list-style: none;
}
.prof-card ul li {
  margin-bottom: var(--sp-sm);
  padding-left: 20px;
  position: relative;
}
.prof-card ul li::before {
  content: '✓';
  color: var(--c-secondary);
  position: absolute;
  left: 0;
  font-weight: bold;
}

.text-left { text-align: left; }

/* ==========================================================================
   CASOS REALES
   ========================================================================== */
.casos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--sp-lg);
  margin-top: var(--sp-xl);
}

.caso-card {
  background: var(--c-white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--t-smooth);
}
.caso-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-5px);
}

.caso-img-wrapper {
  position: relative;
  padding-bottom: 61.8%; /* Golden Ratio */
  overflow: hidden;
}
.caso-img-wrapper img {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  object-fit: cover;
  transition: var(--t-smooth);
}
.caso-card:hover .caso-img-wrapper img {
  transform: scale(1.05);
}

.caso-body {
  padding: var(--sp-md);
}

.caso-body h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
}

.textual-card {
  background: var(--c-primary);
  color: var(--c-white);
}
.textual-card h3 {
  color: var(--c-secondary);
}
.flex-center {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
}
.quote-icon {
  font-family: var(--font-serif);
  font-size: 4rem;
  color: var(--c-secondary);
  line-height: 0;
  margin-bottom: 20px;
  opacity: 0.3;
}
.testimonial {
  font-style: italic;
  font-size: 1.1rem;
  margin-bottom: var(--sp-md);
}
.testimonial-author {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.7);
}

.legal-note {
  font-size: 0.85rem;
  color: var(--c-text-muted);
  font-style: italic;
}

/* ==========================================================================
   CONTACTO
   ========================================================================== */
.contact-list {
  margin-top: var(--sp-lg);
}
.contact-item {
  display: flex;
  gap: var(--sp-md);
  margin-bottom: var(--sp-md);
}
.c-icon {
  color: var(--c-secondary);
  flex-shrink: 0;
}
.contact-item h4 {
  margin-bottom: 5px;
  font-family: var(--font-sans);
  font-size: 1rem;
}
.text-link {
  color: var(--c-secondary);
  font-weight: 600;
}

.form-container {
  background: var(--c-white);
  padding: var(--sp-lg);
  border-radius: 8px;
  box-shadow: var(--shadow-md);
}

.form-container h3 {
  margin-bottom: var(--sp-md);
}

.form-group {
  margin-bottom: var(--sp-sm);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-family: var(--font-sans);
  font-size: 1rem;
  transition: var(--t-fast);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--c-secondary);
  box-shadow: 0 0 0 3px rgba(160, 132, 183, 0.1);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer {
  background-color: var(--c-primary);
  color: rgba(255,255,255,0.7);
  padding: var(--sp-xl) 0 var(--sp-lg);
}

.footer-logo-link {
  display: inline-block;
  text-decoration: none;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: var(--sp-md);
  margin-bottom: var(--sp-lg);
}

.footer-links a {
  color: rgba(255,255,255,0.9);
}
.footer-links a:hover {
  color: var(--c-secondary);
}

.copyright {
  font-size: 0.9rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: var(--sp-md);
}

/* ==========================================================================
   FLOATING WHATSAPP
   ========================================================================== */
.floating-wa {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background-color: #25D366;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
  z-index: 1000;
  transition: var(--t-fast);
}

.floating-wa:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
}

/* ==========================================================================
   ANIMATIONS (Micro-interactions)
   ========================================================================== */
.animate-fade-in-up {
  animation: fadeInUp 1s var(--t-smooth) forwards;
}

.animate-fade-in-left {
  animation: fadeInLeft 1s var(--t-smooth) forwards;
}

.reveal-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ==========================================================================
   RESPONSIVE DESIGN (Media Queries)
   ========================================================================== */
@media (max-width: 992px) {
  :root {
    --text-hero: calc(1rem * 3);
    --text-h2: calc(1rem * 2);
  }
  
  .split-golden,
  .split-golden-reverse {
    grid-template-columns: 1fr;
    gap: var(--sp-lg);
  }
  
  .golden-width {
    max-width: 100%;
  }
  
  .profesionales-grid {
    grid-template-columns: 1fr;
  }
  
  .golden-frame {
    padding-bottom: 70%;
  }
  .gold-border {
    padding-bottom: calc(70% + 20px);
  }
}

@media (max-width: 768px) {
  .hamburger {
    display: flex;
    z-index: 1001;
  }
  
  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background: var(--c-white);
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    transition: var(--t-smooth);
    padding-top: 100px;
  }
  
  .nav-menu.active {
    right: 0;
  }
  
  .nav-links {
    flex-direction: column;
    align-items: flex-start;
    padding: 0 var(--sp-md);
  }
  
  .hamburger.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  .hamburger.active span:nth-child(2) {
    opacity: 0;
  }
  .hamburger.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }
  
  .hero-actions {
    flex-direction: column;
  }
}
