 :root {
            --color-primary: #9d2449;
            --color-secondary: #611232;
            --color-accent: #D4C19C;
            --color-light: #f8f9fa;
            --transition-slow: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
            --transition-fast: all 0.3s ease;
            --shadow-soft: 0 10px 20px rgba(0, 0, 0, 0.1);
            --shadow-medium: 0 15px 30px rgba(0, 0, 0, 0.15);
            --shadow-strong: 0 20px 40px rgba(0, 0, 0, 0.2);
            
            /* Colores específicos para cada coordinación */
            --color-coordinacion-1: #621132;
            --color-coordinacion-2: #13322e;
            --color-coordinacion-3: #a57f2c;
        }
        
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        
        * { margin:0; padding:0; box-sizing:border-box; }
body, html { width:100%; font-family:'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; overflow-x:hidden; scroll-behavior:smooth; }

     
   /* Efecto de partículas en el fondo */
#particles-js {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}


        
        /* Contenedor general del header */
.header-container {
    width: 100%;
    position: relative;
    z-index: 500;
}

/* Imagen del header */
.header-image {
    width: 100%;
    display: block;
    line-height: 0;
    position: relative;
}

.header-image img, .header-img {
    width: 100%;
    height: clamp(150px, 20vh, 250px); /* más corto */
    object-fit: cover;
    display: block;
}

/* Contenedor del título */
.header-title {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    text-align: center;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.7);
    z-index: 10;
    width: 90%;
}

/* H1 y párrafo */
.header-title h1 {
    font-size: clamp(1.8rem, 5vw, 4rem);
    color: #a57f2c;
    text-shadow: 2px 2px 0 #eee;
    font-weight: bold;
    padding: 5px 0;
}

.header-title p {
    font-size: clamp(1rem, 2.5vw, 2.5rem);
    text-shadow: 2px 2px 0 #a57f2c;
}

/* Contador */
.header-title .contador {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 0.9rem;
}

.header-title .ayto {
    position: absolute;
    top: 10px;
    left: 20px; /* ahora a la izquierda */
    font-size: 0.9rem;
}



