/* --------------------------------
   GLOBAL STYLES
-------------------------------- */
body, html {
    margin: 0;
    padding: 0;
    padding-top: 2.5rem;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
    color: #001F3F;
}

/* --------------------------------
   TYPOGRAPHY
-------------------------------- */
h3 {
    color: #001F3F;
    text-transform: uppercase;
}

.poster {
    flex-shrink: 0;
    width: 20rem;
    height: auto;
}

/* --------------------------------
   SCROLLING BACKGROUND
-------------------------------- */
.scrolling-background {
    position: relative;
    width: 100%;
    height: 70vh;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.06);
}

.scrolling-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('/images/col1.png');
    background-size: cover;
    background-repeat: repeat-x;
    animation: scroll-background 80s linear infinite;
    opacity: 0.2;
    z-index: -1;
    background-blend-mode: overlay;
}

@keyframes scroll-background {
    0% { background-position: 0 0; }
    100% { background-position: -100% 0; }
}

/* --------------------------------
   LOGO
-------------------------------- */
.logo3 {
    padding-top: 2rem;
    width: 50%;
    margin-left: -3.438rem;
    z-index: 1;
    transition: transform 0.5s ease-in-out, box-shadow 0.5s ease-in-out;
    animation: fade-in 2s forwards;
}

@keyframes fade-in {
    0% { opacity: 0; transform: scale(0.8); }
    100% { opacity: 1; transform: scale(1); }
}

