/* ===============================================
   Tamirul Ummah Madrasa Frontend Styles
   Modern Islamic Educational Theme
   =============================================== */

:root {
    /* Primary Color Scheme - Islamic Green */
    --primary-color: #10b981;
    --primary-dark: #059669;
    --primary-light: #34d399;

    /* Secondary Color Scheme - Navy Blue */
    --secondary-color: #1e3a8a;
    --secondary-dark: #1e40af;
    --secondary-light: #3b82f6;

    /* Accent Colors */
    --accent-gold: #f59e0b;
    --accent-orange: #ea580c;

    /* Neutral Colors */
    --text-dark: #1f2937;
    --text-muted: #6b7280;
    --bg-light: #f9fafb;
    --bg-white: #ffffff;
    --border-color: #e5e7eb;

    /* Spacing */
    --section-padding: 5rem 0;
    --card-padding: 2rem;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);

    /* Transitions */
    --transition-base: all 0.3s ease;
    --transition-fast: all 0.15s ease;
}

/* ===============================================
   GLOBAL STYLES
   =============================================== */

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

.section-padding {
    padding: var(--section-padding);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
    border-radius: 2px;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 3rem;
}

/* ===============================================
   NAVIGATION
   =============================================== */

.layout-navbar {
    background-color: var(--bg-white) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: var(--transition-base);
    padding: 0.75rem 0;
}

.layout-navbar.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color) !important;
    transition: var(--transition-fast);
}

.navbar-brand:hover {
    color: var(--primary-dark) !important;
}

.navbar-nav .nav-link {
    font-weight: 500;
    color: var(--text-dark) !important;
    padding: 0.5rem 1rem !important;
    margin: 0 0.25rem;
    border-radius: 8px;
    transition: var(--transition-fast);
    position: relative;
}

.navbar-nav .nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 80%;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition-fast);
}

.navbar-nav .nav-link:hover::before,
.navbar-nav .nav-link.active::before {
    transform: translateX(-50%) scaleX(1);
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--primary-color) !important;
    background-color: rgba(16, 185, 129, 0.05);
}

.dropdown-menu {
    border: none;
    box-shadow: var(--shadow-lg);
    border-radius: 12px;
    padding: 0.5rem;
    margin-top: 0.5rem;
}

.dropdown-item {
    border-radius: 8px;
    padding: 0.75rem 1rem;
    transition: var(--transition-fast);
}

.dropdown-item:hover {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--primary-color);
}

/* ===============================================
   HERO SECTION
   =============================================== */

.hero-carousel {
    position: relative;
    height: 600px;
    overflow: hidden;
}

.hero-carousel .carousel-item {
    height: 600px;
}

.hero-carousel .carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-carousel .carousel-caption {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    bottom: 0;
    left: 0;
    right: 0;
    padding: 3rem 1rem;
}

.hero-overlay {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    padding: 5rem 0;
}

.hero-overlay h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
}

/* ===============================================
   STATISTICS SECTION
   =============================================== */

.stats-card {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border-radius: 16px;
    padding: 2.5rem 2rem;
    text-align: center;
    transition: var(--transition-base);
    border: none;
    position: relative;
    overflow: hidden;
}

.stats-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    transition: var(--transition-base);
}

.stats-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.stats-card:hover::before {
    top: -30%;
    right: -30%;
}

.stats-card .stats-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.stats-card .stats-number {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stats-card .stats-label {
    font-size: 1.1rem;
    opacity: 0.95;
    font-weight: 500;
}

.stats-card.bg-success {
    background: linear-gradient(135deg, #10b981, #059669);
}

.stats-card.bg-primary {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.stats-card.bg-warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

/* ===============================================
   CARD COMPONENTS
   =============================================== */

.modern-card {
    border: none;
    border-radius: 16px;
    overflow: hidden;
    transition: var(--transition-base);
    box-shadow: var(--shadow-md);
    height: 100%;
}

.modern-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.modern-card .card-img-top {
    height: 250px;
    object-fit: cover;
    transition: var(--transition-base);
}

.modern-card:hover .card-img-top {
    transform: scale(1.05);
}

.modern-card .card-body {
    padding: 1.5rem;
}

.modern-card .card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
}

.modern-card .card-text {
    color: var(--text-muted);
    line-height: 1.6;
}

/* Teacher Cards */
.teacher-card {
    border: none;
    border-radius: 16px;
    overflow: hidden;
    transition: var(--transition-base);
    box-shadow: var(--shadow-md);
    background: white;
}

.teacher-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.teacher-card .teacher-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    transition: var(--transition-base);
}

.teacher-card:hover .teacher-image {
    transform: scale(1.05);
}

.teacher-card .card-body {
    padding: 1.5rem;
}

.teacher-card .teacher-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.teacher-card .teacher-designation {
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.teacher-card .teacher-subject {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Student Cards */
.student-card {
    border: none;
    border-radius: 12px;
    overflow: hidden;
    transition: var(--transition-base);
    box-shadow: var(--shadow-sm);
    background: white;
    text-align: center;
}

.student-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
}

.student-card .student-image {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 50%;
    margin: 1.5rem auto 1rem;
    border: 4px solid var(--primary-color);
}

/* Success Story Cards */
.story-card {
    border: none;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition-base);
    background: white;
}

.story-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.story-card .story-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.story-card .badge {
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
    font-weight: 500;
}

/* Notice Cards */
.notice-card {
    border-left: 4px solid var(--primary-color);
    border-radius: 8px;
    transition: var(--transition-base);
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.notice-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateX(5px);
}

.notice-card.featured {
    border-left-color: var(--accent-gold);
    background: linear-gradient(to right, rgba(245, 158, 11, 0.05), transparent);
}

.notice-date {
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    display: inline-block;
}

/* ===============================================
   BUTTONS
   =============================================== */

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border: none;
    padding: 0.75rem 2rem;
    font-weight: 600;
    border-radius: 10px;
    transition: var(--transition-base);
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
}

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 0.75rem 2rem;
    font-weight: 600;
    border-radius: 10px;
    transition: var(--transition-base);
}

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

