/* 
    ICU Zambia Website - Design System & Global Styles
    Primary Responsibility: Brand & UI Developer
    Features: CSS Variables, Custom Responsive Grid, Keyframe Animations
*/

/* 1. RESET & BASE STYLES */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Brand Design Tokens */
    --primary: #003366;      /* Deep Blue - Trust & Knowledge */
    --secondary: #FF6600;    /* Orange - Innovation & Energy */
    --accent: #00A651;       /* Green - Growth & Future */
    --light: #F8F9FA;
    --dark: #212529;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--dark);
    overflow-x: hidden;
    background: #ffffff;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
}

/* 2. LOADING SCREEN COMPONENT */
#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary), #001a33);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 1s ease;
}

.loader-content {
    text-align: center;
    color: white;
}

.book-loader {
    width: 80px;
    height: 80px;
    position: relative;
    margin: 0 auto 20px;
    perspective: 200px;
}

.book-page {
    width: 40px;
    height: 60px;
    background: var(--secondary);
    position: absolute;
    left: 20px;
    top: 10px;
    transform-origin: left center;
    animation: flipBook 2s infinite;
    border-radius: 3px;
}

.book-page:nth-child(2) {
    animation-delay: 0.3s;
    background: #ff8533;
}

.book-page:nth-child(3) {
    animation-delay: 0.6s;
    background: #ffaa66;
}

/* 3. ANIMATION KEYFRAMES */
@keyframes flipBook {
    0% { transform: rotateY(0deg); }
    50% { transform: rotateY(-180deg); }
    100% { transform: rotateY(-360deg); }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

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

@keyframes float {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(10deg); }
    100% { transform: translateY(0px) rotate(0deg); }
}

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

/* 4. NAVIGATION STYLES */
.navbar {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    padding: 15px 0;
    transition: var(--transition);
    box-shadow: 0 2px 20px rgba(0,51,102,0.1);
}

/* State when user scrolls down */
.navbar.scrolled {
    padding: 10px 0;
    background: rgba(0,51,102,0.98);
}

.navbar.scrolled .nav-link,
.navbar.scrolled .navbar-brand {
    color: white !important;
}

.navbar-brand {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary) !important;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-link {
    font-weight: 500;
    color: var(--dark) !important;
    margin: 0 10px;
    position: relative;
    transition: var(--transition);
}

/* Animated underline on hover */
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--secondary);
    transition: var(--transition);
}

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

/* 5. HERO SECTION */
.hero {
    min-height: 100vh;
    background: linear-gradient(rgba(0,51,102,0.9), rgba(0,26,51,0.95)), 
                url('https://images.unsplash.com/photo-1562774053-701939374585?ixlib=rb-4.0.3&auto=format&fit=crop&w=2086&q=80');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

/* Circular background pattern */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" opacity="0.1"><circle cx="50" cy="50" r="40" stroke="%23FF6600" stroke-width="2" fill="none"/><circle cx="50" cy="50" r="30" stroke="%23FF6600" stroke-width="2" fill="none"/><circle cx="50" cy="50" r="20" stroke="%23FF6600" stroke-width="2" fill="none"/></svg>');
    background-size: 200px 200px;
    animation: rotate 60s linear infinite;
}

.hero h1 {
    font-size: 5rem;
    font-weight: 800;
}

/* Custom Buttons */
.btn-custom {
    padding: 15px 40px;
    border-radius: 50px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary-custom {
    background: var(--secondary);
    color: var(--primary);
    border: 2px solid var(--secondary);
}

.btn-primary-custom:hover {
    background: transparent;
    color: white;
}

/* 6. COMPONENT CARDS */
.program-card, .feature-item, .faculty-card, .course-card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,51,102,0.1);
    transition: var(--transition);
    height: 100%;
}

.program-card:hover, .feature-item:hover, .faculty-card:hover, .course-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,51,102,0.2);
}

/* Section Common Spacing */
.section-padding { padding: 100px 0; }
.section-title { text-align: center; margin-bottom: 60px; }

/* 7. FOOTER STYLES */
.footer {
    background: #001a33;
    color: white;
    padding: 80px 0 20px;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: var(--transition);
    display: block;
    margin-bottom: 10px;
}

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

.footer-bottom {
    margin-top: 50px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    text-align: center;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* 8. INTERACTIVE ELEMENTS */
#backToTop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--secondary);
    color: white;
    border-radius: 50%;
    display: none;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 999;
    box-shadow: 0 5px 15px rgba(255,102,0,0.3);
    border: none;
    transition: var(--transition);
}

#backToTop:hover {
    background: var(--primary);
    transform: translateY(-5px);
}

/* RESPONSIVE MEDIA QUERIES */
@media (max-width: 991px) {
    .hero h1 { font-size: 3.5rem; }
    .hero .subtitle { font-size: 1.5rem; }
    .section-title h2 { font-size: 2.2rem; }
}

@media (max-width: 767px) {
    .about-stats { flex-direction: column; gap: 20px; }
    .footer { text-align: center; }
    .footer-social { justify-content: center; }
}