/* Contenedor principal */
.main-container {
        width: 100%;
        position: relative;
        margin-top: -80px;
        z-index: 400;
        height: 80vh;
        overflow: visible;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .container-background {
        width: 100%;
        height: 80vh;
        position: relative;
        overflow: hidden;
    }

    .container-background video {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center 70%;
    }

    /* Imagen de ondas superpuesta */
    .waves-overlay {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-image: url('images/principal/onda.png');
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        z-index: 5;
        opacity: 0.8;
        transition: all 2s ease-in-out;
    }

    /* Estados de la imagen de ondas */
    .waves-visible { opacity: 0.9; transform: translateY(0) scale(1); }
    .waves-medium { opacity: 0.4; transform: translateY(-20px) scale(1.02); }
    .waves-hidden { opacity: 0.1; transform: translateY(-40px) scale(1.05); }
    .waves-very-hidden { opacity: 0.05; transform: translateY(-60px) scale(1.08); }

    /* Estilos del header */
    .header-container { width: 100%; position: relative; z-index: 500; }
    .header-image { width: 100%; display: block; line-height: 0; position: relative; }
    .header-image img, .header-img { width: 100%; height: clamp(150px, 20vh, 250px); object-fit: cover; display: block; }
    .header-title { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); color: white; text-align: center; text-shadow: 2px 2px 8px rgba(0,0,0,0.7); z-index: 10; width: 90%; }
    .header-title h1 { font-size: clamp(1.8rem, 5vw, 4rem); color: #a57f2c; text-shadow: 2px 2px 0 #eee; font-weight: bold; padding: 5px 0; }
    .header-title p { font-size: clamp(1rem, 2.5vw, 2.5rem); text-shadow: 2px 2px 0 #a57f2c; }
    .header-title .contador { position: absolute; top: 10px; right: 20px; font-size: 0.9rem; }
    .header-title .ayto { position: absolute; top: 10px; left: 20px; font-size: 0.9rem; }
    


        
        .video-overlay {
    position:absolute; top:0; left:0; width:100%; height:100%;
    display:flex; align-items:center; justify-content:center; flex-direction:column;
    color:white; text-align:center; padding:20px;
}
.video-overlay::before {
    content:''; position:absolute; top:0; left:0; width:100%; height:100%;
    background:rgba(0,0,0,0.4); z-index:-1;
}

        
        
       /* Logo sobre video */
.logo-over-video {
    position:absolute; 
    bottom: -20px;
    left:50%;
     transform:translateX(-50%);
    z-index:800; 
    width: 280px;
    height: 280px;
    border-radius: 50%;
     background:rgba(255,255,255,0.9);
    display:flex; 
    align-items:center; 
    justify-content:center;
    box-shadow:0 5px 15px rgba(0,0,0,0.3);

    transition: transform 0.6s ease, background 0.6s ease, box-shadow 0.6s ease;
    animation: logoEntranceElastic 3.5s cubic-bezier(0.68,-0.55,0.265,1.55) forwards,
               float 6s ease-in-out infinite 3.5s;
}
.logo-over-video:hover { transform:translateX(-50%) scale(1.1); background:rgba(255,255,255,1); box-shadow:0 8px 25px rgba(0,0,0,0.4); animation-play-state:paused; }
.logo-over-video img { width:100%; height:auto; transition:transform 0.5s ease; }
.logo-over-video:hover img { transform:rotate(5deg); }

@keyframes logoEntranceElastic {
    0% { opacity:0; transform:translateX(100%) translateY(0) scale(0.8); }
    50% { opacity:1; transform:translateX(-60%) translateY(-25px) scale(1.1); }
    70% { transform:translateX(-50%) translateY(15px) scale(1); }
    85% { transform:translateX(-50%) translateY(-8px) scale(1); }
    100% { transform:translateX(-50%) translateY(0) scale(1); }
}
@keyframes float { 0%,100%{ transform:translateX(-50%) translateY(0); } 50%{ transform:translateX(-50%) translateY(-10px); } }

/* Contenido general */
.content-section { 
    position:relative; 
    padding:100px 10px 10px;
     text-align:center; 
     z-index:800; }

       

    
        .content-section, .content-overlay {
    width: 100%;
    height: 100%;
    position: relative;
}



        .acordeones-container {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
            gap: 30px;
            margin-top: 30px;
        }
        
        .acordeon-card {
            background: white;
            border-radius: 18px;
            overflow: hidden;
            box-shadow: var(--shadow-soft);
            transition: var(--transition-slow);
            position: relative;
            display: flex;
            flex-direction: column;
            height: auto;
            cursor: pointer;
            width: 100%;
        }
        
        .acordeon-card.active {
            box-shadow: var(--shadow-strong);
            transform: translateY(-5px);
        }
        
        .acordeon-card:hover {
            transform: translateY(-10px);
            box-shadow: var(--shadow-strong);
        }
        
        /* Imagen con efecto hover */
        .acordeon-imagen {
            position: relative;
            height: 200px;
            overflow: hidden;
            border-radius: 20px 20px 0 0;
        }
        
        .acordeon-imagen img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: var(--transition-slow);
        }
        
        .acordeon-card:hover .acordeon-imagen img {
            transform: scale(1.1);
        }
        
        .imagen-overlay {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: linear-gradient(to bottom, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.7) 100%);
            display: flex;
            align-items: center;
            justify-content: center;
            opacity: 0;
            transition: var(--transition-slow);
        }
        
        .acordeon-card:hover .imagen-overlay {
            opacity: 1;
        }
        
        .overlay-text {
            color: white;
            font-size: 1.5rem;
            font-weight: 700;
            text-align: center;
            text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
            transform: translateY(20px);
            transition: var(--transition-slow);
        }
        
        .acordeon-card:hover .overlay-text {
            transform: translateY(0);
        }
        
        /* Efecto de borde con gradiente */
        .acordeon-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 5px;
            background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
            z-index: 2;
        }
        
        /* Icono */
        .acordeon-icon {
            padding: 25px 25px 0;
            text-align: center;
            position: relative;
            z-index: 1;
        }
        
        .acordeon-icon i {
            font-size: 50px;
           background-color: #a57f2c;
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            padding: 15px;
            border-radius: 50%;
            transition: var(--transition-slow);
        }
        
        .acordeon-card:hover .acordeon-icon i,
        .acordeon-card.active .acordeon-icon i {
            transform: scale(1.2) rotate(15deg);
            background-color: #a57f2c;
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }
        
        .acordeon-content {
            padding: 20px 25px;
            position: relative;
            z-index: 1;
        }
        
        .acordeon-content h2 {
            font-size: 1.4rem;
            color: var(--color-secondary);
            margin-bottom: 15px;
            font-weight: 700;
            line-height: 1.3;
            text-align: center;
            transition: var(--transition-fast);
            font-family: 'Montserrat', sans-serif;
        }
        
        .acordeon-card:hover .acordeon-content h2,
        .acordeon-card.active .acordeon-content h2 {
            color: var(--color-primary);
        }
        
        .acordeon-content p {
            color: #666;
            line-height: 1.6;
            text-align: center;
            margin-bottom: 20px;
        }
        
        /* Botón de más información */
        .btn-mas-info {
            display: block;
            margin: 0 auto 20px;
            padding: 12px 25px;
            background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
            color: white;
            border: none;
            border-radius: 30px;
            font-weight: 600;
            transition: var(--transition-fast);
            position: relative;
            overflow: hidden;
            cursor: pointer;
            z-index: 2;
            box-shadow: 0 4px 10px rgba(157, 36, 73, 0.3);
        }
        
        .btn-mas-info:before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 0%;
            height: 100%;
            background: rgba(255, 255, 255, 0.2);
            transition: var(--transition-fast);
            z-index: -1;
        }
        
        .btn-mas-info:hover:before {
            width: 100%;
        }
        
        .btn-mas-info:hover {
            transform: translateY(-3px);
            box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
        }
        
        /* Contenido expandible (acordeón) */
     /* Secciones de detalles ocultas por defecto */
