/* =========================================================
   CONTAMAKE — Estilos compartidos
   Paleta basada en el verde institucional Contamake
   ========================================================= */

:root {
  --black: #0a0e0c;
  --white: #f5f3ef;
  --accent: #66C98E;          /* Verde Contamake (logo) */
  --accent-bright: #7ED9A4;   /* Verde brillante para hovers */
  --accent-soft: rgba(102, 201, 142, 0.10);
  --accent-glow: rgba(102, 201, 142, 0.25);
  --accent2: #2563eb;         /* Azul de soporte */
  --gray: #14181a;
  --gray2: #1c2123;
  --gray3: #252b2e;
  --bg: var(--black);
  --bg-card: var(--gray2);
  --text: var(--white);
  --muted: #8a8f8d;
  --muted2: #b6b9b7;
  --border: rgba(255,255,255,0.08);
  --border-strong: rgba(255,255,255,0.15);
  --warn: #f39c12;
  --danger: #ff5555;
  --ok: #66C98E;
  --nav-h: 72px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--black);
  color: var(--white);
  font-family: 'DM Sans', sans-serif;
  font-size: 17px;
  line-height: 1.6;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4, .nav-logo { font-family: 'Syne', sans-serif; }
a { color: inherit; text-decoration: none; }

/* =========================================================
   ACCESSIBILITY
   ========================================================= */
.skip-link {
  position: absolute;
  top: -100px;
  left: 12px;
  background: var(--accent);
  color: var(--black);
  padding: 10px 18px;
  border-radius: 8px;
  z-index: 1000;
  font-weight: 700;
  transition: top 0.2s;
}
.skip-link:focus { top: 12px; }
:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 2px;
  border-radius: 4px;
}

/* =========================================================
   NAVBAR con dropdown + menú móvil
   ========================================================= */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 18px 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(10,14,12,0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  min-height: var(--nav-h);
}
.nav-logo {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  display: inline-flex;
  align-items: center;
}
.nav-logo-img {
  height: 26px;
  vertical-align: middle;
}
.nav-logo span { color: var(--accent); }

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  width: 42px;
  height: 42px;
  cursor: pointer;
  padding: 0;
  align-items: center;
  justify-content: center;
  color: var(--white);
  transition: border-color 0.2s, background 0.2s;
}
.nav-toggle:hover { border-color: var(--border-strong); background: rgba(255,255,255,0.04); }
.nav-toggle svg { width: 20px; height: 20px; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
  align-items: center;
}
.nav-links > li { position: relative; }
.nav-links a {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.nav-links a:hover { color: var(--white); }
.nav-links a.active,
.nav-links a[aria-current="page"] { color: var(--white); }
.dropdown-arrow {
  font-size: 0.65rem;
  margin-top: 2px;
  transition: transform 0.2s;
}
.nav-links li:hover .dropdown-arrow,
.nav-links li.dropdown-open .dropdown-arrow { transform: rotate(180deg); }

.nav-cta {
  background: var(--accent) !important;
  color: var(--black) !important;
  padding: 10px 22px;
  border-radius: 8px;
  font-weight: 700 !important;
  transition: transform 0.2s, box-shadow 0.2s;
}
.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px var(--accent-glow);
}
.dropdown {
  position: absolute;
  top: 100%;
  left: -20px;
  background: var(--gray);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  min-width: 280px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity 0.2s, transform 0.2s;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}
.dropdown::before {
  content: '';
  position: absolute;
  top: -14px;
  left: 0;
  right: 0;
  height: 14px;
}
.nav-links li:hover .dropdown,
.nav-links li.dropdown-open .dropdown {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}
.dropdown-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  transition: background 0.15s;
}
.dropdown-item:hover { background: var(--gray2); }
.dropdown-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.dropdown-text-title {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--white);
  font-family: 'Syne', sans-serif;
}
.dropdown-text-desc {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 2px;
}
.dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 8px 0;
}
.dropdown-footer {
  display: block;
  text-align: center;
  padding: 10px;
  font-size: 0.85rem !important;
  color: var(--accent) !important;
  font-weight: 600 !important;
}

