@import url('https://fonts.googleapis.com/css2?family=Quicksand:wght@300..700&display=swap');

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body{
    font-family: Quicksand, sans-serif;
    width: 100%;
    height: 100%;
    overflow-x: hidden;
    line-height: 1.5;
}

#topheader{
    height: 50px;
    background-size: 100%;
    background: black url(../assets/geometria.png) center;
    position: relative;
    z-index: 1;
}
#logo{
    background-color: white;
    height: 200px;
    width: 200px;
    position: absolute;
    border-radius: 50%;
    border: 10px solid #d12730;
    top: 10px;
    left: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 3;
    text-align: center;
}

#logo2{
    background-color: white;
    height: 150px;
    width: 150px;
    position: absolute;
    border-radius: 50%;
    border: 10px solid #d12730;
    top: 20px;
    right: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 3;
    text-align: center;
}

#logo img, #logo2 img {
    width: 90%;
}
header {
    position: relative;
    z-index: 2;
}
header nav{
    height: 60px;
    background: #d12730;
    display: flex;
    justify-content: center;
    align-items: center;
}
header nav a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    transition: transform 0.3s;
}
header nav a:hover {
    transform: scale(1.1) translateY(1px);
}
header nav div{
    color: white;
    padding: 1rem;
    display: flex;
    font-weight: bold;
}

header .nav2{
    height: 40px;
    background: black;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding-right: 40px;
}
header .nav2 div{
    color: #ccc;
    padding: 1rem;
    font-size: 0.9em;
}
header .nav2 div a {
    color: #ccc;
    text-decoration: none;
}
header .nav2 div a:hover {
    color: white;
    text-decoration: underline;
}

main {
    position: relative;
}

.w100 {
    width: 100%;
}


.deco {
    height: 50px;
    background-size: 100%;
    background: black url(../assets/geometria.png) center repeat-x;
}

#grid2 {
    background-color: #333;
}

.porta-tiles {
    width: 100%;
    position: absolute;
    left:0;
    top:0;
}

#bg-video {
    position: relative;
}

#bg-video .overlayvideo {
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.9);
    color: white;
    text-align: center;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(74, 74, 74, 0.4);
    backdrop-filter: blur(2px);
}

#bg-video .overlayvideo h1 {
    font-size: 2.5rem;
    font-weight: bold;
}


h1 {
    font-size: 2.0rem;
}

.grid2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-gap: 10px;
}
.grid3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-gap: 30px;
}

.fechas > div {
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.6);
    background-color: rgba(39, 73, 4, 0.6);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    border-radius: 20px / 50px;
    padding: 10px;
    text-align: center;
    font-weight: bold;
}

.max-width {
    max-width: 800px;
    margin: 0 auto;
}

.fechas > div p {
    padding: 10px 0;
    font-size: 0.9em;
}

.italic {
    font-style: italic;
}

.txc {
    text-align: center;
}

.txj {
    text-align: justify;
}

.p30 {
    padding: 30px;
}

.p20 {
    padding: 20px;
}

.h10 {
    height: 10px;
}
.h20 {
    height: 20px;
}

.h30 {
    height: 30px;
}

.h50 {
    height: 50px;
}

.row {
    display: flex;
    align-items: center;
    justify-content: center;
}

.row.top {
    align-items: flex-start;
}

.dia-container {
    margin: 0 10px;
    background-color: #ef3f36;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-weight: bold;
    font-size: 1.9em;
    border: 3px solid black;
}

.dia-container > div {
    text-align: center;
}

.dia-container span {
    display: block;
    font-size: 0.4em;
}

.image {
    border-radius: 10px;
    overflow: hidden;
    font-size: 0;
    box-shadow: 2px 2px 20px #0000003b;
}
.image img {
    width: 100%;
}
.youtube-logo {
    position: absolute;
    width: 60px !important;
    top: 60%;
    left: 50%;
    transform: translate(-50%, -50%);
    mix-blend-mode: lighten;
    opacity: 0.9;
}

.thumbimage {
    overflow: hidden;
    border-radius: 10px;
    position: relative;
    font-size: 0;
    box-shadow: 2px 2px 20px #0000003b;
}

.thumbimage img {
    width: 100%;
}

.noticia {
    flex: 1;
    padding: 10px;
    margin: 10px;
}

.noticia:not(.notover):hover {
    cursor: pointer;
}


.noticia:hover .image img {
    transform: scale(1.1);
}
.noticia:not(.notover):hover h2, .noticia:not(.notover):hover h3 {
    color: #ef3f36;
}

.noticia h2, .noticia h3 {
    transition: color 0.3s;
    margin: 10px 0;
}



.noticia .image {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    clip-path: polygon(23% 5%, 0 0, 6% 24%, 0 46%, 6% 68%, 0 99%, 27% 100%, 52% 95%, 78% 100%, 100% 98%, 94% 73%, 100% 48%, 96% 28%, 100% 0, 75% 4%, 48% 0);
}

