/* ========================================
   SNT Education Academy - Custom Styles
   ======================================== */

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    overflow-x: hidden;
}

/* ========== Loading Screen ========== */
.loader-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #e5e7eb;
    border-top-color: #1e40af;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

#loader.hidden {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
}

/* ========== Navbar Styles ========== */
#navbar {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

#navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
    border-bottom: none;
}

.nav-link {
    color: #374151;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: #1e40af;
    background: rgba(30, 64, 175, 0.05);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 20px;
    height: 3px;
    background: #eab308;
    border-radius: 2px;
    transition: transform 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    transform: translateX(-50%) scaleX(1);
}

.nav-logo-text {
    color: #1e40af;
}

/* ========== Scroll Reveal ========== */
.scroll-reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger delay for children */
.scroll-reveal:nth-child(2) { transition-delay: 0.1s; }
.scroll-reveal:nth-child(3) { transition-delay: 0.2s; }
.scroll-reveal:nth-child(4) { transition-delay: 0.3s; }

/* ========== Course Cards ========== */
.course-card {
    position: relative;
    overflow: hidden;
}

.course-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #1e40af, #eab308);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s ease;
}

.course-card:hover::before {
    transform: scaleX(1);
}

/* ========== Exam Cards ========== */
.exam-card {
    position: relative;
}

.exam-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 40%, rgba(255,255,255,0.1) 100%);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.exam-card:hover::after {
    opacity: 1;
}

/* ========== Feature Cards ========== */
.feature-card {
    position: relative;
    overflow: hidden;
}

.feature-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #1e40af, #eab308);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.feature-card:hover::after {
    transform: scaleX(1);
}

/* ========== Form Styles ========== */
#inquiry-form input:focus,
#inquiry-form select:focus,
#inquiry-form textarea:focus {
    border-color: #1e40af;
    box-shadow: 0 0 0 4px rgba(30, 64, 175, 0.1);
}

#inquiry-form input:invalid:not(:placeholder-shown),
#inquiry-form select:invalid:not([value=""]) {
    border-color: #ef4444;
}

/* ========== Custom Scrollbar ========== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #1e40af, #3b82f6);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #1e3a8a, #1e40af);
}

/* ========== Selection Color ========== */
::selection {
    background: rgba(30, 64, 175, 0.2);
    color: #1e40af;
}

/* ========== Animations ========== */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes pulse-ring {
    0% {
        transform: scale(0.8);
        opacity: 1;
    }
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

/* Pulse animation for call button */
.animate-pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Hero floating animation */
.hero-float {
    animation: float 6s ease-in-out infinite;
}

/* ========== Responsive Adjustments ========== */
@media (max-width: 768px) {
    html {
        scroll-padding-top: 60px;
    }

    .scroll-reveal {
        transform: translateY(20px);
    }
}

/* ========== Print Styles ========== */
@media print {
    #navbar,
    #back-to-top,
    .fixed[aria-label],
    #loader {
        display: none !important;
    }
}

/* ========== Reduced Motion ========== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }

    .scroll-reveal {
        opacity: 1;
        transform: none;
    }
}