.acordeon-details {
  max-height: 0;       /* oculto */
  overflow-y: auto;    /* scroll si se expande */
  overflow-x: hidden;
  transition: max-height 0.5s ease;
  padding-right: 10px;
      position: relative;     /* importante para que no quede “tapado” */
    z-index: 1;             /* asegura que esté arriba */
    background: #fff; 
}



/* Scroll personalizado */
.acordeon-details::-webkit-scrollbar {
  width: 8px;
}
.acordeon-details::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}
.acordeon-details::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 4px;
}
.acordeon-details::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* Cuando está activo (botón clickeado) */
.acordeon-details.show {
  max-height: 300px;   /* altura máxima visible */
}

#volverArriba {
  position: fixed;
  bottom: 20px; /* lo acercamos al footer */
  right: 20px;  /* posición derecha */
  background: #9d2449;
  color: #fff;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  text-decoration: none;
  font-size: 1.5rem;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  transition: all 0.3s ease;
  z-index: 9999;
}

#volverArriba:hover {
  background: #b32d5c;
  transform: translateY(-5px) scale(1.1);
}

/* Opcional: animación de aparición */
#volverArriba.show {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s ease;
}

#volverArriba.hide {
  opacity: 0;
  visibility: hidden;
}




.foto_presi {
   text-align: center;
    padding: clamp(20px, 4vw, 30px);
    perspective: 1500px;
    background-color: #faf8f5ff;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    max-width: min(95%, 600px);
    margin: clamp(30px, 6vw, 50px) auto;
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    width: calc(100% - 40px);
}

