/* ========================
   Rifat Math Care - Custom Styles
   Red Light Theme | Mobile First
   ======================== */

/* --- Base --- */
::selection {
    background-color: #fecaca;
    color: #991b1b;
}

html {
    scroll-behavior: smooth;
}

/* --- Navigation --- */
.nav-link {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.875rem;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #4b5563;
    transition: all 0.2s ease;
}

.nav-link:hover {
    background-color: #fef2f2;
    color: #dc2626;
}

.nav-active {
    background-color: #fef2f2;
    color: #dc2626;
    font-weight: 600;
}

.dark .nav-link { color: #9ca3af; }
.dark .nav-link:hover { background-color: rgba(220,38,38,0.1); color: #f87171; }
.dark .nav-active { background-color: rgba(220,38,38,0.15); color: #f87171; }

.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    font-size: 0.9375rem;
    color: #4b5563;
    transition: all 0.2s ease;
}

.mobile-nav-link:hover {
    background-color: #fef2f2;
    color: #dc2626;
}

.mobile-nav-active {
    background-color: #fef2f2;
    color: #dc2626;
    font-weight: 600;
}

.dark .mobile-nav-link { color: #9ca3af; }
.dark .mobile-nav-link:hover { background-color: rgba(220,38,38,0.1); color: #f87171; }
.dark .mobile-nav-active { background-color: rgba(220,38,38,0.15); color: #f87171; }

/* --- Navbar scroll shadow --- */
.navbar-scrolled {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
}
.dark .navbar-scrolled {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* --- Hero gradient --- */
.hero-gradient {
    background: linear-gradient(135deg, #fef2f2 0%, #ffffff 40%, #fff1f2 70%, #ffe4e6 100%);
}
.dark .hero-gradient {
    background: linear-gradient(135deg, #111827 0%, #0a0a0a 40%, #111827 70%, #1a0505 100%);
}

/* --- Animated gradient blob --- */
.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.3;
    animation: blob-float 8s ease-in-out infinite;
}

@keyframes blob-float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(20px, -30px) scale(1.05); }
    66% { transform: translate(-15px, 15px) scale(0.95); }
}

/* --- Card hover --- */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px -12px rgba(220, 38, 38, 0.15);
}
.dark .card-hover:hover {
    box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.4);
}

/* --- Stats counter animation --- */
.stat-number {
    font-variant-numeric: tabular-nums;
}

/* --- Course card ribbon --- */
.ribbon {
    position: absolute;
    top: 1rem;
    right: -0.5rem;
    background-color: #dc2626;
    color: white;
    padding: 0.25rem 1rem 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 0.375rem 0 0 0.375rem;
    box-shadow: 0 2px 4px rgba(220, 38, 38, 0.3);
}

.ribbon::after {
    content: '';
    position: absolute;
    right: 0;
    bottom: -0.5rem;
    border-width: 0 0.5rem 0.5rem 0;
    border-style: solid;
    border-color: transparent #991b1b transparent transparent;
}

/* --- Form focus ring --- */
.form-input {
    transition: all 0.2s ease;
    border: 1.5px solid #e5e7eb;
}

.form-input:focus {
    outline: none;
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.dark .form-input {
    background-color: #1f2937;
    border-color: #374151;
    color: #e5e7eb;
}

.dark .form-input:focus {
    border-color: #f87171;
    box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.15);
}

.dark ::selection {
    background-color: #991b1b;
    color: #fecaca;
}

/* --- Testimonial card --- */
.testimonial-card {
    position: relative;
}

.testimonial-card::before {
    content: '\201C';
    position: absolute;
    top: -0.5rem;
    left: 1.25rem;
    font-size: 4rem;
    font-family: Georgia, serif;
    color: #fecaca;
    line-height: 1;
}
.dark .testimonial-card::before {
    color: #450a0a;
}

/* --- Feature icon box --- */
.feature-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

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

@keyframes hero-float-anim {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(5deg); }
}

.hero-float-badge {
    animation: hero-badge-float 4s ease-in-out infinite;
}

@keyframes hero-badge-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* --- Smooth fade in --- */
.fade-up {
    opacity: 1;
    transform: translateY(0);
}

/* --- Pulse dot for "live" indicator --- */
.pulse-dot {
    display: inline-block;
    width: 0.5rem;
    height: 0.5rem;
    background-color: #22c55e;
    border-radius: 50%;
    animation: pulse-ring 2s ease-in-out infinite;
}

@keyframes pulse-ring {
    0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4); }
    50% { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
}

/* --- Pattern background --- */
.pattern-bg {
    background-image: radial-gradient(circle, #fecaca 1px, transparent 1px);
    background-size: 24px 24px;
}
.dark .pattern-bg {
    background-image: radial-gradient(circle, #450a0a 1px, transparent 1px);
}

/* --- Smooth scroll indicator --- */
.scroll-indicator {
    animation: bounce-down 2s ease-in-out infinite;
}

@keyframes bounce-down {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(8px); }
}

/* --- Timeline --- */
.timeline-line {
    position: absolute;
    left: 1.25rem;
    top: 3rem;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, #dc2626, #fecaca);
}

@media (min-width: 768px) {
    .timeline-line {
        left: 50%;
        transform: translateX(-50%);
    }
}

/* --- Button shine effect --- */
.btn-shine {
    position: relative;
    overflow: hidden;
}

.btn-shine::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        to right,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent
    );
    transform: rotate(30deg);
    transition: transform 0.5s ease;
}

.btn-shine:hover::after {
    transform: rotate(30deg) translateX(100%);
}

/* --- Responsive adjustments --- */
@media (max-width: 640px) {
    .hero-title {
        font-size: 1.875rem;
        line-height: 1.3;
    }
}

@media (min-width: 641px) and (max-width: 1023px) {
    .hero-title {
        font-size: 2.5rem;
    }
}

@media (min-width: 1024px) {
    .hero-title {
        font-size: 3.25rem;
    }
}
