/* ========================================
   Custom CSS for Islamic Madrasa Website
   Colors inspired by the logo
======================================== */

:root {
    /* Primary colors from logo */
    --primary-green: #1a5632;
    --dark-green: #0f3d21;
    --light-green: #2d7a4c;
    --gold: #d4af37;
    --cream: #f5f0e8;
    --white: #ffffff;
    --text-dark: #2c3e50;
    --text-light: #6c757d;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans Bengali', sans-serif;
    color: var(--text-dark);
    line-height: 1.7;
    overflow-x: hidden;
}

/* ========================================
   Scrollbar Styling
======================================== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--cream);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-green);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--dark-green);
}

/* ========================================
   Top Bismillah Bar
======================================== */
.top-bismillah {
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--dark-green) 100%);
    padding: 10px 0;
    text-align: center;
    border-bottom: 3px solid var(--gold);
}

.bismillah-text {
    font-family: 'Noto Nastaliq Urdu', serif;
    font-size: 1rem;
    color: var(--gold);
    font-weight: 600;
    letter-spacing: 2px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.date-time-display,
.prayer-time-display {
    font-family: 'Noto Sans Bengali', sans-serif;
    font-size: 0.9rem;
    color: var(--white);
    font-weight: 500;
}

.date-time-display i,
.prayer-time-display i {
    margin-right: 5px;
    color: var(--gold);
}

@media (max-width: 767px) {
    .top-bismillah .d-flex {
        flex-direction: column;
        gap: 8px;
    }
    
    .date-time-display,
    .prayer-time-display {
        font-size: 0.75rem;
    }
    
    .bismillah-text {
        font-size: 0.9rem;
    }
}

/* ========================================
   Header Section
======================================== */
.main-header {
    background: linear-gradient(to bottom, var(--cream) 0%, #ffffff 100%);
    padding: 30px 0 20px;
    position: relative;
}

.header-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.logo-img {
    max-width: 200px;
    height: auto;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.15));
    transition: transform 0.3s ease;
}

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

.header-text-content {
    text-align: left;
}

/* Header Arabic Text */
.header-arabic {
    font-family: 'Noto Nastaliq Urdu', 'Traditional Arabic', 'Arabic Typesetting', 'Scheherazade New', serif;
    font-size: 1.96rem;
    color: var(--primary-green);
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 15px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
    text-align: right;
}

/* Header Bengali Title */
.header-title-bengali {
    font-family: 'Noto Sans Bengali', sans-serif;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-green);
    margin-bottom: 8px;
    line-height: 1.3;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    text-align: right;
}

/* Header English Title */
.header-title-english {
    font-family: 'Noto Sans Bengali', sans-serif;
    font-size: 2.09rem;
    font-weight: 600;
    color: var(--dark-green);
    margin-bottom: 8px;
    letter-spacing: 0.5px;
    text-align: right;
}

/* Header Address */
.header-address {
    font-family: 'Noto Sans Bengali', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-dark);
    background: linear-gradient(135deg, rgba(26, 86, 50, 0.05) 0%, rgba(212, 175, 55, 0.05) 100%);
    padding: 12px 80px;
    border-radius: 50px;
    display: inline-block;
    border: 2px solid rgba(26, 86, 50, 0.2);
    margin-top: 10px;
    margin-left: 55px;
    text-align: right;
}

.islamic-border {
    height: 60px;
    overflow: hidden;
    margin-top: 20px;
    opacity: 0.4;
}

.pattern-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* ========================================
   Navigation Menu
======================================== */
.navbar {
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--dark-green) 100%) !important;
    padding: 15px 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 1000;
}

.navbar-brand img {
    filter: brightness(0) invert(1);
}

.navbar-nav {
    gap: 5px;
}

.nav-link {
    color: var(--white) !important;
    font-weight: 500;
    padding: 10px 20px !important;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: var(--gold);
    transform: translateX(-50%);
    transition: width 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    background: rgba(255, 255, 255, 0.15);
    color: var(--gold) !important;
}

.nav-link:hover::before,
.nav-link.active::before {
    width: 80%;
}

.nav-link i {
    margin-right: 5px;
}

/* ========================================
   Hero Banner Section
======================================== */
.hero-banner {
    position: relative;
    min-height: 600px;
    overflow: hidden;
}

.banner-overlay {
    position: relative;
    width: 100%;
    height: 100%;
}

.banner-image {
    width: 100%;
    height: 600px;
    object-fit: cover;
    object-position: center;
    filter: brightness(0.5);
}

.banner-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    z-index: 2;
}

.banner-content h1 {
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.5);
    animation: fadeInDown 1s ease;
}

.banner-content p {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    animation: fadeInUp 1s ease 0.3s both;
}

.banner-buttons {
    animation: fadeInUp 1s ease 0.6s both;
}

