:root {
  --blue: #00007c;
  --blue-hover: #17179b;
}

/* Shared surfaces and controls in both themes. */
.about { background: #fff; }
.about .mission-vision, .about .mv-card, .about-visual::before { background: #fff; }
.btn { min-height: 48px; gap: 10px; }
:is(.contact-actions, .service-detail-actions, .menu-faq-actions) { gap: 12px; flex-wrap: wrap; }
#contacto .privacy-check { grid-template-columns: 20px minmax(0, 1fr); gap: 12px; margin: 4px 0; }
#contacto .privacy-check input { flex-shrink: 0; margin-top: 3px; }
#contacto .privacy-link { padding: 0; border: 0; background: transparent; color: #00007c; font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
#contacto .contact-submit { grid-column: 1 / -1; margin-top: 8px; padding: 14px 20px; }
/* Contact needs its own breathing room rather than the shared CTA card shell. */
#contacto.cta { padding: clamp(48px, 6vw, 88px) 0; }
#contacto .cta-box {
  width: min(calc(100% - 64px), 1400px);
  max-width: 1400px;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.35fr);
  gap: clamp(36px, 4vw, 64px);
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}
#contacto .contact-intro { padding: 24px 0; }
#contacto .contact-intro h2 { max-width: 540px; font-size: clamp(36px, 3.8vw, 52px); line-height: 1.12; margin-bottom: 24px; }
#contacto .contact-intro p:not(.kicker) { line-height: 1.8; margin-bottom: 32px; }
#contacto .contact-actions { gap: 16px; }
#contacto .contact-actions .btn { min-height: 48px; padding: 12px 20px; }
#contacto .contact-card { width: 100%; max-width: none; min-width: 0; padding: clamp(24px, 2.5vw, 36px); gap: 18px 24px; border-radius: 16px; }
#contacto .field-paired { grid-column: auto; }
#contacto .contact-help { margin-bottom: 4px; font-size: 14px; line-height: 1.75; }
#contacto .field { gap: 9px; }
#contacto .privacy-check { margin: 2px 0; line-height: 1.75; color: #526078; }
#contacto textarea.form-control { min-height: 104px; line-height: 1.6; }
#contacto .contact-submit { min-height: 54px; margin-top: 4px; }
@media (max-width: 991.98px) {
  #contacto .cta-box { grid-template-columns: 1fr; gap: 32px; max-width: 720px; }
  #contacto .contact-intro { padding: 0; }
  #contacto .contact-intro h2 { max-width: 620px; }
}
@media (max-width: 560px) {
  #contacto .cta-box { width: calc(100% - 32px); gap: 28px; }
  #contacto .contact-card { grid-template-columns: 1fr; padding: 24px 20px; gap: 20px; }
  #contacto .contact-intro h2 { font-size: clamp(30px, 8vw, 40px); }
  #contacto .privacy-check { font-size: 13px; }
}
.privacy-modal .modal-content { border-radius: 16px; }
.privacy-modal .modal-body { padding: 24px; line-height: 1.75; }
.privacy-modal .modal-body h3 { margin: 24px 0 8px; font-size: 18px; }
.privacy-modal .modal-body a { text-decoration: underline; }

