/* Iran International Theme Colors */
:root {
    --primary-red: #D6001C;
    --primary-blue: #001E62;
    --text-dark: #1a1a1a;
    --text-light: #f5f5f5;
    --bg-light: #ffffff;
    --bg-offset: #f8f9fa;
    --card-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --font-primary: 'Volant', 'Vazirmatn', sans-serif;
    /* Added Vazirmatn as fallback or primary if Volant fails */
}

/* Font Faces */
@font-face {
    font-family: 'Volant';
    src: url('../fonts/Volant_Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: 'Volant';
    src: url('../fonts/Volant_SemiBold.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
}

@font-face {
    font-family: 'Volant';
    src: url('../fonts/Volant_Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
}

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

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

/* Header */
header {
    background-color: var(--primary-blue);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    /* Adjusted for RTL */
    align-items: center;
    border-bottom: 4px solid var(--primary-red);
}

.logo-container img {
    height: 50px;
    width: auto;
}

.header-actions .btn-link {
    background-color: transparent;
    border: 1px solid rgba(255, 255, 255, 0.5);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    margin-right: 1rem;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.header-actions .btn-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: white;
}

.header-actions .btn-lang {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    margin: 0 0.5rem;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s;
    font-weight: 600;
}

.header-actions .btn-lang:hover {
    background-color: white;
    color: var(--primary-blue);
}

/* Main Content */
main {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
    width: 100%;
}

/* Slider Hero */
.slider-hero {
    position: relative;
    height: 400px;
    /* Adjust height as needed */
    width: 100%;
    margin-bottom: 3rem;
    overflow: hidden;
    background-color: var(--primary-blue);
}

.slider-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.slide.active {
    opacity: 0.6;
    /* Dim the image slightly for text readability */
}

.hero-overlay {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    padding: 1rem;
    background: rgba(0, 30, 98, 0.4);
    /* Overlay for legibility */
}

.hero-overlay h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    color: white;
}

.hero-overlay p {
    font-size: 1.3rem;
    max-width: 800px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    color: #f0f0f0;
}

/* Livestream Section */
.livestream-section {
    max-width: 800px;
    margin: 0 auto 3rem;
    padding: 0 1rem;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%;
    /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    background: #000;
}

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



/* Submission Section */
.submission-section {
    max-width: 1000px;
    /* Same as payment section */
    margin: 0 auto 3rem;
    padding: 0 1rem;
}

.submission-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    align-items: center;
}

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

.submission-qr {
    padding: 2rem;
    text-align: center;
    background-color: #f6f6f6;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.submission-qr h2 {
    font-size: 1.5rem;
    color: var(--primary-blue);
    margin-bottom: 1rem;
}

.submission-qr p {
    margin-bottom: 2rem;
    color: #555;
    font-size: 1.1rem;
}

.qr-box {
    width: 180px;
    height: 180px;
    background: white;
    padding: 0.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.qr-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

@media (max-width: 768px) {
    .submission-container {
        grid-template-columns: 1fr;
    }

    .submission-image {
        height: 250px;
    }
}

/* Payment Layout */
.payment-section {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto 4rem;
}

/* Wallet Selection Grid */
.wallet-selection-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.wallet-card {
    background: var(--bg-light);
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s;
}

.wallet-card:hover {
    border-color: #bbb;
}

.wallet-card.active {
    border-color: var(--primary-blue);
    background-color: #f0f7ff;
}

.wallet-icon img {
    width: 40px;
    height: 40px;
    margin-left: 1rem;
    /* RTL margin */
}

.wallet-info h3 {
    font-size: 1.1rem;
    margin-bottom: 0.2rem;
}

.network-badge {
    background-color: #eee;
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 4px;
    color: #666;
}

/* Details Panel */
.donation-details {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    display: none;
    /* Hidden by default */
    box-shadow: var(--card-shadow);
}

.qr-container {
    margin: 1.5rem auto;
    width: 200px;
    height: 200px;
    padding: 1rem;
    border: 1px solid #eee;
    border-radius: 12px;
}

.qr-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.wallet-address-box {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.wallet-address-box p {
    font-family: monospace;
    word-break: break-all;
    color: #333;
    font-size: 1rem;
    direction: ltr;
    /* Addresses are always LTR */
}

.btn-large-copy {
    width: 100%;
    padding: 1rem;
    background-color: var(--primary-blue);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: background-color 0.2s;
    font-family: var(--font-primary);
}

.btn-large-copy:hover {
    background-color: #003399;
}

.btn-large-copy.copied {
    background-color: #2e7d32;
}


/* Footer */
footer {
    background-color: var(--primary-blue);
    color: white;
    padding: 1.5rem 2rem;
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 4px solid var(--primary-red);
}

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

.footer-logo img {
    height: 30px;
    width: auto;
    /* Ensure white logo if it's not already */
}

@media (max-width: 768px) {
    footer {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

/* Base Hamburger default (hidden on desktop) */
.hamburger-menu {
    display: none;
}

/* Material Icons */
.material-symbols-outlined {
    font-size: 24px;
    vertical-align: middle;
}

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

    .hero h1 {
        font-size: 1.5rem;
    }

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

    /* Keep header side-by-side on mobile */
    header {
        flex-direction: row;
        gap: 0.5rem;
        padding: 1rem;
    }

    .header-actions {
        width: auto;
        text-align: left;
    }

    .logo-container img {
        height: 40px;
        /* Slightly smaller logo */
    }

    /* Footer Vertical Stacking */
    footer {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    /* Slider Mobile Adjustments */
    .slider-hero {
        height: 350px;
    }

    .hero-overlay h1 {
        font-size: 1.5rem;
    }

    .hero-overlay p {
        font-size: 1rem;
        padding: 0 1rem;
    }

    /* Hamburger Menu Visibility */
    .hamburger-menu {
        display: flex;
        /* Changed to flex to center icon */
        align-items: center;
        justify-content: center;
        background: transparent;
        /* Explicit transparent */
        border: 1px solid rgba(255, 255, 255, 0.3);
        /* Add border for visibility check, subtle */
        border-radius: 4px;
        color: #ffffff !important;
        /* Force white */
        cursor: pointer;
        padding: 4px;
        z-index: 200;
        width: 40px;
        /* Explicit width */
        height: 40px;
        /* Explicit height */
    }

    /* Slide-in Menu Styles */
    header .header-actions {
        display: flex;
        /* Always display flex, but hide via transform */
        position: fixed;
        top: 0;
        left: 0;
        /* Slide from left */
        width: 250px;
        /* Drawer width */
        height: 100vh;
        background-color: var(--primary-blue);
        flex-direction: column;
        padding: 4rem 1rem 2rem;
        /* Top padding for logo space */
        gap: 1rem;
        transform: translateX(-100%);
        /* Hidden off-canvas */
        transition: transform 0.3s ease-in-out;
        z-index: 150;
        box-shadow: 2px 0 8px rgba(0, 0, 0, 0.2);
        justify-content: flex-start;
    }

    header .header-actions.show {
        transform: translateX(0);
        /* Slide in */
    }

    /* Overlay when menu is open */
    body.menu-open::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 100;
        animation: fadeIn 0.3s;
    }

    @keyframes fadeIn {
        from {
            opacity: 0;
        }

        to {
            opacity: 1;
        }
    }

    .header-actions .btn-lang,
    .header-actions .btn-link {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        margin: 0;
        text-align: center;
        padding: 0;
        /* Remove padding as we use flex height */
        font-size: 1.1rem;
        border: 1px solid rgba(255, 255, 255, 0.1);
        height: 50px;
    }
}



/* Small Mobile Optimizations (< 360px) */
@media (max-width: 360px) {

    /* Adjust container padding */
    .hero {
        padding: 0;
        margin-bottom: 2rem;
    }

    .slider-hero {
        height: auto;
        min-height: 400px;
        /* Allow growing */
        padding-bottom: 2rem;
    }

    .slider-wrapper {
        position: absolute;
        height: 100%;
    }

    .hero-overlay {
        position: relative;
        padding: 2rem 1rem;
    }

    .hero-overlay h1 {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
        line-height: 1.4;
    }

    .hero-overlay p {
        font-size: 0.8rem;
        line-height: 1.4;
        padding: 0;
    }

    .wallet-card {
        padding: 0.5rem;
        gap: 0.5rem;
    }

    .wallet-icon img {
        width: 28px;
        height: 28px;
        margin-left: 0.5rem;
    }

    .wallet-info h3 {
        font-size: 0.9rem;
    }

    .network-badge {
        font-size: 0.65rem;
    }
}