/* Global Styles for Jasemot PHP - Premium Authority Aesthetic */

:root {
    --color-burgundy: #5B0F14;
    --color-red: #7A0E16;
    --color-gold: #F5B041;
    --color-gold-dark: #D68910;
    --color-offwhite: #FDF6F0;
    --color-charcoal: #2C2C2C;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--color-offwhite);
    color: var(--color-charcoal);
    overflow-x: hidden;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
.font-outfit {
    font-family: 'Outfit', sans-serif;
}

.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Preloader */
#preloader {
    position: fixed;
    inset: 0;
    background: var(--color-burgundy);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.8s ease-in-out, visibility 0.8s;
}

.loader-logo {
    width: 100px;
    animation: pulse-scale 2s infinite ease-in-out;
    margin-bottom: 2rem;
}

.loader-bar-container {
    width: 200px;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    border-radius: 99px;
}

.loader-bar {
    position: absolute;
    height: 100%;
    width: 0%;
    background: var(--color-gold);
    animation: load-progress 2s forwards ease-out;
}

@keyframes pulse-scale {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.7;
    }
}

@keyframes load-progress {
    0% {
        width: 0%;
    }

    100% {
        width: 100%;
    }
}

body.loaded #preloader {
    opacity: 0;
    visibility: hidden;
}

/* Base Layout Tweaks for Mobile */
section {
    padding: 5rem 0;
}

@media (min-width: 768px) {
    section {
        padding: 10rem 0;
    }
}

/* Footer Architecture */
footer {
    background: var(--color-burgundy);
    color: white;
    padding: 8rem 0 3rem;
    position: relative;
    overflow: hidden;
    border-top: 5px solid var(--color-gold);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4rem;
    margin-bottom: 6rem;
}

@media (min-width: 768px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1.5fr 1fr 1fr 1fr;
        gap: 5rem;
    }
}

.footer-title {
    font-family: 'Outfit', sans-serif;
    font-size: 0.75rem;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: 0.35em;
    color: var(--color-gold);
    margin-bottom: 2.5rem;
    position: relative;
}

.footer-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--color-gold);
    opacity: 0.3;
}

@media (max-width: 768px) {
    .footer-title::after {
        left: 50%;
        transform: translateX(-50%);
    }
}

.footer-link {
    display: block;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 0.85rem;
    margin-bottom: 1.25rem;
    font-weight: 700;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.footer-link:hover {
    color: var(--color-gold);
    transform: translateX(5px);
}

/* Dynamic Navbar Mobile */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 1.5rem 0;
}

nav.scrolled,
nav.solid {
    background: rgba(253, 246, 240, 0.95);
    backdrop-filter: blur(15px);
    padding: 0.75rem 0;
    box-shadow: 0 10px 30px rgba(91, 15, 20, 0.05);
    border-bottom: 1px solid rgba(245, 176, 65, 0.15);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-links {
    display: none;
    /* Desktop only */
}

@media (min-width: 1024px) {
    .nav-links {
        display: flex;
        gap: 2rem;
        list-style: none;
        align-items: center;
    }
}

.nav-links a {
    text-decoration: none;
    font-weight: 800;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: white;
    transition: all 0.3s;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--color-gold);
    transition: width 0.3s;
}

.nav-links a:hover::after {
    width: 100%;
}

nav.scrolled .nav-links a,
nav.solid .nav-links a {
    color: var(--color-burgundy);
}

/* Logo & Text Visibility */
.logo-title {
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-size: 1.1rem;
    color: white;
    transition: color 0.4s;
}

.logo-subtext {
    font-size: 0.45rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 800;
    transition: color 0.4s;
}

nav.scrolled .logo-title,
nav.solid .logo-title {
    color: var(--color-burgundy);
}

nav.scrolled .logo-subtext,
nav.solid .logo-subtext {
    color: rgba(91, 15, 20, 0.5);
    /* Burgundy with opacity */
}

/* Mobile Menu Toggle */
.mobile-toggle {
    display: block;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

@media (min-width: 1024px) {
    .mobile-toggle {
        display: none;
    }
}

.mobile-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: white;
    transition: 0.3s;
}

nav.scrolled .mobile-toggle span,
nav.solid .mobile-toggle span {
    background: var(--color-burgundy);
}

