/*
Theme Name: Costa de Veracruz
Theme URI:
Author: UXEN
Author URI:
Description: Landing page sencilla y bilingüe (Español / Inglés) para Costa de Veracruz. Tema clásico, ligero y traducible, con las páginas: Inicio, Sobre Nosotros, Nuestras Marcas y Contacto. El home se entrega como wireframe por secciones, listo para reemplazar con el contenido final.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: costadeveracruz
Domain Path: /languages
Tags: landing-page, custom-menu, custom-logo, translation-ready, two-columns
*/

/* =========================================================
   1. Variables y reset base
   ========================================================= */
:root {
  --color-text: #1c2e4d;
  --color-muted: #5d6b82;
  --color-bg: #ffffff;
  --color-bg-alt: #f3f5f9;
  --color-line: #d8dce4;
  --color-accent: #194182;
  --color-accent-dark: #13315f;
  --color-orange: #c06c28;
  --color-orange-dark: #a85c20;
  --color-lemon: #bccc81;
  --wire-fill: #e9ebef;
  --wire-line: #b9bfc8;
  --container: 1140px;
  /* Escala de radios (sistema de diseño) */
  --radius-sm: 10px;   /* botones, inputs, chips, pills */
  --radius-tile: 14px; /* recuadros de icono */
  --radius: 16px;      /* tarjetas y superficies */
  --radius-pill: 999px;
  /* Sombras de tarjeta */
  --shadow-card: 0 24px 60px rgba(18,47,95,.08);
  --shadow-card-hover: 0 40px 80px rgba(18,47,95,.15);
  --space: 1.5rem;
  --font: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-head: "Fraunces", Georgia, "Times New Roman", serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
}

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

a { color: var(--color-accent); text-decoration: none; }
a:hover, a:focus { color: var(--color-accent-dark); text-decoration: underline; }

h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; font-family: var(--font-head); }
h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.25rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1rem; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

/* Accesibilidad */
.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--color-text); color: #fff;
  padding: .75rem 1rem; z-index: 1000; border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; color: #fff; }

/* =========================================================
   2. Botones
   ========================================================= */
.btn {
  display: inline-block;
  padding: .8rem 1.5rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  border: 2px solid var(--color-accent);
  background: var(--color-accent);
  color: #fff;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.btn:hover, .btn:focus { background: var(--color-accent-dark); border-color: var(--color-accent-dark); color: #fff; text-decoration: none; }
.btn--ghost { background: transparent; color: var(--color-accent); }
.btn--ghost:hover, .btn--ghost:focus { background: var(--color-accent); color: #fff; }

/* Iconos SVG inline */
.cdv-icon { display: inline-block; vertical-align: middle; flex: none; }

/* =========================================================
   3. Cabecera y navegación
   ========================================================= */
.site-header {
  background: var(--color-bg);
  border-top: 3px solid var(--color-orange);
  border-bottom: 1px solid var(--color-line);
  position: sticky; top: 0; z-index: 100;
  transition: box-shadow .25s ease;
}
.site-header.is-scrolled { box-shadow: 0 10px 30px rgba(18,47,95,.09); }
.site-header__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  min-height: 78px;
}
.site-branding { justify-self: start; }

/* Marca */
.site-title {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--color-text);
  letter-spacing: -.01em;
}
.site-title:hover { text-decoration: none; color: var(--color-text); }
.site-title__mark {
  display: inline-grid; place-items: center;
  width: 36px; height: 36px;
  border-radius: var(--radius-tile);
  background: var(--color-accent);
  color: var(--color-lemon);
}
.site-title__text { white-space: nowrap; }
.custom-logo { display: block; height: auto; max-height: 52px; width: auto; }
.site-logo-link { display: inline-flex; }
.site-logo { display: block; height: 56px; width: auto; }
@media (max-width: 600px) { .site-logo { height: 46px; } }

