/* =========================================
   1. GLOBAL VARIABLES & RESET
   ========================================= */
:root {
    --gov-blue: #002855;
    --gov-blue-dark: #001f42;
    --gov-grey: #f4f4f4;
    --gov-gold: #c5a948;
    --gov-red: #8a1515; /* Urgent/Report color */
    --text-dark: #333;
    --text-light: #fff;
    --container-width: 1200px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body { 
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; 
    background: var(--gov-grey); 
    color: var(--text-dark); 
    line-height: 1.6; 
    font-size: 16px;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-weight: 700;
    margin-bottom: 10px;
}

a { text-decoration: none; color: inherit; }

/* Utility Container */
.container { max-width: var(--container-width); margin: 0 auto; padding: 0 20px; }


/* =========================================
   2. TOP BAR & HEADER
   ========================================= */
.top-bar {
    background-color: #222;
    color: #ccc;
    font-size: 0.8rem;
    padding: 8px 0;
}
.top-bar-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.lang-options span {
    cursor: pointer;
    margin-right: 10px;
    padding-right: 10px;
    border-right: 1px solid #555;
}
.lang-options span:hover { color: #fff; }
.lang-options span:last-child { border: none; }

#region-title-heading {
    font-weight: 700; 
    margin-top: -5px;
}

.report-link {
    color: #ffcccc;
    font-weight: bold;
    text-transform: uppercase;
    background-color: var(--gov-red);
    padding: 2px 8px;
    border-radius: 2px;
    font-size: 0.75rem;
    transition: 0.3s;
}
.report-link:hover { background-color: #ff0000; color: white; }

/* Header & Logo */
.top-header { 
    background: #fff; 
    padding: 15px 0; 
    border-bottom: 4px solid var(--gov-gold); 
}

.header-content { 
    display: flex; 
    align-items: center; 
    gap: 25px; 
    position: relative; 
}

.logo-img {
    width: 110px; 
    height: 110px;
    object-fit: contain; 
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.1)); 
}

.site-title h1 { 
    color: var(--gov-blue); 
    text-transform: uppercase; 
    font-size: 2rem; 
    line-height: 1.1;
    margin-bottom: 5px;
}

.site-title p { 
    color: #555; 
    font-weight: 600; 
    font-size: 1rem; 
    letter-spacing: 0.5px;
}

#twitter-widget-0 {
    margin: 5px 0 5px 0;
}

/* Mobile Menu Button (Base Style) */
.mobile-menu-btn {
    display: none;
    font-size: 2rem;
    background: none;
    border: none;
    color: var(--gov-blue);
    position: absolute;
    right: 20px;
    cursor: pointer;
}


/* =========================================
   3. NAVIGATION
   ========================================= */
