@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400;1,500;1,600&family=Inter:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600&display=swap');

:root {
    /* Core Greens — deep, rich, fresh */
    --brand-primary: #0F5D3F;
    --brand-emerald: #178A57;
    --brand-forest: #0A3F2B;
    --brand-mint: #6FBF8F;
    --brand-sage: #CFE8D7;

    /* Green Accents */
    --brand-gold: #1F9D63;
    --brand-gold-bright: #34B97A;
    --brand-burgundy: #0D6A44;

    /* Clean Backgrounds */
    --brand-white: #FFFFFF;
    --brand-cream: #F7FCF8;
    --brand-paper: #EEF8F1;
    --brand-paper-deep: #DDEFE3;

    /* Green-Charcoal Text */
    --brand-ink: #163328;
    --brand-sepia: #4F6B5D;
    --brand-charcoal: #163328;
    --brand-dark-gray: #4F6B5D;

    /* Utility */
    --brand-success: #22C55E;
    --brand-line: rgba(15, 93, 63, 0.14);
}

/* =============================================
   Logo – transparent PNG rendering
   ============================================= */
.logo-transparent {
    background: transparent !important;
}

html {
    overflow-x: hidden;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--brand-cream);
    color: var(--brand-ink);
    overflow-x: hidden;
    padding-top: 5rem;
}

@media (min-width: 768px) {
    body {
        padding-top: 5.5rem;
    }
}

.site-header {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    height: 5rem;
}

@media (min-width: 768px) {
    .site-header {
        height: 5.5rem;
    }
}

h1, h2, h3, h4, h5, h6, .font-heading {
    font-family: 'Poppins', system-ui, -apple-system, sans-serif;
    font-weight: 700;
    color: var(--brand-ink);
}

/* =============================================
   Vintage Panel – foundational container
   ============================================= */
.card {
    background: var(--brand-paper);
    border-radius: 0.5rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(22, 51, 40, 0.06), 0 4px 12px rgba(22, 51, 40, 0.04);
    border: 1px solid var(--brand-line);
}

.card:hover {
    box-shadow: 0 2px 8px rgba(22, 51, 40, 0.08);
    border-color: rgba(10, 63, 43, 0.3);
}

/* =============================================
   Buttons
   ============================================= */
.btn-primary {
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-forest));
    color: #F7FCF8;
    padding: 0.65rem 1.25rem;
    border-radius: 0.375rem;
    font-family: 'Poppins', system-ui, sans-serif;
    font-weight: 600;
    letter-spacing: 0.02em;
    border: 1px solid rgba(10, 63, 43, 0.3);
    transition: all 0.3s ease;
    box-shadow: 0 1px 4px rgba(10, 63, 43, 0.2);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--brand-forest), #0A3322);
    box-shadow: 0 3px 10px rgba(10, 63, 43, 0.35);
    transform: translateY(-1px);
    color: #FFFFFF;
}

.btn-secondary {
    background: transparent;
    color: var(--brand-primary);
    padding: 0.65rem 1.25rem;
    border-radius: 0.375rem;
    font-family: 'Poppins', system-ui, sans-serif;
    font-weight: 600;
    border: 2px solid var(--brand-primary);
    transition: all 0.3s ease;
}

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

/* =============================================
   Section Containers
   ============================================= */
.brand-section {
    background: linear-gradient(135deg, var(--brand-cream), var(--brand-paper));
    border: 1px solid var(--brand-line);
    border-radius: 0.75rem;
    position: relative;
}

.brand-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--brand-gold), var(--brand-primary), var(--brand-gold));
    border-radius: 0.75rem 0.75rem 0 0;
}

.brand-gradient-hero {
    background: linear-gradient(135deg, #0A3322 0%, var(--brand-forest) 40%, var(--brand-primary) 100%);
    position: relative;
    overflow: hidden;
}

.brand-gradient-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(23, 138, 87, 0.15) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 50%, rgba(23, 138, 87, 0.1) 0%, transparent 60%);
    pointer-events: none;
}

.brand-gradient-impact {
    background: linear-gradient(135deg, var(--brand-forest), #0A3322);
    position: relative;
    overflow: hidden;
}

.brand-gradient-impact::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 0%, rgba(23, 138, 87, 0.15) 0%, transparent 60%);
    pointer-events: none;
}

