/* ============================================================
   The Khmer Magic Music Bus — Site-Wide Stylesheet
   Warm editorial aesthetic: Angkor stone & Cambodian textiles
   ============================================================ */

/* ------------------------------------------------------------
   CSS Custom Properties
   ------------------------------------------------------------ */
:root {
    /* Palette */
    --stone: #8b7355;
    --terracotta: #c85a3e;
    --burgundy: #7c2d3a;
    --cream: #f8f4ed;
    --parchment: #e8dcc8;
    --deep-teal: #2c5f5d;
    --gold: #d4a373;
    --charcoal: #2a2520;
    --warm-gray: #5a5047;

    /* Shadows & Effects */
    --shadow-soft: 0 4px 20px rgba(124, 45, 58, 0.08);
    --shadow-medium: 0 8px 30px rgba(124, 45, 58, 0.12);
    --shadow-strong: 0 12px 40px rgba(124, 45, 58, 0.18);
    --glow: 0 0 30px rgba(212, 163, 115, 0.15);

    /* Layout */
    --max-width: 1200px;
    --transition: all 0.3s ease;
}

/* ------------------------------------------------------------
   Reset & Base
   ------------------------------------------------------------ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Work Sans', sans-serif;
    line-height: 1.6;
    color: var(--charcoal);
    background-color: var(--cream);
}

img {
    max-width: 100%;
    height: auto;
}

a {
    text-decoration: none;
    color: var(--deep-teal);
    transition: var(--transition);
}

a:hover {
    color: var(--burgundy);
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* ------------------------------------------------------------
   Typography
   ------------------------------------------------------------ */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Crimson Pro', Georgia, serif;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
}

h1 { font-size: 3rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 2rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    line-height: 1.7;
}

/* ------------------------------------------------------------
   Buttons
   ------------------------------------------------------------ */
.btn {
    display: inline-block;
    padding: 12px 30px;
    font-family: 'Work Sans', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    border-radius: 4px;
    border: none;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--terracotta);
    color: var(--cream);
}

.btn-primary:hover {
    background-color: #b04e34;
    color: var(--cream);
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium), var(--glow);
}

.btn-secondary {
    background-color: transparent;
    color: var(--terracotta);
    border: 2px solid var(--terracotta);
}

.btn-secondary:hover {
    background-color: var(--terracotta);
    color: var(--cream);
}

.btn-large {
    padding: 16px 40px;
    font-size: 1.2rem;
}

/* ------------------------------------------------------------
   Header & Navigation
   ------------------------------------------------------------ */
.site-header {
    background-color: var(--cream);
    box-shadow: var(--shadow-soft);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
    max-width: var(--max-width);
    margin: 0 auto;
    position: relative;
}

.brand a {
    font-family: 'Crimson Pro', Georgia, serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--charcoal);
}

.brand a:hover {
    color: var(--charcoal);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: var(--charcoal);
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
    transition: color 0.3s;
}

.nav-link:hover,
.nav-link.active {
    color: var(--terracotta);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--burgundy), var(--gold));
}

/* Mobile Hamburger */
.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--charcoal);
    transition: var(--transition);
}

.nav-toggle-open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle-open span:nth-child(2) {
    opacity: 0;
}

.nav-toggle-open span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* ------------------------------------------------------------
   Hero Sections
   ------------------------------------------------------------ */
.hero, .page-hero {
    position: relative;
    height: 50vh;
    min-height: 400px;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -2;
}

.hero-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(42, 37, 32, 0.45);
    z-index: -1;
}

.hero-content {
    width: 100%;
    z-index: 1;
}

.hero-text {
    max-width: 800px;
    margin-left: 20px;
}

.hero-subtitle {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

.hero-title, .page-title {
    color: var(--cream);
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    opacity: 0;
    animation: fade-in-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0s forwards;
}

.hero-description, .page-description {
    color: rgba(248, 244, 237, 0.9);
    font-size: 1.3rem;
    margin-bottom: 2rem;
    line-height: 1.5;
    opacity: 0;
    animation: fade-in-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s forwards;
}

.hero .btn {
    opacity: 0;
    animation: fade-in-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.35s forwards;
}

/* ------------------------------------------------------------
   Animations
   ------------------------------------------------------------ */
@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll-reveal system */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal[data-delay="1"] {
    transition-delay: 0.1s;
}

.reveal[data-delay="2"] {
    transition-delay: 0.2s;
}

.reveal[data-delay="3"] {
    transition-delay: 0.3s;
}

.reveal[data-delay="4"] {
    transition-delay: 0.4s;
}

/* ------------------------------------------------------------
   Featured Video Section
   ------------------------------------------------------------ */
.featured-content {
    padding: 5rem 0;
    background-color: var(--parchment);
}

.video-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.video-wrapper {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    background-color: var(--charcoal);
    border-radius: 4px;
    overflow: hidden;
    box-shadow: var(--shadow-medium);
    margin: 2rem 0;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-title {
    font-family: 'Crimson Pro', Georgia, serif;
    margin-top: 2rem;
    color: var(--charcoal);
    text-align: center;
    font-size: 1.3rem;
    line-height: 1.5;
}

.sidebar-content {
    background: white;
    padding: 2rem;
    border-radius: 4px;
    box-shadow: var(--shadow-soft);
    text-align: center;
}

.sidebar-title {
    color: var(--charcoal);
    margin-bottom: 1.5rem;
}

/* ------------------------------------------------------------
   Navigation Cards (Homepage)
   ------------------------------------------------------------ */
.nav-cards {
    padding: 5rem 0;
    background-color: var(--cream);
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.nav-card {
    background: white;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.nav-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--burgundy), var(--terracotta), var(--gold));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 2;
}

.nav-card:hover::before {
    transform: scaleX(1);
}

.nav-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-strong), var(--glow);
}

