/* ══════════════════════════════════════════════════════
   Incluy — Theme CSS
   Variables · Reset · Tipografía · Utilidades · Layout base
   ══════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Lexend:wght@300;400;500;600;700;800&family=Archivo+Black&family=Spectral:ital,wght@0,400;0,700;1,400;1,700&display=swap');

/* ══════ VARIABLES ══════ */
:root {
  --white:    #FAFBFC;
  --ice:      #F0F4F8;
  --sky:      #D9E8F5;
  --electric: #00D9FF;
  --violet:   #004494;   /* primario — azul */
  --pink:     #3C2D6D;   /* secundario — púrpura */
  --orange:   #B38F23;   /* acento — dorado */
  --lime:     #A6E22E;
  --deep:     #0A0E27;
  --slate:    #1E2749;
  --gray:     #6B7C93;
  --success:  #00D084;

  --grad-main:   linear-gradient(135deg, var(--violet), var(--pink));
  --grad-warm:   linear-gradient(135deg, var(--violet), var(--orange));
  --grad-cyber:  linear-gradient(135deg, var(--electric), var(--lime));
  --grad-sunset: linear-gradient(135deg, var(--pink), var(--orange));

  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-pill: 50px;

  --shadow-sm: 0 2px 8px rgba(10,14,39,0.06);
  --shadow-md: 0 8px 24px rgba(10,14,39,0.08);
  --shadow-lg: 0 16px 48px rgba(10,14,39,0.12);
  --shadow-violet: 0 4px 16px rgba(0,68,148,0.25);
  --shadow-pink: 0 4px 16px rgba(60,45,109,0.3);
}

/* ══════ RESET ══════ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Lexend', sans-serif;
  background: var(--white);
  color: var(--deep);
  overflow-x: hidden;
  line-height: 1.6;
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

/* ══════ TIPOGRAFÍA ══════ */
h1, h2, h3, h4 {
  font-family: 'Archivo Black', sans-serif;
  line-height: 1.15;
  letter-spacing: -0.5px;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 4vw, 2.8rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.8rem); }
h4 { font-size: 1rem; font-family: 'Lexend', sans-serif; font-weight: 700; }

.gradient {
  background: var(--grad-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ══════ BOTONES ══════ */
.btn-primary {
  background: var(--grad-main);
  color: #fff;
  border: none;
  padding: 0.9rem 2rem;
  border-radius: var(--radius-pill);
  font-family: 'Lexend', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow-violet);
  transition: transform 0.2s, box-shadow 0.2s;
  display: inline-block;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0,68,148,0.4);
}

.btn-secondary {
  background: transparent;
  color: var(--violet);
  border: 2px solid rgba(0,68,148,0.3);
  padding: 0.9rem 2rem;
  border-radius: var(--radius-pill);
  font-family: 'Lexend', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
  display: inline-block;
}
.btn-secondary:hover {
  border-color: var(--violet);
  background: rgba(0,68,148,0.05);
  transform: translateY(-2px);
}

.btn-cta {
  background: var(--grad-main);
  color: #fff;
  border: none;
  padding: 0.7rem 1.5rem;
  border-radius: var(--radius-pill);
  font-family: 'Lexend', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow-violet);
  transition: transform 0.2s, box-shadow 0.2s;
}
.btn-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0,68,148,0.4);
}

/* ══════ SECCIONES — utilidades ══════ */
.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 3.5rem;
}
.section-tag {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--violet);
  margin-bottom: 1rem;
}
.section-desc {
  color: var(--gray);
  font-size: 1.05rem;
  margin-top: 1rem;
}

/* ══════ TOPBAR ══════ */
.topbar {
  background: var(--grad-main);
  color: #fff;
  padding: 0.6rem 5vw;
  font-size: 0.82rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 500;
}
.topbar-links {
  display: flex;
  gap: 1.5rem;
}
.topbar-links a {
  color: rgba(255,255,255,0.9);
  text-decoration: none;
  transition: color 0.2s;
}
.topbar-links a:hover {
  color: var(--orange);
}
.topbar .social-icon {
  background: rgba(255,255,255,.1);
  border-color: rgba(255,255,255,.2);
  color: rgba(255,255,255,.85);
  width: 28px;
  height: 28px;
}
.topbar .social-icon svg { width: 13px; height: 13px; }
.topbar .social-icon:hover {
  background: rgba(255,255,255,.25);
  border-color: rgba(255,255,255,.4);
  color: #fff;
}
.topbar .btn-cta {
  padding: .35rem .9rem;
  font-size: .76rem;
}