/* =============================================
   Brand Cards
   ============================================= */
.brand-card {
    background: linear-gradient(135deg, var(--brand-cream), var(--brand-paper));
    border-radius: 0.5rem;
    padding: 1.5rem;
    border: 1px solid var(--brand-line);
    box-shadow: 0 1px 3px rgba(22, 51, 40, 0.05);
    transition: all 0.3s ease;
}

.brand-card:hover {
    border-color: rgba(10, 63, 43, 0.25);
    box-shadow: 0 3px 12px rgba(22, 51, 40, 0.08);
    transform: translateY(-2px);
}

.brand-card.border-primary {
    border-left: 4px solid var(--brand-primary);
}

.brand-card.border-emerald {
    border-left: 4px solid var(--brand-emerald);
}

.brand-card.border-mint {
    border-left: 4px solid var(--brand-mint);
}

.brand-card.border-gold {
    border-left: 4px solid var(--brand-gold);
}

/* =============================================
   Form Inputs
   ============================================= */
input, textarea, select {
    font-family: 'Inter', system-ui, sans-serif;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
textarea, select {
    border: 1px solid var(--brand-line);
    background: #FAFDFA;
    transition: all 0.3s ease;
    color: var(--brand-ink);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="tel"]:focus,
textarea:focus, select:focus {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(15, 93, 63, 0.15);
    outline: none;
}

::placeholder {
    color: var(--brand-sepia);
    opacity: 0.6;
}

/* =============================================
   Badges
   ============================================= */
.brand-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    font-family: 'Poppins', system-ui, sans-serif;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.brand-badge.gold {
    background: rgba(31, 157, 99, 0.15);
    color: #1F9D63;
    border: 1px solid rgba(31, 157, 99, 0.3);
}

.brand-badge.green {
    background: rgba(15, 93, 63, 0.15);
    color: #0F5D3F;
    border: 1px solid rgba(15, 93, 63, 0.3);
}

.brand-badge.red {
    background: rgba(239, 68, 68, 0.12);
    color: #DC2626;
    border: 1px solid rgba(239, 68, 68, 0.25);
}

/* =============================================
   Dividers
   ============================================= */
.brand-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--brand-gold), transparent);
    margin: 1.5rem 0;
    border: none;
}

.brand-divider-thick {
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--brand-gold), transparent);
    margin: 2rem 0;
    border: none;
}

/* =============================================
   Tables
   ============================================= */
.brand-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.brand-table th {
    font-family: 'Poppins', system-ui, sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.75rem;
    color: var(--brand-ink);
    background: rgba(15, 93, 63, 0.07);
    padding: 0.75rem 1rem;
    border-bottom: 2px solid rgba(15, 93, 63, 0.2);
}

.brand-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--brand-line);
    color: var(--brand-ink);
}

.brand-table tr:hover td {
    background: rgba(15, 93, 63, 0.03);
}

/* =============================================
   Quotes
   ============================================= */
.brand-quote {
    border-left: 3px solid var(--brand-primary);
    padding: 1rem 1.5rem;
    background: rgba(15, 93, 63, 0.05);
    border-radius: 0 0.375rem 0.375rem 0;
    font-style: italic;
    color: var(--brand-sepia);
}

/* =============================================
   Navigation
   ============================================= */
.brand-nav-link {
    font-family: 'Poppins', system-ui, sans-serif;
    font-weight: 500;
    color: var(--brand-sepia);
    transition: color 0.2s ease;
    position: relative;
}

.brand-nav-link:hover {
    color: var(--brand-primary);
}

.brand-nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--brand-primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.brand-nav-link:hover::after {
    transform: scaleX(1);
}

/* =============================================
   Responsive
   ============================================= */
@media (min-width: 1024px) {
    main {
        padding-left: 0;
        padding-right: 0;
    }
}

/* =============================================
   Paper Texture
   ============================================= */
.paper-texture {
    position: relative;
}

.paper-texture::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100' height='100' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
    pointer-events: none;
    border-radius: inherit;
}

/* =============================================
   Images
   ============================================= */
.brand-image {
    filter: brightness(1.02) contrast(1.03) saturate(1.0);
    transition: filter 0.4s ease;
}