/* The site switch stays visible outside the collapsed mobile navigation. */
.topbar .site-theme-toggle {
  order: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  margin-left: 16px;
  padding: 0;
  border: 1px solid #dfe3ef;
  border-radius: 50%;
  background: #f7f8fc;
  color: var(--blue);
  font-size: 19px;
  cursor: pointer;
}
.site-theme-toggle:hover { background: #eceef8; }
.site-theme-toggle:focus-visible { outline: 3px solid #ffc400; outline-offset: 3px; }
@media (max-width: 991.98px) {
  .topbar .brand { margin-right: auto !important; }
  .topbar .site-theme-toggle { order: 0; margin-left: 8px; margin-right: 8px; }
  .topbar .navbar-toggler { order: 1; }
  .topbar .navbar-collapse { order: 2; }
}

html[data-theme="dark"] {
  color-scheme: dark;
  --blue: #242449;
  --blue-hover: #34405f;
  --ink: #f1f3fa;
  --muted: #b5bfd2;
  --paper: #141824;
  --panel: #1c2232;
  --soft: #181e2c;
  --cream: #202438;
  --mint: #252b42;
  --rose: #202438;
  --line: #353d51;
  --theme-accent: #b6bdff;
  --section-label-color: #d8ddff;
}
html[data-theme="dark"] body { background: #111520; color: var(--ink); }
html[data-theme="dark"] :is(.hero, .about, .why, .story, .team, .home-services, .home-projects, .guide, .plans, .plans-grid, .faq, .service-landing, .service-hero, .service-fit, .service-faq, .menu-plan-section, .menu-audience, .menu-modules, .menu-value-strip, .menu-product-hero) { background: #141824; }
html[data-theme="dark"] :is(.home-service-card, .service, .service-detail, .include-card, .why-card, .mv-card, .story-card, .team-card, .plan-card, .plan-visual, .plan-limit, .portfolio-item, .case, .contact-intro, .contact-card, .menu-mini-card, .menu-value-card, .menu-module-card, .menu-plan-card, .menu-audience-card, .menu-faq-panel, .menu-plan-summary, .menu-plan-inherits, .cta-box, .hero-float, .proof-item, .menu-phone, .menu-phone-body, .menu-dish-card, .menu-category-pills span) { background: #1c2232; border-color: #353d51; }
html[data-theme="dark"] .home-projects .guide-card,
html[data-theme="dark"] #contacto .contact-card,
html[data-theme="dark"] .hero .proof { background: #1c2232; border-color: #353d51; }
html[data-theme="dark"] .hero .proof .proof-item { background: transparent; }
html[data-theme="dark"] .hero .proof .proof-item:hover { background: #252c40; }
html[data-theme="dark"] :is(.topbar, .landing-nav) { background: rgba(20,24,36,.97); border-color: #353d51; }
html[data-theme="dark"] .brand img {
  content: url("../images/brand/LOGO-BLANCO-AMARILLO-PUNZA-2026.png");
  aspect-ratio: 2 / 1;
  object-fit: cover;
  background: transparent;
  border-radius: 0;
  padding: 0;
}
html[data-theme="dark"] .topbar :is(.navbar-collapse, .services-dropdown, .menu .nav-link) { background: #141824; }
html[data-theme="dark"] .topbar :is(.nav-link, .nav-services-toggle) { color: #e7eaff; }
html[data-theme="dark"] .topbar .nav-link:is(:hover, .active) { color: #fff; background: #2b3150; }
html[data-theme="dark"] .topbar .services-dropdown .dropdown-item { background: #1c2232; border-color: #353d51; color: #fff; }
html[data-theme="dark"] .topbar .services-dropdown .dropdown-item strong { color: #fff; }
html[data-theme="dark"] .topbar .services-dropdown .dropdown-item span { color: #b5bfd2; }
html[data-theme="dark"] .topbar .services-dropdown .dropdown-item:is(:hover, :focus-visible, .all-services) { background: var(--blue); }
html[data-theme="dark"] .topbar :is(.site-theme-toggle, .navbar-toggler) { background: #252c40; border-color: #424b63; color: #fff; }
html[data-theme="dark"] .topbar .menu-toggle-lines span { background: #fff; }
html[data-theme="dark"] main :is(h1, h2, h3, h4) { color: #f1f3fa !important; }
html[data-theme="dark"] main :is(.kicker, .eyebrow, .faq-contact a, .quote-cta, .contact-link, .home-services-all) { color: var(--theme-accent); }
html[data-theme="dark"] :is(.hero .proof strong, .hero .proof .proof-label, .home-projects .home-project-category, .home-projects .guide-card p, .home-service-copy p, .service-list, .faq-description, .faq-contact p, .contact-card label, .menu-plan-list) { color: #b5bfd2; }
html[data-theme="dark"] .hero .proof strong { color: var(--theme-accent); }
html[data-theme="dark"] :is(.home-service-icon, .hero .proof .proof-icon, .service-tabs .nav-link, .portfolio-tabs .nav-link, .team-arrow, .clients-arrow, .home-services-slider-nav button, .menu-plan-nav) { background: #252c40; color: var(--theme-accent); border-color: #424b63; }
html[data-theme="dark"] :is(.service-tabs .nav-link, .portfolio-tabs .nav-link).active { background: var(--blue); color: #fff; }
html[data-theme="dark"] .faq :is(.accordion-item, .accordion-button),
html[data-theme="dark"] .service-faq :is(.accordion-item, .accordion-button) { background: #1c2232; border-color: #353d51; color: #f1f3fa; }
html[data-theme="dark"] .faq .accordion-body,
html[data-theme="dark"] .service-faq .accordion-body { color: #b5bfd2; }
html[data-theme="dark"] .faq .accordion-button::before { color: #b5bfd2; }
html[data-theme="dark"] .faq .accordion-button::after { background: #303951; color: #fff; }
html[data-theme="dark"] .faq .accordion-button:not(.collapsed)::after { background: var(--yellow); color: #fff; }
html[data-theme="dark"] :is(input, textarea, select, #contacto .form-control, #contacto .form-select) { background: #141824; color: #f1f3fa; border-color: #424b63; }
html[data-theme="dark"] :is(input, textarea)::placeholder { color: #9ba8bf; }
html[data-theme="dark"] #contacto .field > label { color: #d8dff0; }
html[data-theme="dark"] #contacto :is(.form-control, .form-select):focus { background: #141824; color: #fff; border-color: #b6bdff; }
html[data-theme="dark"] #contacto .contact-status { background: #252c40; color: #d8dff0; }
html[data-theme="dark"] .feed-modal .modal-content { background: #1c2232; color: #fff; }
html[data-theme="dark"] :is(.home-services-help, .home-process, .service-process, .home-process .step, .service-process .step) { color: #fff; }
html[data-theme="dark"] :is(.btn.primary, .btn.primary:hover, .process-icon, .faq-contact-icon, .team-role-icon, .service-list i, .tick i) { color: #fff; }
/* The WhatsApp panel keeps its independent light appearance. */
html[data-theme="dark"] .floating-contact-panel { color-scheme: light; }
/* Override the older shared FAQ rules that explicitly force a white theme. */
html[data-theme="dark"] :is(.faq, .service-faq) { background: #141824 !important; }
html[data-theme="dark"] :is(.faq, .service-faq) :is(.accordion-item, .accordion-button, .accordion-body) { background: #1c2232 !important; color: #f1f3fa !important; border-color: #353d51 !important; box-shadow: none !important; }
html[data-theme="dark"] :is(.faq, .service-faq) :is(p, .accordion-body) { color: #b5bfd2 !important; }
html[data-theme="dark"] .faq-contact { background: #1c2232; border-color: #353d51; }
html[data-theme="dark"] :is(.tick, .menu-plan-summary, .menu-plan-inherits) { background: #1c2232; color: #e3e8f5; }
html[data-theme="dark"] :is(.home-services .section-head > p, .home-service-card li, .service-detail p, .plan-card li, .contact-help, .menu-product-hero .lead, .menu-audience-card p, .menu-plan-setup, .menu-plan-position, .menu-plan-list li, .menu-plan-list li strong) { color: #b5bfd2; }
html[data-theme="dark"] :is(.service-crumb, .service-crumb strong, .breadcrumbs a, .breadcrumb a, .plan-limit, .team-card strong, .menu-title-highlight, .menu-dish-price, .menu-category-pills span, .menu-plan-includes, .home-services-slider-count) { color: #b6bdff; }
html[data-theme="dark"] :is(.breadcrumb, .breadcrumbs) a { color: #b6bdff; }
html[data-theme="dark"] .topbar .navbar-toggler::before { background: #252c40; }
html[data-theme="dark"] .seo-breadcrumb a,
html[data-theme="dark"] .faq h2 span { color: #b6bdff; }
html[data-theme="dark"] #contacto .contact-help,
html[data-theme="dark"] .menu-plan-section .section-head > p { color: #b5bfd2; }
html[data-theme="dark"] .menu-digital-page .menu-plan-head { background: #252c40; }
html[data-theme="dark"] .menu-digital-page .menu-plan-card .menu-plan-includes,
html[data-theme="dark"] .menu-plan-setup > strong { color: #b6bdff; }

/* Nosotros: keep the photo frame and mission/vision group in the dark palette. */
html[data-theme="dark"] .about .mission-vision { background: #181e2c; border-color: #353d51; }
html[data-theme="dark"] .about .mv-card { background: #1c2232; border-color: #353d51; }
html[data-theme="dark"] .about .mv-card .text-icon { background: #2b3450; color: #d8ddff; }
html[data-theme="dark"] .about-visual::before { background: #1c2232; border-color: #353d51; }

/* Theme the containers too, so gaps never expose a white background. */
html[data-theme="dark"] :is(.service-tabs, .portfolio-tabs, .accordion) { background: transparent; }
html[data-theme="dark"] .service-tabs .nav-link i { color: #b6bdff; }
html[data-theme="dark"] .service-tabs .nav-link.active i { color: var(--yellow); }
html[data-theme="dark"] .service-tabs .nav-link:is(:hover, :focus-visible) { background: #303b57; border-color: #8793be; color: #fff; }
html[data-theme="dark"] :is(.faq, .service-faq) .accordion { --bs-accordion-bg: transparent; --bs-accordion-border-color: #353d51; }
html[data-theme="dark"] :is(.faq, .service-faq) .accordion-button::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m3 6 5 5 5-5'/%3E%3C/svg%3E");
}
html[data-theme="dark"] :is(.faq-contact, .privacy-modal .modal-content) { background: #1c2232; border-color: #353d51; color: #f1f3fa; }
html[data-theme="dark"] .faq-contact-icon { background: var(--yellow); color: #fff; }
html[data-theme="dark"] #contacto .contact-intro { background: transparent; }
html[data-theme="dark"] #contacto .privacy-link { color: #d8ddff; }
html[data-theme="dark"] #contacto .cta-box { background: transparent; }
html[data-theme="dark"] #contacto .privacy-check { color: #c9d1e3; }
html[data-theme="dark"] #contacto :is(.form-control, .form-select)::placeholder { color: #b5bfd2; opacity: 1; }
html[data-theme="dark"] #contacto .form-select { --bs-form-select-bg-img: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23d8ddff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3E%3C/svg%3E"); }
html[data-theme="dark"] #contacto .form-select:invalid { color: #b5bfd2; }
html[data-theme="dark"] #contacto .contact-submit { background: #4545ba; color: #fff; }
html[data-theme="dark"] #contacto .contact-submit:is(:hover, :focus-visible) { background: #5656cc; }
html[data-theme="dark"] .privacy-modal :is(.modal-header, .modal-footer) { border-color: #353d51; }
html[data-theme="dark"] .privacy-modal .btn-close { filter: invert(1); }

/* Hover settles into a steady highlight while the pointer remains over a link. */
@media (min-width: 992px) {
  html[data-theme="dark"] .topbar .menu > .nav-link,
  html[data-theme="dark"] .topbar .menu > .nav-item > .nav-link {
    background-color: transparent;
    background-image: linear-gradient(#ffc400, #ffc400);
    background-repeat: no-repeat;
    background-position: center bottom;
    background-size: 0% 2px;
    transition: background-size .24s ease, color .24s ease;
  }
  html[data-theme="dark"] .topbar .menu .nav-link.active { background-size: 45% 2px; color: #fff; }
  html[data-theme="dark"] .topbar .menu .nav-link:is(:hover, :focus-visible),
  html[data-theme="dark"] .topbar .nav-services.is-hover-open > .nav-link {
    background-color: transparent;
    background-size: 100% 2px;
    color: #fff;
  }
}
@media (hover: hover) and (pointer: fine) {
  html[data-theme="dark"] .topbar .services-dropdown .dropdown-item {
    transition: background-color .22s ease, border-color .22s ease, box-shadow .22s ease;
  }
  html[data-theme="dark"] .topbar .services-dropdown .dropdown-item:is(:hover, :focus-visible) {
    background: #29334d;
    border-color: #8793be;
    box-shadow: inset 3px 0 0 #ffc400, 0 4px 16px rgba(0,0,0,.12);
  }
  html[data-theme="dark"] .topbar .services-dropdown .dropdown-item > i { transition: transform .22s ease, background-color .22s ease; }
  html[data-theme="dark"] .topbar .services-dropdown .dropdown-item:is(:hover, :focus-visible) > i { transform: translateY(-2px); color: #fff; }
}
@media (prefers-reduced-motion: reduce) {
  html[data-theme="dark"] .topbar .menu .nav-link,
  html[data-theme="dark"] .topbar .services-dropdown .dropdown-item,
  html[data-theme="dark"] .topbar .services-dropdown .dropdown-item > i { transition: none; }
  html[data-theme="dark"] .topbar .services-dropdown .dropdown-item:is(:hover, :focus-visible) > i { transform: none; }
}
