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

:root {
    --primary-color: #0d1a26;
    --secondary-color: #1a3a59;
    --accent-color: #00ffff;
    --text-color: #e0e0e0;
    --glow-color: rgba(0, 255, 255, 0.7);
    --border-color: rgba(0, 255, 255, 0.2);
    --danger-color: #ff4d4d;
}

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

html, body {
    background-color: var(--primary-color); /* Explicitly set for html and body */
}

body {
    font-family: 'Roboto', sans-serif;
    color: var(--text-color);
    overflow-x: hidden;
    background-image: radial-gradient(circle at 20% 20%, rgba(26, 58, 89, 0.5) 0%, transparent 40%),
                      radial-gradient(circle at 80% 70%, rgba(0, 255, 255, 0.1) 0%, transparent 30%);
}

.container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 220px;
    background-color: var(--secondary-color);
    border-right: 1px solid var(--border-color);
    padding: 1.5rem 0;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 20px var(--glow-color);
    overflow-y: auto;
}

.logo {
    font-family: 'Orbitron', sans-serif;
    text-align: center;
    font-size: 1.8rem;
    color: var(--accent-color);
    text-shadow: 0 0 10px var(--glow-color);
    letter-spacing: 2px;
}

.logo img {
    max-width: 120px;
    height: auto;
    display: block;
    margin: 0 auto;
}

.nav-menu {
    list-style: none;
}

.nav-menu li {
    margin-bottom: 1rem;
}

.nav-menu a {
    display: block;
    color: var(--text-color);
    text-decoration: none;
    padding: 0.8rem 1.5rem;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-menu a:hover, .nav-menu a.active {
    background-color: rgba(0, 255, 255, 0.1);
    color: var(--accent-color);
    border-left-color: var(--accent-color);
    text-shadow: 0 0 5px var(--glow-color);
}

.main-content {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
}

/* This is for the CMS pages */
.main-content header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.main-content header h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.5rem;
    color: var(--text-color);
}