/* Navegación (centrada) */
.main-navigation { justify-self: center; display: flex; align-items: center; }
.nav-menu, #primary-menu {
  list-style: none; display: flex; gap: 1.9rem; margin: 0; padding: 0;
}
.nav-menu a, #primary-menu a {
  color: var(--color-text); font-weight: 600; font-size: .95rem; padding: .25rem 0;
  border-bottom: 2px solid transparent;
  transition: color .2s ease, border-color .2s ease;
}
.nav-menu a:hover, #primary-menu a:hover,
.nav-menu .current-menu-item > a, #primary-menu .current-menu-item > a {
  text-decoration: none; color: var(--color-orange); border-bottom-color: var(--color-orange);
}

/* Acciones (idioma + CTA) */
.site-header__actions { justify-self: end; display: flex; align-items: center; gap: .9rem; }

/* Botón CTA del header (corregido: flex centrado) */
.btn--sm {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  min-height: 44px; padding: 0 20px; font-size: 12px; font-weight: 700;
  letter-spacing: .02em; line-height: 1;
}
.btn--sm .cdv-icon { margin-top: -1px; }
.header-cta { background: var(--color-orange); border-color: var(--color-orange); color: #fff; }
.header-cta:hover, .header-cta:focus { background: var(--color-orange-dark); border-color: var(--color-orange-dark); color: #fff; }
.header-cta--mobile, .nav-mobile-foot { display: none; } /* solo dentro del menú móvil */

/* Conmutador de idioma (banderas México / USA) */
.lang-switcher { list-style: none; display: flex; align-items: center; gap: .5rem; margin: 0; padding: 0; }
.lang-switcher .lang-link {
  display: block; width: 30px; height: 21px; border-radius: 5px; overflow: hidden;
  opacity: .5; filter: grayscale(.35);
  box-shadow: 0 0 0 1px rgba(18,47,95,.14);
  transition: opacity .2s ease, filter .2s ease, transform .2s ease, box-shadow .2s ease;
}
.lang-switcher .lang-link:hover { opacity: .9; filter: grayscale(0); transform: translateY(-1px); }
.lang-switcher .lang-link.is-active { opacity: 1; filter: none; box-shadow: 0 0 0 2px var(--color-accent); }
.lang-switcher .flag { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Botón hamburguesa (móvil) — se anima a una X */
.menu-toggle {
  display: none;
  position: relative;
  width: 46px; height: 46px; padding: 0;
  background: transparent; border: 0; border-radius: var(--radius-sm);
  cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: background .2s ease;
}
.menu-toggle:hover, .menu-toggle[aria-expanded="true"] { background: var(--color-bg-alt); }
.menu-toggle__bar,
.menu-toggle__bar::before,
.menu-toggle__bar::after {
  position: absolute; left: 50%; top: 50%;
  width: 24px; height: 2.5px; border-radius: 3px;
  background: var(--color-accent);
}
.menu-toggle__bar { transform: translate(-50%, -50%); transition: background .15s ease; }
.menu-toggle__bar::before, .menu-toggle__bar::after { content: ""; left: 0; }
.menu-toggle__bar::before { top: -7px; transition: transform .25s ease; }
.menu-toggle__bar::after  { top: 7px;  transition: transform .25s ease; }
.menu-toggle[aria-expanded="true"] .menu-toggle__bar { background: transparent; }
.menu-toggle[aria-expanded="true"] .menu-toggle__bar::before { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle__bar::after  { transform: translateY(-7px) rotate(-45deg); }

/* =========================================================
   4. Secciones genéricas / wireframe
   ========================================================= */
.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section--alt { background: var(--color-bg-alt); }
.section__head { max-width: 720px; margin: 0 auto 2.5rem; text-align: center; }
.section__head .eyebrow {
  display: inline-block; font-size: .75rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--color-muted); margin-bottom: .5rem;
}
.lead { font-size: 1.15rem; color: var(--color-muted); }

/* Etiqueta de aviso de wireframe */
.wire-note {
  display: inline-block; font-size: .75rem; color: var(--color-muted);
  background: repeating-linear-gradient(45deg, var(--wire-fill), var(--wire-fill) 8px, #fff 8px, #fff 16px);
  border: 1px dashed var(--wire-line); border-radius: 4px; padding: .25rem .6rem; margin-top: 1rem;
}

/* Bloque marcador de posición */
.placeholder {
  background: var(--wire-fill);
  border: 1px dashed var(--wire-line);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  color: var(--color-muted); font-size: .85rem; text-align: center; padding: 1rem;
}
.placeholder--img { aspect-ratio: 16 / 10; }
.placeholder--logo { aspect-ratio: 3 / 2; font-weight: 600; }
.placeholder--map { min-height: 320px; }

/* =========================================================
   5. Hero
   ========================================================= */
.hero { padding: clamp(3rem, 8vw, 6rem) 0; background: var(--color-bg-alt); }
.hero__inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero__cta { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }
.hero__media .placeholder { aspect-ratio: 4 / 3; }

/* =========================================================
   6. Grids
   ========================================================= */
.grid { display: grid; gap: 1.5rem; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--brands { grid-template-columns: repeat(4, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--color-bg); border: 1px solid var(--color-line);
  border-radius: var(--radius); padding: 1.5rem;
}
.card .num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--color-bg-alt); color: var(--color-accent); font-weight: 700; margin-bottom: 1rem;
}

/* =========================================================
   7. Bloque CTA
   ========================================================= */
.cta-band { background: var(--color-text); color: #fff; text-align: center; }
.cta-band h2 { color: #fff; }
.cta-band p { color: #cdd2da; max-width: 560px; margin-inline: auto; }
.cta-band .btn--ghost { color: #fff; border-color: #fff; }
.cta-band .btn--ghost:hover { background: #fff; color: var(--color-text); }

/* =========================================================
   8. Páginas internas
   ========================================================= */
.page-hero { padding: clamp(2.5rem, 6vw, 4rem) 0; background: var(--color-bg-alt); text-align: center; }
.page-content { padding: clamp(2.5rem, 6vw, 4rem) 0; }
.entry-content { max-width: 760px; margin-inline: auto; }
.entry-content > * { margin-bottom: 1rem; }

/* Contacto */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: start; }
.contact-info dl { margin: 0; }
.contact-info dt { font-weight: 700; margin-top: 1rem; }
.contact-info dd { margin: 0; color: var(--color-muted); }
.form-row { margin-bottom: 1rem; }
.form-row label { display: block; font-weight: 600; margin-bottom: .35rem; }
.form-row input, .form-row textarea {
  width: 100%; padding: .7rem .8rem; border: 1px solid var(--color-line);
  border-radius: var(--radius-sm); font: inherit; background: var(--color-bg);
}
.form-row textarea { min-height: 140px; resize: vertical; }

/* =========================================================
   9. Pie de página (branded)
   ========================================================= */
.site-footer {
  background: #11294f;
  color: #c3cddf;
  margin-top: 0;
  border-top: 4px solid #c06c28;
}
.site-footer__top {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1.1fr 1fr;
  gap: 48px;
  padding: 72px 0 52px;
}
.site-footer__brand .footer-logo {
  display: inline-block;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -.01em;
  color: #fff;
  text-decoration: none;
}
.site-footer__brand .footer-logo:hover { color: #bccc81; text-decoration: none; }
.footer-logo-link { display: inline-block; background: #fff; padding: 14px 18px; border-radius: var(--radius); box-shadow: 0 10px 30px rgba(0,0,0,.18); }
.footer-logo-img { display: block; height: 64px; width: auto; }
.site-footer__brand p {
  margin: 1.1rem 0 0;
  max-width: 330px;
  line-height: 1.75;
  color: #93a3c2;
  font-size: .95rem;
}
.footer-col h4 {
  margin: 0 0 1.3rem;
  color: #fff;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  padding-bottom: .7rem;
  border-bottom: 1px solid rgba(192,108,40,.55);
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .7rem; }
.footer-col li { color: #93a3c2; font-size: .95rem; line-height: 1.5; }
.footer-col a { color: #c3cddf; text-decoration: none; transition: color .2s ease; }
.footer-col a:hover { color: #bccc81; text-decoration: none; }

/* Contacto con iconos */
.footer-contact li { display: flex; align-items: flex-start; gap: .65rem; }
.footer-contact .cdv-icon { color: #c06c28; margin-top: 2px; }

/* Exportación con banderas */
.footer-export li { display: flex; align-items: center; gap: .7rem; }
.footer-export .flag {
  width: 22px;
  height: 15px;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(255,255,255,.14);
  display: block;
  flex: none;
}

/* Redes sociales */
.footer-social { display: flex; gap: .6rem; margin-top: 1.4rem; }
.footer-social__link {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.16);
  color: #c3cddf;
  transition: background .2s ease, color .2s ease, border-color .2s ease, transform .2s ease;
}
.footer-social__link:hover {
  background: #c06c28;
  border-color: #c06c28;
  color: #fff;
  transform: translateY(-3px);
}

.site-footer__bottom { border-top: 1px solid rgba(255,255,255,.08); }
.site-footer__bottom .container {
  padding-top: 1.4rem;
  padding-bottom: 1.4rem;
  text-align: center;
}
.site-footer__bottom p { margin: 0; color: #7e8cab; font-size: .85rem; }

@media (max-width: 900px) {
  .site-footer__top { grid-template-columns: 1fr 1fr; gap: 34px 40px; padding: 60px 0 44px; }
}
@media (max-width: 600px) {
  .site-footer .container { padding-inline: 1.6rem; }
  .site-footer__top { grid-template-columns: 1fr; gap: 36px; padding: 48px 0 40px; }
  .site-footer__brand p { max-width: none; margin-top: 1rem; }
  .site-footer__brand .footer-social { margin-top: 20px; }
  .footer-col h4 { margin-bottom: 1.1rem; }
  .site-footer__bottom .container { justify-content: center; text-align: center; padding-top: 1.5rem; padding-bottom: 1.5rem; }
}

/* =========================================================
   10. Responsive
   ========================================================= */
@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .grid--brands { grid-template-columns: repeat(3, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
}

/* Header — tablet y móvil (menú hamburguesa) */
@media (max-width: 980px) {
  .site-header__inner { display: flex; align-items: center; }
  .site-branding { margin-right: auto; }
  .site-header__actions { order: 2; gap: .55rem; }
  .site-header__actions .header-cta { display: none; } /* el CTA del bar se oculta */
  .menu-toggle { display: block; order: 3; }
  /* La barra (logo, idioma, X) queda por encima del overlay */
  .site-branding, .site-header__actions, .menu-toggle { position: relative; z-index: 2; }

  /* Menú a PANTALLA COMPLETA */
  .main-navigation {
    position: fixed; inset: 0; width: 100%; z-index: 1;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--color-bg);
    padding: 92px 26px 30px; /* el top libra la barra del header */
    overflow-y: auto;
    opacity: 0; visibility: hidden;
    transition: opacity .3s ease, visibility .3s ease;
  }
  .main-navigation.is-open { opacity: 1; visibility: visible; }

  .nav-menu, #primary-menu { flex-direction: column; gap: 0; width: 100%; }
  .nav-menu a, #primary-menu a {
    display: block; padding: 1.1rem .25rem; font-size: 1.5rem; font-weight: 600;
    color: var(--color-text); border: 0; border-bottom: 1px solid var(--color-line);
    border-radius: 0; transition: color .18s ease;
  }
  .nav-menu li:first-child a, #primary-menu li:first-child a { border-top: 1px solid var(--color-line); }
  .nav-menu a:hover, #primary-menu a:hover,
  .nav-menu .current-menu-item > a, #primary-menu .current-menu-item > a {
    background: transparent; color: var(--color-orange);
  }

  /* Pie del menú: botón + redes, pegados abajo */
  .nav-mobile-foot { display: block; margin-top: auto; padding-top: 30px; }
  .header-cta--mobile {
    display: inline-flex; width: 100%; justify-content: center; gap: .5rem;
    min-height: 56px; font-size: 13px;
  }
  .nav-mobile-social { display: flex; justify-content: center; gap: .75rem; margin-top: 22px; }
  .nav-mobile-social a {
    display: inline-grid; place-items: center; width: 48px; height: 48px;
    border-radius: 50%; border: 1px solid var(--color-line); color: var(--color-accent);
    transition: background .2s ease, color .2s ease, border-color .2s ease, transform .2s ease;
  }
  .nav-mobile-social a:hover { background: var(--color-orange); border-color: var(--color-orange); color: #fff; transform: translateY(-3px); }
}

/* Bloquea el scroll del fondo cuando el menú está abierto */
html.nav-open, html.nav-open body { overflow: hidden; }

@media (max-width: 600px) {
  .site-header__inner { min-height: 64px; gap: .6rem; }
  .site-logo { height: 44px; }
  .lang-switcher .lang-link { width: 26px; height: 18px; }
  .grid--2 { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .grid--3, .grid--brands { grid-template-columns: repeat(2, 1fr); }
}

/* =========================================================
 * Grupo flotante de redes (todas las páginas)
 * WhatsApp es el botón principal y va al final: con la columna
 * flex queda abajo del todo, al alcance del pulgar.
 * ========================================================= */
.cdv-float {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: center; /* centrados respecto al de WhatsApp, que es el más ancho */
  gap: 12px;
}

/* Todos los botones miden lo mismo; solo cambia el color de cada red. */
.cdv-float__btn {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  color: #fff;
  box-shadow: 0 6px 16px rgba(18, 47, 95, .22);
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.cdv-float__btn:hover,
.cdv-float__btn:focus {
  color: #fff;
  transform: translateY(-3px) scale(1.05);
  text-decoration: none;
}
.cdv-float__btn .cdv-icon { width: 26px; height: 26px; }

.cdv-float__btn--facebook { background: #1877f2; }
.cdv-float__btn--facebook:hover,
.cdv-float__btn--facebook:focus { background: #0f5fd0; box-shadow: 0 10px 22px rgba(24, 119, 242, .45); }

/* Instagram no tiene un color plano: su marca es el degradado. */
.cdv-float__btn--instagram {
  background: radial-gradient(circle at 28% 106%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285aeb 90%);
}
.cdv-float__btn--instagram:hover,
.cdv-float__btn--instagram:focus { box-shadow: 0 10px 22px rgba(214, 36, 159, .45); }

.cdv-float__btn--linkedin { background: #0a66c2; }
.cdv-float__btn--linkedin:hover,
.cdv-float__btn--linkedin:focus { background: #084e95; box-shadow: 0 10px 22px rgba(10, 102, 194, .45); }

/* WhatsApp: mismo tamaño que el resto, con su verde de marca y el pulso */
.cdv-wa {
  position: relative;
  isolation: isolate; /* mantiene visible el anillo (::before con z-index:-1) */
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  box-shadow: 0 8px 22px rgba(37, 211, 102, .45);
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.cdv-wa:hover,
.cdv-wa:focus {
  color: #fff;
  background: #1ebe5b;
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 12px 28px rgba(37, 211, 102, .55);
  text-decoration: none;
}
.cdv-wa .cdv-icon { width: 28px; height: 28px; } /* glifo con más aire alrededor */

/* Anillo de pulso para llamar la atención (respeta reduce-motion) */
.cdv-wa::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #25d366;
  z-index: -1;
  animation: cdvWaPulse 2.4s ease-out infinite;
}
@keyframes cdvWaPulse {
  0%   { transform: scale(1); opacity: .55; }
  70%  { transform: scale(1.6); opacity: 0; }
  100% { transform: scale(1.6); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .cdv-wa,
  .cdv-float__btn { transition: none; }
  .cdv-wa:hover, .cdv-wa:focus,
  .cdv-float__btn:hover, .cdv-float__btn:focus { transform: none; }
  .cdv-wa::before { animation: none; }
}
@media (max-width: 600px) {
  .cdv-float { right: 16px; bottom: 16px; gap: 10px; }
  .cdv-float__btn { width: 50px; height: 50px; }
  .cdv-float__btn .cdv-icon { width: 24px; height: 24px; }
  .cdv-wa .cdv-icon { width: 26px; height: 26px; }
}