/* Pseudo-elemento para el fondo hover con opacidad */
.foto_presi::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../images/img_dependencias.jpg') center/cover no-repeat;
    opacity: 0;
    border-radius: 15px;
    z-index: 0;
    transition: opacity 0.5s ease;
}

/* Hover: aparecer con opacidad */
.foto_presi:hover::before {
    opacity: 0.4; /* nivel de transparencia elegante */
}

/* Contenido por encima del fondo */
.foto_presi a,
.foto_presi h3,
.foto_presi h4,
.foto_presi p,
.foto_presi .imagen1,
.foto_presi .imagen2,
.foto_presi .social-icons {
    position: relative;
    z-index: 1;
}
.foto_presi a {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* Foto principal */
.foto-principal {
       width: clamp(200px, 60vw, 350px);
    height: clamp(200px, 60vw, 350px);
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid #621132;
    margin-bottom: 15px;
    transition: transform 0.3s, filter 0.3s;
}

.foto-principal:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
}


.foto_presi .imagen1,
.foto_presi .imagen2 {
   position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: clamp(80px, 20vw, 180px);
    height: auto;
    border-radius: 0;
    border: none;
    animation: flotar 3s ease-in-out infinite alternate;
}

.foto_presi .imagen1 {
    left: clamp(-80px, -15vw, -120px);
}

.foto_presi .imagen2 {
    right: clamp(-80px, -15vw, -120px);
}

/* OCULTAR IMÁGENES LATERALES EN MÓVILES PEQUEÑOS */
@media (max-width: 480px) {
    .foto_presi .imagen1,
    .foto_presi .imagen2 {
        display: none;
    }
}


/* Animación de flotación */
@keyframes flotar {
    0% {
        transform: translateY(-50%) translateX(0);
    }
    50% {
        transform: translateY(-52%) translateX(2px);
    }
    100% {
        transform: translateY(-50%) translateX(0);
    }
}

/* Efecto para el nombre del presidente */
.foto_presi .efecto-texto {
   font-size: clamp(1.1rem, 3vw, 1.5rem);
    font-weight: bold;
    color: #a57f2c;
    margin: 10px 0 5px 0;
    opacity: 0;
    transform: translateY(20px);
    transition: all 1s ease-out;;
}

/* Clase que se activará con scroll */
.foto_presi .efecto-texto.visible {
    opacity: 1;
    transform: translateY(0);
}



/* Social icons */
.social-icons {
 margin-top: 12px;
    display: flex;
    justify-content: center;
    gap: clamp(15px, 3vw, 20px);
}

.social-icons a {
    font-size: clamp(20px, 5vw, 30px);
    color: #9d2449;
    transition: 0.3s;
}

.social-icons a:hover {
    color: #611232;
    transform: scale(1.2);
}

/* Animación para el título al scroll */
@keyframes openRotate {
    0% {
        transform: scale(0.8) rotateY(90deg);
        opacity: 0;
    }
    100% {
        transform: scale(1) rotateY(0deg);
        opacity: 1;
    }
}

.foto_presi h3 {
     font-size: clamp(1.1rem, 3vw, 1.5rem);
    font-weight: bold;
    color: #fff;
    background-color: rgba(97,17,50,0.8);
    display: inline-block;
    padding: 10px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    opacity: 0;
    transform: scale(0.8) rotateY(90deg);
    transition: transform 2.5s cubic-bezier(0.25, 1, 0.5, 1), opacity 2.5s ease-out;
}

/* Clase activada al hacer scroll */
.foto_presi h3.visible {
    opacity: 1;
    transform: scale(1) rotateY(0deg);
}

.foto_presi h4 {
   font-size: clamp(1rem, 2.5vw, 1.3rem);
    margin: 10px 0 5px 0;
    font-weight: bold;
    color: #a57f2c;
}