.main-nav { background: var(--gov-blue); position: sticky; top: 0; z-index: 1000; box-shadow: 0 2px 5px rgba(0,0,0,0.2); }
.nav-list { list-style: none; display: flex; }
.nav-link { display: block; padding: 15px 25px; color: #fff; font-weight: 500; }
.nav-link:hover { background: var(--gov-blue-dark); }
.nav-item { position: relative; }

/* Dropdown */
.dropdown-menu {
    display: none; position: absolute; top: 100%; left: 0;
    background: #fff; min-width: 250px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1); border-top: 3px solid var(--gov-gold);
    list-style: none;
}
.nav-item:hover .dropdown-menu { display: block; }
.dropdown-menu a { display: block; padding: 12px 20px; color: #333; border-bottom: 1px solid #eee; }
.dropdown-menu a:hover { background: #f9f9f9; color: var(--gov-blue); padding-left: 25px; transition: 0.2s; }


/* =========================================
   4. SCROLLING ALERT TICKER
   ========================================= */
.alert-ticker-wrap {
    background: var(--gov-red);
    color: white;
    width: 100%;
    overflow: hidden;
    height: 60px;
    position: relative;
    z-index: 10;
    transform: translate3d(0, 0, 0); 
}

.alert-ticker-content {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    display: flex;
    align-items: center;
    white-space: nowrap;
    width: max-content;
    will-change: transform;
    animation: ticker 20s linear infinite;
}

#alert-ticker-ltr {
    animation: ticker 20s linear infinite reverse;

}

@keyframes ticker {
    0% { transform: translate3d(100vw, 0, 0); }
    100% { transform: translate3d(-100%, 0, 0); }
}

/* Mobile Hero Logo (Base) */
.mobile-hero-logo {
    display: none;
}

/* =========================================
   5. HERO SECTION
   ========================================= */
.official-hero {
    background-color: var(--gov-blue);
    background-image: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    padding: 50px 0;
    text-align: center;
    border-bottom: 5px solid var(--gov-gold);
    position: relative;
}

.hero-content {
    max-width: 1100px;
    margin: 0 auto;
}

.hero-badge {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--gov-gold);
    border: 1px solid var(--gov-gold);
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    margin-bottom: 20px;
    display: inline-block;
}

.official-hero h2 {
    font-size: 2.8rem;
    margin-bottom: 20px;
    line-height: 1.1;
    color: white;
    white-space: nowrap; 
}

.official-hero p {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 300;
    line-height: 1.6;
    max-width: 800px;
    margin: 0 auto;
}


/* =========================================
   6. INTRO / MISSION BOX
   ========================================= */
.intro-section {
    padding: 60px 0;
    background-color: white;
    background-image: url("../images/afg1.jpg");
    text-align: center;
}

.mission-box {
    background: var(--gov-blue);
    color: white;
    border-left: 6px solid var(--gov-gold);
    padding: 50px;
    margin: 40px auto;
    max-width: 1000px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    text-align: center;
}

.mission-label {
    color: var(--gov-gold);
    font-weight: 500;
    font-size: 1.7rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 20px;
    display: inline-block;
    border-bottom: 1px solid rgba(197, 169, 72, 0.3);
    padding-bottom: 5px;
}

.mission-box p {
    font-size: 1.4rem;
    color: white;
    line-height: 1.4;
    font-weight: 400;
}


/* =========================================
   7. CORE FUNCTIONS
   ========================================= */
.section-functions {
    padding: 0;
    background: white;
    border-bottom: 1px solid #ddd;
}

.functions-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0;
}

.function-card {
    background: white;
    padding: 60px 20px;
    border: none;
    border-right: 1px solid #eee;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.3s ease;
}

.function-card:last-child {
    border-right: none;
}


.function-card h3 {
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: var(--gov-blue);
}

.function-card p {
    font-size: 0.9rem;
    color: #666;
    margin-top: 5px;
}

.icon-placeholder {
    width: 70px;
    height: 70px;
    font-size: 50px;
    margin-bottom: 25px;
    background: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gov-blue);
}


/* =========================================
   8. AUTHORITY BANNER
   ========================================= */
.authority-section {
    background-color: var(--gov-blue-dark);
    color: white;
    padding: 20px 0;
    border-top: 4px solid var(--gov-gold);
    text-align: center;
}

.authority-content {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    font-size: 0.95rem;
}

.auth-icon {
    font-size: 1.2rem;
}


/* =========================================
   9. GOVERNANCE OVERVIEW
   ========================================= */
.snapshot-section {
    padding: 80px 0;
    background-color: white;
}

.section-title { 
    text-align: center; 
    color: var(--gov-blue); 
    margin-bottom: 40px; 
    text-transform: uppercase; 
}

.snapshot-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-top: 40px;
    text-align: center;
}

.snapshot-item {
    padding: 20px;
}

.snap-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    color: var(--gov-blue);
}

