@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=IBM+Plex+Sans+Arabic:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #003366;
    --secondary: #D4AF37;
    --accent: #FFFFFF;
    --dark: #0a0a0a;
    --light: #f8f9fa;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    scroll-behavior: smooth;
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

body {
    font-family: 'Outfit', sans-serif;
    color: var(--dark);
    background-color: var(--light);
    line-height: 1.6;
}

.arabic-font {
    font-family: 'IBM Plex Sans Arabic', sans-serif;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #005bb5;
}

/* Navbar */
.navbar {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar-scrolled {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(15px);
    padding: 0.8rem 0;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.1);
}

/* Desktop nav link — pill style */
.nav-link {
    position: relative;
    font-weight: 700;
    font-size: 0.8rem;
    white-space: nowrap;
    padding: 5px 10px;
    border-radius: 8px;
    transition: all 0.25s ease;
    letter-spacing: -0.01em;
}

.nav-link:hover {
    background: rgba(0, 51, 102, 0.07);
    color: var(--primary);
}

.nav-link.active {
    background: var(--primary);
    color: #fff !important;
    box-shadow: 0 4px 14px rgba(0, 51, 102, 0.25);
}

.nav-link.active i {
    opacity: 1;
}

/* Glass navbar background */
.glass-nav {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* Swiper Hero */
.hero-slider {
    width: 100%;
    height: 100vh;
    min-height: 600px;
}

.swiper-slide {
    position: relative;
    overflow: hidden;
}

.slide-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: transform 8s ease-out;
}

.swiper-slide-active .slide-bg {
    transform: scale(1.1);
}

.slide-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(0, 51, 102, 0.8), rgba(0, 51, 102, 0.4));
}

.hero-content {
    position: relative;
    z-index: 10;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 100px 24px 40px;
}

.hero-content h2 {
    font-size: clamp(2rem, 7vw, 4rem);
    line-height: 1.15;
    margin-bottom: 1rem;
    font-weight: 900;
}

.hero-content h2 .text-secondary {
    color: var(--secondary);
}

.hero-content h3 {
    font-size: clamp(1.2rem, 4vw, 2.8rem);
    font-weight: 500;
    letter-spacing: 1px;
}

.hero-content p {
    font-size: clamp(1.1rem, 3vw, 1.6rem);
    opacity: 0.9;
    max-width: 800px;
}

/* Swiper Navigation Customization */
.swiper-button-next,
.swiper-button-prev {
    width: 60px !important;
    height: 60px !important;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: var(--secondary) !important;
    transition: all 0.3s;
}

.swiper-button-next:after,
.swiper-button-prev:after {
    font-size: 24px !important;
    font-weight: 900;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
    background: var(--secondary);
    color: var(--primary) !important;
    border-color: var(--secondary);
}

.swiper-pagination-bullet {
    width: 12px !important;
    height: 12px !important;
    background: rgba(255, 255, 255, 0.3) !important;
    opacity: 1 !important;
    transition: all 0.3s;
}

.swiper-pagination-bullet-active {
    background: var(--secondary) !important;
    width: 30px !important;
    border-radius: 10px !important;
}

/* Specific scaling for long Somali words */
body.lang-so .hero-content h2 {
    font-size: clamp(2rem, 8vw, 3.8rem) !important;
    line-height: 1.1;
}

body.lang-so .hero-content h3 {
    font-size: clamp(1.2rem, 4vw, 2.5rem) !important;
}

/* Cards & Hover Effects */
.program-card {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.program-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 25px 50px -12px rgba(0, 51, 102, 0.15);
}

.feature-icon-card {
    transition: all 0.4s ease;
}

.feature-icon-card:hover {
    background: var(--primary);
    color: white;
}

.feature-icon-card:hover i {
    color: var(--secondary);
    transform: scale(1.2) rotate(10deg);
}

.feature-icon-card i {
    transition: all 0.4s ease;
}

/* Glassmorphism */
.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.glass-nav {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex !important;
    gap: 0.5rem;
    max-width: 100%;
    margin: 0 auto;
}

/* Ensure brand doesn't get squeezed */
.glass-nav>a:first-child {
    flex-shrink: 0;
    min-width: max-content;
}

/* Buttons */
.btn-premium {
    position: relative;
    padding: 12px 32px;
    border-radius: 50px;
    font-weight: 700;
    letter-spacing: 0.5px;
    transition: all 0.3s;
    overflow: hidden;
    z-index: 1;
    white-space: nowrap;
}

.btn-premium::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transition: width 0.3s;
    z-index: -1;
}

.btn-premium:hover::before {
    width: 100%;
}

.btn-gold {
    background: var(--secondary);
    color: var(--primary);
}

.btn-gold:hover {
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.4);
    transform: translateY(-2px);
}

.btn-blue {
    background: var(--primary);
    color: white;
}

