/* ========================================
   Abu Taw Haa Adnan - Main Stylesheet
======================================== */

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

html,
body {
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', sans-serif;
    background: #f8f9fa;
    min-height: 100vh;

    /* ALL PAGES — clear fixed navbar */
    padding-top: 40px !important;
}


/* ========================================
   HOME / INDEX PAGE
   No body padding — hero touches navbar
======================================== */

body.home-page {
    padding-top: 0 !important;
}


/* ========================================
   REMOVE UNWANTED PSEUDO ELEMENTS
======================================== */

body::before,
body::after,
nav::before,
nav::after,
main::before,
main::after {
    display: none !important;
    content: none !important;
}


/* ========================================
   NAVBAR
======================================== */

.navbar.fixed-top {
    top: 0 !important;
    margin-top: 0 !important;
}


/* ========================================
   MAIN
======================================== */

main {
    margin: 0 !important;
    padding: 0 !important;
}


/* ========================================
   HOME HERO
======================================== */

body.home-page .hero-section {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* ========== PROFESSIONAL NAVBAR ========== */

.navbar {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 9999;

    padding: 14px 0;
    margin: 0 !important;
    border: none !important;

    background: transparent !important;
    box-shadow: none !important;

    transition: all 0.35s ease-in-out;
}

/* ========== NAVBAR WHEN SCROLLED ========== */


.navbar.scrolled {
    padding: 9px 0;

    background: linear-gradient(
        135deg,
        #0F2A43 0%,
        #155E75 50%,
        #071A2B 100%
    ) !important;

    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.18) !important;

    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}


/* ========== NAVBAR BRAND ========== */

.navbar-brand {
    font-size: 1.5rem;

    font-weight: 800;

    letter-spacing: 0.3px;

    color: #150101 !important;

    text-shadow: 0 2px 8px rgba(196, 192, 215, 0.25);

    transition: all 0.3s ease;
}

.navbar-brand span {
    font-weight: 900 !important;
}

.navbar-brand:hover {
    color: #f4d35e !important;
    transform: translateY(-1px);
}

.navbar-brand i {
    color: #f4d35e;
    margin-right: 5px;
}


/* ========== BRAND WHEN SCROLLED ========== */

.navbar.scrolled .navbar-brand {
    font-size: 1.55rem;
    color: #ffffff !important;
    font-weight: 800;
}


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

.navbar-nav .nav-link {
    color: rgba(6, 14, 239, 0.945) !important;

    font-size: 0.92rem;

    font-weight: 600;

    letter-spacing: 0.2px;

    padding: 8px 15px !important;

    margin: 0 2px;

    border-radius: 8px;

    transition: all 0.3s ease;

    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}


/* Link Hover */

.navbar-nav .nav-link:hover {
    color: #080717 !important;

    background: rgba(170, 225, 18, 0.1);

    transform: translateY(-1px);
}


/* Active Link */

.navbar-nav .nav-link.active {
    color: #eb0606 !important;

    background: rgba(244, 211, 94, 0.10) !important;

    font-weight: 700;
}


/* ========== SCROLLED NAV LINKS ========== */

.navbar.scrolled .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.92) !important;

    text-shadow: none;
}

.navbar.scrolled .navbar-nav .nav-link:hover {
    color: #f4d35e !important;

    background: rgba(255, 255, 255, 0.08);
}

.navbar.scrolled .navbar-nav .nav-link.active {
    color: #c3ea37 !important;

    background: rgba(244, 211, 94, 0.12) !important;
}


/* ========================================
   DESKTOP DROPDOWN - HOVER & CLICK SUPPORT
======================================== */
@media (min-width: 992px) {
    /* Dropdown menu - hidden by default */
    .dropdown-menu {
        display: block !important;
        opacity: 0 !important;
        transform: translateY(-10px) scale(0.95) !important;
        transform-origin: top right !important;
        transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
        visibility: hidden !important;
        pointer-events: none !important;
        border: none !important;
        border-radius: 12px !important;
        box-shadow: 0 10px 40px rgba(0,0,0,0.15) !important;
        padding: 8px !important;
        margin-top: 8px !important;
        background: #fff !important;
        min-width: 200px !important;
        position: absolute !important;
        right: 0 !important;
        left: auto !important;
        top: 100% !important;
        z-index: 1000 !important;
    }
    
    /* Show on hover */
    .dropdown:hover .dropdown-menu {
        opacity: 1 !important;
        transform: translateY(0) scale(1) !important;
        visibility: visible !important;
        pointer-events: auto !important;
    }
    
    /* Show on click (Bootstrap .show) */
    .dropdown.show .dropdown-menu {
        opacity: 1 !important;
        transform: translateY(0) scale(1) !important;
        visibility: visible !important;
        pointer-events: auto !important;
    }
    
    /* Dropdown items */
    .dropdown-item {
        border-radius: 8px !important;
        padding: 8px 16px !important;
        font-size: 0.9rem !important;
        transition: all 0.2s ease !important;
        color: #333 !important;
    }
    
    .dropdown-item:hover {
        background: #28a745 !important;
        color: #fff !important;
    }
    
    .dropdown-item i {
        width: 20px !important;
        color: #28a745 !important;
    }
    
    .dropdown-item:hover i {
        color: #fff !important;
    }
    
    /* Dropdown arrow rotation on hover */
    .dropdown:hover .dropdown-toggle::after {
        transform: rotate(180deg) !important;
    }
    
    .dropdown-toggle::after {
        transition: transform 0.3s ease !important;
    }
}


