/* Central High School Professional Design System */
:root {
    --primary-blue: #0a3d62;
    --secondary-blue: #1e90ff;
    --accent-orange: #ff9f1a;
    --accent-teal: #00b894;
    --light-gray: #f8f9fa;
    --medium-gray: #e9ecef;
    --dark-gray: #2c3e50;
    --success-green: #00b894;
    --warning-yellow: #fdcb6e;
    --danger-red: #e17055;
    
    --gradient-primary: linear-gradient(135deg, #0a3d62, #1e90ff);
    --gradient-accent: linear-gradient(135deg, #ff9f1a, #e17055);
    --gradient-success: linear-gradient(135deg, #00b894, #00cec9);
    
    --shadow-sm: 0 2px 10px rgba(0,0,0,0.08);
    --shadow-md: 0 5px 20px rgba(0,0,0,0.12);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.15);
    --shadow-glow: 0 0 20px rgba(26, 115, 232, 0.3);
    
    --border-radius-sm: 8px;
    --border-radius-md: 12px;
    --border-radius-lg: 20px;
    --border-radius-xl: 30px;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #333;
    line-height: 1.6;
    background-color: #f9fbfd;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.display-1 { font-size: 3.5rem; }
.display-2 { font-size: 3rem; }
.display-3 { font-size: 2.5rem; }

.section-title {
    position: relative;
    padding-bottom: 15px;
    margin-bottom: 2.5rem;
    color: var(--primary-blue);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 70px;
    height: 4px;
    background: var(--gradient-accent);
    border-radius: 2px;
}

.section-title.center::after {
    left: 50%;
    transform: translateX(-50%);
}

/* Navigation Enhancement */
.navbar {
    backdrop-filter: blur(10px);
    background: rgba(10, 61, 98, 0.95) !important;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    padding: 0.8rem 0;
}

.navbar.scrolled {
    padding: 0.5rem 0;
    box-shadow: var(--shadow-lg);
}

.navbar-brand img {
    height: 55px;
    transition: transform 0.3s ease;
}

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

/* Hero Sections */
.hero-section {
    padding: 120px 0 80px;
    background: var(--gradient-primary);
    color: white;
    position: relative;
    overflow: hidden;
}

.hero-section::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 1000 1000"><path fill="rgba(255,255,255,0.05)" d="M0,0L1000,0L1000,1000L0,1000Z"/></svg>');
    background-size: cover;
}

/* Cards with Glow Effect */
.glow-card {
    background: white;
    border-radius: var(--border-radius-md);
    border: none;
    box-shadow: var(--shadow-md);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.glow-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-primary);
    opacity: 0;
    z-index: -1;
    transition: opacity 0.4s ease;
}

.glow-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-glow);
}

.glow-card:hover::before {
    opacity: 0.05;
}

.glow-card.primary {
    border-top: 4px solid var(--primary-blue);
}

.glow-card.accent {
    border-top: 4px solid var(--accent-orange);
}

.glow-card.teal {
    border-top: 4px solid var(--accent-teal);
}

/* Image Hover Effects */
.img-hover-zoom {
    overflow: hidden;
    border-radius: var(--border-radius-md) var(--border-radius-md) 0 0;
}