/* =========================================================
   BOTONES
   ========================================================= */
.btn-primary {
  background: var(--accent);
  color: var(--black);
  padding: 16px 32px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 1rem;
  font-family: 'Syne', sans-serif;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 0 30px var(--accent-glow);
  display: inline-block;
  border: none;
  cursor: pointer;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 50px var(--accent-glow), 0 0 0 4px rgba(102,201,142,0.15);
}
.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}
.btn-ghost {
  color: var(--white);
  padding: 16px 28px;
  border-radius: 10px;
  font-weight: 500;
  font-size: 0.95rem;
  border: 1px solid var(--border);
  transition: border-color 0.2s, background 0.2s;
  display: inline-block;
}
.btn-ghost:hover {
  border-color: rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.02);
}

/* =========================================================
   SECCIONES
   ========================================================= */
section { padding: 100px 5%; }
.section-tag {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent);
  margin-bottom: 16px;
}
.section-title {
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.1;
  margin-bottom: 20px;
}
.section-subtitle {
  font-size: 1.1rem;
  color: var(--muted2);
  max-width: 580px;
  line-height: 1.7;
  font-weight: 300;
}

/* =========================================================
   PÁGINAS DE CONTENIDO (legales, registro, 404, etc.)
   ========================================================= */
.page-content {
  max-width: 820px;
  margin: 0 auto;
  padding: 140px 5% 80px;
}
.page-content h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.1;
  margin-bottom: 16px;
}
.page-content h1 em {
  font-style: normal;
  color: var(--accent);
}
.page-content .page-meta {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 40px;
  font-family: 'DM Mono', monospace;
}
.page-content h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 40px 0 12px;
  color: var(--white);
}
.page-content h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 28px 0 10px;
  color: var(--white);
}
.page-content p,
.page-content li {
  color: var(--muted2);
  font-size: 1rem;
  line-height: 1.75;
  margin-bottom: 14px;
}
.page-content ul,
.page-content ol {
  padding-left: 22px;
  margin-bottom: 14px;
}
.page-content strong { color: var(--white); }
.page-content a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.page-content a:hover { color: var(--accent-bright); }
.page-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 0.9rem;
}
.page-content th,
.page-content td {
  padding: 12px;
  border: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
  color: var(--muted2);
}
.page-content th {
  background: var(--gray);
  color: var(--white);
  font-weight: 600;
  font-family: 'Syne', sans-serif;
}
.page-content .lead {
  font-size: 1.1rem;
  color: var(--muted2);
  line-height: 1.65;
  margin-bottom: 32px;
}
.breadcrumb-page {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 20px;
  font-family: 'DM Mono', monospace;
}
.breadcrumb-page a { color: var(--accent); }
.breadcrumb-page a:hover { color: var(--accent-bright); }

/* =========================================================
   FOOTER
   ========================================================= */