.brand-image:hover {
    filter: brightness(1.04) contrast(1.06) saturate(1.05);
}

/* =============================================
   Footer
   ============================================= */
.brand-footer {
    background: linear-gradient(135deg, #0A3F2B, #062418);
    position: relative;
}

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

/* =============================================
   Scrollbar
   ============================================= */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--brand-paper);
}

::-webkit-scrollbar-thumb {
    background: #0F5D3F;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0A3F2B;
}

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

.brand-animate-in {
    animation: brand-fade-in 0.6s ease-out forwards;
}

/* =============================================
   Text Color Utilities
   ============================================= */
.text-gold {
    color: var(--brand-gold);
}

.text-gold-light {
    color: var(--brand-gold-bright);
}

.text-primary {
    color: var(--brand-primary);
}

.text-emerald {
    color: var(--brand-emerald);
}

.text-ink {
    color: var(--brand-ink);
}

.text-sepia {
    color: var(--brand-sepia);
}

.text-brass {
    color: var(--brand-gold);
}

/* =============================================
   Background Utilities
   ============================================= */
.text-cream {
    color: var(--brand-cream);
}

.bg-cream {
    background-color: var(--brand-cream);
}

.bg-paper {
    background-color: var(--brand-paper);
}

.bg-paper-deep {
    background-color: var(--brand-paper-deep);
}

/* =============================================
   Border Utilities
   ============================================= */
.border-vintage {
    border-color: var(--brand-line);
}

/* =============================================
   Vintage Label Utility
   ============================================= */
.vintage-label {
    font-family: 'Poppins', system-ui, sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--brand-sepia);
}

/* =============================================
   Vintage Panel – framed container
   ============================================= */
.vintage-panel {
    background: var(--brand-paper);
    border: 1px solid var(--brand-line);
    border-radius: 0.5rem;
    padding: 1.5rem;
    box-shadow: 0 1px 2px rgba(22, 51, 40, 0.04);
}

.vintage-panel::before {
    content: '';
    display: block;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--brand-gold), transparent);
    margin: -1px -1px 1.25rem -1px;
    border-radius: 0.5rem 0.5rem 0 0;
}

/* =============================================
   Fine vintage rule
   ============================================= */
.vintage-rule {
    height: 1px;
    background: linear-gradient(90deg, var(--brand-paper-deep), var(--brand-gold), var(--brand-paper-deep));
    margin: 1.5rem 0;
    border: none;
}

/* =============================================
   Editorial subtitle
   ============================================= */
.editorial-subtitle {
    font-family: 'Poppins', system-ui, sans-serif;
    font-weight: 400;
    font-style: italic;
    color: var(--brand-sepia);
    font-size: 1.1rem;
}

/* =============================================
   Ornamental Elements
   ============================================= */

/* Ornamental divider with diamond center */
.ornament-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin: 1.5rem 0;
}

.ornament-divider .line {
    height: 1px;
    flex: 1;
    max-width: 6rem;
    background: linear-gradient(90deg, transparent, var(--brand-gold));
}

.ornament-divider .line:last-child {
    background: linear-gradient(90deg, var(--brand-gold), transparent);
}

.ornament-divider .diamond {
    width: 8px;
    height: 8px;
    background: var(--brand-gold);
    transform: rotate(45deg);
    opacity: 0.6;
}

/* Frame effect for images/placeholders */
.vintage-frame {
    position: relative;
    border: 1px solid var(--brand-line);
    border-radius: 0.375rem;
    overflow: hidden;
}

.vintage-frame::before {
    content: '';
    position: absolute;
    inset: 4px;
    border: 1px solid rgba(10, 63, 43, 0.1);
    border-radius: 0.25rem;
    pointer-events: none;
    z-index: 1;
}

.vintage-frame::after {
    content: '';
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    bottom: 8px;
    border: 1px solid rgba(31, 157, 99, 0.08);
    border-radius: 0.2rem;
    pointer-events: none;
    z-index: 1;
}

/* Decorative corner accents */
.corner-accent {
    position: relative;
}

.corner-accent::before,
.corner-accent::after {
    content: '❦';
    position: absolute;
    font-size: 0.6rem;
    color: var(--brand-gold);
    opacity: 0.4;
}

