﻿/* ============================================
   MADRASA FAYZULULOOM AL-ASHRAFIA - IMPROVED CSS
   Larger fonts, better spacing, modern Islamic design
   ============================================ */

/* Root Variables - Islamic Color Palette */
:root {
    --primary-dark: #0a5c36;
    --primary: #1a7d4a;
    --primary-light: #e8f5ed;
    --secondary: #d4a017;
    --secondary-dark: #b8860b;
    --gold: #f5c542;
    --accent: #2d6a4f;
    --bg-cream: #fefcf7;
    --bg-offwhite: #f9f7f2;
    --text-dark: #1f2937;
    --text-medium: #4b5563;
    --text-light: #6c757d;
    --border: #e2dccd;
    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 16px 32px rgba(0, 0, 0, 0.12);
    --radius-sm: 12px;
    --radius-md: 20px;
    --radius-lg: 28px;
}

/* ========== BASE STYLES - ENLARGED FONTS ========== */
body {
    font-family: 'Kalpurush', 'SolaimanLipi', 'SiyamRupali', 'Nikosh', Arial, sans-serif;
    background-color: var(--bg-cream);
    color: var(--text-dark);
    line-height: 1.7;
    font-size: 18px;
    background-image: radial-gradient(#e6dfd1 0.8px, transparent 0.8px);
    background-size: 24px 24px;
}

/* Bengali Text Styling */
.bengali-text, p, li, span:not(.special) {
    font-family: 'Kalpurush', 'SolaimanLipi', Arial, sans-serif;
    font-size: 18px;
    line-height: 1.8;
    letter-spacing: 0.3px;
}

/* Headings - Larger Sizes */
h1, .h1 {
    font-size: 42px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 20px;
    color: var(--primary-dark);
}

h2, .h2 {
    font-size: 36px;
    font-weight: 600;
    line-height: 1.35;
    margin-bottom: 18px;
    color: var(--primary-dark);
}

h3, .h3 {
    font-size: 28px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 16px;
}

h4, .h4 {
    font-size: 24px;
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: 12px;
}

/* Container Width */
.container {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 0 30px;
}

/* ========== TOP BAR ========== */
.top-bar {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: white;
    padding: 14px 0;
    font-size: 16px;
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.top-bar .quote-text {
    font-size: 17px;
    font-style: italic;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.top-bar i {
    margin-right: 8px;
    font-size: 16px;
}

/* ========== MAIN HEADER ========== */
.main-header {
    background: white;
    padding: 25px 0;
    border-bottom: 2px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.header-grid {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 25px;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo-img {
    width: 85px;
    height: auto;
    transition: transform 0.3s ease;
}

.logo-img:hover {
    transform: scale(1.05);
}

.madrasa-title h1 {
    font-size: 32px;
    margin-bottom: 5px;
    color: var(--primary-dark);
}

.madrasa-title .arabic-name {
    font-family: 'Amiri', serif;
    font-size: 18px;
    color: var(--secondary-dark);
    direction: rtl;
}

.info-badge {
    display: flex;
    gap: 30px;
    background: var(--bg-offwhite);
    padding: 12px 25px;
    border-radius: 60px;
    box-shadow: var(--shadow-sm);
}

.info-badge div {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    color: var(--primary-dark);
    font-weight: 500;
}

.info-badge i {
    font-size: 20px;
    color: var(--secondary);
}

/* ========== NAVIGATION - MODERN ISLAMIC STYLE ========== */
.navbar {
    background: white;
    box-shadow: var(--shadow-md);
    border-top: 2px solid var(--secondary);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.nav-menu li {
    position: relative;
}

.nav-menu a {
    display: block;
    padding: 18px 22px;
    font-weight: 600;
    color: var(--text-dark);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 18px;
    letter-spacing: 0.5px;
    border-radius: var(--radius-sm);
    position: relative;
}

.nav-menu a:hover {
    color: var(--secondary);
    background: linear-gradient(135deg, var(--primary-light), #fef5e8);
}

.nav-menu .active a {
    color: var(--secondary);
    background: linear-gradient(135deg, var(--primary-light), #fef5e8);
}

.nav-menu .active a::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 35px;
    height: 3px;
    background: var(--secondary);
    border-radius: 3px;
}

/* Dropdown Menu - Modern Style */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 280px;
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-md);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    border: none;
    z-index: 100;
    padding: 12px 0;
    transform: translateY(20px);
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(5px);
}

.dropdown-menu li {
    display: block;
}

.dropdown-menu li a {
    padding: 14px 28px;
    font-size: 17px;
    font-weight: 500;
    transition: all 0.25s;
    border-radius: 0;
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
}

.dropdown-menu li a:before {
    content: "";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 8px;
    color: var(--secondary);
    opacity: 0;
    transition: all 0.25s;
}

.dropdown-menu li a:hover:before {
    opacity: 1;
    margin-right: 8px;
}

.dropdown-menu li a:hover {
    background: linear-gradient(95deg, var(--primary-light), #fef5e8);
    padding-left: 35px;
    color: var(--primary-dark);
}

/* Mobile Toggle */
.mobile-toggle {
    display: none;
    font-size: 28px;
    background: none;
    border: none;
    color: var(--primary-dark);
    cursor: pointer;
    padding: 10px;
}

/* ========== HERO BANNER ========== */
.hero-banner {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    padding: 80px 0;
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-banner::before {
    content: "ﷲ";
    font-family: 'Amiri', serif;
    font-size: 200px;
    position: absolute;
    opacity: 0.08;
    right: 20px;
    bottom: -40px;
}

.hero-banner::after {
    content: "ﷺ";
    font-family: 'Amiri', serif;
    font-size: 160px;
    position: absolute;
    opacity: 0.08;
    left: 20px;
    top: -30px;
}

.hero-banner h2 {
    font-size: 48px;
    margin-bottom: 25px;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.hero-banner p {
    font-size: 22px;
    max-width: 750px;
    margin: 0 auto 35px;
    opacity: 0.95;
}

.hero-banner .btn-learn {
    background: white;
    color: var(--primary-dark);
    padding: 12px 35px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 18px;
    display: inline-block;
    transition: all 0.3s;
}

.hero-banner .btn-learn:hover {
    background: var(--secondary);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

/* ========== SECTION STYLES ========== */
.section {
    padding: 80px 0;
}

.section-alt {
    background-color: var(--bg-offwhite);
}

.section-title {
    text-align: center;
    font-size: 42px;
    margin-bottom: 60px;
    color: var(--primary-dark);
    position: relative;
    font-weight: 700;
}

.section-title i {
    color: var(--secondary);
    margin-right: 12px;
}

.section-title:after {
    content: '';
    display: block;
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, var(--secondary), var(--primary));
    margin: 20px auto 0;
    border-radius: 4px;
}

/* About Section */
.about-grid {
    display: flex;
    gap: 50px;
    align-items: center;
    flex-wrap: wrap;
}

.about-img {
    flex: 1;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.about-img img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

.about-img:hover img {
    transform: scale(1.03);
}

.about-text {
    flex: 1;
}

.about-text h3 {
    font-size: 34px;
    color: var(--primary-dark);
    margin-bottom: 25px;
}

.about-text h3 i {
    color: var(--secondary);
    margin-right: 12px;
}

.about-text p {
    font-size: 18px;
    margin-bottom: 20px;
    text-align: justify;
}

.about-text .btn-learn {
    background: var(--primary);
    color: white;
    padding: 10px 28px;
    border-radius: 40px;
    text-decoration: none;
    display: inline-block;
    margin-top: 10px;
    transition: all 0.3s;
    font-weight: 600;
}

.about-text .btn-learn:hover {
    background: var(--secondary);
    transform: translateY(-2px);
}

/* Flip Cards - Departments */
.dept-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 35px;
}

.flip-card {
    background-color: transparent;
    height: 320px;
    perspective: 1000px;
}

.flip-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
}

.flip-card:hover .flip-inner {
    transform: rotateY(180deg);
}

.front, .back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: var(--radius-md);
    padding: 35px 25px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.front {
    background: white;
    border: 1px solid var(--border);
}

.front i {
    font-size: 58px;
    color: var(--primary);
    margin-bottom: 25px;
}

.front h3 {
    font-size: 26px;
    margin-bottom: 15px;
    color: var(--primary-dark);
}

.front p {
    font-size: 16px;
    color: var(--text-medium);
}

.back {
    background: linear-gradient(145deg, var(--primary-dark), var(--primary));
    color: white;
    transform: rotateY(180deg);
}

.back p {
    font-size: 18px;
    margin-bottom: 25px;
    line-height: 1.6;
}

.back a {
    color: white;
    background: rgba(255,255,255,0.2);
    padding: 12px 28px;
    border-radius: 40px;
    text-decoration: none;
    font-weight: 600;
    font-size: 17px;
    transition: all 0.3s;
}

.back a:hover {
    background: var(--secondary);
    color: white;
    transform: translateY(-2px);
}

/* Services Cards */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
    max-width: 900px;
    margin: 0 auto;
}

.service-card {
    background: white;
    padding: 45px 30px;
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    border-bottom: 4px solid var(--primary-light);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-bottom-color: var(--secondary);
}

.service-card i {
    font-size: 58px;
    color: var(--primary);
    margin-bottom: 25px;
}

.service-card h4 {
    font-size: 26px;
    margin-bottom: 18px;
    color: var(--primary-dark);
    font-weight: 600;
}

.service-card p {
    font-size: 17px;
    color: var(--text-medium);
    line-height: 1.7;
}

/* Counter Section */
.counter-section {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: white;
    padding: 70px 0;
    position: relative;
}

.counter-section::before {
    content: "ﷲ";
    font-family: 'Amiri', serif;
    font-size: 140px;
    position: absolute;
    opacity: 0.05;
    right: 30px;
    bottom: 10px;
}

.counter-grid {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 40px;
    text-align: center;
}

.counter-item h3 {
    font-size: 54px;
    font-weight: 800;
    margin-bottom: 15px;
    color: var(--gold);
}

.counter-item p {
    font-size: 22px;
    font-weight: 500;
}

.counter-item p i {
    margin-right: 8px;
}

/* Contact Section */
.contact-grid {
    display: flex;
    gap: 50px;
    flex-wrap: wrap;
}

.contact-form, .contact-map {
    flex: 1;
    background: white;
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
}

.contact-form h3, .contact-map h3 {
    font-size: 30px;
    color: var(--primary-dark);
    margin-bottom: 25px;
}

.contact-form h3 i, .contact-map h3 i {
    color: var(--secondary);
    margin-right: 12px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 17px;
}

input, textarea, select {
    width: 100%;
    padding: 16px 22px;
    border: 2px solid var(--border);
    border-radius: 50px;
    font-family: 'Kalpurush', 'SolaimanLipi', Arial, sans-serif;
    font-size: 17px;
    background: white;
    transition: all 0.3s;
}

input:focus, textarea:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(26, 125, 74, 0.1);
}

textarea {
    border-radius: 25px;
    min-height: 130px;
}

button, .btn-submit {
    background: var(--primary);
    color: white;
    border: none;
    padding: 14px 45px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s;
}

button:hover, .btn-submit:hover {
    background: var(--secondary);
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0,0,0,0.2);
}

/* Footer */
.footer {
    background: #0a1f18;
    color: #e0e0e0;
    padding: 60px 0 35px;
    margin-top: 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 50px;
    margin-bottom: 50px;
}

.footer h4 {
    font-size: 24px;
    color: white;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 12px;
}

.footer h4:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--secondary);
}

.footer p, .footer a {
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 12px;
}

.footer a {
    color: #ccc;
    text-decoration: none;
    transition: all 0.3s;
}

.footer a:hover {
    color: var(--secondary);
    padding-left: 5px;
}

.social-icons {
    margin-top: 20px;
}

.social-icons a {
    display: inline-block;
    margin-right: 18px;
    font-size: 28px;
    transition: transform 0.3s;
}

.social-icons a:hover {
    transform: translateY(-3px);
    color: var(--secondary);
}

.copyright {
    text-align: center;
    padding-top: 35px;
    border-top: 1px solid #2a3a34;
    font-size: 16px;
}

/* ========== RESPONSIVE ADJUSTMENTS ========== */
@media (max-width: 992px) {
    body {
        font-size: 16px;
    }
    
    h1 { font-size: 36px; }
    h2 { font-size: 32px; }
    h3 { font-size: 26px; }
    
    .nav-menu {
        display: none;
        width: 100%;
        flex-direction: column;
        background: white;
        padding: 20px;
    }
    .nav-menu.active {
        display: flex;
    }
    .mobile-toggle {
        display: block;
        position: absolute;
        left: 20px;
        top: 12px;
    }
    .nav-container {
        justify-content: center;
        position: relative;
    }
    .dropdown-menu {
        position: static;
        box-shadow: none;
        padding-left: 25px;
        opacity: 1;
        visibility: visible;
        display: none;
        transform: none;
        width: 100%;
    }
    .dropdown:hover .dropdown-menu {
        display: block;
    }
    .hero-banner h2 {
        font-size: 36px;
    }
    .hero-banner p {
        font-size: 18px;
    }
    .section-title {
        font-size: 34px;
    }
    .info-badge {
        display: none;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }
    
    .section {
        padding: 50px 0;
    }
    
    h1 { font-size: 30px; }
    h2 { font-size: 28px; }
    h3 { font-size: 24px; }
    
    .hero-banner {
        padding: 50px 0;
    }
    .hero-banner h2 {
        font-size: 28px;
    }
    .hero-banner p {
        font-size: 16px;
    }
    
    .counter-item h3 {
        font-size: 38px;
    }
    .counter-item p {
        font-size: 18px;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .madrasa-title h1 {
        font-size: 22px;
    }
    .logo-img {
        width: 60px;
    }
}

@media (max-width: 480px) {
    .madrasa-title h1 {
        font-size: 18px;
    }
    .madrasa-title .arabic-name {
        font-size: 12px;
    }
    .logo-img {
        width: 50px;
    }
    .section-title {
        font-size: 28px;
    }
    .front i {
        font-size: 44px;
    }
    .front h3 {
        font-size: 22px;
    }
    .hero-banner .btn-learn {
        font-size: 15px;
        padding: 10px 25px;
    }
}

/* ========== UTILITY CLASSES ========== */
.text-center { text-align: center; }
.text-primary { color: var(--primary); }
.text-secondary { color: var(--secondary); }
.mb-20 { margin-bottom: 20px; }
.mt-20 { margin-top: 20px; }
.mb-30 { margin-bottom: 30px; }
.mt-30 { margin-top: 30px; }

.shadow-hover {
    transition: box-shadow 0.3s;
}
.shadow-hover:hover {
    box-shadow: var(--shadow-lg);
}

/* Animation for counters */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section {
    animation: fadeInUp 0.6s ease-out;
}

/* Islamic Geometric Pattern Background for specific sections */
.islamic-pattern-bg {
    position: relative;
    overflow: hidden;
}

.islamic-pattern-bg::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' opacity='0.03'%3E%3Cpath fill='none' stroke='%230a5c36' stroke-width='0.5' d='M50 5 L95 27.5 L95 72.5 L50 95 L5 72.5 L5 27.5 Z'/%3E%3Cpath fill='none' stroke='%230a5c36' stroke-width='0.5' d='M50 15 L85 32.5 L85 67.5 L50 85 L15 67.5 L15 32.5 Z'/%3E%3C/svg%3E");
    background-repeat: repeat;
    pointer-events: none;
}