/* 
================================================================
Campus Compass: Minimalist Academic Theme
================================================================
*/

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --primary-blue: #0f172a;
    --accent-blue: #3b82f6;
    --light-blue: #f1f5f9;
    --ethereal-blue: #f8fafc;
    --dark: #0f172a;
    --text-primary: #334155;
    --text-secondary: #64748b;
    --bg-gray: #f8fafc;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --shadow-sm: 0 1px 2px 0 rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --transition-smooth: all 0.2s ease-in-out;
    --radius-md: 8px;
    --radius-lg: 12px;
}

/* ==================== PRELOADER ==================== */
#site-preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out, visibility 0.5s;
}

.preloader-shape, .preloader-ripple {
    display: none;
}

#lottie-animation {
    width: 250px;
    height: 250px;
}


@keyframes ripplePulse {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(2.8); opacity: 0; }
}





#main-content {
    opacity: 0;
    transition: opacity 0.8s ease-in;
}

#main-content.visible {
    opacity: 1;
}


/* ==================== GLOBAL ==================== */
body {
    font-family: 'Outfit', sans-serif;
    color: var(--text-primary);
    background-color: #ffffff;
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, .academic-font {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    color: var(--dark);
}

.section-title {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 2rem;
    position: relative;
    display: inline-block;
    margin-bottom: 2rem;
    letter-spacing: -0.5px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--accent-blue);
    border-radius: 2px;
}

.container-premium {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ==================== NAVBAR ==================== */
.navbar-premium {
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    padding: 0.75rem 0;
    position: sticky;
    top: 0;
    z-index: 1030;
}

.navbar-premium .nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

.navbar-premium .nav-link:hover,
.navbar-premium .nav-link:focus {
    color: var(--accent-blue);
}

.navbar-premium .navbar-toggler {
    padding: 0.4rem 0.6rem;
}

/* Mobile nav cleanup */
@media (max-width: 991.98px) {
    .navbar-premium .navbar-collapse {
        padding-top: 1rem;
        border-top: 1px solid #e2e8f0;
        margin-top: 0.75rem;
    }
    .navbar-premium .nav-link {
        padding: 0.6rem 0;
        text-align: center;
        font-size: 1rem;
    }
}

/* ==================== HERO ==================== */
.hero-portal {
    background-color: #0f172a; /* Darker fallback */
    color: #ffffff;
    padding: 100px 0 160px;
    position: relative;
    overflow: hidden;
}

.hero-slider-wrap {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.5s ease;
}

.hero-slide.active {
    opacity: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 74, 173, 0.5); /* 50% Blue Overlay */
    z-index: 1;
}


.hero-portal .container-premium {
    position: relative;
    z-index: 3;
}


.hero-portal h1 {
    color: #ffffff;
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
    line-height: 1.1;
    transition: font-size 0.3s ease;
}

.search-wrapper-premium {
    position: relative;
    max-width: 700px;
    margin: 0 auto;
    z-index: 10;
    padding: 3rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 30px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
}

.search-premium {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    width: 100%;
}

.search-premium input {
    width: 100%;
    padding: 1.25rem 2rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.3);
    color: white;
    font-size: 1.1rem;
    text-align: center;
    transition: all 0.3s ease;
}

.search-premium input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.search-premium input:focus {
    outline: none;
    background: rgba(0, 0, 0, 0.5);
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 4px rgba(0, 74, 173, 0.2);
}


.btn-search-minimal {
    width: 100%;
    background: var(--accent-blue);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 14px;
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.btn-search-minimal:hover {
    background: #0056cc;
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}



@media (max-width: 768px) {
    .search-wrapper-premium {
        padding: 1.5rem;
        border-radius: 20px;
        margin: 0 1rem;
    }
    .hero-portal h1 {
        font-size: 2.2rem;
    }

    .hero-portal p {
        font-size: 1rem;
        padding: 0 1rem;
    }
}



.hero-wave {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 120px;
    line-height: 0;
    z-index: 4;
    pointer-events: none;
    filter: drop-shadow(0 -10px 15px rgba(0, 0, 0, 0.15));
}



@media (max-width: 768px) {
    .hero-wave {
        height: 80px;
    }
}


/* Tutorials Mobile Fix */
@media (max-width: 768px) {
    .portal-card.flex-row {
        flex-direction: column !important;
    }
    .portal-card.flex-row .card-img-wrapper {
        width: 100% !important;
        height: 180px !important;
    }
    /* Stacking header for news/tutorials on mobile */
    .d-flex.justify-content-between.align-items-end {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 1rem;
    }
    .d-flex.justify-content-between.align-items-end .btn {
        width: 100%;
        text-align: center;
    }
}



.hero-wave .shape-fill {
    fill: #ffffff;
}

/* ==================== SEARCH ==================== */
/* End of Search Sections */


/* ==================== CARDS ==================== */
.portal-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-smooth);
    border: 1px solid #e2e8f0;
    position: relative;
    text-decoration: none;
    color: inherit;
}