/* Stat card */
.stat-card {
    text-align: center;
    padding: 2rem 1rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(31, 157, 99, 0.2);
    border-radius: 0.5rem;
    backdrop-filter: blur(4px);
    transition: all 0.4s ease;
}

.stat-card:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(31, 157, 99, 0.35);
    transform: translateY(-4px);
}

/* Floating decorative dots pattern */
.dots-pattern {
    background-image: radial-gradient(rgba(255, 255, 255, 0.12) 1px, transparent 1px);
    background-size: 20px 20px;
}

/* ── Panel layout shared desktop defaults ── */
.panel-layout {
    display: flex;
}
.panel-sidebar {
    width: 20%;
    min-width: 220px;
    max-width: 280px;
}
.panel-content {
    width: 80%;
    overflow-y: auto;
}

/* =============================================
   Dashboard Sidebar
   ============================================= */
.dashboard-layout {
    display: flex;
    min-height: calc(100vh - 70px);
    gap: 0;
    /* Full-width breakout from parent max-w-6xl container */
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    /* Counteract main py-10 (2.5rem) padding */
    margin-top: -2.5rem;
    margin-bottom: -2.5rem;
    padding: 0;
}

.sidebar {
    width: 250px;
    flex-shrink: 0;
    background: linear-gradient(180deg, #FAFDFA, #EEF8F1);
    border-right: 1px solid var(--brand-line);
    display: flex;
    flex-direction: column;
    padding: 1.25rem 0.75rem;
    position: sticky;
    top: 70px;
    height: calc(100vh - 70px);
    overflow-y: auto;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0 0.75rem 1.25rem;
    border-bottom: 1px solid var(--brand-line);
    margin-bottom: 1rem;
}

.sidebar-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.6rem 0.75rem;
    border-radius: 0.5rem;
    font-family: 'Poppins', system-ui, sans-serif;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--brand-sepia);
    transition: all 0.2s ease;
    text-decoration: none;
}

.sidebar-link:hover {
    background: rgba(15, 93, 63, 0.07);
    color: var(--brand-primary);
}

.sidebar-link.active {
    background: rgba(15, 93, 63, 0.1);
    color: var(--brand-primary);
    font-weight: 600;
    border-left: 3px solid var(--brand-primary);
}

.sidebar-icon {
    width: 1.1rem;
    height: 1.1rem;
    flex-shrink: 0;
    opacity: 0.75;
}

.sidebar-link.active .sidebar-icon {
    opacity: 1;
    color: var(--brand-primary);
}

.sidebar-footer {
    border-top: 1px solid var(--brand-line);
    padding-top: 0.75rem;
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.dashboard-content {
    flex: 1;
    padding: 1.5rem 2rem 0;
    min-width: 0;
    overflow-x: auto;
}

/* ── Mobile sidebar toggle ── */
.sidebar-toggle {
    display: none;
    background: var(--brand-primary);
    color: white;
    border: none;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    cursor: pointer;
    font-size: 1.25rem;
    line-height: 1;
    position: fixed;
    top: 80px;
    right: 0.75rem;
    z-index: 40;
    box-shadow: 0 2px 8px rgba(15, 93, 63, 0.3);
    transition: all 0.3s ease;
}

.sidebar-toggle svg {
    transition: transform 0.3s ease;
}

.sidebar-toggle.open svg {
    transform: scaleX(-1);
}

.sidebar-overlay {
    display: none;
}

@media (max-width: 1023px) {
    .dashboard-layout .sidebar-toggle {
        display: flex;
        z-index: 1001;
        top: 1rem;
        right: 0.75rem;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: -280px;
        height: 100vh;
        z-index: 1002;
        transition: left 0.3s ease;
        box-shadow: 4px 0 20px rgba(0,0,0,0.1);
    }

    .sidebar.open {
        left: 0;
    }

    .sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.3);
        z-index: 1001;
    }

    .sidebar-overlay.open {
        display: block;
    }

    .dashboard-content {
        padding: 1rem 1rem 0;
    }

    .dashboard-layout {
        flex-direction: column;
        /* Reset full-width breakout on mobile — sidebar is fixed */
        width: 100%;
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
    }

    .dashboard-content .flex.items-center.gap-4.mb-8 {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 0.75rem !important;
    }
    .dashboard-content .flex.items-center.gap-4.mb-8 .w-14.h-14 {
        width: 2.5rem;
        height: 2.5rem;
    }
    .dashboard-content .flex.items-center.gap-4.mb-8 h2 {
        font-size: 1.25rem !important;
    }
}

