/* ============================================
   ICDL Somalia - Qaamuus Academy
   Main Stylesheet
   ============================================ */

/* === Base Styles === */
:root {
    --primary-blue: #418FDE;
    --dark-blue: #1a3a5c;
    --icdl-cyan: #00A6D6;
    --light-blue: #e8f4fd;
    --grey: #6c757d;
    --light-grey: #f8f9fa;
    --white: #ffffff;
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
    --font-family: 'Poppins', sans-serif;
}

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

body {
    font-family: var(--font-family);
    color: #333;
    background-color: var(--white);
    line-height: 1.7;
}

a {
    color: var(--primary-blue);
    transition: all 0.3s ease;
}

a:hover {
    color: var(--dark-blue);
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: var(--dark-blue);
}

/* === Top Bar === */
.top-bar {
    font-size: 0.85rem;
    background: linear-gradient(135deg, var(--dark-blue), #0d2137) !important;
}

.top-bar a {
    transition: opacity 0.3s;
}

.top-bar a:hover {
    opacity: 0.8;
}

/* === Navbar === */
.navbar {
    padding: 0.8rem 0;
    transition: all 0.3s ease;
}

.navbar-brand img {
    transition: transform 0.3s;
}

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

.navbar .nav-link {
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.5rem 0.8rem !important;
    color: var(--dark-blue) !important;
    border-radius: 5px;
    transition: all 0.3s;
}

.navbar .nav-link:hover,
.navbar .nav-link.active {
    color: var(--primary-blue) !important;
    background-color: var(--light-blue);
}

/* === Hero Section === */
.hero-section {
    position: relative;
    min-height: 600px;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-slider .carousel-item {
    min-height: 600px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.hero-slider .carousel-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(26, 58, 92, 0.85), rgba(65, 143, 222, 0.7));
}

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

.hero-content h1 {
    font-size: 3rem;
    font-weight: 800;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-content p {
    font-size: 1.2rem;
    opacity: 0.9;
}

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

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--dark-blue);
    margin-bottom: 15px;
}

.section-title p {
    color: var(--grey);
    max-width: 600px;
    margin: 0 auto;
}

.section-title .title-line {
    width: 80px;
    height: 4px;
    background: linear-gradient(to right, var(--primary-blue), var(--icdl-cyan));
    margin: 15px auto;
    border-radius: 2px;
}

/* === Card Styles === */
.card {
    border: none;
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.12);
}

.card-img-top {
    height: 220px;
    object-fit: cover;
}

.product-card .price-tag {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--primary-blue);
    color: white;
    padding: 5px 15px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9rem;
}

.product-card .price-before {
    text-decoration: line-through;
    color: var(--grey);
    font-size: 0.9rem;
}

.product-card .price-after {
    color: var(--primary-blue);
    font-weight: 700;
    font-size: 1.3rem;
}

.product-card .quantity-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

.quantity-available {
    background-color: #d4edda;
    color: #155724;
}

.quantity-low {
    background-color: #fff3cd;
    color: #856404;
}

.quantity-out {
    background-color: #f8d7da;
    color: #721c24;
}

/* === Feature Cards === */
.feature-card {
    text-align: center;
    padding: 30px 20px;
    border-radius: 15px;
    background: white;
    transition: all 0.3s;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(65, 143, 222, 0.15);
}

.feature-card .icon-box {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-blue), var(--icdl-cyan));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: white;
    font-size: 2rem;
}

/* === Stats Section === */
.stats-section {
    background: linear-gradient(135deg, var(--dark-blue), var(--primary-blue));
    color: white;
    padding: 60px 0;
}

.stat-item {
    text-align: center;
}

.stat-item .stat-number {
    font-size: 3rem;
    font-weight: 800;
    display: block;
}

.stat-item .stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* === Registration Form === */
.registration-section {
    background: linear-gradient(135deg, var(--light-blue), #f0f7ff);
}

.registration-form {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.registration-form .form-control,
.registration-form .form-select {
    border-radius: 10px;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    transition: all 0.3s;
}

.registration-form .form-control:focus,
.registration-form .form-select:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 0.2rem rgba(65, 143, 222, 0.15);
}

/* === Buttons === */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-blue), var(--icdl-cyan));
    border: none;
    border-radius: 10px;
    padding: 10px 25px;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--dark-blue), var(--primary-blue));
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(65, 143, 222, 0.3);
}

.btn-outline-primary {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
    border-radius: 10px;
    padding: 10px 25px;
    font-weight: 600;
}

.btn-outline-primary:hover {
    background: var(--primary-blue);
    border-color: var(--primary-blue);
}

.btn-success {
    background: linear-gradient(135deg, #28a745, #20c997);
    border: none;
    border-radius: 10px;
}

.btn-whatsapp {
    background: #25D366;
    color: white;
    border: none;
    border-radius: 10px;
    padding: 10px 25px;
    font-weight: 600;
}

.btn-whatsapp:hover {
    background: #128C7E;
    color: white;
}

/* === Partners Section === */
.partner-logo {
    height: 80px;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: all 0.3s;
}

.partner-logo:hover {
    filter: grayscale(0%);
    opacity: 1;
}

/* === Event Card === */
.event-card {
    border-left: 4px solid var(--primary-blue);
}

.event-date {
    background: var(--primary-blue);
    color: white;
    border-radius: 10px;
    padding: 10px;
    text-align: center;
    min-width: 70px;
}

.event-date .day {
    font-size: 1.8rem;
    font-weight: 800;
    line-height: 1;
}

.event-date .month {
    font-size: 0.8rem;
    text-transform: uppercase;
}

/* === WhatsApp Float === */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: #25D366;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    box-shadow: 0 5px 20px rgba(37, 211, 102, 0.4);
    z-index: 1000;
    transition: all 0.3s;
    text-decoration: none;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    color: white;
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.5);
}