/* ========== BUTTONS ========== */
.btn-success {
    background: linear-gradient(135deg, #1a8a3f 0%, #28a745 100%);
    border: none;
    padding: 10px 25px;
    font-weight: 500;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.btn-success:hover {
    transform: scale(1.02);
    box-shadow: 0 5px 20px rgba(40, 167, 69, 0.4);
}

.btn-outline-success {
    border: 2px solid #28a745;
    color: #28a745;
    font-weight: 500;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.btn-outline-success:hover {
    background: #28a745;
    color: #fff;
    transform: scale(1.02);
}

/* ========== CARDS ========== */
.card {
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.12) !important;
}

/* ========== ALERT MESSAGES ========== */
.alert {
    border-radius: 10px;
    border: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

.alert-success {
    background: #d4edda;
    color: #155724;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
}

/* ========== FORM STYLING ========== */
.form-control {
    border-radius: 8px;
    padding: 10px 14px;
    border: 2px solid #e0e0e0;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.form-control:focus {
    border-color: #28a745;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.15);
}

.form-select {
    border-radius: 8px;
    padding: 10px 14px;
    border: 2px solid #e0e0e0;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.form-select:focus {
    border-color: #28a745;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.15);
}

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

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #28a745;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #1a8a3f;
}

/* ========== UTILITY ========== */
.spinner-border {
    display: none !important;
}

.text-success {
    color: #28a745 !important;
}

.bg-success {
    background: #28a745 !important;
}

/* ========================================
   MOBILE CONTENT SECTION IMPROVEMENTS
======================================== */

/* Fix for mobile cards to ensure proper centering and spacing */
@media (max-width: 575.98px) {
    .section-padding {
        padding: 40px 12px !important;
    }
    
    .section-header h2 {
        font-size: 1.4rem !important;
    }
    
    .section-header p {
        font-size: 0.9rem !important;
        padding: 0 8px !important;
    }
    
    /* Card improvements for mobile */
    .card-hover {
        margin: 0 auto !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .card-hover .card-img-top {
        height: 150px !important;
    }
    
    .card-hover .card-body {
        padding: 14px 16px !important;
    }
    
    /* Scholar cards mobile */
    .scholar-card {
        padding: 12px 8px !important;
    }
    
    .scholar-card .avatar {
        width: 56px !important;
        height: 56px !important;
    }
    
    .scholar-card .avatar-placeholder {
        width: 56px !important;
        height: 56px !important;
        font-size: 1.6rem !important;
    }
    
    .scholar-card .name {
        font-size: 0.8rem !important;
    }
    
    /* CTA section mobile */
    .cta-section {
        padding: 40px 16px !important;
    }
    
    .cta-title {
        font-size: 1.5rem !important;
    }
    
    .cta-subtitle {
        font-size: 0.95rem !important;
        padding: 0 8px !important;
    }
    
    .btn-cta-primary,
    .btn-cta-secondary {
        width: 100% !important;
        justify-content: center !important;
        padding: 12px 20px !important;
        font-size: 0.95rem !important;
    }
    
    /* Newsletter mobile */
    .newsletter-section {
        padding: 30px 12px !important;
    }
    
    .newsletter-section h3 {
        font-size: 1.2rem !important;
        text-align: center !important;
    }
    
    .newsletter-section p {
        text-align: center !important;
        font-size: 0.9rem !important;
    }
    
    .newsletter-section .d-flex {
        flex-direction: column !important;
        gap: 10px !important;
        width: 100% !important;
    }
    
    .newsletter-section .form-control {
        width: 100% !important;
        min-width: unset !important;
        border-radius: 10px !important;
    }
    
    .newsletter-section .btn {
        width: 100% !important;
        justify-content: center !important;
    }
    
    /* Quick stats mobile */
    .quick-stats {
        padding: 20px 0 !important;
    }
    
    .stat-item .number {
        font-size: 1.3rem !important;
    }
    
    .stat-item .label {
        font-size: 0.7rem !important;
    }
    
    /* View all buttons mobile */
    .view-all-btn {
        padding: 10px 24px !important;
        font-size: 0.9rem !important;
        width: 100% !important;
        text-align: center !important;
        justify-content: center !important;
    }
    
    /* Grid spacing mobile */
    .row.g-4 {
        --bs-gutter-y: 1.2rem !important;
        --bs-gutter-x: 0.75rem !important;
    }
}

/* Tablet improvements */
@media (min-width: 576px) and (max-width: 991px) {
    .section-padding {
        padding: 50px 16px !important;
    }
    
    .section-header h2 {
        font-size: 1.8rem !important;
    }
    
    .card-hover .card-img-top {
        height: 160px !important;
    }
    
    .cta-title {
        font-size: 2rem !important;
    }
    
    .newsletter-section .d-flex {
        gap: 12px !important;
    }
    
    .newsletter-section .form-control {
        min-width: 200px !important;
    }
}