/* Custom CSS for Knox Learning Academy */

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

/* Global font family - Plus Jakarta Sans for everything */
* {
    font-family: 'Plus Jakarta Sans', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Custom animations */
@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fade-in 0.8s ease-out forwards;
    opacity: 0;
}

/* Mobile menu slide down animation */
@keyframes slide-down {
    from {
        opacity: 0;
        transform: translateY(-10px);
        max-height: 0;
    }
    to {
        opacity: 1;
        transform: translateY(0);
        max-height: 500px;
    }
}

.animate-slide-down {
    animation: slide-down 0.3s ease-out forwards;
}

/* Backdrop blur support for older browsers */
@supports (backdrop-filter: blur(10px)) {
    .backdrop-blur-sm {
        backdrop-filter: blur(4px);
    }
    .backdrop-blur-md {
        backdrop-filter: blur(8px);
    }
}

/* Enhanced gradient text */
.bg-clip-text {
    -webkit-background-clip: text;
    background-clip: text;
}

/* Smooth transitions for hero elements */
.hero-stat-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-stat-card:hover {
    transform: translateY(-5px) scale(1.05);
}

/* Gradient text animation */
@keyframes gradient {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.animate-gradient {
    background-size: 200% auto;
    animation: gradient 3s ease infinite;
}

/* FAQ Accordion Styles */
.faq-question {
    cursor: pointer;
    user-select: none;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s ease-out, opacity 0.3s ease-out;
    opacity: 0;
}

.faq-answer.active {
    max-height: 1000px;
    padding-top: 1rem;
    padding-bottom: 1rem;
    opacity: 1;
}

.faq-question.active .faq-icon svg {
    transform: rotate(45deg);
    transition: transform 0.3s ease;
}

.faq-question.active {
    background: linear-gradient(to right, rgba(24, 61, 108, 0.05), rgba(169, 211, 47, 0.05));
}

.dark .faq-question.active {
    background: linear-gradient(to right, rgba(24, 61, 108, 0.1), rgba(169, 211, 47, 0.1));
}

/* Custom scrollbar for webkit browsers */
::-webkit-scrollbar {
    width: 10px;
}

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

.dark ::-webkit-scrollbar-track {
    background: #1f2937;
}

::-webkit-scrollbar-thumb {
    background: #183d6c;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a9d32f;
}

/* Focus styles for accessibility */
*:focus {
    outline: 2px solid #183d6c;
    outline-offset: 2px;
}

/* Typography Standards - Consistent Font Hierarchy */
/* Use Plus Jakarta Sans for all headings */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
}

/* H1 - Main Page Titles */
h1 {
    font-size: 2.5rem; /* text-4xl */
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: -0.02em;
}

@media (min-width: 768px) {
    h1 {
        font-size: 3rem; /* text-5xl */
        line-height: 1.2;
    }
}

@media (min-width: 1024px) {
    h1 {
        font-size: 3.75rem; /* text-6xl */
        line-height: 1.2;
    }
}

/* H2 - Section Titles */
h2 {
    font-size: 1.875rem; /* text-3xl */
    line-height: 1.3;
    font-weight: 700;
    letter-spacing: -0.01em;
}

@media (min-width: 768px) {
    h2 {
        font-size: 2.25rem; /* text-4xl */
        line-height: 1.3;
    }
}

@media (min-width: 1024px) {
    h2 {
        font-size: 3rem; /* text-5xl */
        line-height: 1.3;
    }
}

/* H3 - Subsection Titles */
h3 {
    font-size: 1.5rem; /* text-2xl */
    line-height: 1.4;
    font-weight: 600;
    letter-spacing: -0.01em;
}

@media (min-width: 768px) {
    h3 {
        font-size: 1.875rem; /* text-3xl */
        line-height: 1.4;
    }
}

/* H4 - Card Titles */
h4 {
    font-size: 1.25rem; /* text-xl */
    line-height: 1.4;
    font-weight: 600;
}

@media (min-width: 768px) {
    h4 {
        font-size: 1.5rem; /* text-2xl */
        line-height: 1.4;
    }
}

/* H5, H6 */
h5, h6 {
    font-weight: 600;
    line-height: 1.5;
}

/* Body Text - Standard (Plus Jakarta Sans font) */
body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1rem; /* text-base */
    line-height: 1.7;
    font-weight: 400;
    color: #1f2937;
}

.dark body {
    color: #f3f4f6;
}

@media (min-width: 768px) {
    body {
        font-size: 1.0625rem; /* Slightly larger for better readability */
        line-height: 1.75;
    }
}

