/***
 * Estilos de la plantilla cdhiem
 */
:root {
  --color-primary: #a61fff !important; /* Violeta vívido */
  --color-secondary: #4d22c9 !important; /* Azul púrpura oscuro */
  --color-accent: #ff33fc !important; /* Magenta brillante */
  --color-light-accent: #7085ff !important; /* Azul claro/Pervinca */
  --color-neutral: #ababab !important; /* Gris medio */
  --color-light-neutral: #e3e3e3 !important; /* Gris muy claro */
  --color-white: #ffffff !important;
  --color-dark: #212529 !important;
}

body {
  background-color: #f8f9fa;
  color: var(--color-dark);
}

/* Typography & General */
h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--color-secondary) !important;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--color-accent);
}

/* Buttons */
.btn-primary {
  background-color: var(--color-primary) !important;
  border-color: var(--color-primary) !important;
  color: var(--color-white) !important;
}

.btn-primary:hover {
  background-color: var(--color-secondary) !important;
  border-color: var(--color-secondary) !important;
}

.btn-outline-primary {
  color: var(--color-primary) !important;
  border-color: var(--color-primary) !important;
}

.btn-outline-primary:hover {
  background-color: var(--color-primary) !important;
  color: var(--color-white) !important;
}

.btn-light {
  background-color: var(--color-white) !important;
  color: var(--color-primary) !important  ;
  border: none;
}

.btn-light:hover {
  background-color: var(--color-light-neutral) !important;
  color: var(--color-secondary) !important;
}

/* Navbar */
.navbar {
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.05);
}

.transition-navbar {
  transition: all 0.3s ease-in-out;
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}

.navbar-scrolled {
  background-color: var(--color-white) !important;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  padding-top: 0.5rem !important;
  padding-bottom: 0.5rem !important;
}

.navbar-dark .navbar-nav .nav-link {
  color: var(--color-secondary) !important;
}

.navbar-dark .navbar-nav .nav-link:hover {
  color: var(--color-accent) !important;
}

.navbar-scrolled .navbar-nav .nav-link {
  color: var(--color-secondary) !important;
}

.navbar-scrolled .navbar-nav .nav-link:hover {
  color: var(--color-primary) !important;
}

/* Hero Section */
.hero-section {
  background-image: linear-gradient(
      rgba(77, 34, 201, 0.3),
      rgba(166, 31, 255, 0.3)
    ),
    url("../images/hero-bg.png"); /* Overlay with secondary and primary colors */
  background-size: cover;
  background-position: center;
  height: 100vh;
  min-height: 600px;
}

/* Commission Section */
.commission-section {
  background-color: #f8f9fa;
}

/* Redes Mujeres Section */
.redes-mujeres-section {
  background-color: var(--color-light-neutral);
}

.member-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: none;
  border-top: 4px solid var(--color-secondary);
}

.member-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
  border-top-color: var(--color-accent) !important;
}

.member-img {
  width: 150px !important;
  height: 150px !important;
  object-fit: cover;
  border-radius: 50%;
  border: 5px solid var(--color-white);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
}

.text-primary {
  color: var(--color-primary) !important;
}

/* Reform Section */
.reform-section {
  background-color: var(--color-white);
}

/* Footer */
.footer {
  padding: 2rem 0 !important;
  background-color: var(--color-light-neutral) !important;
  margin-top: 2rem !important;
  color: var(--color-secondary) !important;
}

.footer a {
  color: var(--color-primary) !important;
}

.footer a:hover {
  color: var(--color-accent) !important;
}

/* Post Card */
.post-card {
  transition: transform 0.2s;
}

.post-card:hover {
  transform: scale(1.03);
}

/* Texto LGBT (Legacy/Specific) */
.texto-lgbt {
  background-image: linear-gradient(
    to right,
    #e40303,
    #ff8c00,
    #ffed00,
    #008026,
    #24408e,
    #732982
  ) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  color: transparent !important;
  -webkit-text-stroke-width: 0.3px !important;
  -webkit-text-stroke-color: var(--color-light-neutral) !important;
  filter: drop-shadow(3px 3px 2px rgba(0, 0, 0, 0.5)) !important;
  display: inline-block !important;
}

/* Scroll Animations */
.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.9s ease-out, transform 0.9s ease-out;
}

.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Intro Lightbox & Overlay */
#intro-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.85);
  z-index: 9999; /* Just below the highlighted element but above everything else */
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none; /* Initially allow clicks through if invisible, but JS will control this */
}

#intro-overlay.active {
  opacity: 1;
  pointer-events: all;
  display: block;
}

#intro-message {
  position: fixed;
  top: 30%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: transparent;
  color: white;
  text-align: center;
  z-index: 10001;
  max-width: 80%;
  font-size: 1.5rem;
  font-weight: bold;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 0.5s ease;
}

#intro-message.active {
  opacity: 1;
}

/* Base class for the highlighted element */
.intro-highlight {
  position: relative;
  z-index: 10000 !important;
  background-color: var(--color-white) !important;
  color: var(--color-secondary) !important;
  border-radius: 5px;
  box-shadow: 0 0 0 0 rgba(255, 255, 255, 1) !important;
  animation: intense-flash 1.2s infinite ease-in-out !important;
}

/* Ensure link text is visible if it was light on dark navbar */
.intro-highlight .nav-link {
  color: var(--color-secondary) !important;
  font-weight: bold;
}

@keyframes intense-flash {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.8);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 30px 15px rgba(255, 255, 255, 0.9);
    transform: scale(1.05); /* Subtle pulse */
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    transform: scale(1);
  }
}

/* --- Multi-level Dropdown Support (Menu Nivel 3) --- */

/* Desktop: Flyout to the right */
@media (min-width: 992px) {
  .dropdown-menu .dropdown-menu {
    top: 0;
    left: 100%;
    margin-top: -1px; /* Align tops */
  }
  
  /* Ensure parent menu keeps visible when child is hovered/active if purely CSS, 
     but BS5 handles this via 'show' class and data-bs-auto-close='outside' */

  /* Reverse direction if off-screen (toggled by JS) */
  .dropdown-menu .dropdown-menu.dropdown-menu-reversed {
    left: auto;
    right: 100%;
  }
}

/* Mobile: Stack vertically with indentation */
@media (max-width: 991.98px) {
   .dropend .dropdown-menu {
       position: static !important;
       margin-left: 1rem;
       margin-right: 1rem;
       background-color: transparent;
       border: none;
       box-shadow: none;
       padding-top: 0;
   }
   

}
