/* ============================================
   Aditya Chhawchharia Academy - Custom Styles
   ============================================ */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: #f1f1f1;
}
::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #8B1A1A, #1B2845);
    border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #6B1212, #0F1A30);
}

/* Selection color */
::selection {
    background: #8B1A1A;
    color: #fff;
}

/* ===== Keyframe Animations ===== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(40px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-50px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes slideInRight {
    from { opacity: 0; transform: translateX(50px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50%      { transform: translateY(-15px); }
}
@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50%      { background-position: 100% 50%; }
}
@keyframes shimmer {
    0%   { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
@keyframes pulse-ring {
    0%   { transform: scale(0.8); opacity: 1; }
    100% { transform: scale(2.4); opacity: 0; }
}
@keyframes draw-line {
    from { stroke-dashoffset: 1000; }
    to   { stroke-dashoffset: 0; }
}

/* ===== Hero Animated Background ===== */
.hero-gradient {
    background: linear-gradient(135deg, #1B2845 0%, #8B1A1A 50%, #0F1A30 100%);
    background-size: 200% 200%;
    animation: gradientShift 15s ease infinite;
}

.hero-pattern {
    background-image:
        radial-gradient(circle at 20% 50%, rgba(212, 160, 23, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(139, 26, 26, 0.25) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(27, 40, 69, 0.30) 0%, transparent 50%);
}

/* ===== Decorative Grid ===== */
.bg-grid {
    background-image:
        linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
    background-size: 50px 50px;
}

/* ===== Glass-morphism Card ===== */
.glass-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

/* ===== Section Heading Decoration ===== */
.section-heading::before {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #8B1A1A, #D4A017);
    margin: 0 auto 1.25rem;
    border-radius: 2px;
}

.section-heading-left::before {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #8B1A1A, #D4A017);
    margin-bottom: 1rem;
    border-radius: 2px;
}

/* ===== Card Hover Lift ===== */
.card-lift {
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275),
                box-shadow 0.4s ease;
}
.card-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px -10px rgba(139, 26, 26, 0.25);
}

/* ===== Gradient Text ===== */
.gradient-text {
    background: linear-gradient(135deg, #8B1A1A 0%, #D4A017 50%, #1B2845 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 5s ease infinite;
}

.gradient-text-red {
    background: linear-gradient(135deg, #8B1A1A 0%, #D4A017 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ===== Shiny Button ===== */
.btn-shiny {
    position: relative;
    overflow: hidden;
}
.btn-shiny::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.6s ease;
}
.btn-shiny:hover::before {
    left: 100%;
}

/* ===== Stat Card Glow ===== */
.stat-card {
    position: relative;
    transition: all 0.4s ease;
}
.stat-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 2px;
    background: linear-gradient(135deg, #8B1A1A, #D4A017, #1B2845);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s;
}
.stat-card:hover::after {
    opacity: 1;
}

/* ===== Course Card ===== */
.course-card {
    position: relative;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.course-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(135deg, rgba(139,26,26,0.95), rgba(27,40,69,0.95));
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
}
.course-card:hover::before {
    opacity: 1;
}
.course-card .course-content {
    position: relative;
    z-index: 2;
    transition: color 0.4s ease;
}
.course-card:hover .course-content,
.course-card:hover .course-content * {
    color: #fff !important;
}

/* ===== Page Banner ===== */
.page-banner {
    background: linear-gradient(135deg, #1B2845 0%, #8B1A1A 100%);
    position: relative;
    overflow: hidden;
}
.page-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(212, 160, 23, 0.2) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.1) 0%, transparent 40%);
}
.page-banner::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
    background-size: 40px 40px;
}

/* ===== Floating Shape ===== */
.floating-shape {
    animation: float 6s ease-in-out infinite;
}

/* ===== Pulse Ring ===== */
.pulse-ring {
    position: relative;
}
.pulse-ring::before,
.pulse-ring::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: rgba(212, 160, 23, 0.4);
    animation: pulse-ring 2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}
.pulse-ring::after {
    animation-delay: 1s;
}

/* ===== Marquee ===== */
.marquee {
    display: flex;
    overflow: hidden;
    user-select: none;
    gap: 2rem;
}
.marquee__group {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-around;
    gap: 2rem;
    min-width: 100%;
    animation: scroll 30s linear infinite;
}
@keyframes scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(calc(-100% - 2rem)); }
}

/* ===== Timeline ===== */
.timeline-item {
    position: relative;
    padding-left: 2.5rem;
    padding-bottom: 2rem;
    border-left: 2px solid #e5e7eb;
}
.timeline-item:last-child { border-left: 2px solid transparent; }
.timeline-item::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 0;
    width: 14px;
    height: 14px;
    background: #8B1A1A;
    border: 3px solid #fff;
    border-radius: 50%;
    box-shadow: 0 0 0 2px #8B1A1A;
}

/* ===== Counter Number ===== */
.counter {
    display: inline-block;
    font-variant-numeric: tabular-nums;
}

/* ===== Form Input ===== */
.form-input {
    width: 100%;
    padding: 0.875rem 1.125rem;
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 0.75rem;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}
.form-input:focus {
    outline: none;
    border-color: #8B1A1A;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(139, 26, 26, 0.1);
}

/* ===== Reveal-on-scroll fallback ===== */
[data-aos] { opacity: 0; }
[data-aos].aos-animate { opacity: 1; }

/* ===== Achievement Badge ===== */
.achievement-badge {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.achievement-badge::before {
    content: '';
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: 2px dashed #D4A017;
    animation: spin 20s linear infinite;
}
@keyframes spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* ===== Decorative Quote ===== */
.testimonial-card {
    position: relative;
}
.testimonial-card .quote-mark {
    position: absolute;
    top: -10px;
    left: 20px;
    font-size: 5rem;
    line-height: 1;
    color: #8B1A1A;
    opacity: 0.15;
    font-family: Georgia, serif;
}

/* ===== Mobile menu animation ===== */
#mobileMenu.show {
    animation: fadeInUp 0.3s ease-out forwards;
}

/* ===== Header scroll effect ===== */
#mainHeader.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* ===== Wave Divider ===== */
.wave-divider {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
}
.wave-divider svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 80px;
}
.wave-divider .wave-fill {
    fill: #ffffff;
}

/* ===== Responsive tweaks ===== */
@media (max-width: 640px) {
    .section-heading::before,
    .section-heading-left::before { width: 40px; height: 2px; }
}

/* ===== Badge ===== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 1rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.075em;
}

/* ===== Decorative dots pattern ===== */
.dots-pattern {
    background-image: radial-gradient(circle, #d1d5db 1.5px, transparent 1.5px);
    background-size: 18px 18px;
}
