:root {
    --primary-hue: 208;
    --primary-color: hsl(var(--primary-hue), 70%, 43%);
    /* #1e73be */
    --primary-dark: hsl(var(--primary-hue), 70%, 30%);
    --primary-light: hsl(var(--primary-hue), 70%, 55%);
    --accent-color: #fca311;

    --text-main: #2b2d42;
    --text-light: #555;
    /* Darkened from #8d99ae for better contrast */
    --text-inverse: #ffffff;

    --bg-body: #f8f9fa;
    --bg-card: #ffffff;
    /* Removed transparency for readability */

    --shadow-soft: 0 10px 40px rgba(0, 0, 0, 0.08);
    --shadow-strong: 0 20px 60px rgba(0, 0, 0, 0.15);

    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    --radius-lg: 20px;
}

html {
    scroll-behavior: smooth;
}

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

body {
    font-family: var(--font-body);
    color: var(--text-main);
    background-color: var(--bg-body);
    line-height: 1.7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

.animate-fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

.delay-1 {
    animation-delay: 0.2s;
}

.delay-2 {
    animation-delay: 0.4s;
}

.delay-3 {
    animation-delay: 0.6s;
}

/* Header */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    transition: padding 0.3s ease;
    padding: 5px 0;
    /* Minimal padding to maximize logo space */
    background: rgba(30, 115, 190, 0.95);
    /* Brand Blue */
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

header.scrolled {
    padding: 5px 0;
    /* Keep compact */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

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

.logo a {
    text-decoration: none;
    display: flex;
    /* Fix for image spacing */
    align-items: center;
}

/* Logo Styles */
/* Logo Styles */
.logo-link {
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-icon {
    height: 70px;
    width: auto;
    transition: all 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}


header.scrolled .logo-icon {
    height: 50px;
}

@media (max-width: 768px) {
    .logo-icon {
        height: 50px !important;
        /* Force constant height on mobile */
    }

    header {
        padding: 5px 0 !important;
        /* Constant padding */
    }
}

.logo-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.2;
}

.brand-name {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-inverse);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: -0.5px;
    transition: font-size 0.3s ease;
}

.brand-tagline {
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

header.scrolled .brand-name {
    font-size: 1.5rem;
}

header.scrolled .brand-tagline {
    opacity: 0;
    height: 0;
    overflow: hidden;
}

header.scrolled .logo a {
    color: var(--text-inverse);
    /* Keep white */
    text-shadow: none;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
}

nav a {
    text-decoration: none;
    color: var(--text-inverse);
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
    transition: color 0.3s;
}

header.scrolled nav a {
    color: var(--text-inverse);
    /* Keep white */
    text-shadow: none;
}

nav a:hover {
    color: var(--accent-color);
}

/* Mobile Nav Toggle */
.mobile-nav-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1002;
    position: relative;
}

.mobile-nav-toggle .bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: white;
    transition: all 0.3s ease-in-out;
    border-radius: 2px;
}

.mobile-nav-toggle.active .bar:nth-child(2) {
    opacity: 0;
}

.mobile-nav-toggle.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.mobile-nav-toggle.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Mobile Styles */
@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }

    .mobile-nav-toggle {
        display: block;
    }

    .main-nav {
        display: none;
        position: fixed;
        top: 0;
        right: 0;
        width: 100%;
        height: 100vh;
        background: linear-gradient(135deg, rgba(30, 115, 190, 0.98), rgba(20, 30, 48, 0.99));
        backdrop-filter: blur(15px);
        padding-top: 120px;
        z-index: 1001;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        clip-path: circle(0% at 100% 0);
        transition: clip-path 0.5s ease-in-out;
    }

    .main-nav.active {
        display: flex;
        clip-path: circle(150% at 100% 0);
    }

    .main-nav ul {
        flex-direction: column;
        align-items: center;
        gap: 30px;
        text-align: center;
        width: 100%;
    }

    .main-nav li {
        opacity: 0;
        transform: translateY(20px);
        transition: opacity 0.4s ease, transform 0.4s ease;
        width: 100%;
    }

    .main-nav.active li {
        opacity: 1;
        transform: translateY(0);
    }

    .main-nav.active li:nth-child(1) {
        transition-delay: 0.1s;
    }

    .main-nav.active li:nth-child(2) {
        transition-delay: 0.2s;
    }

    .main-nav.active li:nth-child(3) {
        transition-delay: 0.3s;
    }

    .main-nav.active li:nth-child(4) {
        transition-delay: 0.4s;
    }

    .main-nav a {
        font-family: var(--font-heading);
        font-size: 2rem;
        font-weight: 700;
        color: white;
        display: block;
        padding: 15px 0;
        position: relative;
        text-transform: uppercase;
        letter-spacing: 1px;
    }

    .main-nav a::after {
        content: '';
        position: absolute;
        bottom: 10px;
        left: 50%;
        transform: translateX(-50%);
        width: 0;
        height: 2px;
        background: var(--accent-color);
        transition: width 0.3s ease;
    }

    .main-nav a:hover::after,
    .main-nav a.active::after {
        width: 40px;
    }

    body.no-scroll {
        overflow: hidden;
    }

    /* Hero Adjustments */
    .hero {
        padding-top: 160px;
        /* Reduced padding */
        height: auto;
        min-height: 100vh;
        min-height: 100svh;
        /* Stable mobile height */
        background-attachment: scroll !important;
        padding-bottom: 60px;
        align-items: center;
        /* Center alignment */
        text-align: center;
    }

    .hero h1 {
        font-size: 2rem;
        /* Mobile font size */
        line-height: 1.2;
        margin-bottom: 20px;
        font-weight: 700;
        text-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
        margin-left: auto;
        margin-right: auto;
    }

    .hero p {
        font-size: 1.1rem;
        /* Mobile paragraph size */
        max-width: 100%;
        margin: 0 auto 30px;
        font-weight: 300;
    }

    .hero-content {
        margin-top: 20px;
        /* Safe centering */
        width: 100%;
        padding: 0 20px;
        text-align: center;
    }
}

