:root {
    /* Premium Color Palette - Loveworld Style */
    --color-primary: #003366;
    /* Deep Loveworld Blue */
    --color-primary-dark: #002244;
    --color-secondary: #f4f4f4;
    --color-accent: #D4AF37;
    /* Rich Gold */
    --color-accent-hover: #b3922b;
    --color-text-main: #333333;
    --color-text-light: #666666;
    --color-text-white: #ffffff;
    --color-background: #ffffff;
    --color-surface: #f8f9fa;
    --color-border: #e0e0e0;

    /* Typography */
    --font-heading: 'Inter',
        system-ui,
        -apple-system,
        sans-serif;
    --font-body: 'Inter',
        system-ui,
        -apple-system,
        sans-serif;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 8rem;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-medium: 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-background);
    color: var(--color-text-main);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* Typography Utilities */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--spacing-sm);
}

h1 {
    font-size: 3.5rem;
    letter-spacing: -0.02em;
}

h2 {
    font-size: 2.5rem;
    letter-spacing: -0.01em;
}

h3 {
    font-size: 1.75rem;
}

/* Layout Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.section {
    padding: var(--spacing-xl) 0;
}

.bg-primary {
    background-color: var(--color-primary);
    color: var(--color-text-white);
}

.bg-alt {
    background-color: var(--color-surface);
}

.grid-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

/* Button Component */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    background-color: var(--color-primary);
    color: var(--color-text-white);
    border: 2px solid var(--color-primary);
    border-radius: 4px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-medium);
    box-shadow: 0 2px 8px rgba(0, 51, 102, 0.15);
}

.btn:hover {
    background-color: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 51, 102, 0.25);
}

.btn-accent {
    background-color: var(--color-accent);
    border-color: var(--color-accent);
}

.btn-accent:hover {
    background-color: transparent;
    color: var(--color-accent);
}