/* === Back to Top === */
.back-to-top {
    position: fixed;
    bottom: 100px;
    right: 35px;
    width: 40px;
    height: 40px;
    background: var(--primary-blue);
    color: white;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    z-index: 999;
    transition: all 0.3s;
    text-decoration: none;
}

.back-to-top:hover {
    background: var(--dark-blue);
    color: white;
}

.back-to-top.show {
    display: flex;
}

/* === Page Header === */
.page-header {
    background: linear-gradient(135deg, var(--dark-blue), var(--primary-blue));
    color: white;
    padding: 60px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 500px;
    height: 500px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
}

.page-header h1 {
    color: white;
    font-weight: 700;
    font-size: 2.5rem;
}

.page-header .breadcrumb {
    justify-content: center;
    margin-bottom: 0;
}

.page-header .breadcrumb-item a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
}

.page-header .breadcrumb-item.active {
    color: white;
}

/* === Order Modal === */
.order-modal .modal-header {
    background: linear-gradient(135deg, var(--primary-blue), var(--icdl-cyan));
    color: white;
}

/* === Testimonials === */
.testimonial-card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    position: relative;
}

.testimonial-card::before {
    content: '\201C';
    font-size: 4rem;
    color: var(--primary-blue);
    opacity: 0.2;
    position: absolute;
    top: 10px;
    left: 20px;
    font-family: serif;
}

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

.animate-fadeInUp {
    animation: fadeInUp 0.6s ease forwards;
}

/* === Responsive === */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-slider .carousel-item {
        min-height: 400px;
    }
    
    .section-padding {
        padding: 50px 0;
    }
    
    .section-title h2 {
        font-size: 1.8rem;
    }
    
    .stat-item .stat-number {
        font-size: 2rem;
    }
    
    .registration-form {
        padding: 25px;
    }
    
    .whatsapp-float {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    
    .back-to-top {
        bottom: 80px;
        right: 25px;
    }
}

@media (max-width: 576px) {
    .hero-content h1 {
        font-size: 1.6rem;
    }
    
    .page-header h1 {
        font-size: 1.8rem;
    }
}

/* === Loading Spinner === */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* === Pagination === */
.pagination .page-link {
    color: var(--primary-blue);
    border-radius: 8px;
    margin: 0 3px;
    border: none;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.pagination .page-item.active .page-link {
    background: var(--primary-blue);
    color: white;
}

/* === Table Styles === */
.table-custom {
    border-radius: 10px;
    overflow: hidden;
}

.table-custom thead {
    background: linear-gradient(135deg, var(--primary-blue), var(--icdl-cyan));
    color: white;
}

.table-custom tbody tr:hover {
    background-color: var(--light-blue);
}

/* === Badge Styles === */
.badge-status {
    padding: 5px 12px;
    border-radius: 20px;
    font-weight: 500;
    font-size: 0.8rem;
}

/* === Form Floating Labels === */
.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
    color: var(--primary-blue);
}

/* === Language Switcher === */
.lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.lang-switch .btn {
    padding: 2px 10px;
    font-size: 0.8rem;
    border-radius: 15px;
    font-weight: 600;
}

.lang-switch .btn.active-lang {
    background: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
}

/* === Footer === */
.footer {
    background: linear-gradient(135deg, #0d1b2a, var(--dark-blue));
    color: rgba(255,255,255,0.7);
    padding-top: 60px;
}

.footer h5 {
    color: white;
    font-weight: 600;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

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

.footer a {
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    transition: all 0.3s;
}

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

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

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

.footer .social-icons a:hover {
    background: var(--primary-blue);
    transform: translateY(-3px);
    padding-left: 0;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 20px 0;
    margin-top: 40px;
}

/* === Popup Announcement === */
.announcement-popup .modal-content {
    border: none;
    border-radius: 15px;
    overflow: hidden;
}

.announcement-popup .modal-header {
    background: linear-gradient(135deg, var(--primary-blue), var(--icdl-cyan));
    color: white;
    border: none;
}

.announcement-popup .modal-header .btn-close {
    filter: brightness(0) invert(1);
}

.announcement-popup .popup-image {
    width: 100%;
    max-height: 200px;
    object-fit: cover;
}

/* === Partner Card === */
.partner-card {
    border: 2px solid transparent;
    transition: all 0.3s;
}

.partner-card:hover {
    border-color: var(--primary-blue);
}

/* === Notification Toast === */
.toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 9999;
}

/* === Somali Flag Accent === */
.somali-accent {
    background: linear-gradient(135deg, #4189DD 0%, #4189DD 50%, #17A2B8 50%, #17A2B8 100%);
    height: 4px;
    width: 100%;
}

/* === Navbar Scrolled === */
.navbar.scrolled {
    background: white !important;
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
}

/* === CTA Section === */
.cta-section {
    background: linear-gradient(135deg, var(--primary-blue), var(--icdl-cyan));
    color: white;
    padding: 60px 0;
    text-align: center;
}

.cta-section h2 {
    color: white;
}

.cta-section .btn-light {
    background: white;
    color: var(--primary-blue);
    font-weight: 600;
    border-radius: 10px;
    padding: 12px 30px;
}

.cta-section .btn-light:hover {
    background: var(--light-blue);
    transform: translateY(-2px);
}

/* === Smooth Scroll === */
html {
    scroll-behavior: smooth;
}

/* === Print Styles === */
@media print {
    .navbar, .top-bar, .footer, .whatsapp-float, .back-to-top {
        display: none !important;
    }
    
    .section-padding {
        padding: 20px 0;
    }
}