.portal-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.card-img-wrapper {
    position: relative;
    height: 200px;
    overflow: hidden;
    background-color: var(--light-blue);
}

.card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.portal-card:hover .card-img-wrapper img {
    transform: scale(1.05);
}

.category-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: white;
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--dark);
    box-shadow: var(--shadow-sm);
}

.portal-card-body {
    padding: 1.5rem;
    flex-grow: 1;
}

.portal-card-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* ==================== ANIMATIONS ==================== */
.reveal {
    opacity: 0;
    transform: translateY(20px);
}

/* ==================== BUTTONS ==================== */
.btn-premium-primary {
    background: var(--dark);
    color: white;
    padding: 0.6rem 2rem;
    border-radius: 8px;
    font-weight: 500;
    border: none;
    transition: var(--transition-smooth);
}

.btn-premium-primary:hover {
    background: var(--text-primary);
    color: white;
}

.btn-premium-outline {
    background: transparent;
    border: 1px solid #cbd5e1;
    color: var(--text-primary);
    padding: 0.6rem 2rem;
    border-radius: 8px;
    font-weight: 500;
    transition: var(--transition-smooth);
}

.btn-premium-outline:hover {
    border-color: var(--dark);
    color: var(--dark);
    background-color: var(--bg-gray);
}

/* ==================== PROFILE ==================== */
.profile-avatar {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid white;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease;
}

.profile-avatar:hover {
    transform: scale(1.05);
}

.profile-avatar-placeholder {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: var(--accent-blue);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    font-weight: 700;
    border: 4px solid white;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease;
}

.profile-avatar-placeholder:hover {
    transform: scale(1.05);
}

.profile-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.profile-header-bg {
    height: 120px;
    background: var(--dark);
}

.profile-info-row {
    display: flex;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.profile-info-row:last-child {
    border-bottom: none;
}

.profile-info-label {
    width: 100px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.profile-info-value {
    color: var(--text-primary);
    font-weight: 500;
}

/* Edit profile image preview */
.profile-upload-area {
    position: relative;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
    margin: 0 auto;
    border: 3px dashed #cbd5e1;
    transition: border-color 0.2s ease;
}

.profile-upload-area:hover {
    border-color: var(--accent-blue);
}

.profile-upload-area img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-upload-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.profile-upload-area:hover .profile-upload-overlay {
    opacity: 1;
}

/* Page fade-in */
.page-fade-in {
    animation: pageFadeIn 0.5s ease-out;
}

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

/* ==================== FOOTER ==================== */
.footer-premium {
    background: var(--dark);
    color: white;
    padding: 60px 0 30px;
    margin-top: 60px;
}

.footer-link {
    color: rgba(255,255,255,0.5);
    text-decoration: none;
    transition: var(--transition-smooth);
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.footer-link:hover {
    color: white;
    transform: translateX(3px);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    margin-top: 40px;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.4);
}

/* ==================== SOCIAL ICONS ==================== */
.social-icon {
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.08);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.5rem;
    transition: var(--transition-smooth);
}

.social-icon:hover {
    background: rgba(255,255,255,0.2);
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 991.98px) {
    .hero-portal h1 {
        font-size: 2.5rem;
    }
}

@media (max-width: 767.98px) {
    .container-premium {
        padding: 0 1rem;
    }
    .hero-portal {
        padding: 40px 0 60px;
    }
    .hero-portal h1 {
        font-size: 2rem;
    }
    .search-wrapper-premium {
        margin: -25px auto 30px;
        padding: 0 0.5rem;
    }
    .profile-avatar,
    .profile-avatar-placeholder {
        width: 100px;
        height: 100px;
        font-size: 2.5rem;
    }
    .profile-header-bg {
        height: 80px;
    }
}