/* General Styles & Reset */
:root {
    --primary-red: #CD0000; /* Simbu Red */
    --primary-black: #000000;
    --primary-gold: #FFD700; /* Gold */
    --secondary-brown: #8B4513;
    --secondary-cream: #F5F5DC;
    --secondary-grey: #808080;
    --text-color-dark: #333;
    --text-color-light: #f4f4f4;
    --header-height: 75px; /* Slightly reduced from 80px */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Nunito', 'Roboto', sans-serif;
    line-height: 1.6;
    color: var(--text-color-dark);
    background-color: #f8f8f8;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-padding {
    padding: 80px 0;
}

.light-bg {
    background-color: var(--secondary-cream);
}

h1, h2, h3, h4 {
    font-family: 'Poppins', 'Montserrat', sans-serif;
    color: var(--primary-black);
    margin-bottom: 20px;
}

h2 {
    font-size: clamp(2em, 4vw, 3em); /* Adapted to match sss.css h2 */
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

h2::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -10px;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background-color: var(--primary-red);
    border-radius: 2px;
}

p {
    margin-bottom: 15px;
}

a {
    text-decoration: none;
    color: var(--primary-red);
    transition: color 0.3s ease;
}

a:hover {
    color: var(--primary-black);
}

.button {
    display: inline-block;
    background-color: var(--primary-red);
    color: #fff;
    padding: 12px 25px;
    border-radius: 5px;
    transition: background-color 0.3s ease, transform 0.2s ease;
    border: none;
    cursor: pointer;
    font-weight: bold;
    text-align: center;
}

.button:hover {
    background-color: var(--primary-black);
    transform: translateY(-2px);
}

.button.secondary-button {
    background-color: var(--secondary-grey);
    color: #fff;
}

.button.secondary-button:hover {
    background-color: var(--primary-black);
}

hr {
    border: 0;
    height: 1px;
    background-color: var(--secondary-grey);
    margin: 0 0 60px 0;
    width: 80%;
    margin-left: auto;
    margin-right: auto;
}

/* Header */
#main-header {
    background-color: rgba(255, 255, 255, 0.95);
    padding: 10px 0; /* Reduced padding from 15px */
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    height: var(--header-height);
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

#main-header.sticky {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    background-color: #fff;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* Styling for branding (logo + flag) */
.header-branding {
    display: flex;
    align-items: center;
    gap: 20px; /* Space between logo, flag, and new UPNG logo */
}

.logo img {
    height: 65px; /* Slightly reduced from 70px */
}

.simbu-flag img {
    height: 60px; /* Slightly reduced from 65px */
    width: auto;
    border-radius: 1px; /* Slightly rounded corners for flag */
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); /* Subtle shadow for flag */
}

/* UPNG Logo Styling */
.UPNG-logo img {
    height: 60px; /* Slightly reduced from 65px */
    width: auto;
    border-radius: 1px;
}


/* Default desktop navigation styles */
#main-nav ul {
    list-style: none;
    display: flex;
}

#main-nav ul li {
    margin-left: 20px;
}

#main-nav ul li a {
    color: var(--primary-black);
    font-weight: 600;
    transition: color 0.3s ease, transform 0.2s ease;
    position: relative;
    padding-bottom: 5px;
}

#main-nav ul li a:hover,
#main-nav ul li a.active {
    color: var(--primary-red);
}

#main-nav ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background: var(--primary-red);
    left: 0;
    bottom: 0;
    transition: width 0.3s ease;
}

#main-nav ul li a:hover::after,
#main-nav ul li a.active::after {
    width: 100%;
}

/* Styles for the Register Now Button */
.register-button {
    margin-left: 20px;
    background-color: var(--primary-red);
    color: #fff;
    padding: 10px 20px;
    border: 2px solid var(--primary-gold);
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    white-space: nowrap;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    /* For the <a> tag inside the button */
    display: flex; /* Use flex to center the link content if needed */
    align-items: center;
    justify-content: center;
}