/* =============================================
   Panel Layout (admin/panel inline sidebars)
   Shared mobile responsive styles
   ============================================= */
@media (max-width: 767px) {
    .panel-layout {
        flex-direction: column !important;
    }
    .panel-sidebar {
        position: fixed !important;
        top: 0 !important;
        left: -100% !important;
        z-index: 50 !important;
        width: 85% !important;
        max-width: 320px !important;
        height: 100vh !important;
        margin-left: 0 !important;
        transition: left 0.3s ease !important;
    }
    .panel-sidebar.open {
        left: 0 !important;
    }
    .sidebar-toggle {
        display: flex !important;
        z-index: 60 !important;
    }
    .sidebar-overlay {
        display: none !important;
        position: fixed !important;
        inset: 0 !important;
        z-index: 40 !important;
        background: rgba(0,0,0,0.4) !important;
    }
    .sidebar-overlay.open {
        display: block !important;
    }
    .panel-content {
        width: 100% !important;
        padding: 1rem !important;
    }
    .panel-content .flex.items-center.gap-4.mb-8 {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0.75rem !important;
    }
    .panel-content .flex.items-center.gap-4.mb-8 .w-14.h-14 {
        width: 2.5rem !important;
        height: 2.5rem !important;
    }
    .panel-content .flex.items-center.gap-4.mb-8 h2 {
        font-size: 1.25rem !important;
    }
}

/* =============================================
   Responsive Tables
   ============================================= */
@media (max-width: 767px) {
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -0.5rem;
        padding: 0 0.5rem;
    }
    .table-responsive table {
        min-width: 600px;
    }
    /* Card-style table rows on very small screens */
    .table-card-responsive thead {
        display: none;
    }
    .table-card-responsive tbody tr {
        display: block;
        padding: 1rem;
        margin-bottom: 0.75rem;
        background: var(--brand-cream);
        border: 1px solid var(--brand-line);
        border-radius: 0.5rem;
    }
    .table-card-responsive tbody td {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0.4rem 0;
        border-bottom: none;
        text-align: right;
        gap: 0.5rem;
    }
    .table-card-responsive tbody td::before {
        content: attr(data-label);
        font-family: 'Poppins', system-ui, sans-serif;
        font-weight: 600;
        font-size: 0.7rem;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        color: var(--brand-sepia);
        text-align: left;
        flex: 1;
    }
    .table-card-responsive tbody td:empty {
        display: none;
    }
}

/* =============================================
   Responsive dashboard stat cards
   ============================================= */
@media (max-width: 639px) {
    .stat-dashboard-card {
        padding: 1rem;
    }
    .stat-value {
        font-size: 1.5rem;
    }
    .dashboard-widget {
        padding: 1rem;
    }
    .widget-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    .dashboard-table th,
    .dashboard-table td {
        padding: 0.4rem 0.5rem;
        font-size: 0.75rem;
    }
}

/* =============================================
   General mobile helpers
   ============================================= */
@media (max-width: 767px) {
    .panel-content .flex.items-center.gap-4.mb-8 {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 0.75rem !important;
    }
    .panel-content .flex.items-center.gap-4.mb-8 .w-14.h-14 {
        width: 2.5rem;
        height: 2.5rem;
    }
    .panel-content .flex.items-center.gap-4.mb-8 h2 {
        font-size: 1.25rem !important;
    }
}

/* =============================================
   Dashboard Stat Cards
   ============================================= */
.stat-dashboard-card {
    background: linear-gradient(135deg, var(--brand-cream), var(--brand-paper));
    border-radius: 0.75rem;
    padding: 1.25rem 1.5rem;
    border: 1px solid var(--brand-line);
    box-shadow: 0 1px 3px rgba(22, 51, 40, 0.05);
    transition: all 0.3s ease;
}

.stat-dashboard-card:hover {
    border-color: rgba(10, 63, 43, 0.25);
    box-shadow: 0 4px 14px rgba(22, 51, 40, 0.08);
    transform: translateY(-2px);
}

.stat-dashboard-card.border-l-primary {
    border-left: 4px solid var(--brand-primary);
}