/* Desktop Hero Styles (Moved from inline) */
.hero {
    color: white;
}

.hero h1 {
    font-size: 4.5rem;
    margin-bottom: 20px;
    font-weight: 700;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
}

.hero p {
    font-size: 1.6rem;
    max-width: 800px;
    margin: 0 auto 40px;
    font-weight: 300;
}


/* Section Adjustments */
.section {
    padding: 60px 0;
}

.section-heading-modern {
    font-size: 1.6rem;
}

.card-overlap {
    margin-top: -50px;
    padding: 30px 20px;
}

/* Flex/Grid Stacking */
.stats-grid {
    grid-template-columns: 1fr;
    gap: 40px;
}

.story-grid {
    grid-template-columns: 1fr;
}

/* Footer Adjustments */
.footer-grid {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
}

footer h4::after {
    left: 50%;
    transform: translateX(-50%);
}

.footer-brand h4::after {
    left: 50%;
    transform: translateX(-50%);
}

.footer-links h4::after,
.footer-contact h4::after {
    left: 50%;
    transform: translateX(-50%);
}

.address-link {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.address-link:hover {
    color: var(--accent-color);
}

.footer-link:hover {
    padding-left: 0;
    color: var(--accent-color);
    transform: scale(1.05);
}



/* Hero */
.hero {
    height: 90vh;
    /* Reduced from 100vh for better fold visibility */
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)) center/cover fixed;
    /* Background image is set via inline style in each template */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text-inverse);
    margin-bottom: 0;
    padding-top: 80px;
}

.hero h1 {
    font-family: var(--font-heading);
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0;
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 30px;
    opacity: 0;
}

.btn {
    display: inline-block;
    padding: 15px 35px;
    background: var(--primary-color);
    color: white;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    transition: transform 0.2s, background 0.2s;
    border: none;
}

.btn:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
}

.btn-secondary {
    background: transparent;
    border: 2px solid white;
    margin-left: 15px;
}

.btn-secondary:hover {
    background: white;
    color: var(--primary-color);
}

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

.btn.btn-outline-primary:hover {
    background: var(--primary-color);
    color: white;
}

/* Sections */
.section {
    padding: 80px 0;
    position: relative;
}

/* Split Section Grid */
.split-section-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.card-overlap {
    margin-top: -100px;
    z-index: 10;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-strong);
    padding: 60px;
    position: relative;
    color: var(--text-main);
}

/* Approach Grid */
.approach-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

/* Offset for the second card in Pathway to Freedom on desktop only */
@media (min-width: 769px) {
    .card-offset-up {
        top: -50px;
    }
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-top: 40px;
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary-color);
}

.section-heading-modern {
    font-family: var(--font-heading);
    color: var(--primary-dark);
    font-weight: 800;
    font-size: 1.75rem;
    margin-bottom: 30px;
    position: relative;
    padding-bottom: 10px;
}

.section-heading-modern::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--accent-color);
    border-radius: 2px;
}

/* Stories */
.story-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.story-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: transform 0.3s;
}

.story-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-strong);
}

.story-img {
    height: 250px;
    background-size: cover;
    background-position: center;
}

.story-content {
    padding: 30px;
}

.story-content h3 {
    margin-bottom: 10px;
    color: var(--primary-dark);
}

.story-content p {
    color: var(--text-light);
}

/* Contact Page (Unified) */
.contact-container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    padding: 60px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
}

.bank-card {
    background: linear-gradient(135deg, #1e73be, #0d4b8f);
    color: white;
    padding: 40px;
    border-radius: 15px;
    margin-top: 40px;
    box-shadow: 0 15px 30px rgba(30, 115, 190, 0.3);
}

/* Footer */
footer {
    background: linear-gradient(180deg, #1a1a2e 0%, #0f0f1e 100%);
    color: #ffffff;
    padding: 50px 0 0;
    margin-top: auto;
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--accent-color) 50%, var(--primary-color) 100%);
}