/* Navigation */
.navbar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    /* Ensure it's above hero content */
    padding: 1.5rem 0;
    /* Add padding for spacing */
    background: rgba(0, 34, 68, 0.85);
    /* Dark blue with transparency */
    backdrop-filter: blur(10px);
    /* Blur effect */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h3 {
    color: var(--color-text-white);
    margin-bottom: 0;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.navbar.scrolled {
    position: fixed;
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid var(--color-border);
}

.navbar.scrolled .logo h3 {
    color: var(--color-primary);
}

.navbar.scrolled .nav-links a {
    color: var(--color-text-main);
}

/* Fix hamburger menu visibility when scrolled on mobile */
.navbar.scrolled .menu-toggle span {
    background: var(--color-primary);
}


.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links li a {
    font-weight: 500;
    color: var(--color-text-white);
    /* White text for contrast */
    font-size: 0.95rem;
    opacity: 0.9;
    transition: opacity var(--transition-fast), color var(--transition-fast);
}

.nav-links li a:hover,
.nav-links li a.active {
    opacity: 1;
    color: var(--color-accent);
}

.btn-sm {
    padding: 0.5rem 1.25rem;
    font-size: 0.9rem;
    background-color: var(--color-accent) !important;
    /* Force gold bg */
    border-color: var(--color-accent) !important;
    color: var(--color-text-main) !important;
    /* Dark text on gold */
}

.btn-sm:hover {
    background-color: var(--color-accent-hover) !important;
    border-color: var(--color-accent-hover) !important;
    color: var(--color-text-white) !important;
}

/* Hamburger Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 0.5rem;
    background: none;
    border: none;
    z-index: 1001;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--color-text-white);
    transition: all 0.3s ease;
    border-radius: 2px;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

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

/* Mobile Responsiveness */
@media (max-width: 768px) {
    :root {
        --spacing-md: 1.5rem;
        --spacing-xl: 4rem;
    }

    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 2rem;
    }

    .navbar {
        position: relative;
        background: var(--color-primary);
        padding: 1rem 0;
    }

    .navbar .container {
        flex-direction: row;
        justify-content: space-between;
    }

    .menu-toggle {
        display: flex;
    }

    /* Make hamburger menu visible on mobile */
    .menu-toggle span {
        background: var(--color-text-white);
    }

    /* Critical: Change hamburger to dark when scrolled (white background) */
    .navbar.scrolled .menu-toggle span {
        background: var(--color-primary) !important;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 70%;
        max-width: 300px;
        background: var(--color-primary);
        flex-direction: column;
        gap: 0;
        padding: 5rem 2rem 2rem;
        transition: right 0.3s ease;
        z-index: 1000;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.3);
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links li {
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-links li a {
        display: block;
        padding: 1rem 0;
        font-size: 1rem;
        color: var(--color-text-white) !important;
    }

    /* Override scrolled state for mobile menu - keep text white */
    .navbar.scrolled .nav-links li a {
        color: var(--color-text-white) !important;
    }

    .hero-content h1 {
        font-size: 2rem;
        line-height: 1.2;
    }

    .hero-content p {
        font-size: 1rem;
    }

    /* Hero section mobile optimization */
    .hero {
        min-height: 50vh !important;
        padding: 2rem 0 1.5rem !important;
    }

    .hero-content span {
        font-size: 0.75rem !important;
        letter-spacing: 0.05em !important;
        margin-bottom: 0.75rem !important;
    }

    .hero-content h1 {
        font-size: 1.75rem !important;
        margin-bottom: 1rem !important;
    }

    .hero-content p {
        font-size: 0.95rem !important;
        margin-bottom: 1.5rem !important;
    }

    /* Stack buttons vertically on mobile */
    .hero-content div[style*="display: flex"] {
        flex-direction: column !important;
        gap: 0.75rem !important;
        width: 100%;
    }

    .hero-content .btn {
        width: 100%;
        text-align: center;
        padding: 0.875rem 1.5rem !important;
        font-size: 0.95rem !important;
    }

    .section {
        padding: 3rem 0;
    }

    .grid-split {
        grid-template-columns: 1fr;
        gap: 1rem;
        text-align: center;
    }

    .grid-split>div {
        max-width: 100%;
    }

    /* Section header mobile optimization */
    .section-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        text-align: left;
    }

    .section-header a {
        font-size: 0.9rem !important;
    }

    /* Typography mobile adjustments */
    h2 {
        font-size: 1.75rem !important;
    }

    h3 {
        font-size: 1.5rem !important;
    }

    /* PCDL section mobile optimization */
    .grid-split h3 {
        font-size: 1.4rem !important;
        margin-top: 1rem !important;
    }

    .grid-split p {
        font-size: 0.95rem !important;
    }

    .grid-split .btn {
        width: 100%;
        display: block;
        text-align: center;
    }

    /* Logo mobile sizing */
    .logo img {
        height: 40px !important;
    }

    /* Container padding */
    .container {
        padding: 0 1.5rem;
    }

    /* Ensure images in grid-split don't overflow */
    .grid-split img {
        margin: 0 auto;
    }

    /* Reset order for Global Leadership so image is on top logically */
    .grid-split>div {
        order: unset !important;
    }
}

/* Giving Page Styles */
.give-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: -4rem;
    /* Overlap with hero */
    position: relative;
    z-index: 10;
}

.give-card {
    background: #ffffff;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    /* Premium shadow */
    text-align: center;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: transform var(--transition-medium), box-shadow var(--transition-medium);
}

.give-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.give-icon {
    width: 80px;
    height: 80px;
    background: var(--color-surface);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: var(--color-primary);
}

.give-details {
    margin-top: 1.5rem;
    text-align: left;
    background: var(--color-surface);
    padding: 1.5rem;
    border-radius: 8px;
}

.give-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.give-row:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.kingspay-code {
    font-size: 2rem;
    font-weight: 800;
    color: var(--color-primary);
    background: var(--color-surface);
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    letter-spacing: 0.1em;
}

/* Hero Section */
.hero {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: #fff;
    padding-top: 100px;
}

.hero h1 {
    color: #fff;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background-color: var(--color-accent);
    color: var(--color-primary);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-medium);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
    z-index: 999;
    border: none;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--color-accent-hover);
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(212, 175, 55, 0.4);
}

/* WhatsApp Floating Button */
.whatsapp-float {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    background-color: #25D366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-medium);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
    z-index: 999;
    text-decoration: none;
}