.nav-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.card-image {
    height: 200px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-card:hover .card-image img {
    transform: scale(1.05);
}

.card-content {
    padding: 2rem;
}

.card-content h3 {
    color: var(--charcoal);
    transition: color 0.3s;
}

.nav-card:hover .card-content h3 {
    color: var(--burgundy);
}

.card-content p {
    color: var(--warm-gray);
}

.card-link {
    color: var(--terracotta);
    font-weight: 600;
}

/* ------------------------------------------------------------
   Team Section
   ------------------------------------------------------------ */
.team-section {
    padding: 5rem 0;
    background-color: var(--parchment);
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.team-card {
    background: var(--cream);
    border-radius: 4px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.team-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--burgundy), var(--terracotta), var(--gold));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 2;
}

.team-card:hover::before {
    transform: scaleX(1);
}

.team-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-medium), var(--glow);
}

.team-image {
    height: 300px;
    overflow: hidden;
}

.team-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
}

.team-info {
    padding: 1.5rem;
    text-align: center;
}

.team-name {
    color: var(--charcoal);
    transition: color 0.3s;
}

.team-card:hover .team-name {
    color: var(--burgundy);
}

.team-role {
    color: var(--warm-gray);
    font-size: 0.9rem;
}

/* ------------------------------------------------------------
   Donation Section
   ------------------------------------------------------------ */
.donation-section {
    padding: 5rem 0;
    background-color: var(--parchment);
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    color: var(--charcoal);
    margin-bottom: 1rem;
}

/* Centered section-title decoration (donation header) */
.section-header .section-title {
    position: relative;
    padding-bottom: 1rem;
}

.section-header .section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--burgundy), var(--gold));
}

.donation-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    align-items: center;
    margin-bottom: 3rem;
}

.donation-description {
    font-size: 1.2rem;
    line-height: 1.7;
    color: var(--charcoal);
}

.donation-visual {
    text-align: center;
}

.donation-image {
    max-width: 250px;
    border-radius: 4px;
}

.impact-image {
    text-align: center;
}

.audience-image {
    border-radius: 4px;
    box-shadow: var(--shadow-medium);
}

/* ------------------------------------------------------------
   Article Styles (Our Story page)
   ------------------------------------------------------------ */
.article-content {
    padding: 3rem 0;
    background-color: var(--cream);
}

.article-section {
    margin-bottom: 4rem;
}

/* Override centered section-header inside articles */
.article-section .section-header {
    text-align: left;
}

.article-section .section-title {
    text-align: left;
    padding-left: 1.2rem;
    border-left: 3px solid var(--burgundy);
}

/* Kill the centered ::after underline inside articles */
.article-section .section-title::after {
    display: none;
}

.article-body {
    font-family: 'Lora', Georgia, serif;
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--charcoal);
}

.article-image {
    margin: 2rem 0;
}

.article-image img {
    border-radius: 4px;
    box-shadow: var(--shadow-soft);
}

.image-right {
    float: right;
    margin-left: 2rem;
    max-width: 44%;
}

.image-left {
    float: left;
    margin-right: 2rem;
    max-width: 44%;
}

.image-center {
    text-align: center;
    clear: both;
}

.image-center img {
    max-width: 600px;
    width: 100%;
}

.image-caption {
    font-size: 0.9rem;
    color: var(--warm-gray);
    font-style: italic;
    text-align: center;
    margin-top: 0.5rem;
}

.article-quote {
    border-left: 4px solid var(--burgundy);
    padding-left: 2rem;
    margin: 2rem 0;
    font-style: italic;
    font-size: 1.2rem;
    color: var(--warm-gray);
}

.article-cta {
    background-color: var(--parchment);
    padding: 3rem;
    border-radius: 4px;
    text-align: center;
    margin-top: 3rem;
}

/* ------------------------------------------------------------
   Footer
   ------------------------------------------------------------ */
.site-footer {
    background-color: var(--charcoal);
    color: var(--cream);
    text-align: center;
    padding: 2rem 0;
    position: relative;
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--burgundy), var(--gold));
}

.footer-content p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--cream);
    opacity: 0.8;
}

/* ------------------------------------------------------------
   Responsive — Mobile (max-width: 768px)
   ------------------------------------------------------------ */
@media (max-width: 768px) {
    /* Mobile nav menu */
    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        width: 100%;
        background-color: var(--cream);
        flex-direction: column;
        padding: 2rem;
        box-shadow: var(--shadow-medium);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
        z-index: 999;
    }

    .nav-menu-open {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    /* Show hamburger */
    .nav-toggle {
        display: flex;
    }

    /* Hero typography */
    .hero-title, .page-title {
        font-size: 2.5rem;
    }

    /* Donation layout */
    .donation-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    /* Nav cards layout */
    .cards-grid {
        grid-template-columns: 1fr;
    }

    /* Team grid */
    .team-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }

    /* Unfloat article images */
    .article-image.image-right,
    .article-image.image-left {
        float: none;
        margin: 2rem 0;
        max-width: 100%;
    }

    /* Heading scale-down */
    h1 { font-size: 2rem; }
    h2 { font-size: 1.8rem; }
    h3 { font-size: 1.5rem; }
}