.page-header {
    font-family: 'Orbitron', sans-serif;
    font-size: 2rem;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
    text-shadow: 0 0 8px var(--glow-color);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.card {
    background-color: var(--secondary-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 0 15px rgba(0,0,0,0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 25px var(--glow-color);
}

.card-title {
    font-family: 'Orbitron', sans-serif;
    color: var(--accent-color);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.stat-card-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.stat-value {
    font-size: 3rem;
    font-weight: 700;
    color: var(--accent-color);
    font-family: 'Orbitron', sans-serif;
}

.stat-label {
    font-size: 1rem;
    color: var(--text-color);
    margin-top: 0.5rem;
}

/* Login Page Specifics */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    width: 100%;
}

.login-box {
    width: 400px;
    padding: 3rem;
    background-color: var(--secondary-color);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-shadow: 0 0 30px var(--glow-color);
    text-align: center;
}

.login-box h1 {
    font-family: 'Orbitron', sans-serif;
    color: var(--accent-color);
    margin-bottom: 2rem;
}

.input-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.input-group input {
    width: 100%;
    padding: 0.8rem;
    background-color: var(--primary-color);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    color: var(--text-color);
    font-size: 1rem;
}

.btn {
    width: 100%;
    padding: 0.8rem;
    background-color: var(--accent-color);
    color: var(--primary-color);
    border: none;
    border-radius: 5px;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    margin-top: 0.5rem;
}

.btn:hover {
    box-shadow: 0 0 15px var(--glow-color);
}

.btn-delete {
    background-color: var(--danger-color);
    color: var(--text-color);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    transition: opacity 0.3s;
    text-decoration: none;
    display: inline-block;
    font-size: 0.9rem;
}

.btn-delete:hover {
    opacity: 0.8;
}

/* --- Public Homepage Styles --- */

.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background-color: rgba(13, 26, 38, 0.8);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

/* Updated Logo Styling for small, neat appearance */
.main-header .logo {
    margin-bottom: 0;
    display: flex; /* Make logo a flex container */
    align-items: center;
    gap: 0.5rem; /* Space between logo image and text */
}

.main-header .logo img {
    height: 85px; /* Reduced logo size slightly */
    width: auto;
    filter: drop-shadow(0 0 5px var(--glow-color));
}

.logo-text {
    /* Inherits from .logo, but ensure the text shadow is applied consistently */
    font-family: 'Orbitron', sans-serif;
    font-size: 2.6rem; /* Reduced font size slightly */
    color: var(--accent-color);
    text-shadow: 0 0 8px var(--glow-color);
    letter-spacing: 1px;
}

.top-nav {
    display: flex; /* Ensure flexbox is applied */
    align-items: center;
    gap: 1.5rem; /* Space between nav items */
}

.top-nav a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 1.2rem;
    transition: color 0.3s, text-shadow 0.3s;
}

.top-nav a:hover,
.top-nav a.active { /* Added active state styling */
    color: var(--accent-color);
    text-shadow: 0 0 5px var(--glow-color);
}

.top-nav .btn-login {
    background-color: var(--accent-color);
    color: var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: 5px;
    font-weight: bold;
}

.top-nav .btn-login:hover {
    box-shadow: 0 0 10px var(--glow-color);
    color: var(--primary-color);
}

.hero {
    /* This hero style seems unused for the main content but keeping it for other uses */
    height: 40vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 2rem;
}

.hero h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 3.5rem;
    color: var(--text-color);
    text-shadow: 0 0 15px var(--glow-color);
    margin-bottom: 1rem; /* Added margin-bottom */
}

.hero p {
    font-size: 1.2rem;
    max-width: 600px;
}

.public-content {
    padding: 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.content-section {
    background-color: var(--secondary-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.content-section h2 {
    font-family: 'Orbitron', sans-serif;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.main-footer-public {
    text-align: center;
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    margin-top: 2rem;
}

/* --- Gallery Styles --- */

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px 8px 0 0;
    border-bottom: 1px solid var(--border-color);
}

.gallery-item .card-title {
    margin-top: 1rem;
}

/* --- CMS Data Table Styles --- */

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1.5rem;
}

.data-table th, .data-table td {
    padding: 0.8rem 1rem;
    border: 1px solid var(--border-color);
    text-align: left;
}

.data-table th {
    background-color: rgba(0, 255, 255, 0.1);
    font-family: 'Orbitron', sans-serif;
    color: var(--accent-color);
}

.data-table tbody tr:hover {
    background-color: var(--secondary-color);
}

.delete-btn {
    background-color: var(--danger-color);
    color: var(--text-color);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    transition: opacity 0.3s;
}

.delete-btn:hover {
    opacity: 0.8;
}

/* --- New Public Page Styles --- */

.announcement-date {
    font-size: 0.9rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.initiatives-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
}

.initiative-item img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 8px 8px 0 0;
    border-bottom: 1px solid var(--border-color);
}

.initiative-item .card-content {
    padding: 1.5rem;
}

/* --- Carousel Styles (Updated for better fit) --- */
.carousel-container {
    position: relative;
    width: 100%;
    height: 55vh; /* Taller height as requested (was 40vh) */
    overflow: hidden;
    margin-top: 1rem; /* Added padding/gap between header and carousel */
    background-color: var(--secondary-color); /* Matches theme if image doesn't fill */
}

.carousel-slide {
    display: none;
    width: 100%;
    height: 100%;
}

.carousel-slide.active {
    display: block;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Changed from 'cover' to 'contain' to show the whole image */
    filter: brightness(0.7); /* Slightly reduced brightness filter for better whole-image contrast */
    transition: filter 0.5s ease;
}

.carousel-caption {
    position: absolute;
    bottom: 15%; /* Moved up slightly */
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    text-align: center;
    width: 90%; /* Wider caption area */
    padding: 1rem;
    background-color: rgba(13, 26, 38, 0.4); /* Subtle background for readability */
    border-radius: 5px;
    border: 1px solid var(--border-color);
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

.carousel-caption h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.2rem; /* Reduced font size for better fit in smaller area */
    text-shadow: 0 0 15px var(--glow-color);
    margin-bottom: 0.5rem;
}

.carousel-caption p {
    font-size: 1.1rem;
}

.prev, .next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -22px;
    color: white;
    font-weight: bold;
    font-size: 24px;
    transition: 0.6s ease;
    border-radius: 0 3px 3px 0;
    user-select: none;
    background-color: rgba(0,0,0,0.3);
}

.next {
    right: 0;
    border-radius: 3px 0 0 3px;
}

.prev:hover, .next:hover {
    background-color: rgba(0, 255, 255, 0.3);
}

/* --- Stats Section --- */
.stats-section {
    padding: 3rem 2rem;
    background-color: var(--secondary-color);
    /* Add border top/bottom for clear separation */
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}


/* --- General Section Title Style --- */
.section-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 2rem;
    color: var(--accent-color);
    text-align: center;
    margin-bottom: 2.5rem;
    text-shadow: 0 0 8px var(--glow-color);
    /* Add a subtle line under the title for separation */
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
    display: inline-block;
    max-width: 80%;
    margin-left: auto;
    margin-right: auto;
    display: block;
}

