/* --- Media Queries --- */
@media (min-width: 992px) {
    .header__list { display: flex !important; }
}

@media (max-width: 1199px) {
    h1 { font-size: 55px; }
    h2 { font-size: 50px; }
    .lead__info { margin-bottom: 55px; }
    .ft__description a.main__logo { margin-bottom: 25px; }
    .ft__description { max-width: 100%; margin-bottom: 35px; }
    form.newsletter__form { margin-bottom: 45px; }
    .goal__box li { font-size: 25px; }
    .goal__box li span { font-size: 22px; }
    .goal__box { padding: 20px 5px; }
    .support__box { padding: 30px; }
    .support__box h3 { font-size: 28px; }
    .support-field__box input, .support-field__box select { padding: 20px 30px 20px 60px; background-position: right 30px center; }
    .support-field__box label { left: 30px; }
    .radio-btn label { left: 0; }
    .support__form button { padding: 22px 48px; }
    .service-wrap { padding-bottom: 110px; }
    .service__box { padding: 40px 30px; margin-left: -50px; }
    .service__box h3 { font-size: 22px; margin-bottom: 15px; }
    .service__video span { width: 70px; height: 70px; outline-width: 10px; }
    .header-stats { gap: 15px; padding: 6px 15px; }
    .desktop-only { display: none; }
    .h-value { font-size: 15px; }
    .theme-btn.theme-btn_sm { padding: 6px 12px; font-size: 12px; gap: 5px; }
    .header-wrap.stats-visible .main__logo { max-width: 120px; }
}