footer h4 {
    color: var(--accent-color);
    font-weight: 700;
    font-size: 1.1rem;
    position: relative;
    padding-bottom: 12px;
    margin-bottom: 20px;
}

footer h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-color), var(--primary-color));
    border-radius: 2px;
}

footer p {
    color: #ffffff;
    font-size: 0.95rem;
}

footer strong {
    color: #ffffff;
}

.footer-link {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    display: block;
    margin-bottom: 8px;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.footer-link:hover {
    color: var(--accent-color);
    padding-left: 5px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 50px;
    margin-bottom: 40px;
    padding-bottom: 30px;
}

.footer-brand,
.footer-links,
.footer-contact {
    color: #ffffff;
}

.footer-brand h4 {
    font-size: 1.3rem;
    color: var(--accent-color);
}

.footer-brand h4::after {
    background: linear-gradient(90deg, var(--accent-color), var(--primary-color));
    width: 60px;
}

.footer-brand p,
.footer-contact p {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
}

.footer-contact a {
    color: rgba(255, 255, 255, 0.9);
    transition: color 0.2s;
}

.footer-contact a:hover {
    color: var(--accent-color);
}

.footer-bottom {
    padding: 20px 0;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
}

.footer-bottom p {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
}

.admin-link {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.75rem;
    text-decoration: none;
    transition: all 0.3s;
}

.admin-link:hover {
    color: var(--accent-color);
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }
}

/* Layout Utils */
.text-center {
    text-align: center;
}

.mb-2 {
    margin-bottom: 20px;
}

/* Gallery Masonry Layout */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding-bottom: 20px;
}

@media (max-width: 900px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
}

.gallery-wrapper {
    position: relative;
    overflow: hidden;
    max-height: 500px;
    /* Reduced default height slightly for better initial view */
    transition: max-height 0.8s ease-in-out;
    /* Slower transition for masonry height diffs */
}

.gallery-wrapper.expanded {
    max-height: 3000px;
}

/* Gradient Overlay */
.gallery-wrapper::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 150px;
    background: linear-gradient(transparent, #ffffff);
    pointer-events: none;
    transition: opacity 0.5s;
}

.gallery-wrapper.expanded::after {
    opacity: 0;
}

.gallery-item {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    margin-bottom: 0px;
    /* Bottom margin for column spacing */
    transition: transform 0.3s;
    width: 100%;
    cursor: pointer;
    position: relative;
    /* Context for caption positioning if needed, though mostly visual stacking */
    aspect-ratio: 1 / 1;
}

.gallery-item:hover {
    transform: translateY(-5px);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gallery-caption {
    padding: 15px;
    background: white;
    text-align: center;
    color: var(--text-main);
    font-weight: 600;

    /* Click-to-show styles */
    opacity: 0;
    pointer-events: none;
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    /* Gradient overlay for better text readability without blocking image */
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.4) 70%, transparent 100%);
    padding: 20px 15px;
    transform: translateY(100%);
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0;
    color: #fff;
    /* White text for contrast */
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
    font-weight: 500;
}

.gallery-item.active .gallery-caption,
.gallery-wrapper.show-captions .gallery-caption {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

/* Article Styles */
.article-container {
    max-width: 700px;
    margin: -100px auto 0;
    position: relative;
    z-index: 10;
    background: white;
    padding: 60px 40px;
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
}

.article-meta {
    font-family: var(--font-header);
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
    display: flex;
    justify-content: space-between;
}

.article-text {
    font-size: 1.25rem;
    line-height: 1.8;
    color: #333;
    font-family: 'Georgia', serif;
    /* News feel */
}

.article-text p {
    margin-bottom: 25px;
}

.article-header {
    margin-top: 50px;
    margin-bottom: 25px;
    color: var(--primary-dark);
    font-size: 1.8rem;
    font-family: var(--font-header);
    font-weight: 700;
}

.article-quote {
    font-family: 'Georgia', serif;
    font-style: italic;
    font-size: 1.8rem;
    line-height: 1.5;
    color: var(--primary-color);
    text-align: center;
    margin: 50px 0;
    padding: 0 20px;
    position: relative;
    border: none;
    /* Removed default border */
}

.article-quote::before {
    content: "“";
    display: block;
    font-size: 4rem;
    line-height: 1;
    color: rgba(0, 0, 0, 0.1);
    margin-bottom: -20px;
}

.article-figure {
    margin: 50px -40px;
    /* Break out of container slightly */
}

@media (max-width: 768px) {
    .split-section-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .approach-grid {
        grid-template-columns: 1fr;
    }
}

.article-figure img {
    width: 100%;
    border-radius: 0;
    /* Cleaner look for news */
}

.article-caption {
    text-align: center;
    color: #666;
    font-size: 0.9rem;
    margin-top: 15px;
    font-style: italic;
    font-family: var(--font-body);
}

@media (max-width: 768px) {
    .article-container {
        padding: 30px 20px;
        margin-top: -50px;
    }

    .article-figure {
        margin: 30px -20px;
    }
}

/* Admin Styles */
.admin-container {
    max-width: 1000px;
    margin: 150px auto 100px;
    padding: 0 20px;
    min-height: 60vh;
}

.login-form {
    max-width: 400px;
    margin: 0 auto;
    background: white;
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-strong);
}