/* --- Features Section Styles --- */
.features-section {
    padding: 3rem 2rem;
    background-color: var(--primary-color); /* Use primary for a break from secondary */
    text-align: center;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-card {
    /* Inherits styles from .card (background, border, shadow, hover) */
    text-align: center;
    transition: all 0.4s ease; /* Ensure all transitions are smooth */
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    /* Neon effect on the icon itself */
    text-shadow: 0 0 10px var(--accent-color);
}

.feature-card h3 {
    font-family: 'Orbitron', sans-serif;
    color: var(--accent-color);
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
}

.feature-card p {
    font-size: 1rem;
    color: var(--text-color);
    line-height: 1.5;
}


/* --- Hero Section (Bottom) Styles --- */
.hero-bottom {
    background-image: none; /* Clear any background image from the main body */
    padding: 4rem 2rem; /* More padding for a final, impactful section */
    border-top: 1px solid var(--border-color);
}

.hero-subtitle {
    font-size: 1.5rem !important; /* Emphasize the subtitle */
    color: var(--accent-color);
    text-shadow: 0 0 5px var(--glow-color);
    margin-bottom: 2rem;
}

.hero-cta {
    display: flex;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.btn-cta {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 5px;
    text-decoration: none;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.btn-cta:hover {
    transform: translateY(-3px);
}

.btn-cta:first-child {
    /* Primary CTA */
    background-color: var(--accent-color);
    color: var(--primary-color);
    border: 2px solid var(--accent-color);
    box-shadow: 0 0 15px var(--glow-color);
}

.btn-cta:first-child:hover {
    box-shadow: 0 0 25px var(--glow-color);
}

.btn-cta-secondary {
    /* Secondary CTA (Ghost/Outline style) */
    background-color: transparent;
    color: var(--accent-color);
    border: 2px solid var(--accent-color);
}

.btn-cta-secondary:hover {
    background-color: rgba(0, 255, 255, 0.1);
    color: var(--accent-color);
    box-shadow: 0 0 10px var(--glow-color);
}


/* --- Responsive Navigation (Hamburger) --- */
.hamburger {
    display: none; /* Hidden by default */
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px 0;
    background-color: var(--accent-color);
    transition: all 0.3s ease;
}

@media screen and (max-width: 768px) {
    .main-header {
        flex-wrap: wrap;
    }

    .top-nav {
        flex-direction: column;
        width: 100%;
        display: none; /* Hidden by default on mobile */
        background-color: rgba(13, 26, 38, 0.95);
        position: absolute;
        top: 100%;
        left: 0;
        padding: 1rem 0;
        border-top: 1px solid var(--border-color);
    }

    .top-nav.active {
        display: flex; /* Show when active */
    }

    .top-nav a {
        padding: 0.8rem 2rem;
        width: 100%;
        text-align: center;
    }

    .hamburger {
        display: block; /* Show hamburger on mobile */
    }
}
/* --- Mobile View Adjustments --- */
@media (max-width: 768px) {
    /* Hides the carousel caption on screens up to 768px wide */
    .carousel-caption {
        display: none;
    }

    /* Hides the bottom hero section on screens up to 768px wide */
    .hero-bottom {
        display: none;
    }
}