.btn-primary {
    background: var(--primary-green);
    border: 2px solid var(--primary-green);
    color: var(--white);
    font-weight: 600;
    padding: 12px 30px;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: var(--dark-green);
    border-color: var(--dark-green);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(26, 86, 50, 0.3);
}

.btn-outline-light {
    border: 2px solid var(--white);
    color: var(--white);
    font-weight: 600;
    padding: 12px 30px;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.btn-outline-light:hover {
    background: var(--white);
    color: var(--primary-green);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(255, 255, 255, 0.3);
}

/* ========================================
   Quick Info Cards
======================================== */
.quick-info {
    background: var(--cream);
    margin-top: -50px;
    position: relative;
    z-index: 10;
}

.info-card {
    background: var(--white);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border-top: 4px solid var(--primary-green);
}

.info-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(26, 86, 50, 0.2);
}

.info-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--light-green) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.info-icon i {
    font-size: 2rem;
    color: var(--white);
}

.info-card h3 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-green);
    margin-bottom: 10px;
}

.info-card p {
    font-size: 1.1rem;
    color: var(--text-light);
    margin: 0;
}

/* ========================================
   Section Titles
======================================== */
.section-title {
    margin-bottom: 50px;
}

.subtitle {
    color: var(--gold);
    font-weight: 600;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    display: block;
    margin-bottom: 10px;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--primary-green);
    margin-bottom: 15px;
}

.title-border {
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-green) 0%, var(--gold) 100%);
    margin-top: 15px;
    border-radius: 2px;
}

/* ========================================
   About Section
======================================== */
.about-section {
    padding: 80px 0;
}

.about-image {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
}

.about-image img {
    border-radius: 15px;
}

.pattern-overlay {
    position: absolute;
    top: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%231a5632' fill-opacity='0.2'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.3;
    z-index: -1;
}

.about-features .feature-item {
    font-size: 1.1rem;
    padding: 10px 0;
    border-bottom: 1px solid rgba(26, 86, 50, 0.1);
}

.about-features .feature-item:last-child {
    border-bottom: none;
}

/* ========================================
   Registration Certificate Section
======================================== */
.certificate-section {
    padding: 50px 0;
    background: var(--cream);
}

.certificate-card {
    background: var(--white);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    text-align: center;
    border: 3px solid var(--gold);
    position: relative;
    overflow: hidden;
}

.certificate-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(212, 175, 55, 0.1), transparent);
    transform: rotate(45deg);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.certificate-icon {
    font-size: 4rem;
    color: var(--gold);
    text-shadow: 0 5px 15px rgba(212, 175, 55, 0.3);
}

.certificate-card h3 {
    color: var(--primary-green);
    font-weight: 700;
    font-size: 1.8rem;
}

.certificate-image-container {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.certificate-img {
    width: 100%;
    border-radius: 15px;
    transition: transform 0.3s ease;
}

.certificate-image-container:hover .certificate-img {
    transform: scale(1.02);
}

.certificate-overlay-btn {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.certificate-image-container:hover .certificate-overlay-btn {
    opacity: 1;
}

.certificate-info .info-box {
    background: linear-gradient(135deg, rgba(26, 86, 50, 0.05) 0%, rgba(212, 175, 55, 0.05) 100%);
    padding: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
    border-left: 4px solid var(--primary-green);
    transition: all 0.3s ease;
}

.certificate-info .info-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(26, 86, 50, 0.15);
}

.certificate-info .info-box i {
    font-size: 2rem;
    color: var(--gold);
}

.certificate-info .info-box h6 {
    color: var(--primary-green);
    font-weight: 700;
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.certificate-info .info-box p {
    color: var(--text-dark);
    margin: 0;
    font-weight: 600;
}

/* ========================================
   Courses Section
======================================== */
.courses-section {
    padding: 80px 0;
}

.course-card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    height: 100%;
    border: 2px solid transparent;
}

.course-card:hover {
    border-color: var(--primary-green);
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(26, 86, 50, 0.15);
}

.course-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--light-green) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
}

.course-icon i {
    font-size: 2.5rem;
    color: var(--white);
}

.course-card h3 {
    font-size: 1.5rem;
    color: var(--primary-green);
    margin-bottom: 15px;
    font-weight: 700;
}

.course-card p {
    color: var(--text-light);
    margin-bottom: 20px;
}

.course-features {
    list-style: none;
    padding: 0;
}

.course-features li {
    padding: 8px 0;
    color: var(--text-dark);
    border-bottom: 1px dashed rgba(26, 86, 50, 0.2);
}

.course-features li:last-child {
    border-bottom: none;
}

.course-features i {
    color: var(--primary-green);
    margin-right: 10px;
}

/* ========================================
   Teachers Section
======================================== */
.teachers-section {
    padding: 80px 0;
}

.teacher-card {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.teacher-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(26, 86, 50, 0.15);
}

.teacher-img {
    position: relative;
    overflow: hidden;
    height: 300px;
}

