header {
    z-index: 5 ;
    position: relative;
    width: 100vw;
    overflow: hidden;
    display: flex;
    /* flex-direction: column; */
    align-items: center;
    justify-content: center;
    transition: height 1.5s ease-in-out;

    background-image: url('/images/coscorock/1.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat; /* ✅ esto evita la repetición */
}

#main-header {
    height: 100vh;
}

#header {
    background-attachment: fixed;
    height: 75vh;
    color: #ff007a;
    text-align: center;
    font-size: 3.5vw;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.7);
}


/* .background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    filter: brightness(35%);
} */

h1 a {
    color: inherit;
    text-decoration: none;
    letter-spacing: 0.25em; /* Espaciado proporcional al tamaño de la fuente */
	padding-left: 0.25em; /* Ajuste fino para compensar la última letra */
    transition: all 0.3s ease-in-out;
    
    animation-name: cambiocolor;
    animation-duration: 10s;
    animation-iteration-count: infinite;
    /* animation-direction: alternate-reverse; */
}

@keyframes cambiocolor {
    from { color: #961b56; }
    25% {color:#ff007a;} ;
    50% {color:#961b56;} ;
    75% {color:#ff007a;} ;
    to { color: #961b56; }
}

/* AJUSTE PARA CAMBIAR EL TÍTULO EN EL MOBILE */
@media (width <= 860px) {
    #header {
        background-attachment: local;
        font-size: 4.5vw;
        height: 50vh;
    }
    h1 a {
        letter-spacing: 0;
        padding-left: 0;
    }
    header {
        -webkit-mask-image: linear-gradient(to bottom, black 50%, transparent 100%);
        mask-image: linear-gradient(to bottom, black 50%, transparent 100%);
    }
}

/* Para que el fondo salga oscuro desde el principio */
header::before {
    content: "";
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.65); /* similar a brightness(35%) */
    z-index: 0;
}

.slider-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    filter: brightness(35%);
    z-index: 10;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    z-index: 10;
}

.slide.active {
    opacity: 1;
    z-index: 10;
}

#main-title {
    position: absolute;
    z-index: 15;
    /* top: 50%; */
    /* left: 50%; */
    /* transform: translate(-50%, -50%); */
    width: 90%;
    height: auto;
    transition: width 1.5s ease-in-out;
    text-align: center; /* útil si el logo no está centrado internamente */
}

/* @media (width <= 860px) {
    header {
        height: 100vh;
    }
} */