.stat-dashboard-card.border-l-emerald {
    border-left: 4px solid var(--brand-emerald);
}

.stat-dashboard-card.border-l-gold {
    border-left: 4px solid var(--brand-gold);
}

.stat-dashboard-card.border-l-mint {
    border-left: 4px solid var(--brand-mint);
}

.stat-label {
    font-family: 'Poppins', system-ui, sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--brand-sepia);
}

.stat-value {
    font-family: 'Poppins', system-ui, sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--brand-ink);
    line-height: 1.2;
}

.stat-icon {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* =============================================
   Dashboard Widgets (panel sections)
   ============================================= */
.dashboard-widget {
    background: linear-gradient(135deg, var(--brand-cream), var(--brand-paper));
    border: 1px solid var(--brand-line);
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(22, 51, 40, 0.04);
    position: relative;
    transition: all 0.3s ease;
}

.dashboard-widget:hover {
    border-color: rgba(10, 63, 43, 0.15);
    box-shadow: 0 2px 10px rgba(22, 51, 40, 0.06);
}

.widget-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--brand-line);
}

.widget-title {
    font-family: 'Poppins', system-ui, sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--brand-ink);
}

.widget-link {
    font-family: 'Poppins', system-ui, sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--brand-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.widget-link:hover {
    color: var(--brand-forest);
    text-decoration: underline;
}

/* =============================================
   Dashboard Tables (inside widgets)
   ============================================= */
.dashboard-table {
    width: 100%;
    border-collapse: collapse;
}

.dashboard-table th {
    font-family: 'Poppins', system-ui, sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.65rem;
    color: var(--brand-sepia);
    padding: 0.6rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--brand-line);
}

.dashboard-table td {
    padding: 0.65rem 0.75rem;
    border-bottom: 1px solid rgba(57, 69, 54, 0.06);
    font-size: 0.875rem;
}

.dashboard-table tbody tr {
    transition: background 0.15s ease;
}

.dashboard-table tbody tr:hover {
    background: rgba(15, 93, 63, 0.03);
}

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

/* =============================================
   Webinar Items (list rows)
   ============================================= */
.webinar-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 0.5rem;
    background: rgba(94, 111, 82, 0.04);
    border: 1px solid rgba(57, 69, 54, 0.08);
    transition: all 0.2s ease;
}

.webinar-item:hover {
    background: rgba(94, 111, 82, 0.07);
    border-color: rgba(57, 69, 54, 0.15);
}

.webinar-date-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 3rem;
    padding: 0.4rem 0.5rem;
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-forest));
    border-radius: 0.5rem;
    color: var(--brand-cream);
    line-height: 1.2;
    flex-shrink: 0;
}

/* =============================================
   Quick Action Cards
   ============================================= */
.quick-action-card {
    display: block;
    padding: 0.85rem 1rem;
    border-radius: 0.5rem;
    background: rgba(94, 111, 82, 0.04);
    border: 1px solid rgba(57, 69, 54, 0.08);
    transition: all 0.2s ease;
    text-decoration: none;
}

.quick-action-card:hover {
    background: rgba(94, 111, 82, 0.08);
    border-color: rgba(57, 69, 54, 0.18);
    transform: translateX(2px);
}

/* =============================================
   Volunteer Hero Banner
   ============================================= */
.volunteer-hero {
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-forest));
    border-radius: 1rem;
    padding: 1.75rem 2rem;
    position: relative;
    overflow: hidden;
}

.volunteer-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(23, 138, 87, 0.2) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 50%, rgba(111, 191, 143, 0.1) 0%, transparent 60%);
    pointer-events: none;
}

.volunteer-hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
}

/* =============================================
   Progress Bar
   ============================================= */
.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(57, 69, 54, 0.1);
    border-radius: 999px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 0.6s ease;
}

/* =============================================
   Timeline
   ============================================= */
.timeline {
    position: relative;
    padding-left: 1.5rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0.45rem;
    top: 0.4rem;
    bottom: 0.4rem;
    width: 2px;
    background: linear-gradient(180deg, var(--brand-primary), var(--brand-mint), var(--brand-stone-300));
    border-radius: 1px;
}