.login-form h2 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--primary-dark);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-main);
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="email"],
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
    outline: none;
}

/* Admin Tabs */
.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #eee;
}

.tab-btn {
    padding: 10px 20px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-light);
    font-size: 1rem;
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s;
}

/* Admin Story Tiles */
/* Admin Story Tiles */
.admin-story-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.story-editor-tile {
    background: white;
    border: 1px solid #eef0f5;
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
}

.story-editor-tile:hover {
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
    transform: translateY(-5px);
    border-color: var(--primary-light);
}

.story-tile-header {
    padding: 0;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    background: white;
    position: relative;
    height: 100%;
}

.story-tile-pr.gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: transform 0.3s ease;
    cursor: pointer;
    aspect-ratio: 1 / 1;
    /* Force square container */
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Prevent distortion */
    display: block;
    transition: transform 0.5s ease;
}

.story-tile-preview {
    width: 100%;
    aspect-ratio: 16/9;
    background: #f0f2f5;
    position: relative;
    overflow: hidden;
}

.story-tile-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.story-editor-tile:hover .story-tile-preview img {
    transform: scale(1.05);
}

.story-tile-info {
    padding: 20px;
    background: white;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.story-tile-info h4 {
    margin: 0 0 10px 0;
    font-size: 1.1rem;
    color: var(--text-main);
    font-weight: 700;
    line-height: 1.4;
}

.story-date {
    font-size: 0.85rem;
    color: #999;
    font-weight: 500;
}

/* Floating Action Button for Toggle */
.story-tile-actions {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.95);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    color: var(--primary-color);
    z-index: 2;
    transition: all 0.2s;
}

.story-editor-tile:hover .story-tile-actions {
    transform: scale(1.1);
}

/* Expanded State */
.story-editor-tile.expanded {
    grid-column: 1 / -1;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.1);
    transform: none;
    border-color: var(--primary-light);
    margin-bottom: 20px;
}

.story-editor-tile.expanded .story-tile-header {
    flex-direction: row;
    padding: 20px;
    align-items: center;
    gap: 25px;
    height: auto;
    border-bottom: 1px solid #f0f0f0;
}

.story-editor-tile.expanded .story-tile-preview {
    width: 120px;
    aspect-ratio: 1;
    border-radius: 12px;
    flex-shrink: 0;
}

.story-editor-tile.expanded .story-tile-actions {
    position: static;
    background: transparent;
    box-shadow: none;
    width: auto;
    height: auto;
}

.story-editor-tile.expanded .toggle-icon {
    transform: rotate(180deg);
}

.story-tile-details {
    display: none;
    background: #fdfdfd;
}

.story-editor-tile.expanded .story-tile-details {
    display: block;
    animation: fadeIn 0.4s ease-out;
}

/* Form Styles */
.block-item {
    background: #ffffff;
    padding: 30px;
    margin-bottom: 24px;
    border: 2px solid #e3e8f0;
    border-radius: 20px;
    position: relative;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

/* Contact Page 2x2 Grid Redesign */
.contact-section {
    padding-bottom: 80px;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    row-gap: 80px;
    /* Increased to prevent visual overlap with shadows */
    margin-bottom: 30px;
}

.contact-grid>div {
    display: flex;
    flex-direction: column;
}

.contact-card {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border: 1px solid #eef0f5;
    /* height: fit-content; REMOVED to allow flex grow */
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
    border-color: var(--primary-light);
}

.donation-card {
    background: #f9f9f9;
}

.map-container {
    height: 100%;
    min-height: 350px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

@media (max-width: 768px) {
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 60px;
        /* Increased gap to prevent header overlaps */
        row-gap: 60px;
    }

    .contact-grid>div {
        margin-bottom: 20px;
    }

    /* Ensure headers have proper spacing on mobile */
    .contact-grid h2.section-heading-modern {
        margin-bottom: 35px;
        margin-top: 10px;
    }
}

/* Custom Modal Styles */
.site-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(2px);
    animation: fadeIn 0.2s ease-out;
}

.site-modal {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    animation: slideUp 0.3s ease-out;
}

.site-modal-header {
    background: var(--primary-color);
    color: white;
    padding: 15px 20px;
}

.site-modal-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.site-modal-body {
    padding: 25px 20px;
    color: var(--text-main);
    font-size: 1rem;
    line-height: 1.5;
}

.site-modal-footer {
    padding: 15px 20px;
    background: #f9f9f9;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    border-top: 1px solid #eee;
}