.whatsapp-float:hover {
    background-color: #128C7E;
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(37, 211, 102, 0.4);
}

@media (max-width: 768px) {
    .back-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 45px;
        height: 45px;
    }

    .whatsapp-float {
        bottom: 1rem;
        left: 1rem;
        width: 50px;
        height: 50px;
    }
}

/* Hero Section Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-content>* {
    animation: fadeInUp 0.8s ease-out forwards;
}

.hero-content>*:nth-child(1) {
    animation-delay: 0.1s;
}

.hero-content>*:nth-child(2) {
    animation-delay: 0.3s;
}

.hero-content>*:nth-child(3) {
    animation-delay: 0.5s;
}

.hero-content>*:nth-child(4) {
    animation-delay: 0.7s;
}

/* Card Hover Effects */
.card,
[style*="border-radius: 8px"] {
    transition: transform var(--transition-medium), box-shadow var(--transition-medium);
}

.card:hover,
[style*="border-radius: 8px"]:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12) !important;
}

/* Link Hover in Body Text */
p a {
    color: var(--color-primary);
    text-decoration: underline;
    text-decoration-color: var(--color-accent);
    text-decoration-thickness: 2px;
    text-underline-offset: 2px;
    transition: all var(--transition-fast);
}

p a:hover {
    color: var(--color-accent);
    text-decoration-color: var(--color-primary);
}

/* Improved Section Spacing */
.section+.section {
    margin-top: 0;
}

/* ===== UI ENHANCEMENTS ===== */

/* 1. Fade-in Animation on Scroll */
.fade-in-section {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-section.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger animation delays for child elements */
.fade-in-section.delay-1 {
    transition-delay: 0.1s;
}

.fade-in-section.delay-2 {
    transition-delay: 0.2s;
}

.fade-in-section.delay-3 {
    transition-delay: 0.3s;
}

/* 2. Enhanced Hero Background with Texture */
.hero {
    position: relative;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(212, 175, 55, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: 1;
}

.hero .container {
    position: relative;
    z-index: 2;
}

/* Subtle noise texture for depth */
.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.03'/%3E%3C/svg%3E");
    opacity: 0.4;
    pointer-events: none;
    z-index: 1;
}

/* 3. Enhanced Card Hover Effects */
.card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    will-change: transform;
}

.card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 32px rgba(0, 51, 102, 0.15) !important;
}

/* Apply to ministry cards and other card-like elements */
[style*="border-radius: 12px"],
[style*="border-radius: 8px"] {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

[style*="border-radius: 12px"]:hover,
[style*="border-radius: 8px"]:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12) !important;
}

/* 4. Decorative Footer Enhancement */
footer {
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg,
            var(--color-accent) 0%,
            var(--color-primary) 50%,
            var(--color-accent) 100%);
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);
}

/* Add subtle pattern to footer */
footer {
    background: linear-gradient(180deg, #001a33 0%, var(--color-primary) 100%);
}

/* 5. Smooth Button Pulse Animation */
@keyframes pulse {

    0%,
    100% {
        box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);
    }

    50% {
        box-shadow: 0 4px 16px rgba(212, 175, 55, 0.5);
    }
}

.btn-accent {
    animation: pulse 3s ease-in-out infinite;
}

.btn-accent:hover {
    animation: none;
}

/* 6. Image Hover Effects for Gallery */
img[style*="object-fit: cover"] {
    transition: transform 0.4s ease, filter 0.4s ease;
}

img[style*="object-fit: cover"]:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
}

/* Prevent image overflow on hover */
[style*="overflow: hidden"] {
    overflow: hidden !important;
}

/* 7. Smooth Scroll Indicator */
@keyframes scrollIndicator {

    0%,
    100% {
        transform: translateY(0);
        opacity: 1;
    }

    50% {
        transform: translateY(10px);
        opacity: 0.5;
    }
}

/* 8. Enhanced Focus States for Accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible {
    outline: 3px solid var(--color-accent);
    outline-offset: 2px;
    border-radius: 4px;
}

/* 9. Smooth Page Transitions */
body {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* ===== END UI ENHANCEMENTS ===== */