/* --- General Styles & Variables --- */
:root {
    --primary-color: #0a2e5c;
    --secondary-color: #ff7f50;
    --accent-color: #4A90E2;
    --background-color: #f8f9fa;
    --text-color: #343a40;
    --white-color: #ffffff;
    --heading-font: 'Poppins', sans-serif;
    --body-font: 'Inter', sans-serif;
}

body {
    font-family: var(--body-font);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: var(--background-color);
    color: var(--text-color);
    scroll-behavior: smooth;
    overflow-x: hidden;
}

.container { width: 90%; max-width: 1200px; margin: auto; overflow: hidden; padding: 20px 0; }

.section-title {
    text-align: center;
    font-family: var(--heading-font);
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 50px;
    position: relative;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.section-title.is-visible { opacity: 1; transform: translateY(0); }
.section-title::after { content: ''; display: block; width: 80px; height: 4px; background: var(--secondary-color); margin: 15px auto 0; border-radius: 2px; }

/* --- Splash Screen --- */
#splash-screen { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-image: url('../images/background.gif'); background-size: cover; background-position: center; z-index: 10000; transition: opacity 1.5s ease-out, visibility 1.5s; display: flex; justify-content: center; align-items: center; }
.splash-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(10, 46, 92, 0.7); }
.splash-content { position: relative; z-index: 1; text-align: center; color: var(--white-color); }
.splash-logo { max-width: 150px; animation: fadeInScale 1.5s ease-out forwards; }
#splash-screen h1 { font-family: var(--heading-font); color: var(--white-color); margin-top: 20px; opacity: 0; animation: fadeIn 1s 0.5s ease-out forwards; }
#main-content.hidden { display: none; }
@keyframes fadeInScale { from { transform: scale(0.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* --- Animated Navbar --- */
header { background: rgba(255, 255, 255, 0.8); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); padding: 15px 0; position: sticky; top: 0; z-index: 1000; box-shadow: 0 2px 15px rgba(0,0,0,0.1); }
header .container { display: flex; justify-content: space-between; align-items: center; }
.logo-container { display: flex; align-items: center; font-family: var(--heading-font); font-size: 1.5rem; color: var(--primary-color); font-weight: 700; }
.header-logo { width: 50px; margin-right: 15px; }
nav a { font-family: var(--heading-font); color: var(--primary-color); text-decoration: none; margin-left: 30px; font-weight: 500; position: relative; padding: 5px 0; transition: color 0.3s ease; }
nav a::after { content: ''; position: absolute; width: 100%; height: 3px; bottom: -5px; left: 0; background-color: var(--secondary-color); transform: scaleX(0); transform-origin: bottom right; transition: transform 0.3s ease-out; }
nav a:hover { color: var(--primary-color); }
nav a:hover::after { transform: scaleX(1); transform-origin: bottom left; }

/* --- Cinematic Hero Section --- */
#hero { color: var(--white-color); text-align: center; padding: 120px 0; position: relative; overflow: hidden; }
.hero-background {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(45deg, #0a2e5c, #0056b3, #4A90E2);
    background-size: 400% 400%;
    animation: gradient-animation 15s ease infinite;
    z-index: 1;
}
@keyframes gradient-animation { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
.hero-content { position: relative; z-index: 2; }
#hero h2 { font-family: var(--heading-font); font-size: 3.8rem; font-weight: 700; margin-bottom: 20px; }
#hero p { font-size: 1.3rem; margin-bottom: 40px; max-width: 700px; margin-left: auto; margin-right: auto; }

/* --- Buttons with Glow Effect --- */
.cta-button { background: var(--secondary-color); color: var(--white-color); padding: 15px 35px; text-decoration: none; border: none; border-radius: 50px; font-weight: 700; font-family: var(--heading-font); transition: transform 0.3s ease, box-shadow 0.3s ease; cursor: pointer; box-shadow: 0 4px 15px rgba(255, 127, 80, 0.4); }
.cta-button:hover { transform: translateY(-3px); box-shadow: 0 7px 25px rgba(255, 127, 80, 0.6), 0 0 20px rgba(255, 127, 80, 0.4); }

/* --- Live Counter Section --- */
#stats { display: flex; justify-content: space-around; text-align: center; padding: 40px 0; background: var(--white-color); border-radius: 12px; margin: -60px auto 0; position: relative; z-index: 5; box-shadow: 0 10px 30px rgba(0,0,0,0.1); max-width: 1000px; }
.stat-item { padding: 0 20px; }
.stat-number { font-size: 3rem; font-weight: 700; color: var(--primary-color); }
.stat-label { font-size: 1rem; color: #555; }

/* --- Features & Courses Sections with On-Scroll Animation --- */
#about, #courses, #comparison, #contact { padding: 80px 0; }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 30px; }
.feature-item, .course-card {
    transition: transform 0.4s ease, box-shadow 0.4s ease, opacity 0.6s ease;
    opacity: 0;
    transform: translateY(30px);
}
.feature-item.is-visible, .course-card.is-visible {
    opacity: 1;
    transform: translateY(0);
    transition-delay: calc(0.1s * var(--i));
}
.feature-item { background: var(--white-color); padding: 30px; text-align: center; border-radius: 12px; box-shadow: 0 4px 20px rgba(0,0,0,0.06); }
.feature-item:hover { transform: translateY(-10px) !important; box-shadow: 0 10px 30px rgba(0,0,0,0.1); }
.feature-item h3 { font-family: var(--heading-font); color: var(--primary-color); font-size: 1.5rem; margin-bottom: 15px; }

.course-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 30px; }
.course-card { background: var(--white-color); border-radius: 12px; overflow: hidden; box-shadow: 0 4px 20px rgba(0,0,0,0.08); display: flex; flex-direction: column; }
.course-card:hover { transform: translateY(-10px) !important; box-shadow: 0 10px 30px rgba(0,0,0,0.12); }
.course-card:hover .card-image img { transform: scale(1.05); }
.card-image { overflow: hidden; }
.card-image img { width: 100%; height: 220px; object-fit: cover; transition: transform 0.4s ease; }
.course-content { padding: 25px; flex-grow: 1; display: flex; flex-direction: column; }
.course-content h3 { font-family: var(--heading-font); color: var(--primary-color); font-size: 1.6rem; margin-top: 0; }
.course-content ul { list-style-type: '✓'; padding-left: 20px; flex-grow: 1; color: #555; }
.course-content li { margin-bottom: 10px; padding-left: 10px; }
.course-button { background: var(--primary-color); color: var(--white-color); border: none; padding: 12px 25px; border-radius: 50px; cursor: pointer; font-weight: 600; font-family: var(--heading-font); align-self: flex-start; transition: background-color 0.3s ease; margin-top: 15px; }
.course-button:hover { background: var(--secondary-color); }

/* --- Forms & Comparison --- */
#comparison p, .contact-subtitle { max-width: 800px; margin: 0 auto 40px auto; text-align: center; font-size: 1.1rem; }
.graph-container { background: var(--white-color); padding: 30px; border-radius: 12px; box-shadow: 0 4px 20px rgba(0,0,0,0.08); height: 500px; position: relative; }
.contact-form { max-width: 800px; margin: auto; }
.form-group { display: flex; gap: 20px; margin-bottom: 20px; }
.form-group input, .form-group textarea { width: 100%; padding: 15px; border: 1px solid #ddd; border-radius: 8px; font-family: var(--body-font); font-size: 1rem; transition: border-color 0.3s ease, box-shadow 0.3s ease; }
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--accent-color); box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.2); }
.contact-form button { display: block; margin: 20px auto 0; }

/* --- Pre-booking & Payment Modal --- */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.6); display: flex; justify-content: center; align-items: center; z-index: 2000; opacity: 0; visibility: hidden; transition: opacity 0.3s ease, visibility 0.3s ease; }
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal-content { background: var(--white-color); padding: 40px; border-radius: 12px; width: 90%; max-width: 500px; text-align: center; position: relative; transform: scale(0.9); transition: transform 0.3s ease; overflow: hidden; }
.modal-overlay.active .modal-content { transform: scale(1); }
.modal-close-btn { position: absolute; top: 15px; right: 15px; background: none; border: none; font-size: 2rem; cursor: pointer; color: #aaa; z-index: 10; }
#prebook-step, #payment-step { transition: transform 0.4s ease, opacity 0.4s ease; }
#payment-step.hidden, #prebook-step.hidden { position: absolute; opacity: 0; transform: translateX(100%); pointer-events: none; }
#prebook-step.hidden { transform: translateX(-100%); }
#prebook-form .form-group { flex-direction: column; }
.price-display { font-size: 1.5rem; font-weight: 600; color: var(--text-color); margin: 20px 0; display: flex; justify-content: center; align-items: center; gap: 10px; }
.price-display strong { color: var(--primary-color); font-size: 1.8rem; }
.payment-details { margin: 20px 0; }
.qr-code { max-width: 180px; margin-bottom: 15px; border-radius: 8px; }
.upi-id { background: #f0f0f0; padding: 10px; border-radius: 8px; font-weight: 600; display: inline-flex; align-items: center; gap: 10px; }
#copy-upi-btn { background: var(--primary-color); color: white; border: none; border-radius: 5px; padding: 5px 10px; cursor: pointer; }
.payment-apps { display: flex; justify-content: center; gap: 15px; margin-top: 20px; }
.payment-apps img { height: 40px; width: auto; }
.back-button { background: none; border: 1px solid #ccc; color: #555; padding: 10px 20px; border-radius: 50px; cursor: pointer; margin-top: 20px; transition: background 0.3s ease, color 0.3s ease; }
.back-button:hover { background: #eee; color: #111; }

/* --- Footer --- */
footer { background: #111; color: #aaa; text-align: center; padding: 30px 0; }
footer a { color: var(--white-color); text-decoration: none; transition: color 0.3s ease; }
footer a:hover { color: var(--secondary-color); }

/* --- Responsive Design --- */
@media(max-width: 768px) {
    .section-title { font-size: 2.2rem; }
    header .container { flex-direction: column; }
    .logo-container { margin-bottom: 15px; }
    nav { width: 100%; display: flex; justify-content: center; }
    nav a { margin: 0 15px; }
    #hero h2 { font-size: 2.8rem; }
    .form-group { flex-direction: column; }
    .graph-container { height: 400px; }
    #stats { flex-direction: column; gap: 30px; padding: 30px; }
}
@media(max-width: 480px) {
    nav a { margin: 0 10px; font-size: 0.9rem; }
    .graph-container { height: 350px; }
}