.btn-blue:hover {
    box-shadow: 0 8px 25px rgba(0, 51, 102, 0.3);
    transform: translateY(-2px);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.reveal {
    animation: fadeInUp 0.8s ease forwards;
}

/* Overlapping Stats Section */
.stats-overlap {
    position: relative;
    z-index: 20;
    margin-top: 40px;
}


.stat-card-premium {
    background: white;
    border-radius: 20px;
    padding: 24px 28px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-bottom: 4px solid transparent;
    width: 100%;
}


.stat-card-premium:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 30px rgba(0, 51, 102, 0.1);
}

.stat-icon-wrapper {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.stat-card-premium.blue {
    border-bottom-color: #003366;
}

.stat-card-premium.blue .stat-icon-wrapper {
    background: #e6f0ff;
    color: #003366;
}

.stat-card-premium.orange {
    border-bottom-color: #f7b731;
}

.stat-card-premium.orange .stat-icon-wrapper {
    background: #fff9e6;
    color: #f7b731;
}

.stat-card-premium.light-blue {
    border-bottom-color: #4b7bec;
}

.stat-card-premium.light-blue .stat-icon-wrapper {
    background: #edf2ff;
    color: #4b7bec;
}

.stat-card-premium.purple {
    border-bottom-color: #a55eea;
}

.stat-card-premium.purple .stat-icon-wrapper {
    background: #f5edff;
    color: #a55eea;
}

.stat-card-premium .stat-info h3 {
    font-size: 32px;
    font-weight: 800;
    color: #1a1a1a;
    line-height: 1;
    margin-bottom: 6px;
}

.stat-card-premium .stat-info p {
    font-size: 11px;
    font-weight: 700;
    color: #666;
    margin: 0;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}




/* Gallery Masonry */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    grid-gap: 20px;
    grid-auto-rows: minmax(200px, auto);
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 51, 102, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

/* Language Toggle */
.lang-toggle {
    display: flex;
    align-items: center;
    gap: 4px;
    background: #f1f1f1;
    padding: 3px 8px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.lang-toggle span,
.lang-toggle a {
    cursor: pointer;
    padding: 2px 8px;
    border-radius: 12px;
    transition: all 0.3s;
    text-decoration: none;
    color: inherit;
}

.lang-toggle span:hover,
.lang-toggle a:hover {
    background: rgba(0, 51, 102, 0.12);
}

.lang-toggle span.active,
.lang-toggle a.active {
    background: var(--primary);
    color: white;
}

/* Mobile Nav */
#mobile-menu {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(100%);
}

#mobile-menu.active {
    transform: translateX(0);
}

/* Mobile nav link — icon list style */
.mobile-nav-link {
    display: flex;
    align-items: center;
    transition: all 0.2s ease;
    background: #fff;
}

.mobile-nav-link:hover {
    background: #f8faff;
}

.mobile-nav-link:hover span:first-child {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 51, 102, 0.15);
}

.mobile-nav-link:hover .fa-chevron-right {
    transform: translateX(3px);
    color: var(--secondary);
}

.mobile-nav-link span:first-child {
    transition: all 0.2s ease;
}

.mobile-nav-link .fa-chevron-right {
    transition: all 0.2s ease;
}

/* Language Specific Adjustments */
body.lang-so .nav-link,
body.lang-ar .nav-link {
    font-size: 0.78rem;
    letter-spacing: -0.02em;
}

body.lang-so .lg\:flex,
body.lang-ar .lg\:flex {
    gap: 0.4rem !important;
}

body.lang-so .btn-premium,
body.lang-ar .btn-premium {
    padding: 10px 18px;
    font-size: 0.8rem;
    white-space: nowrap;
}

/* Footer Bottom */
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* AOS Tweaks */
[data-aos] {
    transition-duration: 1000ms !important;
}

/* Swiper Pagination & Navigation */
.swiper-pagination-bullet-active {
    background: var(--secondary) !important;
}

/* Responsive Table */
.admission-table {
    width: 100%;
    border-collapse: collapse;
}

.admission-table th,
.admission-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.admission-table th {
    background: var(--primary);
    color: white;
}


/* Standardize Hero Slider Height and Layout */
.hero-slider {
    height: 100vh !important;
    min-height: 600px !important;
}

/* hero-content padding is set in the main block above — no override needed here */

/* Force Custom Swiper Navigation (High Specificity) */
.hero-slider .swiper-button-next,
.hero-slider .swiper-button-prev {
    width: 55px !important;
    height: 55px !important;
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 12px !important;
    color: var(--secondary) !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    margin-top: 0 !important;
}

.hero-slider .swiper-button-next::after,
.hero-slider .swiper-button-prev::after {
    font-size: 20px !important;
    font-weight: 900 !important;
}

.hero-slider .swiper-button-next:hover,
.hero-slider .swiper-button-prev:hover {
    background: var(--secondary) !important;
    color: var(--primary) !important;
    border-color: var(--secondary) !important;
}

/* Pagination Dots */
.hero-slider .swiper-pagination-bullet {
    width: 12px !important;
    height: 12px !important;
    background: rgba(255, 255, 255, 0.4) !important;
    opacity: 1 !important;
}

.hero-slider .swiper-pagination-bullet-active {
    background: var(--secondary) !important;
    width: 35px !important;
    border-radius: 10px !important;
}