/* ══════ NAV ══════ */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250,251,252,0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0,68,148,0.1);
  padding: 1rem 5vw;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: box-shadow 0.3s;
}
nav.scrolled {
  box-shadow: 0 4px 30px rgba(10,14,39,0.08);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
}
.logo-icon {
  width: 42px;
  height: 42px;
  background: var(--grad-main);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  box-shadow: var(--shadow-violet);
}
.logo-img {
  width: 200px;
  height: 100px;
  border-radius: 12px;
  object-fit: contain;
}
.logo-text {
  font-family: 'Archivo Black', sans-serif;
  font-size: 1.5rem;
  background: var(--grad-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}
.nav-links a {
  color: var(--slate);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  position: relative;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--violet); }
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--orange);
  transform: scaleX(0);
  transition: transform 0.3s;
}
.nav-links a:hover::after { transform: scaleX(1); }

/* ══════ NAV SEARCH ══════ */
.nav-search {
  display: flex;
  align-items: center;
  background: rgba(0,68,148,0.06);
  border: 1px solid rgba(0,68,148,0.15);
  border-radius: var(--radius-pill);
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.nav-search:focus-within {
  border-color: var(--violet);
  box-shadow: 0 0 0 3px rgba(0,68,148,0.1);
}
.nav-search-input {
  border: none;
  outline: none;
  background: transparent;
  padding: 0.4rem 0.75rem;
  font-family: 'Lexend', sans-serif;
  font-size: 0.85rem;
  color: var(--navy);
  width: 160px;
  transition: width 0.3s;
}
.nav-search-input:focus { width: 220px; }
.nav-search-input::placeholder { color: var(--gray); }
.nav-search-btn {
  background: none;
  border: none;
  padding: 0.4rem 0.7rem;
  cursor: pointer;
  color: var(--violet);
  display: flex;
  align-items: center;
}
.nav-search-btn svg { width: 16px; height: 16px; fill: currentColor; }
.nav-search-btn:hover { color: var(--orange); }

@media (max-width: 900px) { .nav-search { display: none; } }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 3px;
  background: var(--violet);
  border-radius: 3px;
  transition: transform 0.3s, opacity 0.3s;
}
/* Hamburger → X */
.hamburger.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ══════ FOOTER ══════ */
footer {
  background: var(--deep);
  color: rgba(255,255,255,0.6);
  padding: 4rem 5vw 2rem;
}

.footer-content {
  max-width: 1300px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.footer-logo-icon {
  width: 36px;
  height: 36px;
  background: var(--grad-main);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}
.footer-logo-img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  object-fit: contain;
}
.footer-logo-text {
  font-family: 'Archivo Black', sans-serif;
  font-size: 1.3rem;
  color: #fff;
}
.footer-tagline {
  font-size: 0.9rem;
  line-height: 1.6;
  max-width: 300px;
}

.footer-col h4 {
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 1.2rem;
  font-family: 'Lexend', sans-serif;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}
.footer-links a {
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  font-size: 0.88rem;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--orange); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 2rem;
  max-width: 1300px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
}

