/* -----------------------------------------------------
   HEADER (SPAZIO PREMIUM)
----------------------------------------------------- */

.header-sticky {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--color-primary); /* Midnight Blue */
    border-bottom: 1px solid rgba(173, 146, 111, 0.2); /* Borde Ocre Gold sutil */
    transition: background var(--transition);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

/* LOGO: Icono + Texto SPAZIO */
.site-logo a {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--color-text-dark); 
}

.site-logo h1 {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    letter-spacing: 0.2em;
    font-family: "Rajdhani", sans-serif;
    text-transform: uppercase;
}

.site-logo .icon-gavel {
    font-size: 30px;
    color: var(--color-accent); /* Ocre Gold */
}

/* -----------------------------------------------------
   MENÚ PRINCIPAL Y LÓGICA RESPONSIVE
----------------------------------------------------- */

.main-nav {
    /* La navegación es visible por defecto en escritorios */
    display: block; 
}

.main-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex; /* Asegura que los ítems estén en línea en escritorio */
    gap: 30px;
}

.main-menu li a {
    color: var(--color-text-dark);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 14px;
    padding: 5px 0;
    position: relative;
    transition: color var(--transition);
}

.main-menu li a:hover {
    color: var(--color-accent);
}

/* Ocultar el botón de menú móvil en escritorio */
.menu-toggle {
    display: none; 
}