.register-button:hover {
    background-color: var(--primary-black);
    border-color: var(--primary-red);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.register-button a {
    color: #fff; /* Ensure the link text inside is white */
    text-decoration: none; /* Remove underline from the link */
    padding: 0; /* Remove any default padding from the <a> tag */
    display: contents; /* Make the anchor effectively 'disappear' in layout, passing text styles to parent */
}

.register-button a:hover {
    color: #fff; /* Keep text white on hover */
}

.menu-box {
    display: none; /* Hidden by default on desktop */
}

.menu-toggle {
    display: none; /* Hidden by default on desktop */
    font-size: 1.8em;
    cursor: pointer;
    color: var(--primary-black);
    transition: transform 0.3s ease; /* Smooth rotation for 'X' */
}


/* Hero Section */
.hero-section {
    position: relative;
    padding-top: var(--header-height); /* Offset for fixed header */
    height: 40vh; /* Reduced height */
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    /* Gradient background */
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--primary-black) 100%);
    color: #fff; /* Ensure text visible on dark background */
    text-align: center; /* Center text within hero */
    box-shadow: inset 0 -5px 15px rgba(0, 0, 0, 0.2); /* Subtle inner shadow */
}

/* Animation for hero overlay and cards */
@keyframes fadeInSlideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-overlay {
    position: relative;
    z-index: 10;
    background-color: transparent;
    padding: 40px;
    border-radius: 10px;
    text-align: center;
    color: #fff;
    max-width: 900px;
    transform: translateY(20px);
    opacity: 0;
    animation: fadeInSlideUp 1s forwards 0.5s;
}

.hero-overlay h1 {
    font-size: clamp(2.5em, 5vw, 4em); /* Adapted to match sss.css h1 */
    margin-bottom: 10px; /* Reduced margin */
    color: var(--primary-gold); /* Gold for contrast */
    line-height: 1.2;
}

.hero-overlay p {
    font-size: clamp(1em, 2vw, 1.4em); /* Responsive font size */
    margin-bottom: 0; /* No bottom margin for hero paragraph */
}

/* Activities & Programs Section */
.section-description {
    text-align: center;
    margin-bottom: 40px;
    font-size: 1.1em;
    color: var(--text-color-dark);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.activities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    padding: 0 20px;
}

.activity-card {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInSlideUp 0.8s forwards;
}

/* Staggered animation delay for activity cards */
.activity-card:nth-of-type(1) { animation-delay: 0.2s; }
.activity-card:nth-of-type(2) { animation-delay: 0.4s; }
.activity-card:nth-of-type(3) { animation-delay: 0.6s; }
.activity-card:nth-of-type(4) { animation-delay: 0.8s; }
.activity-card:nth-of-type(5) { animation-delay: 1.0s; }
.activity-card:nth-of-type(6) { animation-delay: 1.2s; }
.activity-card:nth-of-type(7) { animation-delay: 1.4s; }
.activity-card:nth-of-type(8) { animation-delay: 1.6s; }
.activity-card:nth-of-type(9) { animation-delay: 1.8s; }


.activity-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.activity-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-bottom: 3px solid var(--primary-red);
}

.activity-card h3 {
    font-size: clamp(1.2em, 2.5vw, 1.8em);
    color: var(--primary-black);
    margin-bottom: 10px;
    padding: 0 20px; /* Added padding for text inside card */
}

.activity-card p {
    font-size: clamp(0.8em, 1.5vw, 1em);
    color: var(--text-color-dark);
    margin-bottom: 20px;
    padding: 0 20px; /* Added padding for text inside card */
}

.activity-card .activity-date {
    display: block; /* Ensures it takes full width and 'i' aligns */
    font-size: 0.9em;
    color: var(--secondary-grey);
    margin-bottom: 15px;
    padding: 0 20px 20px; /* Added padding to bottom */
}

.activity-card .activity-date i {
    margin-right: 5px;
    color: var(--primary-red);
}

/* Gallery Section (Slick Carousel) */
.gallery-wrapper {
    position: relative; /* Needed for absolute positioning of controls */
    max-width: 900px;
    margin: 0 auto 30px auto;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    animation: fadeInSlideUp 1s forwards; /* Animation for the entire carousel block */
}

.gallery-carousel {
    overflow: hidden;
    border-radius: 10px; /* Match wrapper border-radius */
}

.gallery-carousel .slick-slide img {
    width: 100%;
    height: 350px; /* Fixed height for carousel images */
    object-fit: cover;
    display: block;
    border-radius: 8px; /* Match container border-radius */
}

/* Hide default Slick dots navigation */
.slick-dots {
    display: none !important;
}

/* Slick specific overrides for navigation buttons (default, though we use custom ones) */
.slick-prev:before,
.slick-next:before {
    color: var(--primary-red) !important;
    font-size: 30px !important;
}