.social-links {
  display: flex;
  gap: 0.6rem;
}
.social-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.2s;
  flex-shrink: 0;
}
.social-icon svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
  display: block;
}
.social-icon:hover { transform: translateY(-2px); }
.social-icon--fb:hover  { background: #1877F2; border-color: #1877F2; color: #fff; }
.social-icon--ig:hover  { background: #E1306C; border-color: #E1306C; color: #fff; }
.social-icon--li:hover  { background: #0A66C2; border-color: #0A66C2; color: #fff; }
.social-icon--tt:hover  { background: #010101; border-color: #010101; color: #fff; }
.social-icon--yt:hover  { background: #FF0000; border-color: #FF0000; color: #fff; }
.social-icon--wa:hover  { background: #25D366; border-color: #25D366; color: #fff; }

/* Social icons en la nav (fondo claro / glassmorphic) */
.nav-social {
  display: flex;
  gap: 0.4rem;
  align-items: center;
}
.nav-social .social-icon {
  width: 32px;
  height: 32px;
  background: rgba(0,68,148,0.06);
  border: 1px solid rgba(0,68,148,0.18);
  color: var(--white);
}
.nav-social .social-icon svg { width: 14px; height: 14px; }
@media (max-width: 900px) { .nav-social { display: none; } }

/* ══════ ANIMACIONES ══════ */
@keyframes float {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25%       { transform: translate(20px, -30px) rotate(5deg); }
  50%       { transform: translate(-15px, 20px) rotate(-5deg); }
  75%       { transform: translate(25px, 15px) rotate(3deg); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(1.3); }
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ══════ RESPONSIVE ══════ */
@media (max-width: 1100px) {
  .footer-content { grid-template-columns: 1fr 1fr; }
}

/* ── Mobile nav (≤ 900px) ── */
@media (max-width: 900px) {
  .topbar {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }
  .topbar-links {
    flex-wrap: wrap;
    justify-content: center;
  }

  /* Ocultar CTA y redes en desktop */
  .btn-cta:not(.btn-cta--block) { display: none; }
  .nav-social { display: none; }

  /* Hamburger visible */
  .hamburger { display: flex; }

  /* Menú desplegable */
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(250,251,252,0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 0.5rem 5vw 1.5rem;
    gap: 0;
    border-bottom: 1px solid rgba(0,68,148,0.1);
    box-shadow: 0 8px 30px rgba(10,14,39,0.1);
    z-index: 999;
  }
  .nav-links.nav-open { display: flex; }

  /* Links normales */
  .nav-links li:not(.nav-m-sep):not(.nav-m-social):not(.nav-m-cta) a {
    display: block;
    padding: 0.85rem 0;
    border-bottom: 1px solid rgba(0,68,148,0.06);
    font-size: 0.97rem;
    position: static;
  }
  .nav-links li:not(.nav-m-sep):not(.nav-m-social):not(.nav-m-cta) a::after {
    display: none;
  }

  /* Separador */
  .nav-m-sep {
    display: block !important;
    height: 1px;
    background: rgba(0,68,148,0.12);
    margin: 0.6rem 0;
  }

  /* Redes sociales mobile */
  .nav-m-social {
    display: flex !important;
    gap: 0.5rem;
    padding: 0.5rem 0;
  }
  .nav-m-social .social-icon {
    width: 36px;
    height: 36px;
    background: rgba(0,68,148,0.08);
    border: 1px solid rgba(0,68,148,0.18);
    color: var(--slate);
  }

  /* CTA mobile */
  .nav-m-cta { display: block !important; padding-top: 0.5rem; }
  .btn-cta--block {
    display: block;
    text-align: center;
    padding: 0.9rem;
    border-radius: var(--radius-pill);
  }

  .footer-content { grid-template-columns: 1fr; }
}

/* Ocultar mobile-only items en desktop */
@media (min-width: 901px) {
  .nav-m-sep,
  .nav-m-social,
  .nav-m-cta { display: none !important; }
}

/* ══════ RESPONSIVE CONTAINERS (estilo Bootstrap) ══════ */
.post-wrapper,
.noticia-wrapper,
.guia-detail,
.ley-detail,
.noticia-detail {
  width: 100%;
  padding-left: 5vw;
  padding-right: 5vw;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}
@media (min-width: 576px) {
  .post-wrapper,
  .noticia-wrapper,
  .guia-detail,
  .ley-detail,
  .noticia-detail { max-width: 540px; padding-left: 1.5rem; padding-right: 1.5rem; }
}
@media (min-width: 768px) {
  .post-wrapper,
  .noticia-wrapper,
  .guia-detail,
  .ley-detail,
  .noticia-detail { max-width: 720px; }
}
@media (min-width: 992px) {
  .post-wrapper,
  .noticia-wrapper,
  .guia-detail,
  .ley-detail,
  .noticia-detail { max-width: 960px; }
}
@media (min-width: 1200px) {
  .post-wrapper,
  .noticia-wrapper,
  .guia-detail,
  .ley-detail,
  .noticia-detail { max-width: 1140px; }
}
@media (min-width: 1400px) {
  .post-wrapper,
  .noticia-wrapper,
  .guia-detail,
  .ley-detail,
  .noticia-detail { max-width: 1320px; }
}
@media (min-width: 1600px) {
  .post-wrapper,
  .noticia-wrapper,
  .guia-detail,
  .ley-detail,
  .noticia-detail { max-width: 1520px; }
}

/* ══════ BREAKPOINT 1600px+ (pantallas grandes 1920px) ══════ */
@media (min-width: 1600px) {
  .footer-content,
  .footer-bottom { max-width: 1560px; }
}
