/* ===== GLOBAL SETTINGS ===== */
* {
    box-sizing: border-box;
    padding: 0;
    margin-bottom: 5px;
}
h2 {
    text-align: center;
    margin-bottom: 10px;
}
.container {
    background-image: url('../images/bg.png');
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-size: 100% 100%;
    padding: 20px;
    min-height: 100vh;
    background-color: #f1f1f1;
    font-family: Arial;
    padding-top: 7%;
}

/* ===== SLIDER SECTION ===== */
.newslider {
    background-color: transparent;
    overflow: hidden;
    width: 100%;
    height: 500px;
    position: relative;
}
.newslider img {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    animation-duration: 12s;
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
    z-index: 1;
}
@keyframes fadeInOut {
    0%, 100% { opacity: 0; }
    33% { opacity: 1; }
    66% { opacity: 0; }
}
.photo1 { animation-name: fadeInOut; animation-delay: 1s; z-index: 4; }
.photo2 { animation-name: fadeInOut; animation-delay: 4s; z-index: 3; }
.photo3 { animation-name: fadeInOut; animation-delay: 8s; z-index: 1; }

/* ===== ANNOUNCEMENTS SECTION ===== */
.wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    margin: 0 auto 5%;
}
.card {
    height: 350px;
    width: 22%;
    background: white;
    display: flex;
    align-items: flex-end;
    padding: 2rem 1rem;
    position: relative;
    transition: 0.5s all ease-in-out;
    overflow: hidden;
    border-radius: 1rem;
    z-index: 1;
    box-sizing: border-box;
}
.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(107, 107, 107, 0.3), rgba(107, 107, 107, 1));
    z-index: 1;
    opacity: 0;
    transition: 0.5s all;
}
.card:hover::before { opacity: 1; }
.card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 0;
}
.card .info {
    position: relative;
    color: #fff;
    z-index: 2;
    opacity: 0;
    transform: translateY(30px);
    transition: 0.5s all;
}
.card:hover .info {
    opacity: 1;
    transform: translateY(0);
}
.card .info h1 { line-height: 40%; margin-bottom: 10px; }
.card .info p {
    font-size: 15px;
    letter-spacing: 1px;
    margin-bottom: 20px;
}

/* ===== UPCOMING ANNOUNCEMENTS SECTION ===== */
.section {
    display: flex;
    justify-content: space-between;
    border-top-left-radius: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
    margin-bottom: 2px;
    padding: 10px;
}
.section a {
    border-radius: 10px;
    padding: 10px;
    width: 23%;
    text-align: left;
    overflow: hidden;
    color: white;
    text-decoration: none;
    margin-bottom: 10px;
    cursor: pointer;
}
.section a:hover {
    background-color: #636363;
    box-shadow: #000000;
    opacity: 90%;
}
/* .section img {
    width: 100%;
    margin-bottom: 10px;
} */
 .section img {
    width: 100%;
    height: 200px; 
    object-fit: cover; 
    border-radius: 10px;
    margin-bottom: 10px;
}

/* ===== NEWS SECTION ===== */
/* .image-container {
    width: 100%;
    min-width: 250px;
    max-width: 250px;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    position: relative;
    border-radius: 8px;
    margin-bottom: 5px;
}
.image-container img {
    width: auto;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
} */

.image-container {
    width: 100%;
    min-width: 250px;
    max-width: 250px;
    height: 200px;
    overflow: hidden;
    position: relative;
    border-radius: 8px;
    margin-bottom: 5px;
}
/* .image-container img {
    width: 100%;
    height: 100%; 
    object-fit: cover; 
    position: absolute;
    top: 0;
    left: 0;
} */

.image-container img {
    width: 100%;
    height: 100%; 
    object-fit: cover;
    object-position: center ;
    position: absolute;
    top: 0;
    left: 0;
    transition: transform 0.5s ease, object-position 0.5s ease;
}

.image-container:hover img {
    transform: scale(1.05); /* Slight zoom effect */
    object-position: center center; /* Ensure it centers on hover */
}


.card__container {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
    margin-bottom: 8%;
}
.card__article {
    position: relative;
    width: 20%;
    max-width: 328px;
    height: 90%;
}
.card__img {
    width: 320px;
    height: 180px;
    border-radius: 1rem;
    position: relative;
}
.card__data {
    width: 230px;
    height: 90%;
    background-color: white;
    padding: 1rem 1rem;
    box-shadow: 0 8px 24px hsla(0, 0%, 0%, .15);
    border-radius: 1rem;
    position: absolute;
    bottom: -7rem;
    left: 0;
    right: 0;
    margin-inline: auto;
    margin-bottom: 5%;
    transition: opacity 1s 1s;
}
.card__description {
    display: block;
    font-size: var(--h2-font-size);
    margin-bottom: .10rem;
}
.limit-lines {
    max-height: 7em;
    max-width: 25em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

/* ===== COMMON ELEMENTS ===== */
.shortbutton {
    display: inline-block;
    padding: 10px 20px;
    background: white;
    color: black;
    font-size: 1rem;
    text-align: center;
    border: none;
    border-radius: 25px;
    text-decoration: none;
    cursor: pointer;
    transition: 0.3s ease-in-out;
    position: relative;
}
.shortbutton:hover {
    background-color: green;
    color: white;
}
img {
    display: block;
    max-width: 100%;
    height: auto;
}
#modalImage {
    margin-top: 10%;
    display: block;
    max-width: 100%;
    height: auto;
}

/* ===== MODAL & SLIDES ===== */
.mySlides { display: none; }
.prev, .next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    color: rgb(13, 136, 30);
    font-weight: bold;
    font-size: 18px;
    transition: 0.6s ease;
    border-radius: 0 3px 3px 0;
    user-select: none;
}
.next {
    right: 0;
    border-radius: 3px 0 0 3px;
}
.prev:hover, .next:hover {
    background-color: rgba(0,0,0,0.8);
}
.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.9);
}
.modal-content {
    position: relative;
    margin: auto;
    margin-top: 10%;
    padding: 0;
    width: 80%;
    max-width: 700px;
}
.close {
    color: white;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

/* ===== RESPONSIVE (Mobile) ===== */
@media screen and (max-width: 700px) {
    .wrapper {
        flex-direction: column;
        align-items: center;
    }
    .container {
        width: 100%;
        padding: 20px;
    }
    .newslider {
        margin-top: 20px;
        overflow: hidden;
        width: 100%;
        height: 200px;
    }
    .card {
        height: 100px;
        width: auto;
        padding: 1rem;
        margin-bottom: 20px;
    }
    .card .info p {
        font-size: 15px;
        margin-bottom: 20px;
    }
    .section {
        flex-direction: column;
        align-items: center;
        padding: 10px;
    }
    .section a {
        width: 90%;
    }
    .section img {
        width: 100%;
        height: 100%;
        margin-bottom: 10px;
    }
    .image-container {
        max-width: 100%;
        aspect-ratio: 16 / 9;
    }
    .card img {
        height: 200px;
    }
    .card .info {
        opacity: 1;
        transform: translateY(0);
    }
    .card__article {
        width: 40%;
        height: 50%;
    }
    .card__img {
        width: 100%;
    }
    .card__data {
        width: 100%;
        height: 50%;
        padding: 1rem;
        bottom: 0;
        margin-bottom: 5%;
    }
    .card__description {
        font-size: 10px;
    }
    .card__container {
        width: 100%;
        height: 100%;
        display: flex;
        justify-content: center;
    }
    .limit-lines h4 {
        font-size: 12px;
    }
    #modalImage {
        margin-top: 20%;
    }
}
