/* CSS Reset */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #009696;
    --primary-dark: #007a7a;
    --text-on-primary: #FFFFFF;
    --bg-body: #f8fafb;
    /* Modern Off-White */
    --bg-card: #FFFFFF;
    --text-body: #1a1a1a;
    /* Softer Black */
    --text-muted: #555555;
    --font-family: 'Inter', system-ui, -apple-system, sans-serif;
    --header-height: auto;
    --container-width: 1100px;
    /* Wider for modern screens */
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Base Styles */
body {
    background-color: var(--bg-body);
    color: var(--text-body);
    font-family: var(--font-family);
    line-height: 1.8;
    /* More airy line height */
    font-size: 18px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header & Navigation */
header {
    background-color: var(--primary-color);
    color: var(--text-on-primary);
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-content {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 1.25rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.header-banner {
    width: 100%;
    margin-top: 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.header-banner img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.header-banner p {
    font-size: 1rem;
    color: var(--text-muted);
    font-style: italic;
    text-align: center;
    margin-bottom: 0;
}

nav {
    width: 100%;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 3rem;
    /* More space between nav items */
    padding: 0.5rem 0;
}

nav a {
    color: var(--text-on-primary);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 0;
    transition: var(--transition-smooth);
    opacity: 0.9;
}

nav a:hover {
    opacity: 1;
}

nav a.active {
    border-bottom: 2px solid var(--text-on-primary);
    opacity: 1;
}

/* Main Content */
main {
    max-width: var(--container-width);
    margin: 4rem auto;
    /* Increased vertical space */
    padding: 0 2rem;
    flex: 1;
    width: 100%;
    animation: fadeIn 0.8s ease-out;
}

h1 {
    margin-bottom: 2rem;
    color: var(--primary-color);
    text-align: center;
    font-size: 2.8rem;
    /* Larger */
    font-weight: 700;
    letter-spacing: -0.02em;
}

h2 {
    margin-bottom: 1.5rem;
    margin-top: 5rem;
    /* Massive space above sections */
    color: var(--primary-color);
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
}

p {
    margin-bottom: 1.5rem;
    text-align: left;
    /* Modern standard */
    hyphens: auto;
}

/* Footer */
footer {
    background-color: var(--primary-color);
    color: var(--text-on-primary);
    padding: 3rem;
    text-align: center;
    margin-top: 6rem;
}

/* 3D Carousel Styles */
.carousel {
    width: 100%;
    height: 750px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    perspective: 1500px;
    /* Increased perspective */
    margin: 4rem 0;
}

.carousel-inner {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    transform-style: preserve-3d;
}

.carousel-item {
    position: absolute;
    width: 650px;
    /* Slightly wider */
    max-width: 90%;
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    pointer-events: none;
    text-align: center;
    background: var(--bg-card);
    border-radius: 16px;
    /* Rounder corners */
    padding: 40px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.carousel-item.active {
    opacity: 1;
    transform: translate3d(0, 0, 150px);
    z-index: 10;
    pointer-events: auto;
}

.carousel-item.prev {
    opacity: 0.4;
    transform: translate3d(-500px, 0, -250px) scale(0.75);
    z-index: 5;
    pointer-events: auto;
}

.carousel-item.next {
    opacity: 0.4;
    transform: translate3d(500px, 0, -250px) scale(0.75);
    z-index: 5;
    pointer-events: auto;
}

.carousel-item.hidden-left {
    opacity: 0;
    transform: translate3d(-1000px, 0, -500px) scale(0.5);
}

.carousel-item.hidden-right {
    opacity: 0;
    transform: translate3d(1000px, 0, -500px) scale(0.5);
}

.carousel-item img {
    max-width: 100%;
    width: auto;
    height: auto;
    max-height: 400px;
    border-radius: 8px;
    display: block;
    margin-bottom: 30px;
}

.carousel-caption {
    font-size: 1.15rem;
    color: var(--text-body);
    text-align: center;
    font-weight: 500;
    line-height: 1.6;
    width: 100%;
}

/* Nav Buttons */
.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary-color);
    color: white;
    border: none;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.carousel-nav:hover {
    background: var(--primary-dark);
    transform: translateY(-50%) scale(1.1);
}

.carousel-nav:active {
    transform: translateY(-50%) scale(0.95);
}

.carousel-nav.prev {
    left: 20px;
}

.carousel-nav.next {
    right: 20px;
}

@media (max-width: 900px) {
    .carousel-item {
        width: 85%;
        padding: 30px;
    }

    .carousel-item.prev {
        transform: translate3d(-40%, 0, -200px) scale(0.7);
    }

    .carousel-item.next {
        transform: translate3d(40%, 0, -200px) scale(0.7);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        font-size: 17px;
    }

    nav ul {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .header-content {
        padding: 1.5rem 1rem;
    }

    main {
        margin: 2rem auto;
        padding: 0 1.25rem;
    }

    h1 {
        font-size: 2.2rem;
    }

    h2 {
        font-size: 1.7rem;
    }
}

/* Gallery & Lightbox Styles */
.article-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2.5rem;
    margin: 4rem 0;
}

.article-thumbnail {
    cursor: pointer;
    transition: var(--transition-smooth);
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg-card);
    padding: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.article-thumbnail:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}

.article-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 6px;
}

/* Lightbox Modal */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    display: none;
    /* Hidden by default */
    justify-content: center;
    align-items: flex-start;
    /* Top alignment for scrolling */
    z-index: 2000;
    padding: 60px 20px;
    overflow-y: auto;
    /* Enable scroll if image is large */
}

.lightbox.visible {
    display: flex;
}

.lightbox-content {
    max-width: 90%;
    position: relative;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    margin: auto;
}

.lightbox-content img {
    width: 100%;
    height: auto;
    max-height: 85vh;
    /* Initial fit */
    object-fit: contain;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
    border-radius: 4px;
    cursor: zoom-in;
    display: block;
}

/* Zoomed state */
.lightbox-content.zoomed {
    max-width: none;
    width: 1200px;
    /* Big enough to read newspaper text */
}

.lightbox-content.zoomed img {
    max-height: none;
    cursor: zoom-out;
}

.lightbox-close {
    position: fixed;
    /* Keep on screen while scrolling */
    top: 20px;
    right: 30px;
    color: white;
    font-size: 4rem;
    cursor: pointer;
    user-select: none;
    line-height: 1;
    transition: var(--transition-smooth);
    z-index: 2100;
    text-shadow: 0 0 15px #000;
}

.lightbox-close:hover {
    color: var(--primary-color);
    transform: scale(1.1) rotate(90deg);
}

@media (max-width: 768px) {
    .lightbox-close {
        top: 20px;
        /* Keep at top */
        right: 20px;
        font-size: 3rem;
    }
}