.site-modal-btn {
    padding: 8px 20px;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s;
}

.site-modal-btn-primary {
    background: var(--primary-color);
    color: white;
}

.site-modal-btn-primary:hover {
    background: #0056b3;
}

.site-modal-btn-secondary {
    background: #e0e0e0;
    color: #333;
}

.site-modal-btn-secondary:hover {
    background: #d0d0d0;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

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



.block-item:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-light);
    transform: translateY(-2px);
}

.block-item label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #888;
    margin-bottom: 10px;
}

.blocks-container {
    background: #f8f9fc;
    padding: 24px;
    border-radius: 16px;
    margin-bottom: 20px;
    border: 1px solid #e8ecf4;
}

.block-actions {
    position: absolute;
    top: 20px;
    right: 20px;
}

.btn-remove {
    background: #fff5f5;
    color: #e03131;
    border: none;
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 0.5px;
}

.btn-remove:hover {
    background: #ffe3e3;
    color: #c92a2a;
}

textarea.stylized-input,
input.stylized-input {
    border: 2px solid #f0f2f5;
    background: #fafbfd;
    padding: 15px;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.2s;
    width: 100%;
}

textarea.stylized-input:focus,
input.stylized-input:focus {
    background: white;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(30, 115, 190, 0.1);
}

.add-block-container {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    margin-top: 20px;
    border: 2px dashed #e9ecef;
    text-align: center;
}

.add-block-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.btn-block-add {
    background: white;
    border: 1px solid #e9ecef;
    color: var(--text-main);
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
}

.btn-block-add:hover {
    transform: translateY(-2px);
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: 0 5px 15px rgba(30, 115, 190, 0.15);
}

