/* --- BRICK WALL & HADITH STYLES --- */

/* Hadith Styling */
.hadith-box {
    padding: 20px;
    background: #f8fafc;
    border-radius: 12px;
    border-left: 4px solid #01705C;
    text-align: center;
}

.hadith-box em {
    font-family: 'Georgia', serif;
    font-style: italic;
}

/* Brick Appeal Section */
.brick-section {
    padding: 60px 0;
    background: #FFFFFF;
    position: relative;
    z-index: 1;
}

.brick-wall-container {
    background: #252839; 
    padding: 40px 20px 20px; 
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    margin: 20px auto 40px;
    overflow: hidden;
    position: relative;
    max-width: 1100px;
    display: flex;       
    flex-direction: column;
}

/* Scroll Indicator */
.scroll-indicator {
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
    animation: bounce 2s infinite;
}
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {transform: translateY(0);}
    40% {transform: translateY(-5px);}
    60% {transform: translateY(-3px);}
}

.brick-wall {
    display: flex;
    flex-wrap: wrap; 
    justify-content: center; 
    gap: 4px;
    width: 100%;
    
    /* SCROLLABLE LOGIC */
    max-height: 400px;      
    overflow-y: auto;       
    padding: 15px;           /* FIX: Added padding to prevent zoom clipping [cite: 2026-03-01] */
    margin-bottom: 20px;
    
    /* Custom Scrollbar for Dark Mode */
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

/* Webkit Scrollbar Styling */
.brick-wall::-webkit-scrollbar { width: 6px; }
.brick-wall::-webkit-scrollbar-track { background: transparent; }
.brick-wall::-webkit-scrollbar-thumb { background-color: rgba(255, 255, 255, 0.3); border-radius: 10px; }

/* --- BASE BRICK STYLING (Shared Typography) --- */
.brick {
    flex: 0 0 calc(6.66% - 4px); 
    aspect-ratio: 2.5/1;
    border-radius: 2px;
    border: 1px solid rgba(255,255,255,0.3); 
    display: flex;
    align-items: center;
    justify-content: center;
    
    /* UNIFIED TYPOGRAPHY: Applies to Available, Hover, and Filled [cite: 2026-03-01] */
    color: #FFFFFF; 
    font-weight: 800;        /* Bold across all states */
    font-size: 11px;         /* Single consistent size */
    text-shadow: none;       /* Clean flat look */
    
    transition: all 0.2s ease-out;
    cursor: pointer;
    position: relative;
}

/* Base State (Available) */
.brick.available {
    background-color: rgba(255, 255, 255, 0.08); 
    box-shadow: inset 0 0 5px rgba(255,255,255,0.1);
}

/* Hover State (Light Emerald) */
.brick.available:hover {
    transform: translateY(-2px) scale(1.05); /* Slight zoom */
    background-color: rgba(1, 112, 92, 0.5) !important; /* Light Green */
    color: #fff !important; 
    z-index: 10;
    box-shadow: 0 4px 15px rgba(1, 112, 92, 0.3);
    border-color: #fff !important;
    /* Maintain Shared Typography [cite: 2026-03-01] */
    font-weight: 800;
    font-size: 11px;
}

/* Filled State (Gold Foundation) */
.brick.filled {
    cursor: default;
    background-color: #FFD249 !important; /* Gold */
    color: #252839 !important; /* Dark Text */
    box-shadow: inset 0 0 10px rgba(0,0,0,0.1), 0 2px 4px rgba(0,0,0,0.1); 
    border-color: rgba(255, 255, 255, 0.5) !important;
    opacity: 1 !important; 
    transform: none !important; /* Prevents stuck zoom [cite: 2026-03-01] */
    /* Maintain Shared Typography [cite: 2026-03-01] */
    font-weight: 800;
    font-size: 11px;
}

/* Stats Section */
.brick-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    border-top: 1px solid rgba(255,255,255,0.15);
    padding-top: 20px;
    margin-top: auto; 
    flex-wrap: wrap;
    background: #252839; 
    z-index: 5;
}

.brick-stat-item { text-align: center; color: white; }
.brick-stat-item span { display: block; font-size: 11px; opacity: 0.6; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 5px; }
.brick-stat-item strong { display: block; font-size: 28px; color: var(--tertiary-color); font-family: "Epilogue", sans-serif; font-weight: 700; }

.brick-cta { text-align: center; margin-top: 20px; }

/* --- Live Brick Purchase Animation --- */
@keyframes brickPop {
    0% { transform: scale(1); }
    50% { 
        transform: scale(1.3); 
        filter: brightness(1.2); 
        background-color: #ffe082 !important; 
        box-shadow: 0 0 20px #FFD249; 
        z-index: 20;
    }
    100% { transform: scale(1); } 
}

.brick-pop { 
    animation: brickPop 0.8s ease-out forwards !important; 
    position: relative;
    z-index: 10; 
}

/* --- Celebration Overlay --- */
.wall-complete-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(46, 52, 51, 0.9);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden; transition: opacity 3s ease-in-out, visibility 3s ease-in-out;
    z-index: 100;
}
.brick-wall-container.is-complete .wall-complete-overlay { opacity: 1; visibility: visible; }
.brick-wall-container.is-complete .brick-wall { filter: blur(3px); transition: filter 3s ease-in-out; }
.celebration-text { text-align: center; padding: 20px; }
.celebration-text h3 { color: #FFD249; font-size: 48px; margin-bottom: 15px; font-family: "Epilogue", sans-serif; letter-spacing: 2px; text-transform: uppercase; }
.celebration-text p { color: white; font-size: 22px; font-style: italic; font-family: "Poppins", sans-serif; }