.timeline-item {
    position: relative;
    padding-bottom: 1.25rem;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -1.5rem;
    top: 0.35rem;
    width: 0.9rem;
    height: 0.9rem;
    border-radius: 50%;
    border: 2px solid var(--brand-cream);
    box-shadow: 0 0 0 2px rgba(57, 69, 54, 0.1);
    z-index: 1;
}

.timeline-content {
    padding-left: 0.5rem;
}

/* ════════════════════════════════════════
   MARQUEE ANIMATIONS
   ════════════════════════════════════════ */
.marquee-track {
    display: flex;
    gap: 1.25rem;
    width: max-content;
}

.marquee-row {
    overflow: hidden;
}

.marquee-row .marquee-track {
    animation-duration: 120s;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}

.marquee-right-to-left .marquee-track {
    animation-name: scroll-right-to-left;
}

.marquee-left-to-right .marquee-track {
    animation-name: scroll-left-to-right;
}

@keyframes scroll-right-to-left {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

@keyframes scroll-left-to-right {
    0% {
        transform: translateX(-50%);
    }
    100% {
        transform: translateX(0);
    }
}

/* ════════════════════════════════════════
   GALLERY OVERRIDES — full-width + natural images
   ════════════════════════════════════════ */
#gallery .marquee-row {
    width: 100vw;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
}

#gallery .marquee-track {
    align-items: center;
}

#gallery .vintage-frame {
    width: auto !important;
    min-height: 14rem;
}

#gallery .vintage-frame img {
    width: auto !important;
    height: 100%;
    object-fit: cover;
}

/* =============================================
   CTA Full-Width Section
   ============================================= */
.cta-fullwidth {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    background: linear-gradient(rgba(0,0,0,0.65), rgba(0,0,0,0.65)), url('../images/hero-3.webp');
    background-size: cover;
    background-position: center 10%;
    position: relative;
    padding: 0.5rem 2rem 2rem;
    text-align: center;
}

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

.cta-fullwidth::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--brand-gold), var(--brand-primary), var(--brand-gold));
}

@media (min-width: 768px) {
    .cta-fullwidth {
        padding: 1rem 4rem 4rem;
    }
}

/* =============================================
   Hero Background Slideshow
   ============================================= */
.hero-slideshow {
    background: linear-gradient(135deg, #0A3322 0%, #0A3F2B 50%, #0F5D3F 100%);
    position: relative;
    overflow: hidden;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    border-radius: 0;
}

.hero-bg-wrapper {
    position: absolute;
    inset: -5%;
    z-index: 1;
    will-change: transform;
}

.hero-zoom-wrapper {
    width: 100%;
    height: 100%;
    animation: hero-zoom 20s ease-in-out infinite alternate;
}

.hero-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.2s ease-in-out;
}

.hero-slide.active {
    opacity: 1;
}

.hero-slide-1 {
    background-image: url('../images/hero-1.webp');
}

.hero-slide-2 {
    background-image: url('../images/hero-2.webp');
    background-position: center 20%;
}

.hero-slide-3 {
    background-image: url('../images/hero-3.webp');
}

@keyframes hero-zoom {
    0% {
        transform: scale(1);
    }
    100% {
        transform: scale(1.08);
    }
}

/* Mobile responsive adjustments */
@media (max-width: 639px) {
    .hero-slideshow {
        min-height: 100vh;
    }

    .font-nastaleeq {
        font-size: 1.25rem !important;
        line-height: 1.7 !important;
    }

    #gallery .vintage-frame {
        min-height: 10rem;
    }

    .marquee-row .marquee-track {
        animation-duration: 60s !important;
    }
}

/* Hero dark overlay for text readability */
.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(180deg,
        rgba(0,0,0,0.45) 0%,
        rgba(0,0,0,0.35) 40%,
        rgba(10,63,43,0.65) 85%,
        rgba(10,63,43,0.95) 100%
    );
    pointer-events: none;
}

/* Glass card wrapping the sher */
.hero-glass-card {
    background: rgba(255,255,255,0.04);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 2rem;
    padding: 2rem 1.5rem;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.06);
}

@media (min-width: 768px) {
    .hero-glass-card {
        padding: 2.5rem 3rem;
        border-radius: 2.5rem;
    }
}

