/* ===== VARIABLES ===== */
:root {
  --bg:      #f5f3f0;
  --fg:      #3a3a3a;
  --primary: #1a2847;
  --secondary:#a8c5e0;
  --accent:  #d4cfc4;
  --muted:   #8b8b8b;
  --radius:  0.5rem;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg); color: var(--fg);
  -webkit-font-smoothing: antialiased;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--accent); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--secondary); }

/* ===== LAYOUT ===== */
.container { max-width: 1280px; margin: 0 auto; padding: 0 1.5rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; }
@media (max-width: 900px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}
@media (min-width: 901px) and (max-width: 1100px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

/* ===== HEADER ===== */
header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: var(--primary);
  box-shadow: 0 2px 16px rgba(0,0,0,.25);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 80px;
}
.logo-wrap { display: flex; align-items: center; gap: .75rem; text-decoration: none; }
.logo-wrap img { width: 130px; height: auto; transition: transform .3s; }
.logo-wrap:hover img { transform: scale(1.05); }
.logo-text { color: var(--secondary); font-size: .85rem; font-weight: 500; max-width: 200px; line-height: 1.3; }
@media (max-width: 600px) { .logo-text { display: none; } }

nav.desktop { display: flex; align-items: center; gap: 2rem; }
nav.desktop a {
  color: var(--bg); font-size: .9rem; font-weight: 500;
  text-decoration: none; transition: color .2s;
}
nav.desktop a:hover, nav.desktop a.active { color: var(--secondary); }
.btn-nav {
  background: var(--secondary) !important; color: var(--primary) !important;
  padding: .6rem 1.5rem; border-radius: var(--radius);
  font-weight: 600 !important; transition: background .2s, transform .2s; border: none; cursor: pointer;
}
.btn-nav:hover { background: var(--bg) !important; transform: scale(1.05); color: var(--primary) !important; }

.hamburger {
  display: none; background: none; border: none; cursor: pointer;
  color: var(--bg); padding: .5rem;
}
@media (max-width: 768px) { nav.desktop { display: none; } .hamburger { display: block; } }

#mobile-menu { display: none; background: var(--primary); border-top: 1px solid rgba(255,255,255,.1); }
#mobile-menu.open { display: block; }
#mobile-menu a {
  display: block; padding: .75rem 1.5rem;
  color: var(--bg); text-decoration: none; font-weight: 500; transition: background .2s;
}
#mobile-menu a:hover { background: rgba(255,255,255,.1); }
#mobile-menu .btn-mobile {
  display: block; background: var(--secondary); color: var(--primary);
  text-align: center; margin: .5rem 1rem 1rem; border-radius: var(--radius);
  padding: .75rem; text-decoration: none; font-weight: 600;
}

/* ===== BUTTONS ===== */
.btn-primary {
  display: inline-block; background: var(--primary); color: var(--bg);
  padding: 1rem 2rem; border-radius: var(--radius); font-weight: 700;
  font-size: 1.05rem; text-decoration: none; border: none; cursor: pointer;
  transition: background .3s, transform .2s; font-family: inherit;
}
.btn-primary:hover { background: var(--secondary); color: var(--primary); transform: scale(1.05); }
.btn-outline {
  display: inline-block; background: rgba(255,255,255,.1); color: var(--bg);
  border: 2px solid var(--bg); padding: 1rem 2rem; border-radius: var(--radius);
  font-weight: 700; font-size: 1.05rem; text-decoration: none; cursor: pointer;
  transition: background .3s, transform .2s;
}
.btn-outline:hover { background: rgba(255,255,255,.2); transform: scale(1.05); }
.btn-secondary {
  display: inline-block; background: var(--secondary); color: var(--primary);
  padding: 1rem 2.5rem; border-radius: var(--radius); font-weight: 700;
  font-size: 1.05rem; text-decoration: none; border: none; cursor: pointer;
  transition: background .3s, transform .2s; box-shadow: 0 4px 16px rgba(0,0,0,.2);
  font-family: inherit;
}
.btn-secondary:hover { background: var(--bg); transform: scale(1.05); }