.noticia .image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.noti-titulo {
    font-size: 0.9em;
    font-weight: 500;
    color: red;
    font-style: italic;
    padding: 10px 0;
    margin-bottom: 10px;
}

footer {
    position: relative;
}

#footer-nav {
    background-color: #e30029;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
}
#footer-nav > div {
    padding: 1rem;
    font-size: 0.9em;
    font-weight: bold;
}
#footer-nav > div a {
    color: white;
    text-decoration: none;
}

#footer-nav > div a:hover {
    text-decoration: underline;
}

.social-icons img {
    width: 48px;
}

#butterflies-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.butterfly {
    position: absolute;
    width: 40px;
    height: 40px;
    background-image: url('../assets/butterfly.gif');
    background-size: contain;
    background-repeat: no-repeat;
    animation: fly linear infinite;
    opacity: 0.8;
}

@keyframes fly {
    0% {
        transform: translate(0, 0) scale(1) rotate(0deg);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: translate(var(--x), var(--y)) scale(var(--scale)) rotate(var(--rot));
        opacity: 0;
    }
}


.timeline {
    position: relative;
    max-width: 800px;
    margin: auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 4px;
    background-color: #d1001c;
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

.timeline-event {
    padding: 20px 40px;
    position: relative;
    width: 50%;
}

.timeline-event::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    right: -10px;
    background-color: white;
    border: 4px solid #d1001c;
    top: 30px;
    border-radius: 50%;
    z-index: 1;
}

.left {
    left: 0;
}

.right {
    left: 50%;
}

.right::after {
    left: -10px;
}

.timeline-content {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    position: relative;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.timeline-content h3 {
    margin-top: 0;
    color: #d1001c;
}



.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    padding: 20px;
}

.gallery img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    cursor: pointer;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    transition: transform 0.2s;
}

.gallery img:hover {
    transform: scale(1.02);
}

.lightbox-img {
    transition: transform 0.4s;
}

.lightbox-img:hover {
    cursor: pointer;
    transform: scale(1.05);
}

.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgb(140 140 140 / 80%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.95);
    transition: opacity 0.3s ease;
    backdrop-filter: blur(30px);
}

.lightbox.visible {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.lightbox img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 10px;
}

.close {
    position: fixed;
    top: 20px;
    right: 30px;
    font-size: 48px;
    color: white;
    cursor: pointer;
    font-weight: bold;
    z-index: 1001;
    text-shadow: 0 0 5px #000000cc;
}

.regresar {
    padding: 10px 30px;
    border: none;
    background: #d12730;
    color: white;
    font-family: 'Quicksand', sans-serif;
    font-size: 1.2em;
    border-radius: 5px;
}

.regresar:hover {
    cursor: pointer;
    background: #fd5b64;

}

.menu-icon {
    font-size: 24px;
}


#drawer {
    position: fixed;
    top: 0;
    left: -260px; /* oculto inicialmente */
    width: 250px;
    height: 100%;
    background-color: #222;
    color: white;
    display: flex;
    flex-direction: column;
    padding-top: 60px;
    transition: left 0.3s ease;
    z-index: 999;
}

#drawer a {
    color: white;
    padding: 15px;
    text-decoration: none;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

#drawer a:hover {
    background-color: rgba(255,255,255,0.1);
}

#menu-btn {
    display: none;
}

/* Botón cerrar */
#close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 28px;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
}

/* Estado abierto */
#drawer.open {
    left: 0;
}

#agenda-mobile {
    display: none;
}

@media screen and (max-width: 768px) {
    .timeline-event {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }

    .timeline-event::after {
        left: 30px;
    }

    .right {
        left: 0%;
    }

    .right::after {
        left: 30px;
    }

    .timeline::after {

        display: none;
    }

    header .nav2 {
        display: none;
    }

    header nav div:not(.menu-icon) {
        display: none;
    }

    header nav {
        justify-content: flex-end;
    }

    header #logo {
        height: 130px;
        width: 130px;
    }

    #logo2 {
        height: 120px;
        width: 120px;
    }

    header .deco {
        height: 40px;
    }

    #footer-nav {
        display: none;
    }

    footer .row {
        display: block;
    }

    .max-width {
        padding: 0 25px;
    }

    .dia-container {
        width: 70px;
        height: 70px;
        font-size: 1.3em;
    }

    .row.break {
        display: block;
    }

    .noticia {
        border-bottom: 1px solid #ccc;
        margin-bottom: 20px;
    }

    .overlayvideo {
        display: none !important;
    }

    .fechas > div {
        font-size: 0.8em;
        margin-bottom: 10px;
    }

    h1 {
        font-size: 1.4rem;
    }

    #agenda-mobile {
        display: block;
    }

    #menu-btn {
        display: block;
    }

}