/* --------------------------------
   ROW SECTIONS
-------------------------------- */
.row1, .row2, .row3 {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.row1 {
    padding-top: 1%;
    gap: 0.5%;
}

.row2 {
    padding-top: 2%;
    overflow: hidden;
}

.row3 {
    margin-top: 3%;
    background-color: #F4F4F4;
    height: 20%;
    padding: 3% 0;
    justify-content: space-between;
    gap: 2%;
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.row3.show-row {
    opacity: 1;
    transform: translateY(0);
}

/* --------------------------------
   COLUMNS
-------------------------------- */
.column, .column:first-child {
    padding: 0 1.5vh 2vh;
    text-align: center;
    align-items: center;
    font-size: .8rem;
    margin-top: 2vh;
    border-radius: 2vh;
    width: 9rem;
    max-width: 100%;
    opacity: 0;
    transform: scale(0.8);
}

.column {
    background-color: transparent;
    color: #001F3F;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
    transition: opacity 1s ease, transform 1s ease;
}

.count {
    overflow: hidden;
}

.column:first-child {
    background-color: #001F3F;
    color: white;
}

.column.show {
    opacity: 1;
    transform: scale(1);
}

.column:not(:first-child):hover {
    transform: scale(1.1);
    box-shadow: 0px 6px 12px rgba(0, 0, 0, 0.3);
}

/* --------------------------------
   LOCATION SECTION
-------------------------------- */
.column1 {
    padding: 1%;
    text-align: center;
    max-width: 30%;
    overflow-wrap: break-word;
}

.column1.location {
    margin-left: 5%;
    border-radius: 10px;
    color: #fff;
    opacity: 0;
    transform: translateX(100%);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.column1.location.show {
    opacity: 1;
    transform: translateX(0);
}

.column1.location a {
    text-decoration: none;
}

.column1.location h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: #005B88;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.1);
}

.column1.location h2 {
    font-size: 1.5rem;
    font-weight: 400;
    color: #2D2D2D;
    margin-bottom: 15px;
    transition: color 0.3s ease;
}

.column1.location h2:hover {
    color: #FFB400;
}

/* --------------------------------
   MAP
-------------------------------- */
.map {
    width: 100vh;
    margin-left: -30%;
    transition: transform 0.3s ease;
}

.map:hover {
    transform: scale(1.1);
}

/* --------------------------------
   POSTER CAROUSEL
-------------------------------- */
.carousel-header {
    text-align: center;
    margin-block: 2rem;
}

.carousel-header h2 {
    font-size: clamp(1.25rem, 3vw, 2rem);
    color: #01185E; /* PFCCO main color */
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.poster-carousel-container {
    display: flex;
    align-items: center;
    position: relative;
    max-width: 100%;
    margin: 2% 0;
    opacity: 0;
    transform: translateY(100px);
    transition: opacity 0.8s ease, transform 0.8s ease;
    overflow: hidden;
}

.poster-carousel-container.show-carousel {
    opacity: 1;
    transform: translateY(0);
}

.poster-carousel {
    display: flex;
    gap: 1rem;
    transition: transform 0.5s ease-in-out;
    will-change: transform;
}

.poster-card {
    height: 26rem;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    background-color: #003366cb;
    padding: 1rem;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.5s ease, transform 0.5s ease;
}

.poster-card:hover {
    background-color: #001F3F;
}

.carousel-button {
    position: absolute;
    background-color: #0000001e;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 10rem;
    height: 10rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    font-size: 50px;
    transition: background-color 0.3s ease;
}

.carousel-button:hover {
    background-color: #001F3F;
    color: white;
}

.carousel-button.prev { left: 5rem; }
.carousel-button.next { right: 5rem; }

/* --------------------------------
   MODAL
-------------------------------- */
.modal {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.8); /* Dim background */
    justify-content: center;
    align-items: center;
}

.modal-content {
    margin: 10% auto;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 80%;
    max-width: 700px;
    background-color: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.modal-content img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 0.5rem;
}

.close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2rem;
    color: white;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover {
    color: #ccc;
}

/* --------------------------------
   AFFILIATIONS
-------------------------------- */
.affiliations1 {
    width: 10%;
}

.column2 {
    flex: 1;
    text-align: center;
    padding: 10px;
}

.column2 img {
    width: 100px;
    height: auto;
    margin-bottom: 10px;
    transition: transform 0.3s ease;
}

.column2:hover img {
    transform: scale(1.1);
}

.column2 span {
    display: block;
    font-size: 14px;
    margin-top: 5px;
    color: #333;
}

/* --------------------------------
   MEDIA QUERIES
-------------------------------- */
@media (max-width: 768px) {
    .poster {
        width: 180px;
    }

    .poster-carousel-container {
        opacity: 1 !important;
        transform: translateY(0) !important;
    }
}

@media only screen and (max-width: 400px) {
    .scrolling-background {
        margin-top: 6vh;
        height: 40vh;
    }

    .logo3 {
        width: 80%;
        margin-left: 0;
        padding-top: 1rem;
    }

    .row1, .row2, .row3 {
        flex-direction: column;
        padding: 0;
        gap: 1rem;
    }

    .column, .column:first-child {
        width: 80%;
        font-size: 0.75rem;
        margin: 1rem auto;
    }

    .column1 {
        max-width: 100%;
        padding: 10px;
    }

    .column1.location {
        margin-left: 0;
        padding: 10px;
    }

    .column1.location h1 {
        font-size: 1.8rem;
    }

    .column1.location h2 {
        font-size: 1rem;
    }

    .map {
        width: 100%;
        margin-left: 0;
    }

    .poster-carousel-container {
        flex-direction: column;
    }

    .poster-carousel {
        flex-direction: column;
        align-items: center;
    }

    .poster-card {
        width: 90%;
        height: auto;
        margin-bottom: 1rem;
    }

    .carousel-button {
        width: 3rem;
        height: 3rem;
        font-size: 14px;
    }
    .poster {
        width: 100%;
        height: 12rem; /* or any other fixed height like 15vh */
        object-fit: cover;
        border-radius: 0.5rem;
    }

    .carousel-button.prev { left: 1rem; }
    .carousel-button.next { right: 1rem; }

    .modal-content {
        width: 95%;
        margin: 20% auto;
    }

    .close {
        top: 10px;
        right: 20px;
        font-size: 24px;
    }

    .row3 {
        padding: 2%;
    }

    .column2 img {
        width: 60px;
    }

    .column2 span {
        font-size: 12px;
    }

    .poster {
        width: 100%;
    }
}

.video-section {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    background-color: #f9f9f9;
}

.video-player {
    width: 100%;
    max-width: 960px;
    height: auto;
    border-radius: 1rem;
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.1);
}