/* ===== HERO ===== */
.hero {
  position: relative; min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; text-align: center;
}
.hero-bg { position: absolute; inset: 0; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; }
.hero-overlay { position: absolute; inset: 0; background: rgba(26,40,71,.85); }
.hero-content { position: relative; z-index: 2; max-width: 900px; padding: 0 1.5rem; }
.hero-content h1 {
  font-size: clamp(2.5rem, 7vw, 4.5rem); font-weight: 800;
  color: var(--bg); line-height: 1.1; margin-bottom: 1.5rem;
}
.hero-content h1 span { display: block; color: var(--secondary); margin-top: .5rem; }
.hero-content p { font-size: 1.25rem; color: rgba(245,243,240,.9); max-width: 650px; margin: 0 auto 2.5rem; line-height: 1.7; }
.hero-cta { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

.scroll-indicator { position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%); }
.scroll-indicator .wheel {
  width: 1.5rem; height: 2.5rem; border: 2px solid rgba(245,243,240,.5);
  border-radius: 999px; display: flex; align-items: flex-start;
  justify-content: center; padding: .5rem; animation: bounce 1.5s infinite;
}
.scroll-indicator .dot { width: .25rem; height: .75rem; background: rgba(245,243,240,.5); border-radius: 999px; }
@keyframes bounce { 0%,100% { transform: translateY(0); } 50% { transform: translateY(10px); } }

/* ===== SECTIONS ===== */
section { padding: 5rem 0; }
.section-title { text-align: center; margin-bottom: 4rem; }
.section-title h2 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; color: var(--primary); margin-bottom: 1rem; }
.section-title p { font-size: 1.1rem; color: var(--fg); max-width: 650px; margin: 0 auto; line-height: 1.7; }
.section-title.light h2 { color: var(--bg); }
.section-title.light p { color: rgba(245,243,240,.85); }
.bg-accent-light { background: rgba(212,207,196,.3); }

/* ===== PAGE HERO ===== */
.page-hero { background: var(--primary); padding: 7rem 0 4rem; text-align: center; }
.page-hero h1 { font-size: clamp(2.5rem, 5vw, 3.5rem); font-weight: 800; color: var(--bg); margin-bottom: 1rem; }
.page-hero p { font-size: 1.15rem; color: rgba(245,243,240,.9); max-width: 650px; margin: 0 auto; }

/* ===== FEATURE CARD ===== */
.feature-card {
  background: var(--bg); border-radius: 1rem; padding: 2rem;
  box-shadow: 0 4px 16px rgba(0,0,0,.08); border: 1px solid var(--accent);
  transition: box-shadow .3s;
}
.feature-card:hover { box-shadow: 0 8px 32px rgba(0,0,0,.14); }
.feature-icon {
  width: 3.5rem; height: 3.5rem; background: var(--primary);
  border-radius: .5rem; display: flex; align-items: center; justify-content: center; margin-bottom: 1.5rem;
}
.feature-icon svg { width: 1.75rem; height: 1.75rem; }
.feature-card h3 { font-size: 1.15rem; font-weight: 700; color: var(--primary); margin-bottom: .75rem; }
.feature-card p { color: var(--fg); line-height: 1.65; }

/* ===== CTA SECTION ===== */
.cta-section { background: var(--primary); text-align: center; }
.cta-section h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); font-weight: 800; color: var(--bg); margin-bottom: 1.5rem; }
.cta-section p { font-size: 1.1rem; color: rgba(245,243,240,.9); max-width: 550px; margin: 0 auto 2.5rem; }

/* ===== SERVICE CARD ===== */
.service-card {
  background: var(--bg); border-radius: 1rem; padding: 2rem;
  border: 1px solid var(--accent); height: 100%;
  box-shadow: 0 4px 16px rgba(0,0,0,.07); transition: box-shadow .3s;
}
.service-card:hover { box-shadow: 0 8px 32px rgba(0,0,0,.14); }
.service-card h3 { font-size: 1.15rem; font-weight: 700; color: var(--primary); margin-bottom: .75rem; }
.service-card p { color: var(--fg); line-height: 1.65; }

/* ===== PROCESS BOX ===== */
.process-box { background: var(--primary); border-radius: 1.25rem; padding: 2.5rem; color: var(--bg); }
.process-box h3 { font-size: 1.5rem; font-weight: 800; margin-bottom: 2rem; }
.process-step { display: flex; gap: 1rem; margin-bottom: 1.75rem; }
.process-step:last-child { margin-bottom: 0; }
.step-num {
  width: 2.5rem; height: 2.5rem; background: var(--secondary);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: var(--primary); flex-shrink: 0;
}
.step-info h4 { font-weight: 700; font-size: 1.05rem; margin-bottom: .25rem; }
.step-info p { color: rgba(245,243,240,.8); font-size: .9rem; line-height: 1.6; }

/* ===== CHECK LIST ===== */
.check-list { list-style: none; }
.check-list li { display: flex; gap: 1rem; align-items: flex-start; margin-bottom: 1.75rem; }
.check-circle {
  width: 2rem; height: 2rem; background: var(--secondary);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: .2rem;
}
.check-circle svg { width: 1.1rem; height: 1.1rem; stroke: var(--primary); }
.check-info h3 { font-weight: 700; font-size: 1.1rem; color: var(--primary); margin-bottom: .4rem; }
.check-info p { color: var(--fg); line-height: 1.6; }