.btn-secondary {
    background: linear-gradient(135deg, var(--secondary-color), var(--secondary-dark));
    border: none;
    padding: 0.75rem 2rem;
    font-weight: 600;
    border-radius: 10px;
}

/* ===============================================
   FOOTER
   =============================================== */

.footer {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    color: rgba(255, 255, 255, 0.8);
    padding: 3rem 0 1.5rem;
}

.footer h5 {
    color: white;
    font-weight: 600;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer h5::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--primary-color);
}

.footer a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: var(--transition-fast);
}

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

.footer .social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    margin-right: 0.75rem;
    transition: var(--transition-base);
}

.footer .social-links a:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-3px);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
    margin-top: 2rem;
}

/* ===============================================
   GALLERY
   =============================================== */

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

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    cursor: pointer;
    transition: var(--transition-base);
}

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

.gallery-item img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    transition: var(--transition-base);
}

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

.gallery-item .gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    opacity: 0;
    transition: var(--transition-base);
    display: flex;
    align-items: flex-end;
    padding: 1.5rem;
}

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

.gallery-overlay h5 {
    color: white;
    margin: 0;
}

/* ===============================================
   CONTACT FORM
   =============================================== */

.contact-form {
    background: white;
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
}

.contact-form .form-control,
.contact-form .form-select {
    border: 2px solid var(--border-color);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    transition: var(--transition-fast);
}

.contact-form .form-control:focus,
.contact-form .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.contact-info-card {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 2rem;
    border-radius: 16px;
    margin-bottom: 1.5rem;
}

.contact-info-card i {
    font-size: 2rem;
    margin-bottom: 1rem;
}

/* ===============================================
   ABOUT PAGE
   =============================================== */

.about-section {
    position: relative;
}

.about-image {
    border-radius: 16px;
    box-shadow: var(--shadow-xl);
    overflow: hidden;
}

.about-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mission-vision-card {
    background: white;
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.mission-vision-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: linear-gradient(to bottom, var(--primary-color), var(--primary-dark));
}

.mission-vision-card h3 {
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 1.5rem;
}

/* ===============================================
   PRINCIPAL PROFILE
   =============================================== */

.principal-profile {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.principal-image {
    width: 100%;
    height: 500px;
    object-fit: cover;
}

.principal-info {
    padding: 2.5rem;
}

.principal-quote {
    border-left: 4px solid var(--primary-color);
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: var(--text-muted);
}

/* ===============================================
   PAGINATION
   =============================================== */

.pagination {
    gap: 0.5rem;
}

.page-link {
    border: none;
    border-radius: 8px;
    color: var(--primary-color);
    font-weight: 600;
    padding: 0.5rem 1rem;
    transition: var(--transition-fast);
}

.page-link:hover {
    background: var(--primary-color);
    color: white;
}

.page-item.active .page-link {
    background: var(--primary-color);
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.3);
}

/* ===============================================
   BADGES
   =============================================== */

.badge {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 600;
}

.badge-primary {
    background: var(--primary-color);
}

.badge-success {
    background: #10b981;
}

.badge-warning {
    background: var(--accent-gold);
}

.badge-info {
    background: var(--secondary-light);
}

/* ===============================================
   LOADING ANIMATION
   =============================================== */

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(16, 185, 129, 0.2);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===============================================
   RESPONSIVE DESIGN
   =============================================== */

@media (max-width: 768px) {
    .hero-overlay h1 {
        font-size: 2rem;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .stats-card {
        margin-bottom: 1rem;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .navbar-nav .nav-link {
        padding: 0.75rem 1rem !important;
    }

    .contact-form {
        padding: 1.5rem;
    }
}

@media (max-width: 576px) {
    .hero-carousel {
        height: 400px;
    }

    .hero-carousel .carousel-item {
        height: 400px;
    }
}

/* ===============================================
   ANIMATIONS
   =============================================== */

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

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* ===============================================
   UTILITY CLASSES
   =============================================== */

.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
}

.bg-gradient-secondary {
    background: linear-gradient(135deg, var(--secondary-color), var(--secondary-dark));
}

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

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

.bg-light-primary {
    background-color: rgba(16, 185, 129, 0.1);
}

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

.shadow-custom {
    box-shadow: var(--shadow-lg);
}