.teacher-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.teacher-card:hover .teacher-img img {
    transform: scale(1.1);
}

.teacher-info {
    padding: 25px;
}

.teacher-info h4 {
    color: var(--primary-green);
    font-weight: 700;
    margin-bottom: 5px;
}

/* ========================================
   Facilities Section
======================================== */
.facilities-section {
    padding: 80px 0;
}

.facility-card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    text-align: center;
    height: 100%;
    border-top: 4px solid var(--primary-green);
}

.facility-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(26, 86, 50, 0.15);
}

.facility-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--light-green) 100%);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
}

.facility-icon i {
    font-size: 2.5rem;
    color: var(--white);
}

.facility-card h4 {
    color: var(--primary-green);
    font-weight: 700;
    margin-bottom: 15px;
}

.facility-card p {
    color: var(--text-light);
    margin: 0;
}

/* ========================================
   Gallery Section
======================================== */
.gallery-section {
    padding: 80px 0;
}

.gallery-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    height: 300px;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 86, 50, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay i {
    font-size: 3rem;
    color: var(--white);
}

/* ========================================
   Contact Section
======================================== */
.contact-section {
    padding: 80px 0;
}

.contact-info {
    background: var(--white);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    height: 100%;
}

.info-item {
    display: flex;
    gap: 20px;
}

.info-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--light-green) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.info-icon i {
    font-size: 1.5rem;
    color: var(--white);
}

.info-content h5 {
    color: var(--primary-green);
    font-weight: 700;
    margin-bottom: 10px;
}

.info-content p {
    color: var(--text-light);
    margin: 0;
}

.contact-form {
    background: var(--white);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.contact-form .form-control {
    border: 2px solid #e0e0e0;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.contact-form .form-control:focus {
    border-color: var(--primary-green);
    box-shadow: 0 0 0 0.2rem rgba(26, 86, 50, 0.15);
}

/* ========================================
   Footer
======================================== */
.footer {
    background: linear-gradient(135deg, var(--dark-green) 0%, var(--primary-green) 100%);
    color: var(--white);
}

.footer-widget h4,
.footer-widget h5,
.footer-widget h6 {
    color: var(--gold);
    margin-bottom: 20px;
    font-weight: 700;
}

.footer-logo {
    filter: brightness(0) invert(1);
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: var(--white);
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.footer-links a:hover {
    color: var(--gold);
    padding-left: 5px;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-link {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.3rem;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: var(--gold);
    color: var(--dark-green);
    transform: translateY(-5px);
}

.prayer-times {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 10px;
    margin-top: 10px;
}

/* ========================================
   Scroll to Top Button
======================================== */
.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--light-green) 100%);
    color: var(--white);
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 20px rgba(26, 86, 50, 0.3);
    transition: all 0.3s ease;
    z-index: 999;
}

.scroll-top:hover {
    background: var(--dark-green);
    transform: translateY(-5px);
}

.scroll-top.show {
    display: flex;
}

/* ========================================
   Animations
======================================== */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   Responsive Design
======================================== */
@media (max-width: 991px) {
    .logo-img {
        max-width: 150px;
    }

    .bismillah-text {
        font-size: 1.3rem;
    }

    .header-arabic {
        font-size: 1.1rem;
    }

    .header-title-bengali {
        font-size: 2rem;
    }

    .header-title-english {
        font-size: 1.2rem;
    }

    .header-address {
        font-size: 0.95rem;
        padding: 10px 20px;
    }

    .section-title h2 {
        font-size: 2rem;
    }

    .banner-content h1 {
        font-size: 2.5rem !important;
    }

    .nav-link {
        padding: 10px 15px !important;
    }
}

@media (max-width: 767px) {
    .logo-img {
        max-width: 120px;
    }

    .bismillah-text {
        font-size: 1.1rem;
    }

    .header-arabic {
        font-size: 0.95rem;
        padding: 0 10px;
    }

    .header-title-bengali {
        font-size: 1.6rem;
        padding: 0 15px;
    }

    .header-title-english {
        font-size: 1rem;
    }

    .header-address {
        font-size: 0.85rem;
        padding: 8px 15px;
        margin: 0 10px;
    }

    .banner-content h1 {
        font-size: 2rem !important;
    }

    .section-title h2 {
        font-size: 1.7rem;
    }

    .info-card h3 {
        font-size: 2rem;
    }

    .course-card,
    .facility-card {
        padding: 30px 20px;
    }

    .scroll-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 575px) {
    .banner-image {
        height: 400px;
    }

    .hero-banner {
        min-height: 400px;
    }

    .btn-lg {
        padding: 10px 20px;
        font-size: 0.95rem;
    }

    .header-title-bengali {
        font-size: 1.4rem;
    }

    .header-title-english {
        font-size: 0.9rem;
    }

    .header-arabic {
        font-size: 0.85rem;
    }

    .header-address {
        font-size: 0.75rem;
        padding: 6px 12px;
    }
}