nav.scrolled .mobile-toggle,
nav.solid .mobile-toggle {
    background: rgba(91, 15, 20, 0.05);
}

/* Hero Optimization - Prevent Overlap */
.hero {
    min-height: 100vh;
    padding-top: 140px;
    /* Increased to prevent overlap */
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: black;
    color: white;
    text-align: center;
    overflow: hidden;
}

/* Section Banner Optimization - Prevent Overlap */
.section-banner {
    position: relative;
    height: 50vh;
    min-height: 400px;
    padding-top: 140px;
    /* Increased to prevent overlap */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: var(--color-burgundy);
}

.banner-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.4;
    filter: grayscale(1) contrast(1.2);
}

.banner-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, var(--color-offwhite) 0%, transparent 60%);
}

.banner-content {
    position: relative;
    z-index: 10;
    text-align: center;
}

/* Grid & Cards for Mobile */
.card-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 640px) {
    .card-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .card-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 3rem;
    }
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

@media (min-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 2rem;
    }
}

.stats-card {
    padding: 2rem 1rem;
}

/* Responsive Utilities */
.text-center-mobile {
    text-align: center;
}

@media (min-width: 768px) {
    .text-left-desktop {
        text-align: left;
    }

    .text-center-desktop {
        text-align: center;
    }
}

/* Button Responsive */
.btn-primary {
    width: 100%;
    justify-content: center;
}

@media (min-width: 640px) {
    .btn-primary {
        width: auto;
    }
}

/* Decorative background animation reduced for mobile */
@keyframes float-petal {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.03;
    }

    50% {
        transform: translateY(-20px) rotate(10deg);
        opacity: 0.04;
    }
}

@media (max-width: 768px) {
    .watermark {
        font-size: 8rem;
        opacity: 0.01;
    }

    .decorative-background .orb {
        width: 150px !important;
        height: 150px !important;
    }
}

/* --- Added Missing Components & Utilities --- */

/* Reveal Animations */
[data-reveal] {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-reveal].revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Global Section Elements */
.section-tag {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background: rgba(91, 15, 20, 0.05);
    color: var(--color-red);
    border-radius: 9999px;
    font-size: 0.65rem;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(122, 14, 22, 0.1);
}

.section-title {
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 950;
    line-height: 1;
    color: var(--color-burgundy);
    font-family: 'Outfit', sans-serif;
}

/* Buttons */
.btn-primary {
    display: inline-flex;
    align-items: center;
    padding: 1.25rem 3rem;
    background: var(--color-red);
    color: white;
    text-decoration: none;
    font-weight: 900;
    border-radius: 1.25rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.85rem;
    transition: all 0.3s;
    border: none;
}

.btn-primary:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(122, 14, 22, 0.3);
}

.btn-donate {
    background: var(--color-gold);
    color: var(--color-burgundy);
    padding: 0.75rem 1.5rem;
    border-radius: 1rem;
    font-weight: 900;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-decoration: none;
    transition: all 0.3s;
}

.btn-donate:hover {
    background: var(--color-gold-dark);
    color: white;
}

/* Cards */
.program-card {
    background: white;
    border-radius: 3rem;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.05);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.program-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.1);
}

.card-body {
    padding: 3rem;
}

/* Impact Stats */
.stats-number {
    display: block;
    font-size: 4rem;
    font-weight: 950;
    color: var(--color-burgundy);
    line-height: 1;
}

.stats-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: #9ca3af;
    font-weight: 800;
}

/* Decorative Orbs & Watermarks */
.watermark {
    position: absolute;
    font-size: 15vw;
    font-weight: 950;
    color: var(--color-burgundy);
    opacity: 0.02;
    pointer-events: none;
    z-index: 1;
    font-family: 'Outfit';
}

.decorative-background {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.orb {
    position: absolute;
    border-radius: 50%;
    background: var(--color-gold);
    filter: blur(100px);
    opacity: 0.1;
    animation: pulse 10s infinite alternate;
}

.petal {
    position: absolute;
    opacity: 0.03;
    animation: float-petal 15s infinite linear;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.1;
    }

    100% {
        transform: scale(1.2);
        opacity: 0.15;
    }
}

/* Responsive Fixes */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

.hero-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.8));
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 1000px;
    margin: 0 auto;
}