/* ===== ABOUT ===== */
.founder-img { border-radius: 1.25rem; width: 100%; height: 500px; object-fit: cover; border: 1px solid var(--accent); box-shadow: 0 8px 32px rgba(0,0,0,.12); }
.founder-text h2 { font-size: clamp(1.8rem, 3vw, 2.5rem); font-weight: 800; color: var(--primary); margin-bottom: 1.5rem; }
.founder-text p { line-height: 1.8; color: var(--fg); margin-bottom: 1.25rem; }
.founder-text span.name { font-weight: 700; color: var(--primary); }
.collab-card { border-radius: 1rem; padding: 2rem; border: 1px solid var(--accent); }
.collab-card.blue { background: rgba(168,197,224,.2); border-color: rgba(168,197,224,.5); }
.collab-card.beige { background: rgba(212,207,196,.2); }
.collab-card h3 { font-size: 1.4rem; font-weight: 700; color: var(--primary); margin-bottom: 1rem; }
.collab-card p { color: var(--fg); line-height: 1.7; }
.commitment-section { background: var(--primary); padding: 5rem 0; text-align: center; }
.commitment-section h2 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; color: var(--bg); margin-bottom: 1.5rem; }
.commitment-section .p1 { font-size: 1.1rem; line-height: 1.8; max-width: 700px; margin: 0 auto 1.25rem; color: rgba(245,243,240,.9); }
.commitment-section .p2 { font-size: 1rem; max-width: 600px; margin: 0 auto; color: var(--secondary); }

