/* 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: 80px; /* Adjusted to 80px for consistency across CSS files */
}

* {
    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;
}

/* New rule to push content below the fixed header */
main {
    margin-top: var(--header-height);
}

.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(1.8em, 4vw, 2.5em); /* Responsive font size */
    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;
    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;
    /* Removed overflow: hidden; as it was causing the hamburger menu to be clipped */
}

#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;
}

.simbu-flag img {
    height: 60px;
    width: auto;
    border-radius: 1px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* UPNG Logo Styling */
.UPNG-logo img {
    height: 60px;
    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;
    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;
    text-decoration: none;
    padding: 0;
    display: contents;
}

.register-button a:hover {
    color: #fff;
}

.menu-box {
    display: none;
}

.menu-toggle {
    display: none;
    font-size: 1.8em;
    cursor: pointer;
    color: var(--primary-black);
    transition: transform 0.3s ease;
}


/* Hero Section */
.hero-section {
    position: relative;
    height: 40vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--primary-black) 100%);
    color: #fff;
    text-align: center;
}

/* 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(2em, 4vw, 3.5em); /* Adjusted as per activities.css */
    margin-bottom: 10px;
    color: var(--primary-gold);
    line-height: 1.2;
}

.hero-overlay p {
    font-size: clamp(1em, 2vw, 1.4em); /* Adjusted as per activities.css */
    margin-bottom: 0;
}

/* Featured Spotlight Section */
#featured-spotlight .spotlight-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    text-align: center;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    padding: 30px;
}

#featured-spotlight .spotlight-image {
    width: 100%;
    max-width: 600px;
    height: auto;
    border-radius: 8px;
    object-fit: cover;
}

#featured-spotlight .spotlight-text {
    flex: 1;
}

#featured-spotlight .spotlight-text h3 {
    font-size: clamp(1.5em, 3vw, 2.2em);
    color: var(--primary-red);
    margin-bottom: 15px;
}

#featured-spotlight .spotlight-text p {
    font-size: 1.1em;
    line-height: 1.8;
    color: var(--text-color-dark);
}

#featured-spotlight .post-meta {
    font-size: 0.9em;
    color: var(--secondary-grey);
    margin-top: 20px;
}

/* Blog 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;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    padding: 0 20px;
}

/* Styling for Vision Spotlight Card (Blog Card) */
.blog-card {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: fadeInSlideUp 0.8s forwards;
    opacity: 0;
    transform: translateY(20px);
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15);
}

.blog-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-bottom: 3px solid var(--primary-red);
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

.blog-card .card-content {
    padding: 20px;
    padding-bottom: 25px;
}

.blog-card .post-meta {
    font-size: 0.85em;
    color: var(--secondary-grey);
    margin-bottom: 15px;
}

.blog-card .post-meta i {
    margin-right: 5px;
    color: var(--primary-red);
}

.blog-card h3 {
    font-size: clamp(1.2em, 2.4vw, 1.8em);
    color: var(--primary-black);
    margin-bottom: 10px;
}

.blog-card p {
    font-size: clamp(0.8em, 1.5vw, 1em);
    color: var(--text-color-dark);
    margin-bottom: 20px;
    line-height: 1.7;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 50px;
    gap: 10px;
}

.pagination a {
    display: inline-block;
    padding: 10px 15px;
    border: 1px solid var(--primary-red);
    border-radius: 5px;
    color: var(--primary-red);
    transition: background-color 0.3s ease, color 0.3s ease;
    font-weight: bold;
}

.pagination a:hover, .pagination a.active {
    background-color: var(--primary-red);
    color: #fff;
}

/* Sidebar for blog */
.sidebar {
    background-color: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    margin-top: 30px;
    animation: fadeInSlideUp 0.8s forwards 0.2s;
}

.sidebar h3 {
    font-size: 1.5em;
    color: var(--primary-black);
    margin-bottom: 20px;
    border-bottom: 2px solid var(--primary-red);
    padding-bottom: 10px;
}

.sidebar ul {
    list-style: none;
    padding: 0;
}

.sidebar ul li {
    margin-bottom: 15px;
}

.sidebar ul li a {
    color: var(--text-color-dark);
    transition: color 0.3s ease;
}

.sidebar ul li a:hover {
    color: var(--primary-red);
    text-decoration: underline;
}

/* Footer */
footer {
    background-color: var(--primary-black);
    color: var(--text-color-light);
    padding: 40px 0; /* Updated as per activities.css */
    margin-top: 50px; /* Kept for general spacing from main content */
    font-size: 0.85em; /* Updated as per activities.css */
    border-top: 5px solid var(--primary-red); /* Added as per activities.css */
    text-align: center; /* Explicitly centered footer content */
}

.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%;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 20px; /* Adjusted as per activities.css */
}

.footer-copyright p {
    display: block; /* Ensures paragraphs break onto new lines as per activities.css */
    margin-bottom: 5px; /* Adjusted as per activities.css */
    color: var(--text-color-light); /* Updated color as per activities.css */
}

.footer-copyright p:last-child {
    margin-bottom: 0; /* No bottom margin for the last paragraph as per activities.css */
}

.developer-credit a {
    color: var(--primary-gold);
    font-weight: bold;
    white-space: nowrap; /* Prevent developer credit link from wrapping */
}


/* Responsive Design */
@media (max-width: 1024px) {
    /* Mobile Navigation (Hamburger Menu) styles moved and updated as per activities.css */
    #main-nav {
        display: flex; /* Always display as flex on mobile, control visibility with max-height */
        flex-direction: column;
        position: absolute; /* Positions menu below header */
        top: var(--header-height); /* Starts right below the header */
        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: 1001; /* Increased z-index to ensure it appears above the header */
        overflow: hidden;
        max-height: 0; /* Collapsed state */
        transition: max-height 0.4s ease-in-out;
    }

    #main-nav.active {
        max-height: 500px; /* Increased max-height for better accommodation of menu items */
        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 */
    }

    .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;
        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 */
    }
    .hero-overlay h1 {
        font-size: 2.5em; /* Adjusted for tablets */
    }
    .hero-overlay p {
        font-size: 1.2em; /* Adjusted for tablets */
    }
}

@media (max-width: 768px) {
    h2 {
        font-size: 2em;
    }

    .section-padding {
        padding: 60px 0;
    }

    /* Hero section adjustments for mobile phones */
    .hero-section {
        height: 35vh; /* Significantly reduced height for mobile */
        /* Removed padding-top here as it was pushing text down */
    }
    .hero-overlay {
        padding: 20px;
    }
    .hero-overlay h1 {
        font-size: 2em; /* Reduced font size for mobile */
        margin-bottom: 5px;
    }
    .hero-overlay p {
        font-size: 1em; /* Reduced font size for mobile */
    }

    .header-branding {
        gap: 8px;
    }
    .logo img {
        height: 45px;
    }
    .simbu-flag img {
        height: 40px;
    }
    .UPNG-logo img {
        height: 40px;
    }

    .blog-grid {
        grid-template-columns: 1fr;
        padding: 0 10px;
    }

    .blog-card {
        margin: 0 auto;
        max-width: 400px;
    }
}

/* 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;
    }
    h1, h2, h3, h4 {
        color: #000;
    }
    h2::after {
        background-color: #000;
    }
}