/* Custom Carousel Controls */
.carousel-controls {
    display: flex;
    justify-content: center; /* Center buttons */
    gap: 15px; /* Space between buttons */
    margin-top: 25px; /* Space below the carousel */
    padding: 0 20px; /* Padding from wrapper edges */
    z-index: 10; /* Ensure controls are above images if they overlap */
}

.carousel-controls button {
    background-color: var(--primary-red); /* Solid red */
    color: #fff;
    border: none;
    padding: 12px 18px; /* Slightly larger buttons */
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.1em;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
}

.carousel-controls button:hover {
    background-color: var(--primary-black);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
}

.carousel-controls button i {
    pointer-events: none; /* Ensure click goes to button, not icon */
}


/* Upcoming Events Section */
.events-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    padding: 0 20px;
}

.event-card {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    padding: 25px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    /* Animation similar to blog cards */
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInSlideUp 0.8s forwards;
}

.event-card:nth-of-type(1) { animation-delay: 0.2s; }
.event-card:nth-of-type(2) { animation-delay: 0.4s; }
.event-card:nth-of-type(3) { animation-delay: 0.6s; }

.event-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.event-card h3 {
    font-size: clamp(1.1em, 2.2vw, 1.6em);
    color: var(--primary-red);
    margin-bottom: 10px;
}

.event-card .event-date,
.event-card .event-location {
    font-size: 0.95em;
    color: var(--secondary-grey);
    margin-bottom: 5px;
}

.event-card .event-date i,
.event-card .event-location i {
    margin-right: 5px;
    color: var(--primary-red);
}

.event-card .event-description {
    font-size: clamp(0.8em, 1.5vw, 1em);
    color: var(--text-color-dark);
    margin-top: 15px;
    line-height: 1.5;
}


/* Footer */
footer {
    background-color: var(--primary-black);
    color: var(--text-color-light);
    padding: 40px 0;
    text-align: center;
    font-size: 0.85em;
    border-top: 5px solid var(--primary-red);
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    gap: 30px;
    text-align: left;
}

.footer-links,
.footer-socials,
.footer-contact,
.footer-copyright {
    flex: 1;
    min-width: 200px;
    padding: 0 10px;
}

.footer-links h3,
.footer-socials h3,
.footer-contact h3,
.footer-copyright p:first-child {
    color: var(--primary-gold);
    margin-bottom: 20px;
    font-size: 1.1em;
    font-family: 'Poppins', sans-serif;
    position: relative;
    padding-bottom: 5px;
}

.footer-links h3::after,
.footer-socials h3::after,
.footer-contact h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 2px;
    background-color: var(--primary-red);
}

.footer-links ul {
    list-style: none;
}

.footer-links ul li {
    margin-bottom: 10px;
}

.footer-links ul li a {
    color: var(--text-color-light);
    transition: color 0.3s ease;
}

.footer-links ul li a:hover {
    color: var(--primary-red);
    text-decoration: underline;
}

.footer-socials a {
    color: var(--text-color-light);
    font-size: 1.6em;
    margin-right: 15px;
    transition: color 0.3s ease, transform 0.2s ease;
}

.footer-socials a:hover {
    color: var(--primary-gold);
    transform: translateY(-3px);
}

.footer-contact p {
    margin-bottom: 10px;
    color: var(--text-color-light);
}

.footer-contact i {
    margin-right: 10px;
    color: var(--primary-red);
}

.footer-copyright {
    text-align: center;
    flex-basis: 100%; /* Takes full width on smaller screens */
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 20px;
}

/* Corrected styles for footer copyright section */
.footer-copyright p {
    display: block; /* Ensure paragraphs break onto new lines */
    margin-bottom: 5px; /* Slightly reduced from 8px */
    color: var(--text-color-light);
}

.footer-copyright p:last-child {
    margin-bottom: 0; /* No bottom margin for the last paragraph */
}

.footer-copyright .developer-credit a {
    color: var(--primary-gold);
    font-weight: bold;
    white-space: nowrap; /* Prevent developer credit link from wrapping */
}


