/* 
    NARAIN COLLEGE - MODERN REDESIGN
    Theme: Modern, Premium, Deep Blue & Gold, Glassmorphism
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Playfair+Display:ital,wght@0,600;0,700;0,800;1,600&display=swap');

:root {
    /* Color Palette */
    --primary-blue: #1e293b;
    /* Deep Blue */
    --primary-blue-light: #3B82F6;
    --primary-blue-dark: #0f172a;
    --accent-gold: #F59E0B;
    /* Golden Yellow */
    --accent-gold-light: #FCD34D;
    --bg-light: #F8FAFC;
    --bg-white: #FFFFFF;
    --text-main: #334155;
    --text-light: #64748B;
    --text-heading: #0F172A;
    --transition-speed: 0.3s;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-main);
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Playfair Display', serif;
    color: var(--text-heading);
    font-weight: 700;
}

/* Typography Overrides */
.text-primary {
    color: var(--primary-blue) !important;
}

.text-warning {
    color: var(--accent-gold) !important;
}

.bg-primary {
    background-color: var(--primary-blue) !important;
}

/* Focus States */
*:focus {
    border-color: var(--primary-blue-light) !important;
    box-shadow: 0 0 0 0.25rem rgba(59, 130, 246, 0.25) !important;
}

/* =========================================
   Glassmorphism Utilities
   ========================================= */
.glass-nav {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.glass-card {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 8px 32px rgba(30, 58, 138, 0.05);
    border-radius: 16px;
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(30, 58, 138, 0.1);
}

/* =========================================
   Navbar & Links
   ========================================= */
.navbar-brand span {
    color: var(--primary-blue);
    font-size: 1.5rem;
    letter-spacing: -0.5px;
}

.nav-link {
    color: var(--text-heading) !important;
    font-weight: 500;
    transition: color var(--transition-speed) ease, transform 0.2s ease;
    padding: 0.5rem 1rem !important;
    border-radius: 8px;
    margin: 0 4px;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-blue-light) !important;
    background-color: rgba(59, 130, 246, 0.05);
}

.navbar .form-control {
    background-color: var(--bg-light);
    border: 1px solid transparent;
    transition: all var(--transition-speed) ease;
}

.navbar .form-control:focus {
    background-color: var(--bg-white);
    border-color: var(--primary-blue-light);
}

/* =========================================
   Buttons
   ========================================= */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-blue-light));
    border: none;
    color: white;
    font-weight: 600;
    padding: 0.6rem 1.5rem;
    border-radius: 8px;
    transition: all var(--transition-speed) ease;
    box-shadow: 0 4px 15px rgba(30, 58, 138, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-blue-light), var(--primary-blue));
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(30, 58, 138, 0.4);
}

.btn-warning {
    background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-light));
    border: none;
    color: var(--text-heading);
    font-weight: 700;
    padding: 0.6rem 1.5rem;
    border-radius: 8px;
    transition: all var(--transition-speed) ease;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

.btn-warning:hover {
    background: linear-gradient(135deg, #f5b026, #fde047);
    color: var(--text-heading);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
}

/* =========================================
   Hero Section
   ========================================= */
#home {
    background: linear-gradient(135deg, var(--primary-blue-dark) 0%, var(--primary-blue) 100%);
    position: relative;
    overflow: hidden;
    padding: 100px 0;
}

/* Subtle background glowing orb */
#home::before {
    content: '';
    position: absolute;
    top: -10%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.15) 0%, rgba(255, 255, 255, 0) 70%);
    border-radius: 50%;
    z-index: 0;
}

#home .container {
    position: relative;
    z-index: 1;
}

#home h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    letter-spacing: -1px;
    margin-bottom: 1.5rem;
}

#home p.lead {
    font-size: 1.25rem;
    font-weight: 300;
    opacity: 0.9;
    margin-bottom: 2rem;
}

.hero-carousel-container {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    border: 4px solid rgba(255, 255, 255, 0.1);
}

/* =========================================
   Statistics Cards
   ========================================= */
.stat-card {
    background: var(--bg-white);
    border-radius: 16px;
    padding: 2rem 1rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-blue), var(--accent-gold));
    transform: scaleX(0);
    transition: transform 0.4s ease;
    transform-origin: left;
}

.stat-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(30, 58, 138, 0.1);
}

.stat-card:hover::after {
    transform: scaleX(1);
}

.stat-card img {
    transition: transform 0.4s ease;
}

.stat-card:hover img {
    transform: scale(1.15) rotate(5deg);
}

.stat-card h2 {
    color: var(--primary-blue) !important;
    font-size: 2.5rem;
    margin-top: 1rem;
}

/* =========================================
   Sections General
   ========================================= */
section h1 {
    position: relative;
    display: inline-block;
    padding-bottom: 0.5rem;
    margin-bottom: 2rem;
    color: var(--primary-blue) !important;
}

section h1::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 60px;
    height: 4px;
    background: var(--accent-gold);
    border-radius: 2px;
}

/* Center aligned headers */
.text-center h1::after {
    left: 50%;
    transform: translateX(-50%);
}

/* =========================================
   Cards (Departments & News)
   ========================================= */
.card {
    border: none;
    border-radius: 16px;
    background: var(--bg-white);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: all var(--transition-speed) ease;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(30, 58, 138, 0.12);
}

.card-title {
    color: var(--primary-blue) !important;
    font-weight: 700;
}

.card-img-top {
    height: 200px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.card:hover .card-img-top {
    transform: scale(1.05);
}

/* =========================================
   Forms
   ========================================= */
.form-control,
.form-select {
    border-radius: 8px;
    padding: 0.75rem 1rem;
    border: 1px solid #e2e8f0;
    background-color: var(--bg-light);
}

.form-label {
    color: var(--text-heading) !important;
    font-weight: 600;
    font-size: 0.95rem;
}

/* =========================================
   Footer
   ========================================= */
footer {
    background: var(--primary-blue-dark) !important;
    color: var(--text-light) !important;
    border-top: 4px solid var(--accent-gold);
}

footer h4,
footer h6 {
    color: var(--bg-white);
    margin-bottom: 1.2rem;
    font-weight: 600;
}

footer a.text-white {
    color: #cbd5e1 !important;
    transition: color 0.2s ease, transform 0.2s ease;
    display: inline-block;
}

footer a.text-white:hover {
    color: var(--accent-gold) !important;
    transform: translateX(5px);
}

.footer-heading::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 40px;
    height: 3px;
    background: var(--accent-gold);
    border-radius: 2px;
}

.footer-link {
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.footer-link:hover {
    color: var(--accent-gold);
    transform: translateX(8px);
}

.footer-link-small {
    transition: color 0.2s ease;
}

.footer-link-small:hover {
    color: var(--accent-gold) !important;
}

.btn-outline-light {
    border-color: rgba(255, 255, 255, 0.2);
    color: #cbd5e1;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: all 0.3s ease;
}

.btn-outline-light:hover {
    background-color: var(--accent-gold);
    border-color: var(--accent-gold);
    color: var(--text-heading);
    transform: translateY(-3px);
}

/* =========================================
   Animations (Triggered by JS)
   ========================================= */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.165, 0.84, 0.44, 1), transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.stagger-1 {
    transition-delay: 0.1s;
}

.stagger-2 {
    transition-delay: 0.2s;
}

.stagger-3 {
    transition-delay: 0.3s;
}

.stagger-4 {
    transition-delay: 0.4s;
}