/* ===== CONTACT ===== */
.contact-info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
@media (max-width: 768px) { .contact-info-grid { grid-template-columns: 1fr; } }
.contact-card {
  background: var(--bg); border-radius: 1rem; padding: 1.5rem;
  border: 1px solid var(--accent); text-align: center; box-shadow: 0 2px 12px rgba(0,0,0,.07);
}
.contact-icon {
  width: 3.5rem; height: 3.5rem; background: var(--primary);
  border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 1rem;
}
.contact-icon svg { width: 1.5rem; height: 1.5rem; stroke: var(--secondary); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.contact-card h3 { font-weight: 700; color: var(--primary); margin-bottom: .5rem; }
.contact-card a, .contact-card p { color: var(--fg); text-decoration: none; transition: color .2s; }
.contact-card a:hover { color: var(--primary); }

.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
.form-section h2 { font-size: 1.8rem; font-weight: 800; color: var(--primary); margin-bottom: 1.5rem; }
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-weight: 600; color: var(--primary); margin-bottom: .35rem; font-size: .9rem; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: .75rem 1rem;
  border: 1px solid var(--accent); border-radius: var(--radius);
  background: var(--bg); color: var(--fg);
  font-family: inherit; font-size: 1rem;
  transition: border-color .2s, box-shadow .2s; outline: none;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  border-color: var(--secondary); box-shadow: 0 0 0 2px rgba(168,197,224,.35);
}
.form-group textarea { resize: vertical; min-height: 120px; }
.btn-submit {
  width: 100%; padding: 1rem; background: var(--primary); color: var(--bg);
  border: none; border-radius: var(--radius); font-size: 1.05rem;
  font-weight: 700; cursor: pointer; font-family: inherit;
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  transition: background .2s, transform .2s;
}
.btn-submit:hover { background: var(--secondary); color: var(--primary); transform: scale(1.01); }
.meeting-box { background: rgba(212,207,196,.25); border-radius: 1.25rem; padding: 2rem; border: 1px solid var(--accent); }
.meeting-box-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }
.meeting-icon { width: 3rem; height: 3rem; background: var(--primary); border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.meeting-icon svg { width: 1.4rem; height: 1.4rem; stroke: var(--secondary); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.meeting-box h2 { font-size: 1.4rem; font-weight: 800; color: var(--primary); }
.meeting-box p { color: var(--fg); margin-bottom: 1rem; }
.hours-box { background: var(--bg); border-radius: .75rem; padding: 1.5rem; border: 1px solid var(--accent); margin-top: 1.5rem; }
.hours-box h3 { font-weight: 700; color: var(--primary); margin-bottom: 1rem; }
.hours-box p { color: var(--fg); margin-bottom: .4rem; }
.hours-box .note { font-size: .85rem; color: var(--muted); margin-top: .75rem; }
.contact-img { border-radius: 1.25rem; width: 100%; height: 250px; object-fit: cover; border: 1px solid var(--accent); box-shadow: 0 4px 16px rgba(0,0,0,.1); margin-bottom: 1.5rem; }
.form-success { display: none; background: #d4edda; color: #155724; border: 1px solid #c3e6cb; border-radius: var(--radius); padding: 1rem 1.25rem; margin-bottom: 1rem; font-weight: 500; }

/* ===== FOOTER ===== */
footer { background: var(--primary); color: var(--bg); padding: 4rem 0 2rem; }
.footer-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 2.5rem; margin-bottom: 2rem; }
@media (max-width: 768px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-logo { display: flex; align-items: center; gap: .75rem; margin-bottom: 1.25rem; text-decoration: none; }
.footer-logo img { width: 110px; }
.footer-logo span { color: var(--bg); font-size: .85rem; max-width: 180px; line-height: 1.3; }
.footer-sub { color: rgba(245,243,240,.75); font-size: .9rem; line-height: 1.65; }
.footer-col h3 { font-size: 1rem; font-weight: 700; margin-bottom: 1rem; }
.footer-col a { display: block; color: rgba(245,243,240,.75); text-decoration: none; font-size: .9rem; margin-bottom: .5rem; transition: color .2s; }
.footer-col a:hover { color: var(--secondary); }
.contact-item { display: flex; align-items: flex-start; gap: .75rem; margin-bottom: .75rem; }
.contact-item svg { width: 1.15rem; height: 1.15rem; stroke: var(--secondary); flex-shrink: 0; margin-top: .1rem; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.contact-item a, .contact-item span { color: rgba(245,243,240,.75); font-size: .9rem; text-decoration: none; transition: color .2s; }
.contact-item a:hover { color: var(--secondary); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.15); padding-top: 1.5rem; text-align: center; }
.footer-bottom p { color: rgba(245,243,240,.5); font-size: .85rem; }

/* ===== SVG defaults ===== */
svg { fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ===== ANIMATIONS ===== */
.fade-in { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ============================================
   CIF — Selector de localización
   ============================================ */

/* Divisor visual entre CTA y selector */
.cif-locale-divider {
  display: inline-block;
  width: 1px;
  height: 1.25rem;
  background: rgba(26, 40, 71, 0.18);
  margin: 0 .5rem;
  vertical-align: middle;
}

/* Contenedor desktop */
.cif-locale-wrap {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: #fff;
  border: 1px solid rgba(26, 40, 71, 0.14);
  border-radius: .5rem;
  padding: 2px;
}

/* Botón individual */
.cif-locale-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: .28rem .55rem;
  border: none;
  border-radius: .35rem;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  transition: background .15s ease;
  line-height: 1;
}

.cif-locale-btn:hover {
  background: var(--accent, #e8e4de);
}

.cif-locale-btn.cif-locale-active {
  background: var(--primary, #1a2e44);
}

.cif-flag {
  font-size: 14px;
  line-height: 1;
  display: inline-block;
}

.cif-code {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--primary, #1a2e44);
  line-height: 1;
}

.cif-locale-btn.cif-locale-active .cif-code {
  color: var(--secondary, #c8a96e);
}

/* Mobile: bloque dentro del menú hamburguesa */
.cif-mobile-locale {
  margin-top: 1rem;
  padding: 1.5rem; /* Aumentamos padding para dar aire */
  border-top: 1px solid rgba(255, 255, 255, 0.1); /* Consistente con el borde del menú móvil */
  display: flex;
  flex-direction: column;
  align-items: center; /* Centra la etiqueta y la fila de botones */
}

.cif-mobile-locale-label {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: .5rem;
  text-align: center;
  color: var(--bg); /* En el móvil el fondo es oscuro, cambiamos color de etiqueta */
  opacity: 0.7;
}

.cif-mobile-locale-row {
  display: inline-flex; /* Para que el fondo solo ocupe lo necesario */
  gap: 2px;
  background: rgba(255, 255, 255, 0.05); /* Fondo sutil para el contenedor */
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: .5rem;
  padding: 3px;
  justify-content: center;
}

.cif-mobile-locale-btn {
  flex-direction: row !important; /* Cambiamos de columna a fila para que sea igual al desktop */
  gap: 6px !important;
  padding: .5rem .8rem !important;
  border: none !important; /* Quitamos el borde individual */
  background: transparent;
  width: auto;
}

.cif-mobile-locale-btn .cif-flag {
  font-size: 18px;
}

.cif-mobile-locale-btn .cif-code {
  font-size: .62rem;
  color: var(--bg);
}

.cif-mobile-locale-btn.cif-locale-active {
  background: var(--secondary) !important; /* Color de realce */;
  border-color: var(--primary, #1a2e44);
}

.cif-mobile-locale-btn.cif-locale-active .cif-code {
  color: var(--primary, #1a2847);
}


/* Ocultar selector en desktop cuando está en mobile y viceversa */
@media (max-width: 768px) {
  .cif-locale-wrap,
  .cif-locale-divider {
    display: none !important;
  }
}