/* --- Tablet / Large Mobile (Landscape) --- */
@media (max-width: 991px) {
    h1 { font-size: 50px; }
    h2 { font-size: 45px; }
    .menu-btn { display: block; }
    .header__list { display: none; position: absolute; left: 0; right: 0; top: 100%; padding: 15px; background: #333644; margin: 0; }
    .header__list li { padding: 0 0 20px; text-align: center; }
    .header__list li:last-child { padding-bottom: 0; }
    .lead__info { margin-bottom: 40px; }
    .ft__box.newsletter { max-width: 100%; margin-top: 35px; }
    form.newsletter__form { max-width: 375px; margin-bottom: 35px; }
    .ft__box h3 { margin-bottom: 20px; }
    
    .support-content-row { flex-direction: column; align-items: center; gap: 30px; }
    .support-footer-row { flex-direction: column; align-items: center; text-align: center; gap: 30px; padding-top: 30px; }
    .support_info, .support__box { max-width: 100%; flex: auto; }
    .social__sharing { padding-right: 0; align-items: center; text-align: center; }
    .social__sharing ul { flex-direction: row !important; justify-content: center; max-width: 100%; }
    .support-text { padding-left: 0; border-left: none; border-top: 1px solid rgba(255, 255, 255, 0.1); padding-top: 30px; width: 100%; }
    
    .service-wrap { padding-bottom: 70px; }
    .service { flex-direction: column; gap: 25px; }
    .service__video { max-width: 100%; }
    .service__box { max-width: 100%; margin-left: 0; }
    .support_info em { margin-bottom: 5px; }
    .support-wrap .vector__three { bottom: 1%; }
    
    /* Brick Appeal: 8 Bricks per row (Larger targets) */
    .brick-wall {
        display: flex;
        flex-wrap: wrap; 
        justify-content: center;
        gap: 4px;
    }
    .brick {
        flex: 0 0 calc(12.5% - 4px); 
        font-size: 10px;
    }
}

/* --- Standard Mobile (Portrait) --- */
@media (max-width: 767px) {
    .thanks-info h1, h1 { font-size: 45px; }
    .support_info h2, h2 { font-size: 40px; }
    h3 { font-size: 18px; }
    p, h1, h2, h3, h4, h5, h6 { margin-bottom: 20px; }
    a.main__logo { max-width: 350px; }
    .header-wrap.active .header a.main__logo { max-width: 300px; }
    .lead__info { margin-bottom: 30px; }
    .lead__info em { margin-bottom: 5px; }
    .support__form button { font-size: 18px; padding: 16px 35px; }
    .footer-wrap { padding: 40px 0 20px; }
    .footer { gap: 35px; margin-bottom: 25px; }
    .ft__description { margin-bottom: 0; }
    
    .ft__box { width: 46%; }
    .ft__box.newsletter { max-width: 46%; margin-top: 0; }
    
    .support-wrap { padding: 60px 0; }
    .support__box h3 { font-size: 25px; }
    .service-wrap { padding: 60px 0; }
    .service__video span { width: 60px; height: 60px; outline-width: 7px; }
    
    /* Mobile First Optimisations */
    .goal__box { flex-direction: column; gap: 20px; padding: 25px 15px; }
    .goal__box li { width: 100%; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 15px; margin-bottom: 5px; }
    .goal__box li:last-child { border-bottom: none; padding-bottom: 0; margin-bottom: 0; }
    .goal__box li::after { display: none; }
    .money-wrapper { font-size: 40px !important; }
    #Remaining .money-wrapper { font-size: 55px !important; }
    .goal__box li span { font-size: 20px; }

    .radio-outer { flex-wrap: wrap; gap: 8px; }
    .radio-btn { flex: 1 0 45%; height: 50px; }
    .radio-btn.other-amount { flex: 1 0 100%; }
    
    .support-tabs { flex-direction: column; }
    .support-tab { text-align: center; padding: 12px; }
    .donate__outer { flex-wrap: wrap; }
    .donate__box { width: 45%; margin-bottom: 15px; }

    /* Brick Appeal: 4 Bricks per row (Improved for Mobile) */
    .brick-wall-container { 
        padding: 15px 5px; 
        overflow: hidden; 
        width: 100%; 
    }
    
    .brick-wall {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 4px;
        width: 100%;
    }

    .brick {
        flex: 0 0 calc(25% - 4px) !important; /* 4 per row instead of 5 */
        height: 42px; 
        font-size: 10px;
        min-width: 0;
    }
    
    /* Brick Stats Grid Layout */
    .brick-stats {
        display: grid !important;
        grid-template-columns: 1fr 1fr; 
        gap: 15px;
        width: 100%;
        padding-top: 20px;
        border-top: 1px solid rgba(255,255,255,0.1);
    }

    .brick-stat-item {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }

    .brick-stat-item:last-child {
        grid-column: span 2; 
        margin-top: 5px;
        padding-top: 15px;
        border-top: 1px solid rgba(255,255,255,0.05);
    }

    .brick-stat-item strong { 
        font-size: 16px; 
    }
}

@media (max-width: 575px) {
    .thanks-info h1, h1 { font-size: 38px; }
    .support_info h2, h2 { font-size: 32px; }
    p, h1, h2, h3, h4, h5, h6 { margin-bottom: 18px; }
    body, input, select, textarea, p { font-size: 16px; }
    .container { padding: 0 15px; }
    a.main__logo { max-width: 280px; }
    .header-wrap.active .header a.main__logo { max-width: 250px; }
    .support__form button, .theme-btn { font-size: 16px; padding: 14px 25px; }
    .theme-btn span { width: 14px; }
    .ft__description a.main__logo { margin-bottom: 20px; }
    .ft__box { width: 100%; }
    .ft__box.newsletter { max-width: 100%; }
    form.newsletter__form { margin-bottom: 25px; }
    .copyright { font-size: 14px; }
    
    .social__sharing { text-align: center !important; }
    .social__sharing h3 { width: 100%; justify-content: center; }
    .social__sharing ul { justify-content: center !important; gap: 20px; }
    .social__sharing ul a { width: 40px; height: 40px; }
    
    .support__box { padding: 20px; }
    .support-field__box { margin-bottom: 20px; }
    .support__box h3 { font-size: 20px; }
    .support-field__box input, .support-field__box select { padding: 15px 20px 15px 42px; background-position: right 20px center; }
    .support-field__box label { left: 20px; width: 17px; }
    .radio-btn label { width: auto; left: 0; font-size: 14px; }
    .radio-btn label span { display: none; }
    
    .support-tabs { gap: 10px; margin-bottom: 15px; }
    .support-tab { font-size: 14px; padding: 5px 8px; }
    .radio-outer { gap: 10px; }
    .radio-btn { width: 31%; max-width: inherit; min-width: 1px; height: 37px; }
    .radio-btn.other-amount { min-width: 120px; }
    
    .checkbox__field { margin: 0 0 10px 0; }
    .checkbox__field label { font-size: 13px; padding-left: 10px; }
    .support__box p { font-size: 14px; }
    
    .service { gap: 20px; }
    .service__video { padding-bottom: 50%; }
    .service__video span { width: 50px; height: 50px; outline-width: 5px; }
    .service__box { padding: 25px; }
    .service__box h3 { font-size: 20px; }
    
    .recent-donations-wrap h3 { display: block; text-align: center; }
    ul.goal__box.recent-donations-list { 
        flex-direction: row !important; 
        overflow-x: auto !important; 
        overflow-y: hidden; 
        justify-content: flex-start !important; 
        scroll-snap-type: x mandatory; 
        padding: 10px 15px 20px 15px !important; 
        gap: 15px !important; 
        -webkit-overflow-scrolling: touch; 
    }
    ul.goal__box.recent-donations-list li { min-width: 200px !important; scroll-snap-align: center; }
    ul.goal__box.recent-donations-list::-webkit-scrollbar { height: 4px; }
    ul.goal__box.recent-donations-list::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.2); border-radius: 10px; }
}

/* --- Narrow Mobile Optimisations (iPhone SE / Small Androids) --- */
@media (max-width: 400px) {
    #Remaining .money-wrapper { font-size: 11vw !important; line-height: 1.1 !important; }
    #Raised .money-wrapper, #Goal .money-wrapper { font-size: 24px !important; }
    .container { padding: 0 12px; }
    .goal__box { padding: 15px 10px; gap: 12px; }
    .radio-outer { gap: 8px; }
    .radio-btn { flex: 1 0 45%; max-width: none; min-width: auto; height: 45px; }
    .radio-btn label { font-size: 14px; }
    
    /* 3 Bricks per row for very narrow screens */
    .brick {
        flex: 0 0 calc(33.33% - 4px) !important; 
        height: 40px; 
        font-size: 10px;
    }
    
    h1 { font-size: 32px; }
    h2 { font-size: 28px; }
    .support_info h2 { font-size: 26px; }
    .lead__info h2 { font-size: 28px; }
    .ft__box { width: 100%; text-align: center; }
    .ft__list li { justify-content: center; display: flex; }
    form.newsletter__form { max-width: 100%; }
}