@font-face {
    font-family: 'Sahel';
    src: url('../fonts/Sahel.woff') format('woff');
    font-weight: 400;
}

@font-face {
    font-family: 'Sahel';
    src: url('./fonts/Sahel-Bold.woff') format('woff');
    font-weight: 500;
}

@font-face {
    font-family: 'Sahel';
    src: url('./fonts/Sahel-Black.woff') format('woff');
    font-weight: 700;
}

/* Modern Flat Colors */
:root {
    --flat-green: #27ae60;
    --flat-red: #e74c3c;
    --flat-white: #ffffff;
    --bg-color: #f4f7f6;
    --text-dark: #2c3e50;
    --text-muted: #7f8c8d;
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.08);
}

/* Base */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Sahel', Tahoma, sans-serif;
    background: var(--bg-color);
    color: var(--text-dark);
    line-height: 1.6;
}

/* Top Flag Bar */
.top-bar {
    height: 6px;
    background: linear-gradient(to right, var(--flat-red) 33.3%, var(--flat-white) 33.3%, var(--flat-white) 66.6%, var(--flat-green) 66.6%);
}

/* header */

.header {
    position: relative;
    text-align: center;

    padding: 230px 20px 40px;
    background: var(--flat-white);
    box-shadow: var(--shadow-sm);
}

.header-text {
    position: relative;
    z-index: 2;
}

.header h1 {
    margin: 0;
    font-size: 36px;
    font-weight: 700;
    color: var(--text-dark);
}

.header p {
    margin-top: 12px;
    font-size: 18px;
    color: var(--text-muted);
}

/* Islamic Frames (Positioned Top Left & Top Right) */
.islamic-frame {
    position: absolute;
    top: 30px;
    width: 140px;
    height: 190px;
    padding: 6px;
    background-color: #2c3e50;
    border-radius: 15px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    z-index: 2;
}

.right-frame {
    right: 5%;
}

.left-frame {
    left: 5%;
}

.islamic-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

/* Container */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Hero */
.hero {
    text-align: center;
    margin-top: -40px;
    /* Overlap effect */
    position: relative;
    z-index: 10;
}

.image-wrapper {
    display: inline-block;
    padding: 8px;
    background: var(--flat-white);
    border-radius: 50%;
    box-shadow: var(--shadow-md);
}

.hero img {
    width: 180px;
    height: 180px;
    object-fit: cover;
    border-radius: 50%;
    display: block;
    transition: transform 0.3s ease;
}

.hero img:hover {
    transform: scale(1.05);
}

/* Cards (Bio & Wasiat) */
.card {
    background: var(--flat-white);
    border-radius: 16px;
    padding: 40px;
    margin: 40px auto;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

/* Biography Box */
.bio-box {
    border-right: 6px solid var(--flat-green);
}

.bio-box h2 {
    text-align: center;
    margin-top: 0;
    margin-bottom: 30px;
    font-size: 24px;
    color: var(--flat-green);
}

.bio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.bio-item {
    background: var(--bg-color);
    padding: 15px 20px;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bio-item span {
    color: var(--text-muted);
    font-size: 14px;
}

/* Wasiat */
.wasiat {
    border-right: 6px solid var(--flat-red);
}

.wasiat-icon {
    display: inline-block;
    background: rgba(231, 76, 60, 0.1);
    color: var(--flat-red);
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: bold;
    margin-bottom: 20px;
}

.wasiat p {
    font-size: 18px;
    line-height: 1.8;
    color: var(--text-dark);
    text-align: justify;
}

/* Gallery */
.gallery {
    margin: 60px 0;
}

.gallery h2 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 26px;
    color: var(--text-dark);
}

.gallery .grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.gallery img {
    width: 100%;
    aspect-ratio: 1 / 1;
    /* Creates perfect squares */
    object-fit: cover;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    display: block;
}

.gallery img:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

/* Khatm Section */
.khatm-section {
    text-align: center;
    margin-top: 60px;
    margin-bottom: 60px;
}

.khatm-section h2 {
    font-weight: bold;
    color: var(--text-dark);
    margin-bottom: 40px;
}

.khatm-grid {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.khatm-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 260px;
    background: var(--flat-white);
    padding: 40px 20px;
    border-radius: 16px;
    box-shadow: var(--shadow-sm); 
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-bottom: 5px solid var(--flat-red);
}

.khatm-item:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-md);
}

.khatm-count {
    font-size: 54px;
    font-weight: 900;
    color: var(--flat-green);
    line-height: 1;
    margin-bottom: 15px;
}

.khatm-title {
    font-size: 18px;
    color: var(--text-dark);
    margin-bottom: 25px;
    font-weight: 500;
}

.khatm-btn {
    background-color: var(--flat-green);
    color: var(--flat-white);
    border: none;
    padding: 12px 30px;
    font-size: 15px;
    font-family: inherit;
    font-weight: normal;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 90%;
    box-shadow: 0 4px 10px rgba(39, 174, 96, 0.2);
}

.khatm-btn:hover {
    background-color: #219653;
    box-shadow: 0 6px 15px rgba(39, 174, 96, 0.3);
    transform: scale(1.02);
}

.khatm-btn:disabled {
    opacity: 0.5;
    pointer-events: none;
}


/* Footer */
.footer {
    text-align: center;
    padding: 30px 20px;
    background: var(--text-dark);
    color: var(--flat-white);
    margin-top: 60px;
}

.footer p {
    margin: 0;
    opacity: 0.8;
    font-size: 14px;
}


/* Toast */
#toast {
    position: fixed;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #1e7a45;
    color: #fff;
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 14px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    opacity: 0;
    pointer-events: none;
    transition: all .35s ease;
    z-index: 9999;
}

#toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
    .header {
        padding-top: 160px;
    }

    .header h1 {
        font-size: 26px;
    }

    .header p {
        font-size: 15px;
    }

    .islamic-frame {
        width: 90px;
        height: 120px;
        top: 20px;
    }

    .right-frame {
        right: 15px;
    }

    .left-frame {
        left: 15px;
    }

    .card {
        padding: 25px;
    }

    .bio-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .khatm-grid {
        flex-direction: column;
        align-items: center;
        gap: 40px;
    }
}