/* File Upload */
.image-upload-container {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.image-preview-box {
    width: 120px;
    height: 120px;
    border-radius: 12px;
    background: #f0f2f5;
    overflow: hidden;
    border: 2px solid #eef0f5;
}

.image-preview-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.file-upload-wrapper {
    flex-grow: 1;
}


/* Login Page Specifics */
.login-page-body {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-page-body main {
    width: 100%;
    display: flex;
    justify-content: center;
}

.login-page-body .login-form {
    width: 100%;
    max-width: 700px;
    margin: 0;
    padding: 50px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    border-radius: 16px;
}

.login-page-body .login-form h2 {
    font-size: 2rem;
    margin-bottom: 10px;
    color: var(--primary-dark);
}

.login-brand {
    text-align: center;
    margin-bottom: 30px;
    color: var(--text-light);
    font-size: 0.95rem;
}

.login-page-body .btn {
    width: 100%;
    padding: 14px;
    font-size: 1.1rem;
    margin-top: 10px;
}

/* Admin Sidebar Layout */
.admin-dashboard-wrapper {
    display: flex;
    min-height: calc(100vh - 80px);
    margin-top: 20px;
}

.admin-sidebar {
    width: 250px;
    background: white;
    border-right: 1px solid #eaecf0;
    flex-shrink: 0;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    padding: 20px 0;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    color: var(--text-light);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.95rem;
}

.sidebar-item:hover {
    color: var(--primary-color);
    background: #f8f9fa;
}

.sidebar-item.active {
    color: var(--primary-color);
    background: #eef4fb;
    border-right: 3px solid var(--primary-color);
}

.sidebar-item .icon {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

.admin-content {
    flex-grow: 1;
    padding: 30px;
    background: #fcfcfd;
    overflow-x: hidden;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eaecf0;
}

.btn-logout-small {
    padding: 8px 20px;
    font-size: 0.85rem;
    background-color: #666;
}

/* Responsive Sidebar */
@media (max-width: 900px) {
    .admin-dashboard-wrapper {
        flex-direction: column;
    }

    .admin-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #eaecf0;
    }

    .sidebar-nav {
        flex-direction: row;
        overflow-x: auto;
        padding: 0;
    }

    .sidebar-item {
        padding: 15px;
        justify-content: center;
        width: auto;
        flex-shrink: 0;
        border-right: none;
        border-bottom: 3px solid transparent;
    }

    .sidebar-item.active {
        border-right: none;
        border-bottom-color: var(--primary-color);
        background: none;
    }

}

/* Force Gallery Caption Visibility */
/* Force visibility when explicitly rendered */
.gallery-caption.visible {
    transform: translateY(0);
    opacity: 1;
}

.gallery-item.active .gallery-caption,
.gallery-caption.visible {
    transform: translateY(0) !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Admin Cards & Grid Pattern */
.admin-grid-two-col {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.admin-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid #eee;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.admin-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.card-header {
    background: #f8f9fa;
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: #444;
}

.card-body {
    padding: 15px;
}

.btn-icon-danger {
    background: none;
    border: none;
    color: #dc3545;
    font-size: 1.2rem;
    cursor: pointer;
    line-height: 1;
    padding: 0 5px;
    transition: color 0.2s;
}

.btn-icon-danger:hover {
    color: #a71d2a;
}


/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: white;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 250px;
    transform: translateX(120%);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-left: 4px solid #333;
}

.toast.show {
    transform: translateX(0);
}

.toast-success {
    border-left-color: #28a745;
}

.toast-error {
    border-left-color: #dc3545;
}

.toast-info {
    border-left-color: #17a2b8;
}

.toast-icon {
    font-weight: bold;
    font-size: 1.1rem;
}

.toast-success .toast-icon {
    color: #28a745;
}

.toast-error .toast-icon {
    color: #dc3545;
}

/* Custom Confirmation Modal - Modern Premium Design */
.custom-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.custom-modal-overlay.show {
    opacity: 1;
}

.custom-modal {
    background: white;
    padding: 0;
    border-radius: 20px;
    width: 90%;
    max-width: 440px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transform: translateY(20px) scale(0.95);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.custom-modal-overlay.show .custom-modal {
    transform: translateY(0) scale(1);
    opacity: 1;
    animation: modalBounce 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalBounce {
    0% {
        transform: translateY(20px) scale(0.95);
        opacity: 0;
    }

    50% {
        transform: translateY(-5px) scale(1.01);
    }

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

/* Modal Icon */
.modal-icon-container {
    padding: 32px 32px 0 32px;
    display: flex;
    justify-content: center;
}

.modal-warning-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fef3c7 0%, #fed7aa 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #f59e0b;
    box-shadow: 0 8px 16px rgba(245, 158, 11, 0.2), inset 0 0 0 2px rgba(245, 158, 11, 0.1);
    animation: iconPulse 2s ease-in-out infinite;
}

@keyframes iconPulse {

    0%,
    100% {
        box-shadow: 0 8px 16px rgba(245, 158, 11, 0.2), inset 0 0 0 2px rgba(245, 158, 11, 0.1);
    }

    50% {
        box-shadow: 0 8px 20px rgba(245, 158, 11, 0.3), inset 0 0 0 2px rgba(245, 158, 11, 0.15);
    }
}

.modal-warning-icon svg {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

/* Modal Content */
.modal-content-wrapper {
    padding: 24px 32px 32px 32px;
    text-align: center;
}

.modal-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 12px 0;
    letter-spacing: -0.02em;
}

.modal-message {
    font-size: 1rem;
    color: #6b7280;
    line-height: 1.6;
    margin: 0;
    font-weight: 500;
}

/* Modal Actions */
.modal-actions {
    display: flex;
    gap: 12px;
    padding: 0 24px 24px 24px;
}

.modal-actions button {
    flex: 1;
    padding: 14px 24px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: var(--font-body);
    position: relative;
    overflow: hidden;
}

.modal-actions button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.modal-actions button:active::before {
    width: 300px;
    height: 300px;
}

.btn-modal-cancel {
    background: #f3f4f6;
    color: #6b7280;
    border: 1px solid #e5e7eb;
}

.btn-modal-cancel:hover {
    background: #e5e7eb;
    color: #4b5563;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.btn-modal-cancel:active {
    transform: translateY(0);
}

.btn-modal-confirm {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
    border: none;
}

.btn-modal-confirm:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}

.btn-modal-confirm:active {
    transform: translateY(0);
}

/* Mobile Responsiveness */
@media (max-width: 480px) {
    .custom-modal {
        width: 95%;
        max-width: none;
    }

    .modal-icon-container {
        padding: 24px 24px 0 24px;
    }

    .modal-warning-icon {
        width: 64px;
        height: 64px;
    }

    .modal-warning-icon svg {
        width: 40px;
        height: 40px;
    }

    .modal-content-wrapper {
        padding: 20px 24px 24px 24px;
    }

    .modal-title {
        font-size: 1.125rem;
    }

    .modal-message {
        font-size: 0.95rem;
    }

    .modal-actions {
        flex-direction: column-reverse;
        gap: 8px;
        padding: 0 20px 20px 20px;
    }

    .modal-actions button {
        width: 100%;
    }
}



/* Rich Text Editor */
.rich-text-wrapper {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}

.formatting-toolbar {
    background: #f8f9fa;
    padding: 5px;
    border-bottom: 1px solid #eee;
    display: flex;
    gap: 5px;
}

.formatting-toolbar button {
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 30px;
    height: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.formatting-toolbar button:hover {
    background: #eee;
}

.rich-editor {
    border: none !important;
    border-radius: 0 !important;
    padding: 15px !important;
    width: 100%;
    resize: vertical;
    font-family: inherit;
}


/* Admin UI Polish */
.admin-header {
    background: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.tab-content h3 {
    font-size: 1.5rem;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
    color: #333;
}

.form-group label {
    color: #555;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.stylized-input {
    background: #fdfdfd;
    border: 1px solid #e0e0e0;
    transition: all 0.2s;
}

.stylized-input:focus {
    background: white;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

.btn {
    border-radius: 6px;
    font-weight: 500;
    letter-spacing: 0.3px;
    padding: 10px 24px;
}

.story-editor-tile {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.story-editor-tile.expanded {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border-color: #d0d0d0;
}

.story-tile-header {
    background: #fff;
    padding: 15px;
    border-bottom: 1px solid transparent;
}

.story-tile-header:hover {
    background: #fafafa;
}

.story-editor-tile.expanded .story-tile-header {
    background: #f8f9fa;
    border-bottom-color: #eee;
}

/* Smooth fade for tabs */
.tab-content {
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

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

/* Rich Text Editor */
.rich-text-wrapper {
    border: 1px solid #ccc;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.rich-text-wrapper:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(30, 115, 190, 0.1);
}

.formatting-toolbar {
    background: #f8f9fa;
    padding: 8px;
    border-bottom: 1px solid #eee;
    display: flex;
    gap: 5px;
    align-items: center;
}

.formatting-toolbar button {
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 0.9rem;
    color: #333;
    transition: all 0.2s;
    min-width: 32px;
}

.formatting-toolbar button:hover {
    background: #e9ecef;
    border-color: #ced4da;
}

.formatting-toolbar button.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.formatting-toolbar input[type="color"] {
    width: 40px;
    height: 32px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    padding: 2px;
}

.toolbar-separator {
    color: #ccc;
    margin: 0 5px;
}

.rich-editor-visual {
    min-height: 120px;
    padding: 15px;
    outline: none;
    line-height: 1.6;
    color: #000 !important;
}

.rich-editor-visual * {
    color: inherit;
}

.rich-editor-visual ul,
.rich-editor-visual ol {
    padding-left: 20px;
    margin: 10px 0;
}

.rich-editor-visual h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 15px 0 10px;
    color: var(--primary-dark);
}

/* Ensure focus doesn't double up outline */
.stylized-input.rich-editor-visual:focus {
    box-shadow: none;
    border: none;
}

/* ===================================
   PROFESSIONAL ADMIN DASHBOARD STYLING
   =================================== */

/* Enhanced Visual Hierarchy */
.admin-content h2 {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-dark);
    margin-bottom: 10px;
    letter-spacing: -0.5px;
}

.admin-content h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #eef0f5;
    position: relative;
}

.admin-content h3::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 2px;
}

.admin-content h4 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 15px;
}

/* Premium Card Design */
.admin-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid #eef0f5;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.admin-card:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
    border-color: var(--primary-light);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: linear-gradient(135deg, #f8f9fc 0%, #ffffff 100%);
    border-bottom: 1px solid #eef0f5;
}

.card-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
}

.card-body {
    padding: 20px;
}

.btn-icon-danger {
    background: transparent;
    border: none;
    color: #e03131;
    font-size: 1.5rem;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s;
    line-height: 1;
    padding: 0;
}

.btn-icon-danger:hover {
    background: rgba(224, 49, 49, 0.1);
    transform: scale(1.1);
}

/* Enhanced Form Elements */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-main);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.85rem;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group textarea,
.form-group select,
input.stylized-input,
textarea.stylized-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e8ecf4;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.3s;
    background: #fafbfd;
    color: var(--text-main);
}