.foto_presi p {
  font-size: clamp(0.9rem, 2vw, 1.1rem);
    color: #611132;
    margin: 0;
}

.details-content {
    padding: clamp(15px, 3vw, 20px) clamp(20px, 4vw, 25px) clamp(20px, 4vw, 25px);
}


.foto_presi img:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
}




        
     
        .details-content h3 {
            color: var(--color-primary);
            font-size: 1.2rem;
            margin-bottom: 15px;
            font-family: 'Montserrat', sans-serif;
            border-bottom: 2px solid var(--color-accent);
            padding-bottom: 8px;
        }
        
        .features-list {
            list-style: none;
            padding: 0;
            margin-bottom: 20px;
        }
        
        .features-list li {
            margin-bottom: 10px;
            position: relative;
            padding-left: 30px;
            color: #555;
        }
        
        .features-list li:before {
            content: '\f058';
            font-family: 'Font Awesome 6 Free';
            font-weight: 900;
            color: var(--color-primary);
            position: absolute;
            left: 0;
            top: 50%;
            transform: translateY(-50%);
            font-size: 1.2rem;
        }
        
        .contact-info {
            background: rgba(157, 36, 73, 0.08);
            border-radius: 10px;
            padding: 15px;
            border-left: 4px solid var(--color-primary);
        }
        
        .contact-info p {
            margin-bottom: 8px;
            display: flex;
            align-items: center;
            text-align: left;
        }
        
        .contact-info i {
            margin-right: 10px;
            color: var(--color-primary);
            width: 20px;
        }
    
        
        /* Elemento decorativo */
        .acordeon-triangle {
            position: absolute;
            width: 0;
            height: 0;
            border-style: solid;
            opacity: 0.1;
            z-index: 0;
            transition: var(--transition-slow);
        }
        
        .acordeon-triangle-1 {
            border-width: 0 0 80px 80px;
            border-color: transparent transparent var(--color-primary) transparent;
            top: 20px;
            left: 20px;
        }
        
        .acordeon-triangle-2 {
            border-width: 0 60px 60px 0;
            border-color: transparent var(--color-secondary) transparent transparent;
            bottom: 20px;
            right: 20px;
        }
        
        .acordeon-card:hover .acordeon-triangle,
        .acordeon-card.active .acordeon-triangle {
            opacity: 0.2;
        }
        
        /* Efecto de aparición */
        .acordeon-card {
            opacity: 0;
            transform: translateY(50px);
            animation: fadeInUp 0.8s ease forwards;
        }
        
        .acordeon-card:nth-child(1) {
            animation-delay: 0.1s;
        }
        
        .acordeon-card:nth-child(2) {
            animation-delay: 0.2s;
        }
        
        .acordeon-card:nth-child(3) {
            animation-delay: 0.3s;
        }

        
        @keyframes fadeInUp {
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }
        
        /* ESTILOS PARA LOS ENLACES DENTRO DEL ACORDEÓN */
        .enlaces-directos {
            display: flex;
            flex-direction: column;
            gap: 15px;
            margin-top: 20px;
        }
        
        .enlace-directo {
            display: flex;
            align-items: center;
            background: white;
            border-radius: 12px;
            padding: 15px;
            text-decoration: none;
            color: #333;
            box-shadow: var(--shadow-soft);
            transition: var(--transition-fast);
            border-left: 4px solid var(--color-primary);
            position: relative;
            overflow: hidden;
        }
        
        .enlace-directo:before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(157, 36, 73, 0.1), transparent);
            transition: var(--transition-slow);
        }
        
        .enlace-directo:hover:before {
            left: 100%;
        }
        
        .enlace-directo:hover {
            transform: translateY(-3px);
            box-shadow: var(--shadow-medium);
            border-left: 4px solid var(--color-secondary);
        }
        
        .enlace-icono {
            width: 50px;
            height: 50px;
            display: flex;
            align-items: center;
            justify-content: center;
            background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
            color: white;
            border-radius: 10px;
            margin-right: 15px;
            flex-shrink: 0;
            transition: var(--transition-fast);
        }
        
        .enlace-directo:hover .enlace-icono {
            transform: scale(1.1) rotate(5deg);
            background: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-primary) 100%);
        }
        
        .enlace-texto {
            flex-grow: 1;
        }
        
        .enlace-titulo {
            font-weight: 700;
            color: var(--color-primary);
            font-size: 1.1rem;
            margin-bottom: 4px;
            font-family: 'Montserrat', sans-serif;
        }
        
        .enlace-descripcion {
            color: #666;
            font-size: 0.9rem;
           
        }
        
        .enlace-boton {
            margin: 10px auto 0;
    display: block;
            padding: 8px 15px;
            background: rgba(157, 36, 73, 0.1);
            color: var(--color-primary);
            border-radius: 20px;
            font-size: 0.9rem;
            font-weight: 600;
            transition: var(--transition-fast);
            flex-shrink: 0;
        }
        
        .enlace-directo:hover .enlace-boton {
            background: var(--color-primary);
            color: white;
        }
        
        /* Imagen de hover - EFECTO MEJORADO */
        .coordinacion-hover-image {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            opacity: 0;
            background-size: cover;
            background-position: center;
            transition: var(--transition-slow);
            z-index: 0;
            border-radius: 18px;
            transform: scale(1.08);
            filter: brightness(0.7) blur(2px);
        }
        
        .acordeon-card:hover .coordinacion-hover-image {
            opacity: 0.2;
            transform: scale(1);
            filter: brightness(0.8) blur(0);
        }
        
      /*----------------- RESPPONSIVIDAD -----------------------*/

       /* Ajustes extra para móviles */