/* Hero CTA button */
.hero-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.85rem 2rem;
    border-radius: 9999px;
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.15);
    color: #fff;
    font-family: 'Poppins', system-ui, sans-serif;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}
.hero-cta-btn:hover {
    background: rgba(52,211,153,0.2);
    border-color: rgba(52,211,153,0.4);
    transform: translateY(-1px);
    box-shadow: 0 8px 30px rgba(52,211,153,0.15);
}

@media (min-width: 768px) {
    .hero-cta-btn {
        padding: 1rem 2.5rem;
        font-size: 1rem;
    }
}

/* Scroll mouse indicator */
.scroll-mouse {
    width: 22px;
    height: 34px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 12px;
    position: relative;
    transition: border-color 0.3s;
}
.scroll-mouse-wheel {
    display: block;
    width: 3px;
    height: 7px;
    background: rgba(255,255,255,0.6);
    border-radius: 3px;
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll-bounce 2s ease-in-out infinite;
}
@keyframes scroll-bounce {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
    50% {
        transform: translateX(-50%) translateY(8px);
        opacity: 0.4;
    }
}

/* =============================================
   Urdu Nastaleeq Font
   ============================================= */
.font-nastaleeq {
    font-family: 'Noto Nastaliq Urdu', 'Jameel Noori Nastaleeq', serif;
    font-weight: 500;
    line-height: 2.2;
}

/* =============================================
   IQBAL SHER HERO — highlight & graffiti underline
   ============================================= */

/* Green highlight for "نم" */
.nam-highlight {
    color: #34D399;
    position: relative;
    display: inline-block;
    text-shadow: 0 0 30px rgba(52, 211, 153, 0.25);
}

/* Base graffiti line styles */
.graffiti-line {
    position: absolute;
    left: -4%;
    right: -4%;
    bottom: 2px;
    height: 3px;
    background: linear-gradient(90deg,
        transparent 0%,
        #34D399 15%,
        #10B981 50%,
        #34D399 85%,
        transparent 100%
    );
    border-radius: 50%;
    transform-origin: center;
    width: 0;
    animation: graffiti-draw 0.9s cubic-bezier(0.22, 0.96, 0.35, 1) forwards;
    opacity: 0.85;
    filter: blur(0.5px);
}

.graffiti-line-1 {
    bottom: -2px;
    animation-delay: 2.5s;
    height: 2.5px;
}

.graffiti-line-2 {
    bottom: -8px;
    animation-delay: 2.9s;
    height: 2px;
    background: linear-gradient(90deg,
        transparent 0%,
        #059669 10%,
        #34D399 40%,
        #10B981 70%,
        transparent 100%
    );
    opacity: 0.7;
    filter: blur(0.8px);
}

/* Graffiti wavy variation — hand-drawn feel */
.graffiti-line-1::before {
    content: '';
    position: absolute;
    inset: 0;
    background: inherit;
    border-radius: inherit;
    animation: graffiti-wobble 0.4s ease-in-out 2.7s forwards;
    opacity: 0;
}

@keyframes graffiti-draw {
    0% {
        width: 0;
        opacity: 0;
    }
    60% {
        opacity: 1;
    }
    100% {
        width: 108%;
        opacity: 0.85;
    }
}

@keyframes graffiti-wobble {
    0% {
        transform: translateY(0) scaleY(1);
        opacity: 0;
    }
    50% {
        transform: translateY(-1px) scaleY(1.3);
        opacity: 1;
    }
    100% {
        transform: translateY(1px) scaleY(0.85);
        opacity: 0.6;
    }
}

/* Fade-in animation for sher lines */
@keyframes sher-line-fade-in {
    0% {
        opacity: 0;
        transform: translateY(18px) scale(0.98);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.animate-sher-line {
    animation: sher-line-fade-in 0.9s cubic-bezier(0.22, 0.96, 0.35, 1) forwards;
}

/* Glow pulse on the highlighted word */
@keyframes nam-glow-pulse {
    0%, 100% {
        text-shadow: 0 0 30px rgba(52, 211, 153, 0.25);
    }
    50% {
        text-shadow: 0 0 50px rgba(52, 211, 153, 0.45), 0 0 80px rgba(16, 185, 129, 0.2);
    }
}

.nam-highlight {
    animation: nam-glow-pulse 4s ease-in-out 4s infinite;
}