.form-group input:hover,
.form-group textarea:hover,
.form-group select:hover,
input.stylized-input:hover,
textarea.stylized-input:hover {
    border-color: #d0d7e3;
    background: #ffffff;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus,
input.stylized-input:focus,
textarea.stylized-input:focus {
    border-color: var(--primary-color);
    background: #ffffff;
    outline: none;
    box-shadow: 0 0 0 4px rgba(30, 115, 190, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* Rich Text Editor Toolbar */
.rich-text-wrapper {
    border: 2px solid #e8ecf4;
    border-radius: 8px;
    overflow: hidden;
    background: white;
    transition: all 0.3s;
}

.rich-text-wrapper:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(30, 115, 190, 0.1);
}

.formatting-toolbar {
    display: flex;
    gap: 5px;
    padding: 10px;
    background: #f8f9fc;
    border-bottom: 1px solid #e8ecf4;
    flex-wrap: wrap;
    align-items: center;
}

.formatting-toolbar button {
    background: white;
    border: 1px solid #d0d7e3;
    color: var(--text-main);
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.formatting-toolbar button:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(30, 115, 190, 0.2);
}

.formatting-toolbar button.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.toolbar-separator {
    color: #d0d7e3;
    margin: 0 5px;
}

.formatting-toolbar input[type="color"] {
    width: 35px;
    height: 35px;
    border: 1px solid #d0d7e3;
    border-radius: 6px;
    cursor: pointer;
    padding: 2px;
    background: white;
}

.rich-editor-visual {
    min-height: 150px;
    padding: 15px;
    outline: none;
    line-height: 1.6;
    color: var(--text-main);
    background: white;
}

.rich-editor-visual:empty:before {
    content: 'Start typing...';
    color: #999;
}

.hidden-content-input {
    display: none !important;
}

/* Improved Button System */
.btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.95rem;
    font-family: inherit;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 2px 8px rgba(30, 115, 190, 0.2);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(30, 115, 190, 0.3);
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(30, 115, 190, 0.2);
}

.btn-secondary {
    background: #6c757d;
    box-shadow: 0 2px 8px rgba(108, 117, 125, 0.2);
}

.btn-secondary:hover {
    background: #5a6268;
    box-shadow: 0 6px 16px rgba(108, 117, 125, 0.3);
}

.btn-danger {
    background: #e03131;
    box-shadow: 0 2px 8px rgba(224, 49, 49, 0.2);
}

.btn-danger:hover {
    background: #c92a2a;
    box-shadow: 0 6px 16px rgba(224, 49, 49, 0.3);
}

/* File Upload Styling */
.file-upload-input {
    width: 100%;
    padding: 10px;
    border: 2px dashed #d0d7e3;
    border-radius: 8px;
    background: #f8f9fc;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s;
}

.file-upload-input:hover {
    border-color: var(--primary-color);
    background: #eef4fb;
}

/* Modern Table Design */
.table-responsive {
    overflow-x: auto;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.table-responsive table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.table-responsive thead {
    background: linear-gradient(135deg, #f8f9fc 0%, #eef4fb 100%);
}

.table-responsive th {
    padding: 16px 20px;
    text-align: left;
    font-weight: 700;
    color: var(--text-main);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e8ecf4;
}

.table-responsive td {
    padding: 16px 20px;
    color: var(--text-light);
    font-size: 0.95rem;
    border-bottom: 1px solid #f0f2f5;
}

.table-responsive tbody tr {
    transition: all 0.2s;
}

.table-responsive tbody tr:hover {
    background: #f8f9fc;
    transform: scale(1.01);
}

.table-responsive tbody tr:last-child td {
    border-bottom: none;
}

/* Professional Grid Layouts */
.admin-grid-two-col {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.admin-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.gallery-admin-item {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: pointer;
}

.gallery-admin-item:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.gallery-admin-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.gallery-admin-item:hover img {
    transform: scale(1.1);
}

/* Recipient Input Groups */
.recipient-input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    align-items: stretch;
}

.recipient-input-group input {
    flex: 1;
}

.recipient-input-group .btn {
    padding: 8px 16px;
    white-space: nowrap;
}

/* Custom Modal Improvements */
.custom-modal {
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease-out;
}

.modal-content {
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

/* Enhanced Content Header */
.content-header h2 {
    margin: 0;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Improved Sidebar Styling */
.admin-sidebar {
    background: white;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.03);
}

.sidebar-item {
    position: relative;
    overflow: hidden;
}

.sidebar-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    transition: width 0.3s ease;
}

.sidebar-item:hover::before,
.sidebar-item.active::before {
    width: 4px;
}

.sidebar-item .icon {
    transition: transform 0.2s;
}

.sidebar-item:hover .icon {
    transform: scale(1.2);
}

/* Tab Content Animation */
.tab-content {
    animation: fadeIn 0.4s ease-out;
}

.tab-content.active {
    animation: fadeIn 0.4s ease-out;
}

/* Success/Error Messages Enhancement */
.admin-content>div[style*="background-color: #d4edda"],
.admin-content>div[style*="background-color: #f8d7da"] {
    border-radius: 8px;
    padding: 15px 20px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-left: 4px solid;
    animation: slideInRight 0.3s ease-out;
}

.admin-content>div[style*="background-color: #d4edda"] {
    border-left-color: #28a745;
}

.admin-content>div[style*="background-color: #f8d7da"] {
    border-left-color: #dc3545;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

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

/* Improved Save Button Placement */
.admin-content button[type="submit"] {
    min-width: 180px;
}

/* Image Preview Box Enhancement */
.image-preview-box {
    border: 2px solid #e8ecf4;
    transition: all 0.3s;
}

.image-preview-box:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(30, 115, 190, 0.15);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .admin-grid-two-col {
        grid-template-columns: 1fr;
    }

    .admin-content h2 {
        font-size: 1.5rem;
    }

    .admin-content h3 {
        font-size: 1.3rem;
    }

    .formatting-toolbar button {
        padding: 5px 10px;
        font-size: 0.8rem;
    }
}

@media (max-width: 768px) {
    .logo-link {
        gap: 10px;
    }

    .logo-icon {
        height: 50px;
    }

    header.scrolled .logo-icon {
        height: 40px;
    }

    .brand-name {
        font-size: 1.4rem;
    }

    .brand-tagline {
        font-size: 0.65rem;
        letter-spacing: 1px;
    }

    header.scrolled .brand-name {
        font-size: 1.2rem;
    }

    /* Prevent mobile zoom on form focus */
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"],
    input[type="tel"],
    textarea,
    select {
        font-size: 16px !important;
    }
}

/* Admin Logo */
.admin-logo-icon {
    height: 50px;
    width: auto;
    transition: all 0.3s ease;
}