/* --- Media Query para Móviles (Menú Hamburguesa) --- */
@media (max-width: 768px) {
    
    .header-container {
        /* Permite que el logo y el botón de CTA estén en los extremos */
        padding: 15px 20px;
    }

    /* Ocultar los ítems del menú en móviles por defecto */
    .main-nav {
        display: none;
        position: absolute;
        top: 100%; /* Justo debajo del header */
        left: 0;
        width: 100%;
        background-color: var(--color-primary); 
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
    }

    /* El menú de lista se vuelve vertical */
    .main-menu {
        flex-direction: column;
        padding: 20px 30px;
    }

    .main-menu li a {
        display: block;
        padding: 10px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    /* Mostrar el botón de hamburguesa en móviles */
    .menu-toggle {
        display: block; 
        color: var(--color-text-dark);
    }
    
    /* Ocultar el botón "AGENDAR CITA" en móviles */
    .btn-header {
        display: none; 
    }
}
/* BOTÓN CTA EN EL HEADER */
.btn-header {
    /* Sobreescribe el estilo de .btn-secondary para un tamaño más discreto */
    padding: 8px 18px; 
    font-size: 12px;
}

.menu-toggle {
    display: none; /* Ocultar en escritorio */
    background: none;
    border: none;
    cursor: pointer;
}
/* -----------------------------------------------------
   FIN DE HEADER
----------------------------------------------------- */


/* Animaciones suaves */

/* Fade Up */
@keyframes fade-up {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-up {
    opacity: 0;
    animation: fade-up 1s ease-out forwards;
}

/* Slide Up */
@keyframes slide-up {
    0% {
        opacity: 0;
        transform: translateY(40px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-up {
    opacity: 0;
    animation: slide-up 0.9s ease-out forwards;
}

/* Delay helpers */
.delay-1 {
    animation-delay: 0.2s;
}
.delay-2 {
    animation-delay: 0.4s;
}
.delay-3 {
    animation-delay: 0.6s;
}
.delay-4 {
    animation-delay: 0.8s;
}

/* Animación al hacer scroll (opcional con JS ligero) */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease-out;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Overlay */
.menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(3px);
  opacity: 0;
  visibility: hidden;
  transition: 0.3s ease;
}

.menu-overlay.visible {
  opacity: 1;
  visibility: visible;
}

/* ========== FOOTER ========== */
.site-footer {
  background: #000e1c;
  padding: 60px 0 30px;
  color: #dcdcdc;
}

.footer-inner {
  max-width: 1200px;
  margin: auto;
}

.footer-widgets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-widgets .widget {
  color: #dcdcdc;
}

.footer-nav .footer-menu {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-bottom: 20px;
}

.footer-nav .footer-menu li a {
  color: #dcdcdc;
  font-size: 14px;
  transition: 0.3s;
}

.footer-nav .footer-menu li a:hover {
  color: #AD926F;
}

.footer-copy {
  text-align: center;
  font-size: 14px;
  opacity: 0.7;
}

/* =======================================================
   GLOBAL RESET + BASE
======================================================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  overflow-x: hidden;
}

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

/* Container */
.container {
  width: 90%;
  max-width: 1300px;
  margin: 0 auto;
}

/* Spacing helpers */
.section {
  padding: 100px 0;
}

.section-sm {
  padding: 60px 0;
}

.mt-40 { margin-top: 40px; }
.mb-40 { margin-bottom: 40px; }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }

/* Grid helpers */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}

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

/* Buttons */
.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
}

.btn-primary {
  background: var(--color-accent);
  color: #fff;
}

.btn-primary:hover {
  background: #0056d4;
}

.btn-outline {
  border: 2px solid var(--color-accent);
  color: var(--color-accent);
}

.btn-outline:hover {
  background: var(--color-accent);
  color: white;
}

/* Cards */
.card {
  background: white;
  padding: 30px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.card:hover {
  transform: translateY(-5px);
}

/* Dark mode (global selectors) */
body.dark {
  background: var(--color-bg-dark);
  color: var(--color-text-dark);
}

body.dark .card {
  background: var(--color-card-dark);
}

/* Video background */
.hero-video-bg {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: -1;
  filter: brightness(0.6);
}

/* Overlay for hero */
.hero-overlay {
  background: linear-gradient(
    180deg,
    rgba(0,0,0,0.5) 0%,
    rgba(0,0,0,0.7) 100%
  );
  position: absolute;
  inset: 0;
  z-index: -1;
}

/* Hero text placement */
.hero-content {
  position: relative;
  z-index: 3;
  max-width: 650px;
}

/* Scroll animations (via IntersectionObserver) */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition: 0.6s ease;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

.single-title {
  font-size: 42px;
  margin-bottom: 10px;
  font-weight: 700;
}

.post-meta {
  font-size: 14px;
  opacity: 0.7;
  margin-bottom: 25px;
  display: flex;
  gap: 10px;
}

.single-featured img {
  width: 100%;
  border-radius: var(--radius);
  margin: 40px 0;
}

.single-content {
  font-size: 18px;
  line-height: 1.7;
}

.single-taxonomies {
  margin-top: 40px;
  font-size: 15px;
}

.single-nav {
  margin-top: 50px;
  display: flex;
  justify-content: space-between;
  font-weight: 600;
}

.archive-header h1 {
  font-size: 36px;
  margin-bottom: 10px;
  font-weight: 700;
}

.archive-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 35px;
  margin-top: 40px;
}

.archive-post {
  padding-bottom: 20px;
}

.archive-post .thumb img {
  border-radius: var(--radius);
  width: 100%;
  height: auto;
}

.no-thumb {
  width: 100%;
  height: 180px;
  background: #eee;
  border-radius: var(--radius);
}

.archive-title {
  font-size: 20px;
  margin: 12px 0 8px;
  font-weight: 600;
}

.archive-excerpt {
  opacity: 0.8;
  font-size: 16px;
  margin-bottom: 12px;
}

.archive-readmore {
  font-weight: 600;
  color: var(--color-accent);
  text-decoration: none;
}

.center {
  text-align: center;
}

.dark-toggle {
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
  font-size: 26px;
  display: flex;
  align-items: center;
  transition: var(--transition);
}

body.dark .dark-toggle {
  color: var(--color-text-dark);
}

.search-form {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.search-form input {
  flex: 1;
  padding: 12px;
  border-radius: var(--radius);
  border: 1px solid #ddd;
}

.search-form button {
  background: var(--color-accent);
  border: none;
  padding: 12px 18px;
  border-radius: var(--radius);
  color: white;
  cursor: pointer;
}