.img-hover-zoom img {
    transition: transform 0.5s ease;
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.glow-card:hover .img-hover-zoom img {
    transform: scale(1.08);
}

/* Stats Counter */
.stat-card {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius-md);
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

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

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    line-height: 1;
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

.timeline-item {
    position: relative;
    margin-bottom: 2rem;
    padding-left: 30px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -36px;
    top: 5px;
    width: 15px;
    height: 15px;
    background: var(--accent-orange);
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 0 0 3px var(--accent-orange);
}

/* Buttons */
.btn-primary {
    background: var(--gradient-primary);
    border: none;
    padding: 12px 28px;
    border-radius: var(--border-radius-md);
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.btn-accent {
    background: var(--gradient-accent);
    border: none;
    padding: 12px 28px;
    border-radius: var(--border-radius-md);
    font-weight: 600;
    color: white;
    transition: all 0.3s ease;
}

.btn-outline-primary {
    border: 2px solid var(--primary-blue);
    color: var(--primary-blue);
    background: transparent;
    padding: 10px 26px;
    border-radius: var(--border-radius-md);
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    background: var(--primary-blue);
    color: white;
    transform: translateY(-3px);
}

/* Form Styling */
.form-control {
    padding: 12px 16px;
    border: 2px solid var(--medium-gray);
    border-radius: var(--border-radius-md);
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--secondary-blue);
    box-shadow: 0 0 0 3px rgba(30, 144, 255, 0.1);
}

/* Subject Buttons */
.subject-btn {
    padding: 20px;
    border-radius: var(--border-radius-md);
    background: white;
    border: 2px solid var(--medium-gray);
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.subject-btn:hover, .subject-btn.active {
    border-color: var(--secondary-blue);
    background: rgba(30, 144, 255, 0.05);
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.subject-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

/* Chat Interface */
.chat-container {
    height: 500px;
    border-radius: var(--border-radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.chat-messages {
    height: 400px;
    overflow-y: auto;
    padding: 20px;
    background: white;
}

.message {
    padding: 12px 16px;
    border-radius: 18px;
    margin-bottom: 10px;
    max-width: 80%;
    animation: fadeInUp 0.3s ease;
}

.user-message {
    background: var(--gradient-primary);
    color: white;
    margin-left: auto;
}

.ai-message {
    background: var(--light-gray);
    color: #333;
}

/* Progress Bars */
.progress {
    height: 8px;
    border-radius: 4px;
    background: var(--medium-gray);
    overflow: hidden;
}

.progress-bar {
    background: var(--gradient-primary);
    border-radius: 4px;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: var(--shadow-lg);
}

.back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-glow);
}

/* Responsive Design */
@media (max-width: 768px) {
    .display-1 { font-size: 2.5rem; }
    .display-2 { font-size: 2.2rem; }
    .display-3 { font-size: 1.8rem; }
    
    .hero-section {
        padding: 100px 0 60px;
    }
    
    .stat-number {
        font-size: 2.2rem;
    }
}

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

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

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

@keyframes glow {
    0%, 100% { box-shadow: 0 0 20px rgba(26, 115, 232, 0.3); }
    50% { box-shadow: 0 0 40px rgba(26, 115, 232, 0.6); }
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    33% { transform: translateY(-20px) rotate(120deg); }
    66% { transform: translateY(10px) rotate(240deg); }
}

@keyframes cardEntrance {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Animation Utilities */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; }

/* Card Animations */
.student-card, .alumni-card, .feature-card {
    animation: cardEntrance 0.6s ease forwards;
    animation-play-state: paused;
}

.student-card.animate-in, .alumni-card.animate-in, .feature-card.animate-in {
    animation-play-state: running;
}

/* Loading States */
.loading-shimmer {
    background: linear-gradient(90deg, 
        #f0f0f0 25%, 
        #e0e0e0 50%, 
        #f0f0f0 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite linear;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Hover Effects */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.hover-glow {
    transition: box-shadow 0.3s ease;
}

.hover-glow:hover {
    box-shadow: 0 0 25px rgba(26, 115, 232, 0.3);
}

/* Page Transitions */
.page-transition-enter {
    animation: pageEnter 0.5s ease forwards;
}

.page-transition-exit {
    animation: pageExit 0.5s ease forwards;
}

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

@keyframes pageExit {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

/* Ripple Effect */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%);
    transform-origin: 50% 50%;
}

.ripple:focus:not(:active)::after {
    animation: ripple 1s ease-out;
}

@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 0.5;
    }
    100% {
        transform: scale(20, 20);
        opacity: 0;
    }
}

/* Scroll Animations */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, #0a3d62, #1e90ff);
    z-index: 9999;
    transition: width 0.1s ease;
}

/* Typing Animation */
.typing-animation {
    display: inline-block;
    overflow: hidden;
    border-right: 2px solid #0a3d62;
    white-space: nowrap;
    animation: typing 3.5s steps(40, end), blink-caret 0.75s step-end infinite;
}

@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}

@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: #0a3d62 }
}