/* ===== ROOT VARIABLES ===== */
:root {
    --primary-color: #1a7a4f;
    --secondary-color: #d4af37;
    --dark-color: #1a3a2e;
    --light-color: #f8f9fa;
    --text-dark: #2c3e50;
    --text-light: #6c757d;
    --shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
    --gradient-primary: linear-gradient(135deg, #1a7a4f 0%, #2d9a66 100%);
    --gradient-secondary: linear-gradient(135deg, #d4af37 0%, #f0c552 100%);
}

/* ===== GLOBAL STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Bangla font for Bangla text */
.bn-text,
.brand-name-bn,
[lang="bn"] {
    font-family: 'Hind Siliguri', sans-serif;
}

html {
    scroll-behavior: smooth;
}

/* ===== ADMISSION MODAL STYLES ===== */
.admission-modal-content {
    border: none;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.btn-close-custom {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 10;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.btn-close-custom:hover {
    background: #ff4444;
    color: white;
    transform: rotate(90deg) scale(1.1);
}

.btn-close-custom i {
    font-size: 18px;
}

.admission-banner {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    padding: 40px 30px 30px;
    position: relative;
    overflow: hidden;
}

.admission-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        repeating-linear-gradient(45deg, transparent, transparent 35px, rgba(26, 122, 79, 0.02) 35px, rgba(26, 122, 79, 0.02) 70px),
        repeating-linear-gradient(-45deg, transparent, transparent 35px, rgba(212, 175, 55, 0.02) 35px, rgba(212, 175, 55, 0.02) 70px);
    pointer-events: none;
}

.admission-header {
    position: relative;
    z-index: 1;
    margin-bottom: 25px;
}

.admission-badge {
    display: inline-block;
    margin-bottom: 15px;
}

.badge-circle {
    display: inline-block;
    background: linear-gradient(135deg, #ff6b6b 0%, #ff8e53 100%);
    color: white;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 6px 20px rgba(255, 107, 107, 0.6);
    }
}

.rotating {
    animation: pulse 2s infinite, colorShift 3s infinite;
}

@keyframes colorShift {

    0%,
    100% {
        background: linear-gradient(135deg, #ff6b6b 0%, #ff8e53 100%);
    }

    50% {
        background: linear-gradient(135deg, #ff8e53 0%, #ffd93d 100%);
    }
}

.school-name-modal {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.tagline-modal {
    font-size: 1.1rem;
    color: var(--secondary-color);
    font-weight: 600;
    font-style: italic;
    margin-bottom: 0;
}

.admission-features {
    margin: 25px 0;
    position: relative;
    z-index: 1;
}

.feature-tag {
    padding: 12px 15px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.85rem;
    text-align: center;
    color: white;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.feature-tag:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.25);
}

.feature-tag i {
    display: inline-block;
}

.feature-tag-purple {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.feature-tag-pink {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.feature-tag-green {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.feature-tag-blue {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.feature-tag-yellow {
    background: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
}

.nctb-badge {
    background: linear-gradient(135deg, #ff9a56 0%, #ff6b6b 50%, #ffd93d 100%);
    border-radius: 15px;
    padding: 20px;
    margin: 25px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    box-shadow: 0 5px 20px rgba(255, 107, 107, 0.3);
    position: relative;
    z-index: 1;
}

.nctb-stamp {
    width: 90px;
    height: 90px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px dashed var(--primary-color);
    animation: rotate 20s linear infinite;
    flex-shrink: 0;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.stamp-inner {
    text-align: center;
    font-weight: 900;
    font-size: 0.9rem;
    color: var(--primary-color);
    line-height: 1.2;
    text-transform: uppercase;
}

.nctb-text {
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.admission-contact {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-top: 25px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1;
}

.contact-details p {
    font-size: 1rem;
    color: var(--text-dark);
    font-weight: 500;
}

.contact-details a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.contact-details a:hover {
    color: var(--secondary-color);
}

.btn-admission {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(26, 122, 79, 0.3);
}

.btn-admission:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(26, 122, 79, 0.5);
    color: white;
}

.modal-logo {
    position: absolute;
    bottom: 15px;
    left: 15px;
    width: 60px;
    height: 60px;
    opacity: 0.3;
}

.modal-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Modal Animation */
.modal.fade .modal-dialog {
    transform: scale(0.7) rotateX(45deg);
    transition: all 0.4s ease;
}

.modal.show .modal-dialog {
    transform: scale(1) rotateX(0deg);
}

/* Responsive Modal */
@media (max-width: 768px) {
    .admission-banner {
        padding: 30px 20px 20px;
    }

    .school-name-modal {
        font-size: 1.2rem;
    }

    .tagline-modal {
        font-size: 0.95rem;
    }

    .badge-circle {
        font-size: 0.9rem;
        padding: 10px 20px;
    }

    .feature-tag {
        font-size: 0.75rem;
        padding: 10px 8px;
    }

    .feature-tag i {
        font-size: 0.9rem;
    }

    .nctb-badge {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
    }

    .nctb-stamp {
        width: 70px;
        height: 70px;
    }

    .stamp-inner {
        font-size: 0.75rem;
    }

    .nctb-text {
        font-size: 0.9rem;
    }

    .btn-admission {
        width: 100%;
        margin-top: 10px;
    }

    .modal-logo {
        width: 40px;
        height: 40px;
    }
}

/* ===== CUSTOM SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 10px;
}

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

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

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

/* ===== UTILITY CLASSES ===== */
.bg-primary-soft {
    background-color: rgba(26, 122, 79, 0.1);
}

.text-primary {
    color: var(--primary-color) !important;
}

.btn-primary {
    background: var(--gradient-primary);
    border: none;
    padding: 12px 30px;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    background: linear-gradient(135deg, #2d9a66 0%, #1a7a4f 100%);
}

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.section-badge {
    display: inline-block;
}

/* ===== NAVIGATION BAR ===== */
.navbar {
    transition: all 0.3s ease;
    padding: 15px 0;
}

.navbar.scrolled {
    box-shadow: var(--shadow);
}

.logo-img {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.brand-name-en {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-color);
}

.brand-name-bn {
    font-size: 0.85rem;
    color: var(--text-light);
}

.navbar-nav .nav-link {
    font-weight: 500;
    color: var(--text-dark);
    margin: 0 10px;
    transition: color 0.3s ease;
    position: relative;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--primary-color);
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

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

.language-toggle {
    border-radius: 25px;
    padding: 8px 20px;
}

/* ===== HERO SECTION ===== */
.hero-section {
    position: relative;
    min-height: 100vh;
    background: linear-gradient(135deg, #1a7a4f 0%, #2d9a66 50%, #1a3a2e 100%);
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.islamic-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        repeating-linear-gradient(45deg, transparent, transparent 35px, rgba(212, 175, 55, 0.05) 35px, rgba(212, 175, 55, 0.05) 70px),
        repeating-linear-gradient(-45deg, transparent, transparent 35px, rgba(212, 175, 55, 0.05) 35px, rgba(212, 175, 55, 0.05) 70px);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-logo {
    width: 180px;
    height: 180px;
    object-fit: contain;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

.hero-buttons .btn {
    margin: 5px;
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.animate-bounce {
    animation: bounce 2s infinite;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* ===== ABOUT SECTION ===== */
#about {
    position: relative;
    z-index: 10;
}

.feature-box {
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.feature-box:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.icon-box i {
    transition: transform 0.3s ease;
}

.feature-box:hover .icon-box i {
    transform: scale(1.2);
}

/* ===== PROGRAMS SECTION ===== */
#programs {
    position: relative;
    z-index: 10;
}

.program-card {
    background: white;
    border-radius: 15px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.program-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.program-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    background: rgba(26, 122, 79, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.program-card:hover .program-icon {
    background: var(--gradient-primary);
}

.program-card:hover .program-icon i {
    color: white !important;
    transform: scale(1.2);
}

.program-icon i {
    transition: all 0.3s ease;
}

/* ===== GALLERY SECTION ===== */
#gallery {
    position: relative;
    z-index: 10;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    cursor: pointer;
}

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

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

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    padding: 20px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

/* ===== CONTACT SECTION ===== */
#contact {
    position: relative;
    z-index: 10;
}

.contact-info-box {
    transition: all 0.3s ease;
}

.contact-info-box:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.contact-icon {
    width: 60px;
    height: 60px;
    background: rgba(26, 122, 79, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.map-wrapper {
    height: 550px;
}

.map-wrapper iframe {
    width: 100%;
    height: 100%;
}

/* ===== FOOTER ===== */
footer {
    background: linear-gradient(135deg, #1a3a2e 0%, #0d1f19 100%);
}

.footer-logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

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

.footer-links a,
.footer-contact {
    transition: all 0.3s ease;
}

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

.social-icons a {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.social-icons a:hover {
    background: var(--secondary-color);
    transform: translateY(-3px);
}

/* ===== BACK TO TOP BUTTON ===== */
.btn-floating {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
}

.btn-floating:hover {
    transform: translateY(-5px);
}

.btn-floating.show {
    display: flex;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* ===== RESPONSIVE STYLES ===== */
@media (max-width: 991px) {
    .navbar-brand {
        font-size: 0.9rem;
    }

    .logo-img {
        width: 40px;
        height: 40px;
    }

    .brand-name-en {
        font-size: 0.85rem;
    }

    .brand-name-bn {
        font-size: 0.75rem;
    }

    .navbar-nav .nav-link {
        margin: 5px 0;
    }

    .hero-section {
        padding-top: 80px;
    }

    .hero-logo {
        width: 120px;
        height: 120px;
    }

    .display-3 {
        font-size: 2rem;
    }

    .display-5 {
        font-size: 1.8rem;
    }
}

@media (max-width: 767px) {
    .hero-logo {
        width: 100px;
        height: 100px;
    }

    .display-3 {
        font-size: 1.5rem;
    }

    .display-5 {
        font-size: 1.5rem;
    }

    .lead {
        font-size: 1rem;
    }

    .program-card {
        margin-bottom: 20px;
    }

    .gallery-item img {
        height: 250px;
    }

    .map-wrapper {
        height: 350px;
    }

    .btn-floating {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 575px) {
    .hero-section {
        min-height: auto;
        padding: 100px 0 50px;
    }

    .hero-logo {
        width: 80px;
        height: 80px;
    }

    .display-3 {
        font-size: 1.3rem;
    }

    .h3 {
        font-size: 1.1rem;
    }

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

    .program-icon {
        width: 60px;
        height: 60px;
    }

    .program-icon i {
        font-size: 1.5rem !important;
    }

    .contact-icon {
        width: 50px;
        height: 50px;
    }
}

/* ===== PRINT STYLES ===== */
@media print {

    .navbar,
    .btn-floating,
    .hero-buttons,
    .language-toggle {
        display: none !important;
    }

    .hero-section {
        min-height: auto;
        padding: 50px 0;
    }
}

/* ===== ACCESSIBILITY ===== */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-color);
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-to-content:focus {
    top: 0;
}

/* Focus styles for keyboard navigation */
a:focus,
button:focus,
input:focus,
textarea:focus {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
}

/* ===== LOADING ANIMATION ===== */
.loading {
    opacity: 0;
    animation: fadeIn 0.5s ease forwards;
}

/* ===== CUSTOM BADGES ===== */
.badge {
    font-weight: 500;
    letter-spacing: 0.5px;
    border-radius: 20px;
}

/* ===== IMAGE OPTIMIZATIONS ===== */
img {
    max-width: 100%;
    height: auto;
}

/* ===== SMOOTH TRANSITIONS ===== */
* {
    transition: color 0.3s ease, background-color 0.3s ease;
}

/* ===== ISLAMIC DECORATIVE ELEMENTS ===== */
.section-badge::before {
    content: '✦';
    color: var(--secondary-color);
    margin-right: 8px;
}

.section-badge::after {
    content: '✦';
    color: var(--secondary-color);
    margin-left: 8px;
}