/* Mobile Responsiveness */
@media (max-width: 1024px) {
    #main-nav {
        display: flex; /* Always display as flex on mobile, control visibility with max-height */
        flex-direction: column;
        position: absolute;
        top: var(--header-height);
        left: 0;
        width: 100%;
        background-color: rgba(255, 255, 255, 0.98);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
        z-index: 999;
        overflow: hidden;
        max-height: 0; /* Collapsed state */
        transition: max-height 0.4s ease-in-out;
    }

    #main-nav.active {
        max-height: 300px; /* Expanded state - adjust if more links are added */
        border-top: 1px solid var(--primary-red);
    }

    #main-nav ul {
        flex-direction: column;
        align-items: center;
        padding: 20px 0;
    }

    #main-nav ul li {
        margin: 10px 0;
    }

    #main-nav ul li a {
        font-size: 1.1em;
        padding: 10px 20px;
        display: block;
        width: 100%;
        text-align: center;
    }

    .register-button {
        display: none; /* Hide register button on mobile, it's not part of the current hamburger menu structure */
    }

    .menu-box {
        display: block; /* Show menu toggle container */
    }

    .menu-toggle {
        display: block; /* Show hamburger icon */
    }

    .header-content {
        padding: 0 15px;
    }

    .header-branding {
        flex-grow: 1; /* Allow branding to take available space */
        justify-content: flex-start; /* Push logos to the left */
    }

    .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .footer-links,
    .footer-socials,
    .footer-contact,
    .footer-copyright {
        width: 100%;
        max-width: 300px; /* Constrain width for better mobile layout */
        margin-bottom: 20px;
    }

    .footer-socials a {
        margin: 0 10px;
    }

    .footer-links h3::after,
    .footer-socials h3::after,
    .footer-contact h3::after {
        left: 50%;
        transform: translateX(-50%);
    }

    /* Hero section adjustments for tablets */
    .hero-section {
        height: 45vh; /* Slightly reduced height for tablets */
    }
    /* Removed specific font-size for .hero-overlay h1 here to allow clamp() to take effect */
    .hero-overlay p {
        font-size: 1.2em; /* Adjusted for tablets */
    }
}

@media (max-width: 768px) {
    /* Removed specific font-size for h2 here to allow clamp() to take effect */

    .section-padding {
        padding: 60px 0;
    }

    /* Hero section adjustments for mobile phones */
    .hero-section {
        height: 35vh; /* Significantly reduced height for mobile */
        padding-top: calc(var(--header-height) + 20px); /* Add some top padding */
    }
    .hero-overlay {
        padding: 20px;
    }
    /* Removed specific font-size for .hero-overlay h1 here to allow clamp() to take effect */
    .hero-overlay p {
        font-size: 1em; /* Reduced font size for mobile */
    }

    .header-branding {
        gap: 8px;
    }
    .logo img {
        height: 45px; /* Slightly reduced from 50px */
    }
    .simbu-flag img {
        height: 40px; /* Slightly reduced from 45px */
    }
    .UPNG-logo img {
        height: 40px; /* Slightly reduced from 45px */
    }

    .activities-grid,
    .events-list {
        grid-template-columns: 1fr; /* Single column on very small screens */
        padding: 0 10px;
    }

    .activity-card, .event-card {
        margin: 0 auto; /* Center cards */
        max-width: 400px; /* Max width for single column cards */
    }

    .gallery-carousel .slick-slide img {
        height: 350px; /* Smaller height for carousel on mobile */
    }

    /* Adjust custom carousel controls for mobile */
    .carousel-controls {
        padding: 0 10px; /* Reduce padding on mobile */
        gap: 10px; /* Smaller gap on mobile */
    }
    .carousel-controls button {
        padding: 8px 12px;
        font-size: 1em;
    }
}

/* Print Styles */
@media print {
    header, footer, .register-button, .menu-box, .carousel-controls, .slick-dots {
        display: none !important;
    }
    body {
        background-color: #fff;
        color: #000;
        font-size: 12pt;
    }
    .container {
        max-width: none;
        padding: 0;
    }
    .section-padding {
        padding: 20px 0;
    }
    .hero-section {
        background: none;
        color: #000;
        height: auto;
        padding-top: 0;
    }
    .hero-overlay {
        padding: 0;
        animation: none;
        opacity: 1;
        transform: none;
    }
    .activity-card, .event-card {
        box-shadow: none;
        border: 1px solid #eee;
        page-break-inside: avoid;
        animation: none;
        opacity: 1;
        transform: none;
    }
    .activity-card img {
        height: 150px;
    }
    .gallery-wrapper {
        box-shadow: none;
        border: none;
    }
    .gallery-carousel .slick-slide img {
        height: 200px;
        object-fit: contain; /* Ensure images are fully visible */
    }
    h1, h2, h3, h4 {
        color: #000;
    }
    h2::after {
        background-color: #000;
    }
}