footer {
  padding: 64px 5% 32px;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
}
.footer-logo {
  font-family: 'Syne', sans-serif;
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 12px;
}
.footer-logo-img {
  height: 22px;
  vertical-align: middle;
}
.footer-logo span { color: var(--accent); }
.footer-desc {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.6;
  max-width: 280px;
}
.footer-social {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}
.footer-social a {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  transition: all 0.2s;
}
.footer-social a:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
}
.footer-social svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}
.footer-col h4 {
  font-family: 'Syne', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 16px;
}
.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-col ul a {
  font-size: 0.85rem;
  color: var(--muted);
  transition: color 0.2s;
}
.footer-col ul a:hover { color: var(--white); }
.footer-bottom {
  padding: 24px 5%;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.8rem;
  color: var(--muted);
}
.footer-bottom-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}
.footer-bottom-links a {
  color: var(--muted);
  transition: color 0.2s;
}
.footer-bottom-links a:hover { color: var(--white); }
.footer-bottom a { color: inherit; }
.footer-bottom a:hover { color: var(--accent); }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 880px) {
  footer { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  nav { padding: 14px 5%; }
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: fixed;
    top: var(--nav-h);
    right: -100%;
    bottom: 0;
    width: min(320px, 85vw);
    background: var(--gray);
    border-left: 1px solid var(--border);
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 24px 20px;
    overflow-y: auto;
    transition: right 0.3s ease;
  }
  .nav-links.open { right: 0; }
  .nav-links > li { width: 100%; }
  .nav-links a {
    width: 100%;
    padding: 12px 14px;
    font-size: 1rem;
    border-radius: 8px;
  }
  .nav-links a:hover { background: rgba(255,255,255,0.04); }
  .dropdown {
    position: static;
    opacity: 1;
    pointer-events: all;
    transform: none;
    margin-top: 4px;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 4px 4px 8px 12px;
    min-width: auto;
    display: none;
  }
  .nav-links li.dropdown-open .dropdown { display: block; }
  .nav-cta {
    margin-top: 8px;
    text-align: center;
    padding: 14px 22px !important;
  }
  section { padding: 70px 5%; }
  footer { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .page-content { padding: 110px 5% 60px; }
  .page-content h2 { font-size: 1.25rem; }
}

@media print {
  nav, footer, .footer-bottom, .skip-link, .btn-primary, .btn-ghost { display: none !important; }
  body { background: white; color: black; }
  .page-content { padding: 0; max-width: 100%; }
  .page-content h1, .page-content h2, .page-content h3 { color: black; }
  .page-content p, .page-content li { color: #333; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* =========================================================
   BANNER DE COOKIES
   ========================================================= */
.cookie-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  max-width: 720px;
  margin: 0 auto;
  background: var(--gray);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  padding: 18px 22px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  z-index: 999;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s, transform 0.3s;
}
.cookie-banner.show {
  opacity: 1;
  transform: translateY(0);
}
.cookie-banner-text {
  flex: 1 1 280px;
  font-size: 0.88rem;
  color: var(--muted2);
  line-height: 1.55;
}
.cookie-banner-text a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.cookie-banner-text a:hover { color: var(--accent-bright); }
.cookie-banner-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.cookie-btn {
  padding: 10px 18px;
  border-radius: 8px;
  font-family: 'Syne', sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--white);
  transition: all 0.2s;
}
.cookie-btn:hover {
  border-color: var(--border-strong);
  background: rgba(255,255,255,0.04);
}
.cookie-btn-accept {
  background: var(--accent);
  color: var(--black);
  border-color: var(--accent);
}
.cookie-btn-accept:hover {
  background: var(--accent-bright);
  border-color: var(--accent-bright);
  box-shadow: 0 4px 16px var(--accent-glow);
}

@media (max-width: 540px) {
  .cookie-banner { flex-direction: column; align-items: stretch; }
  .cookie-banner-actions { width: 100%; }
  .cookie-btn { flex: 1; }
}

/* =========================================================
   BOTÓN FLOTANTE DE WHATSAPP
   ========================================================= */
.whatsapp-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25D366;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 90;
  box-shadow: 0 8px 24px rgba(37,211,102,0.35);
  transition: transform 0.2s, box-shadow 0.2s;
}
.whatsapp-fab:hover {
  transform: scale(1.08);
  box-shadow: 0 12px 32px rgba(37,211,102,0.5);
}
.whatsapp-fab svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}
.whatsapp-fab-tooltip {
  position: absolute;
  right: 70px;
  background: var(--gray);
  border: 1px solid var(--border);
  color: var(--white);
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.82rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  font-family: 'DM Sans', sans-serif;
}
.whatsapp-fab:hover .whatsapp-fab-tooltip { opacity: 1; }

@media (max-width: 540px) {
  .whatsapp-fab { width: 52px; height: 52px; bottom: 16px; right: 16px; }
  .whatsapp-fab-tooltip { display: none; }
}
@media print {
  .whatsapp-fab, .cookie-banner { display: none !important; }
}