.snapshot-item h4 {
    color: var(--gov-blue);
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.snapshot-item p {
    color: #666;
    font-size: 0.95rem;
}


/* =========================================
   10. UPDATES & TWITTER GRID
   ========================================= */
.section-updates { 
    padding: 60px 0;
    background: #e9ecef;
    min-height: 600px; /* Keeps the space open so the page doesn't jump */
    background: #f4f4f4; /* Optional: Light grey loading background */
}

.updates-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.updates-column {
    background: white;
    padding: 30px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.column-title {
    font-size: 1.4rem;
    color: var(--gov-blue);
    border-bottom: 2px solid var(--gov-gold);
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.updates-list { list-style: none; }
.updates-list li { padding: 15px 0; border-bottom: 1px solid #eee; }

.btn-archive {
    display: inline-block;
    margin-top: 20px;
    font-weight: 600;
    color: var(--gov-blue);
}


/* =========================================
   11. COMMITMENT SECTION
   ========================================= */
.commitment-section {
    background-color: #1a1a1a;
    color: white;
    padding: 80px 0;
}

.commitment-header {
    text-align: center;
    margin-bottom: 50px;
}

.commitment-header h2 {
    color: white;
    margin-bottom: 15px;
}

.commitment-line {
    width: 60px;
    height: 3px;
    background: var(--gov-gold);
    margin: 0 auto;
}

.commitment-row {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    text-align: center;
}

.commitment-col {
    flex: 1;
    min-width: 200px;
    padding: 0 20px;
    border-right: 1px solid #333;
}

.commitment-col:last-child {
    border-right: none;
}

.commitment-col h4 {
    color: var(--gov-gold);
    margin-bottom: 10px;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.commitment-col p {
    color: #aaa;
    font-size: 0.9rem;
}


/* =========================================
   12. CAROUSEL
   ========================================= */
.carousel-section { 
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
    background: #000; 
    display: none;
}
.carousel-track { display: flex; transition: transform 0.5s ease-in-out; height: 100%; }
.carousel-slide { min-width: 100%; height: 100%; position: relative; }
.carousel-slide img { width: 100%; height: 100%; object-fit: cover; opacity: 0.7; }
.carousel-caption {
    position: absolute; bottom: 50px; left: 50px; color: white;
    background: rgba(0, 40, 85, 0.8); padding: 20px; border-left: 4px solid var(--gov-gold);
}
.carousel-btn {
    position: absolute; top: 50%; transform: translateY(-50%);
    background: rgba(0,0,0,0.5); color: white; border: none;
    padding: 15px; cursor: pointer; font-size: 1.5rem; z-index: 10;
}
.btn-prev { left: 10px; }
.btn-next { right: 10px; }


/* =========================================
   13. FOOTER
   ========================================= */
.main-footer {
    background-color: var(--gov-blue);
    color: white;
    padding: 60px 0 20px;
    margin-top: auto;
}

.footer-grid {
    display: flex;
    flex-wrap: wrap; 
    gap: 20px;
    justify-content: space-between;
}

.footer-brand { flex: 1 1 250px; min-width: 250px; }
.footer-links { flex: 3 1 600px; display: flex; justify-content: space-between; gap: 20px; }
.footer-col { flex: 1; min-width: 140px; }

.footer-col h4 {
    color: var(--gov-gold);
    margin-bottom: 20px;
    font-size: 1.1rem;
    border-bottom: 2px solid rgba(255,255,255,0.1);
    padding-bottom: 10px;
    white-space: nowrap; 
}

.footer-col ul { list-style: none; padding: 0; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a { color: #ddd; transition: color 0.3s; font-size: 0.95rem; }
.footer-col ul li a:hover { color: var(--gov-gold); padding-left: 5px; }

.footer-bottom {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    text-align: center;
    font-size: 0.9rem;
    color: #aaa;
}


/* =========================================
   14. INTERNAL PAGE STYLES
   ========================================= */
.page-hero {
    background-color: var(--gov-blue);
    color: white;
    padding: 50px 0; 
    border-bottom: 4px solid var(--gov-gold);
}

.page-hero h1 { font-size: 2.2rem; margin-bottom: 10px; }
.page-hero p { font-size: 1.1rem; opacity: 0.9; max-width: 800px; }

.content-section { padding: 60px 0; background-color: white; min-height: 500px; }

.gov-text-block { max-width: 900px; margin-bottom: 40px; }
.gov-text-block h2 { color: var(--gov-blue); font-size: 2rem; border-bottom: 2px solid #eee; padding-bottom: 10px; margin-bottom: 20px; margin-top: 30px; }
.gov-text-block h2:first-of-type { margin-top: 0; }
.gov-text-block p { margin-bottom: 15px; text-align: justify; }

.principles-list { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px; margin-top: 20px; }
.principles-list li { background-color: var(--gov-grey); padding: 15px; border-left: 3px solid var(--gov-gold); font-weight: 600; color: var(--gov-blue); }

.highlight-box { background-color: #eef2f5; border: 1px solid #dde2e6; padding: 25px; border-radius: 4px; margin: 20px 0; }

/* TABS */
.tabs-container { display: flex; gap: 40px; margin-top: 40px; min-height: 400px; }
.tab-buttons { flex: 0 0 250px; display: flex; flex-direction: column; gap: 10px; }
.tab-btn { background: #f8f9fa; border: none; border-left: 4px solid transparent; padding: 15px 20px; text-align: left; font-size: 1rem; font-weight: 600; color: #555; cursor: pointer; transition: all 0.3s; font-family: inherit; }
.tab-btn:hover { background-color: #e9ecef; color: var(--gov-blue); }
.tab-btn.active { background-color: var(--gov-blue); color: white; border-left: 4px solid var(--gov-gold); }
.tab-content { flex: 1; background: white; padding-left: 20px; border-left: 1px solid #eee; }
.tab-panel { display: none; animation: fadeIn 0.4s ease; }
.tab-panel.active { display: block; }
.tab-panel h3 { color: var(--gov-blue); font-size: 1.5rem; margin-bottom: 20px; border-bottom: 2px solid var(--gov-gold); display: inline-block; padding-bottom: 5px; }
.tab-panel p { margin-bottom: 15px; text-align: justify; }
.tab-panel ul { list-style: none; margin-top: 15px; }
.tab-panel li { padding: 10px 0; border-bottom: 1px solid #eee; display: flex; align-items: center; }
.tab-panel li::before { content: "▸"; color: var(--gov-gold); margin-right: 10px; font-size: 1.2rem; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* MANDATES */
.mandates-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; margin-top: 20px; }
.mandate-card { background-color: #f8f9fa; padding: 20px; border: 1px solid #e9ecef; border-radius: 4px; transition: transform 0.2s; }
.mandate-card:hover { transform: translateY(-3px); box-shadow: 0 4px 8px rgba(0,0,0,0.05); border-color: var(--gov-gold); }
.mandate-card h5 { color: var(--gov-blue); font-size: 1.1rem; margin-bottom: 10px; border-bottom: 2px solid var(--gov-gold); display: inline-block; padding-bottom: 3px; }
.mandate-card p { font-size: 0.95rem; color: #555; margin-bottom: 0; text-align: left; }

/* FORMS */
.form-container { max-width: 700px; margin: 0 auto; background: #f8f9fa; padding: 40px; border: 1px solid #e9ecef; border-radius: 4px; box-shadow: 0 4px 10px rgba(0,0,0,0.05); }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 600; color: var(--gov-blue); }
.form-group input, .form-group textarea { width: 100%; padding: 12px; border: 1px solid #ccc; border-radius: 4px; font-size: 1rem; font-family: inherit; transition: border-color 0.3s; }
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--gov-blue); box-shadow: 0 0 5px rgba(0, 40, 85, 0.2); }
.form-text { font-size: 0.85rem; color: #666; margin-top: 5px; }
.btn-submit { background-color: var(--gov-blue); color: white; padding: 15px 30px; border: none; border-radius: 4px; font-size: 1rem; font-weight: 600; cursor: pointer; width: 100%; transition: background 0.3s; }
.btn-submit:hover { background-color: var(--gov-blue-dark); }
.optional-tag { font-weight: 400; color: #888; font-size: 0.9rem; margin-left: 5px; }

/* SERVICE PAGES */
.service-content { max-width: 900px; margin: 0 auto; padding-top: 40px; }
.service-section { margin-bottom: 50px; }
.service-section h3 { color: var(--gov-blue); font-size: 1.6rem; margin-bottom: 15px; border-bottom: 1px solid #ddd; padding-bottom: 10px; }
.service-list { list-style: none; margin-top: 15px; }
.service-list li { position: relative; padding-left: 30px; margin-bottom: 12px; color: #444; }
.service-list li::before { content: "■"; color: var(--gov-gold); font-size: 0.8rem; position: absolute; left: 0; top: 3px; }
.callout-box { background-color: #f8f9fa; border-left: 4px solid var(--gov-blue); padding: 25px; border-radius: 4px; margin: 20px 0; }


/* =========================================
   15. DONATION VAULT STYLES
   ========================================= */

.donation-vault {
    display: flex;
    max-width: 900px;
    margin: 40px auto;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    overflow: hidden;
}

/* LEFT SIDE: TABS */
.vault-tabs {
    flex: 0 0 250px;
    background: #f4f6f9;
    border-right: 1px solid #ddd;
    display: flex;
    flex-direction: column;
}

.vault-tab {
    padding: 20px;
    text-align: left;
    background: none;
    border: none;
    border-bottom: 1px solid #e0e0e0;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    color: #555;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 10px;
}

.vault-tab:hover {
    background: #e9ecef;
    color: var(--gov-blue);
}

.vault-tab.active {
    background: white;
    color: var(--gov-blue);
    border-right: 3px solid transparent; /* Hide border */
    position: relative;
    box-shadow: -5px 0 0 var(--gov-gold) inset; /* Gold indicator on left */
}

.coin-icon {
    font-size: 1.2rem;
    width: 30px;
    text-align: center;
}

/* RIGHT SIDE: CONTENT */
.vault-display {
    flex: 1;
    padding: 40px;
    background: white;
}

.vault-panel {
    display: none;
    animation: fadeIn 0.3s ease;
}

.vault-panel.active {
    display: block;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    border-bottom: 2px solid #eee;
    padding-bottom: 15px;
}

.badge-network {
    background: #444;
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ADDRESS INPUT GROUP */
.address-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    color: var(--gov-blue);
    font-size: 0.9rem;
}

.input-wrapper {
    display: flex;
    gap: 10px;
}

.input-wrapper input {
    width: 100%;
    padding: 12px;
    background: #f8f9fa;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: monospace; 
    font-size: 1rem;
    color: #333;
}

.btn-copy {
    background: var(--gov-blue);
    color: white;
    border: none;
    padding: 0 20px;
    border-radius: 4px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-copy:hover {
    background: var(--gov-blue-dark);
}

/* QR CODE AREA */
.qr-container {
    text-align: center;
    margin-bottom: 30px;
}

.qr-placeholder {
    width: 180px;      
    height: 180px;
    background: #fff;
    border: 2px dashed #ccc;
    margin: 0 auto;
    display: flex;    
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    overflow: hidden;  
}

.qr-placeholder img {
    max-width: 100%;   
    max-height: 100%;  
    object-fit: contain; 
    display: block;    
}

/* =========================================
   16. HEADER UPDATES & UTILITIES
   ========================================= */

/* Top Bar Actions Group */
.top-actions {
    display: flex;
    gap: 15px; 
    align-items: center;
}

/* Donate Link Styling */
.donate-link {
    color: #fff;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    transition: 0.3s;
}

.donate-link:hover {
    color: var(--gov-gold);
    text-decoration: underline;
}

/* Header Right Image */
.header-right-img {
    margin-left: auto; 
    display: flex;
    align-items: center;
}

.header-right-img img {
    width: 100px;  
    height: 100px; 
    object-fit: contain;
    background-color: transparent; 
    border: none;
}

/* ADDRESS BOX STYLES */
.address-text-box {
    background: #f8f9fa;
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 15px;
    display: flex;
    flex-direction: column; 
    gap: 15px;
}

.wallet-text {
    font-family: 'Courier New', Courier, monospace; 
    font-size: 1.05rem;
    color: #222;
    word-break: break-all; 
    line-height: 1.4;
    font-weight: 600;
}

.btn-copy-text {
    background: var(--gov-blue);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: 700;
    cursor: pointer;
    align-self: flex-start; 
    font-size: 0.9rem;
    transition: background 0.3s;
}

.btn-copy-text:hover {
    background: var(--gov-blue-dark);
}

/* =========================================
   17. RTL SUPPORT (Language Attribute)
   ========================================= */
/* Mirror the direction */
[dir="rtl"] body {
    text-align: right;
    direction: rtl;
    font-family: 'Tahoma', 'Arial', sans-serif; 
}

/* Fix Margins/Paddings */
[dir="rtl"] .margin-left-class {
    margin-left: 0;
    margin-right: 20px; 
}

/* Fix Flexbox Layouts (Top Bar, Header) */
[dir="rtl"] .top-bar-flex,
[dir="rtl"] .header-content {
    flex-direction: row-reverse; 
}

/* Fix Absolute Positioning */
[dir="rtl"] .mobile-menu-btn {
    right: 20px;
    left: auto;
}


/* =========================================
   OFFICIAL DOCUMENT "PAPER" APPEARANCE
   ========================================= */
.official-paper {
    background: #ffffff;
    max-width: 210mm; /* Standard A4 Paper Width */
    min-height: 297mm; /* Standard A4 Paper Height */
    margin: 0 auto;
    padding: 40px 50px;
    
    /* The 3D Paper Shadow Effect */
    box-shadow: 0 10px 30px rgba(0,0,0,0.15); 
    
    /* THIN BLUE BARS ON TOP AND BOTTOM */
    border-top: 4px solid var(--gov-blue, #1a2f4c);
    border-bottom: 4px solid var(--gov-blue, #1a2f4c);
    
    /* MAKES IT BEHAVE LIKE AN IMAGE (Disables text highlighting/copying) */
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    
    /* Forces printer to print the blue borders */
    color-adjust: exact !important;
    -webkit-print-color-adjust: exact !important;
}

/* Letterhead Layout inside the paper */
.paper-letterhead {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 2px solid #eaeaea;
    padding-bottom: 20px;
    margin-bottom: 30px;
}



/* =========================================
   MEDIA QUERIES (RESPONSIVE STYLES)
   ========================================= */

/* Hero Section Responsiveness */
@media (max-width: 1024px) {
    .official-hero h2 {
        white-space: normal;
        font-size: 2.2rem;
    }
}



/* Functions Grid (Medium Screens) */
@media (max-width: 1000px) {
    .functions-grid { grid-template-columns: repeat(3, 1fr); }
    .function-card { border-bottom: 1px solid #eee; }
}

/* Commitment Section & Footer */
@media (max-width: 900px) {
    /* Commitment */
    .commitment-row { flex-direction: column; gap: 30px; }
    .commitment-col { border-right: none; border-bottom: 1px solid #333; padding-bottom: 20px; }
    .commitment-col:last-child { border-bottom: none; }

    /* Footer */
    .footer-grid { flex-direction: column; gap: 30px; }
    .footer-brand { flex: 0 0 100%; border-right: none; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 20px; text-align: center; }
    .footer-logo { margin: 0 auto 15px auto; }
    .footer-links { flex-wrap: wrap; }
    .footer-col { flex-basis: 45%; margin-bottom: 20px; }
}

/* Snapshot Grid & Updates */
@media (max-width: 800px) {
    .snapshot-grid { grid-template-columns: repeat(2, 1fr); }
    .updates-grid { grid-template-columns: 1fr; }
}

/* Tablet & Mobile (Main Breakpoint) */
@media (max-width: 768px) {
    /* Mobile Hero Logo */
    .mobile-hero-logo {
        display: block;        
        width: 100px;          
        height: auto;
        margin: 0 auto 20px auto; 
        object-fit: contain;
    }
    .site-title h1 { 
    margin-top: 20px;
    }

    /* Header & Navigation */
    .authority-content { flex-direction: column; gap: 5px; text-align: center; }
    
    .header-content { flex-direction: column; text-align: center; }
    .mobile-menu-btn { display: block; top: 20px; right: 20px; }
    
    .nav-list { display: none; flex-direction: column; width: 100%; }
    .nav-list.active { display: flex; }
    
    .nav-link { border-bottom: 1px solid rgba(255,255,255,0.1); padding: 15px; }
    .dropdown-menu { position: static; box-shadow: none; border-top: none; background: #003366; }
    .dropdown-menu a { color: #ccc; padding-left: 40px; }
    
    .top-bar-flex { flex-direction: column; gap: 10px; }
    
    /* Intro Section & Region Heading */
    .intro-section {
        padding: 60px 0;
        background-color: white;
        background-image: none;
        text-align: center;
    }
    #region-title-heading {
        font-weight: 700; 
        display: block;
        margin-top: -5px;
    }

    .header-content { 
    display: flex; 
    align-items: center; 
    gap: 0px; 
    position: relative; 
    }


    /* Tabs Container */
    .tabs-container { flex-direction: column; }
    .tab-buttons { flex: auto; width: 100%; }
    .tab-content { border-left: none; padding-left: 0; border-top: 1px solid #eee; padding-top: 20px; }

    /* Donation Vault */
    .donation-vault {
        flex-direction: column;
    }
    .vault-tabs {
        flex: auto;
        flex-direction: row;
        overflow-x: auto; /* Scrollable tabs on mobile */
        border-right: none;
        border-bottom: 1px solid #ddd;
    }
    .vault-tab {
        flex: 0 0 auto; 
        padding: 15px;
        box-shadow: none;
        border-bottom: 3px solid transparent;
    }
    .vault-tab.active {
        box-shadow: none;
        border-bottom: 3px solid var(--gov-gold);
    }
    .vault-display {
        padding: 20px;
    }
    .input-wrapper {
        flex-direction: column;
    }
    .btn-copy {
        padding: 12px;
        margin-top: 5px;
    }

    /* Header Right Image & Actions */
    .header-right-img {
        display: none; 
    }
    .top-actions {
        gap: 10px;
    }

    /* RTL Specific Mobile Fixes */
    [dir="rtl"] .top-bar-flex {
        display: flex;
        flex-direction: column !important;
        align-items: center !important;
        height: auto;
        padding: 10px 0;
    }

    [dir="rtl"] .lang-options {
        display: flex;
        justify-content: center !important; 
        width: 100%;
        margin-bottom: 8px; 
        border-bottom: 1px solid rgba(255,255,255,0.1); 
        padding-bottom: 8px;
    }

    [dir="rtl"] .top-actions {
        display: flex;
        justify-content: center !important;
        width: 100%;
        gap: 15px;
    }
}

/* Small Mobile Screens */
@media (max-width: 600px) {
    /* Functions Grid */
    .functions-grid { grid-template-columns: 1fr; }
    .function-card { padding: 40px 20px; border-right: none; }
    
    /* Footer */
    .footer-col { flex-basis: 100%; text-align: center; }
}

/* =========================================
   PRINTING LOGIC (The Magic)
   ========================================= */

@media print {
    @page {
        size: A4;

    }
    .top-bar, .top-header, .main-nav, .page-hero, .no-print, footer, [data-include="header.html"], [data-include="footer.html"] {
        display: none !important;
    }

    body {
        background: white;
    }

    /* 3. Make the paper fill the actual printer page perfectly */
    .official-paper {
        box-shadow: none; /* Remove 3D shadow for printing */
        max-width: 100%;
        min-height: auto;
        padding: 0; /* Let the printer margins handle spacing */
        border-top: 4px solid #1a2f4c !important;
        border-bottom: 4px solid #1a2f4c !important;
    }

}