@media (max-width: 600px) {
    .carousel-item img {
        object-fit: contain; /* muestra toda la imagen sin recortar */
    }
}

/* Responsivo: ajusta clip-path y object-position */
@media (max-width: 900px) {
    .container-background {
        clip-path: polygon(0% 0%, 100% 0%, 100% 80%, 50% 90%, 0% 80%);
        top: 15px;
    }
    .container-background video {
        object-position: center 70%;
    }
}

@media (max-width: 600px) {
    .container-background {
        clip-path: polygon(0% 0%, 100% 0%, 100% 75%, 50% 85%, 0% 75%);
        top: 10px;
    }
    .container-background video {
        object-position: center 75%;
    }
}

@media (max-width: 420px) {
    .container-background {
        clip-path: polygon(0% 0%, 100% 0%, 100% 70%, 50% 80%, 0% 70%);
        top: 5px;
    }
    .container-background video {
        object-position: center 80%;
    }
}

/* Ajustes responsivos */
@media (max-width: 1200px) {
    .carousel-section {
        height: 50vh;
    }
}

@media (max-width: 900px) {
    .carousel-section {
        height: 45vh;
    }
}

@media (max-width: 600px) {
    .carousel-section {
        height: 35vh;
    }
}

@media (max-width: 420px) {
    .carousel-section {
        height: 30vh;
    }
}


/* Responsive: altura máxima menor en móviles */
@media (max-width: 768px) {
  .acordeon-details.show {
    max-height: 200px;
  }
}
@media (max-width: 420px) {
  .acordeon-details.show {
    max-height: 150px;
  }
}
 
      @media (max-width: 900px) {
    .logo-over-video {
        width: 220px;
        height: 220px;
        /* posición calculada según altura del video */
        bottom: calc(5% + 0px); /* 5% desde la base del video */
    }
}

/* Móviles */
@media (max-width: 600px) {
    .logo-over-video {
        width: 180px;
        height: 180px;
        bottom: calc(3% + 0px); /* más pegado al borde inferior */
    }
}