/* Paragraph text improvements */
p {
    line-height: 1.75;
    color: #374151;
}

.dark p {
    color: #d1d5db;
}

/* Improved text contrast for better readability */
.text-gray-700 {
    color: #374151 !important;
}

.dark .text-gray-700 {
    color: #d1d5db !important;
}

.text-gray-600 {
    color: #4b5563 !important;
}

.dark .text-gray-600 {
    color: #e5e7eb !important;
}

.text-gray-300 {
    color: #d1d5db !important;
}

.dark .text-gray-300 {
    color: #9ca3af !important;
}

/* Small Text */
.text-small {
    font-size: 0.875rem; /* text-sm */
}

@media (min-width: 768px) {
    .text-small {
        font-size: 1rem; /* text-base */
    }
}

/* Extra Small Text / Badges */
.text-xs {
    font-size: 0.75rem; /* text-xs */
}

@media (min-width: 768px) {
    .text-xs {
        font-size: 0.875rem; /* text-sm */
    }
}

/* Standardized Card Styles */
.card {
    border-radius: 0.75rem; /* rounded-xl */
    padding: 1.5rem; /* p-6 */
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); /* shadow-lg */
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04); /* shadow-xl */
    transform: translateY(-2px);
}

.card-large {
    border-radius: 1rem; /* rounded-2xl */
    padding: 2rem; /* p-8 */
}

/* Standardized Button Styles */
.btn-primary {
    background-color: #a9d32f;
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: #8fb026;
    transform: scale(1.05);
}

.btn-secondary {
    background-color: #183d6c;
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background-color: #123055;
    transform: scale(1.05);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid currentColor;
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

/* Standardized Icon Sizes */
.icon-sm {
    width: 1rem;
    height: 1rem;
}

.icon-md {
    width: 1.5rem;
    height: 1.5rem;
}

.icon-lg {
    width: 2rem;
    height: 2rem;
}

.icon-xl {
    width: 3rem;
    height: 3rem;
}

/* Leading relaxed utility for better text spacing */
.leading-relaxed {
    line-height: 1.75;
}

/* Improved section transitions */
section {
    transition: background-color 0.3s ease;
}

/* Better visual separation between sections */
section + section {
    border-top: 1px solid rgba(229, 231, 235, 0.5);
}

.dark section + section {
    border-top-color: rgba(55, 65, 81, 0.5);
}

/* Print styles */
@media print {
    header, footer {
        display: none;
    }
}

/* Exam Registration Popup Modal Styles */
#registrationModal {
    animation: fadeIn 0.3s ease-out;
}

#registrationModal .modal-content {
    animation: slideUp 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(30px) scale(0.95);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.animate-fadeIn {
    animation: fadeIn 0.3s ease-out;
}

.animate-slideUp {
    animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Countdown Timer Styles */
.countdown-box {
    transition: transform 0.3s ease;
}

.countdown-box:hover {
    transform: scale(1.05);
}

/* Exam Registration Section Styles */
#examRegistration {
    position: relative;
}

#examRegistration::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(24, 61, 108, 0.1) 0%, rgba(169, 211, 47, 0.1) 100%);
    pointer-events: none;
}

/* Slow spin animation for icons */
@keyframes spin-slow {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.animate-spin-slow {
    animation: spin-slow 3s linear infinite;
}

/* Prize card glow animation */
@keyframes prize-glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(234, 179, 8, 0.3), 0 0 40px rgba(234, 179, 8, 0.2);
    }
    50% {
        box-shadow: 0 0 30px rgba(234, 179, 8, 0.5), 0 0 60px rgba(234, 179, 8, 0.3);
    }
}

.prize-card-glow {
    animation: prize-glow 2s ease-in-out infinite;
}

/* Shimmer effect for prize cards */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.prize-shimmer {
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent
    );
    background-size: 1000px 100%;
    animation: shimmer 3s infinite;
}

/* Enhanced bounce for badges */
@keyframes bounce-slow {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.animate-bounce-slow {
    animation: bounce-slow 2s ease-in-out infinite;
}

/* Registration Form Modal Styles - Full Screen */
#registrationFormModal {
    animation: fadeIn 0.3s ease-out;
    z-index: 110 !important;
}

#registrationFormModal iframe {
    width: 100%;
    height: 100%;
    min-height: 100vh;
}

/* Ensure form modal takes full viewport */
#registrationFormModal {
    width: 100vw;
    height: 100vh;
    max-width: 100vw;
    max-height: 100vh;
}