/* Móviles muy pequeños */
@media (max-width: 420px) {
    .logo-over-video {
        width: 150px;
        height: 150px;
         bottom: 40px;
    }
}
@media (max-width: 768px) {
    .custom-carousel .carousel-item {
        height: 40vh; 
    }

    .custom-carousel .carousel-item img {
        width: 100%;
        height: 100%;
        object-fit: cover; /* rellena el contenedor */
    }

    .custom-carousel .carousel-caption {
        bottom: 10%;
        width: 90%;
        max-width: none;
        text-align: center;
    }
}



        .header-img {
    width: 100%;
    height: clamp(250px, 30vh, 400px);
    object-fit: cover;
}
@media (max-width: 768px) {
    .header-img {
        height: auto;   /* altura flexible en móviles */
    }
}
@media (max-width: 768px) {
    .header-title {
        display: flex;
        flex-direction: column;  /* Apilar elementos verticalmente */
        align-items: center;     /* Centra horizontalmente */
        justify-content: center; /* Centra verticalmente dentro del header */
        text-align: center;
    }

  .header-title .ayto{
        position: relative; /* deja de estar absoluto */
        top: 0;
        left: auto;
        right: auto;
        margin: 25px 0; /* separación entre elementos */
    }

    .header-title .contador {
        position: relative; /* deja de estar absoluto */
        top: 0;
        left: auto;
        right: auto;
        margin: 25px 0; /* separación entre elementos */
    }
}

@media (max-width: 480px) {
    .header-title .contador {
        font-size: 0.8rem;     /* más pequeño en móviles pequeños */
    }

    .header-title .ayto {
        font-size: 0.8rem;     /* más pequeño en móviles pequeños */
    }
}

        @media (max-width: 768px) {
            .acordeones-container {
                grid-template-columns: 1fr;
            }
            
            .acordeon-content {
                padding: 15px 20px;
            }
            
            .details-content {
                padding: 15px 20px 20px;
            }
            
            h1 {
                font-size: 2rem;
            }
        }
        
        /* Responsive para enlaces */
        @media (max-width: 480px) {
            .enlace-directo {
                flex-direction: column;
                text-align: center;
                padding: 20px;
            }
            
            .enlace-icono {
                margin-right: 0;
                margin-bottom: 15px;
            }
            
            .enlace-boton {
                margin-top: 15px;
            }
        }
        @media screen and (max-width: 1024px) {
    .emergency-card {
        flex: 1 1 calc(33.333% - 1rem); /* 3 por fila */
    }
}
@media screen and (max-width: 768px) {
    .emergency-card {
        flex: 1 1 calc(50% - 1rem); /* 2 por fila */
    }
}
@media screen and (max-width: 480px) {
    .emergency-card {
        flex: 1 1 100%; /* 1 por fila */
    }
}
/* Pantallas medianas */
@media (max-width: 992px) {
    .foto-principal {
        width: 60%;
        max-width: 300px;
    }

    .foto_presi .imagen1,
    .foto_presi .imagen2 {
        width: 20%;
        max-width: 140px;
    }

    .foto_presi h3 {
        font-size: 1.3rem;
    }

    .foto_presi .efecto-texto {
        font-size: 1.2rem;
    }

    .social-icons a {
        font-size: 25px;
    }
}

/* Pantallas pequeñas / móviles */
@media (max-width: 576px) {
    .foto-principal {
        width: 80%;
        max-width: 250px;
    }

    .foto_presi .imagen1,
    .foto_presi .imagen2 {
        width: 18%;
        max-width: 100px;
        left: -50px;
        right: -50px;
    }

    .foto_presi h3 {
        font-size: 1.1rem;
    }

    .foto_presi .efecto-texto {
        font-size: 1rem;
    }

    .social-icons a {
        font-size: 20px;
    }

    .foto_presi {
        padding: 15px;
    }
}