/* ============================================
   RPrep - Complete Master Stylesheet
   Har page ke liye ek hi CSS - Fully Responsive
   ============================================ */

/* ---------- 1. RESET & BASE ---------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    max-width: 100%;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

body {
    width: 100%;
    overflow-x: hidden;
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #fef9f0 0%, #fff5e6 100%);
    color: #1a1a2e;
    line-height: 1.5;
}

/* ---------- 2. SAFE CONTAINERS ---------- */
.container, section, header, footer, main, article, aside, nav, div {
    max-width: 100%;
    overflow-x: hidden;
}

/* ---------- 3. IMAGES & MEDIA (Auto resize) ---------- */
img, svg, video, iframe, picture, figure, .logo-icon, .testimonial-avatar {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ---------- 4. TEXT SAFETY ---------- */
p, h1, h2, h3, h4, h5, h6, a, span, li, button, input, textarea, label {
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

/* ---------- 5. TYPOGRAPHY (Auto font size har device pe) ---------- */
html { font-size: 16px; }

@media (max-width: 480px) { html { font-size: 13px; } }
@media (min-width: 481px) and (max-width: 768px) { html { font-size: 14px; } }
@media (min-width: 769px) and (max-width: 1024px) { html { font-size: 15px; } }
@media (min-width: 1025px) { html { font-size: 16px; } }

h1 { font-size: clamp(1.8rem, 5vw, 2.5rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 4vw, 2rem); font-weight: 700; }
h3 { font-size: clamp(1.2rem, 3vw, 1.5rem); font-weight: 600; }
p { font-size: clamp(0.9rem, 2vw, 1rem); }

/* ---------- 6. NO SIDE SCROLL PROTECTION ---------- */
body, html {
    overflow-x: hidden !important;
    position: relative;
}

* {
    -webkit-tap-highlight-color: transparent;
}

/* Safe area for notched phones */
@supports (padding: max(0px)) {
    body {
        padding-left: max(0px, env(safe-area-inset-left));
        padding-right: max(0px, env(safe-area-inset-right));
    }
}

/* ---------- 7. SCROLLBAR (Clean look) ---------- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 10px; }
::-webkit-scrollbar-thumb { background: #e74c3c; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #c0392b; }

/* ---------- 8. PREMIUM HEADER ---------- */
.header {
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0,0,0,0.05);
    width: 100%;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-icon {
    font-size: 2rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, #1e3c72, #2a5298, #e74c3c);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.logo p {
    font-size: 0.7rem;
    color: #e74c3c;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
    flex-wrap: wrap;
}

.nav-links a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover { color: #e74c3c; }

.cta-btn {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white !important;
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(231,76,60,0.3);
}

/* ---------- 9. HERO SECTION ---------- */
.hero {
    text-align: center;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    position: relative;
    overflow: hidden;
    width: 100%;
}

.hero::before {
    content: "🩺";
    position: absolute;
    font-size: 300px;
    opacity: 0.05;
    bottom: -50px;
    right: -50px;
}

.hero h2 {
    font-size: clamp(2rem, 6vw, 3.5rem);
    font-family: 'Playfair Display', serif;
    margin-bottom: 1rem;
}

.hero p {
    font-size: clamp(1rem, 3vw, 1.2rem);
    max-width: 700px;
    margin: 0 auto 2rem;
    opacity: 0.9;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: clamp(1rem, 6vw, 4rem);
    flex-wrap: wrap;
    margin-top: 2rem;
}

.hero-stat { text-align: center; }
.hero-stat .number { font-size: clamp(1.8rem, 5vw, 2.8rem); font-weight: 800; }
.hero-stat .label { font-size: 0.85rem; opacity: 0.85; }

/* ---------- 10. SECTION TITLES ---------- */
.section-title {
    text-align: center;
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 3rem;
    color: #1a1a2e;
}

.section-title span {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* ---------- 11. QUOTES SECTION ---------- */
.quotes-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.quotes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.quote-card {
    background: white;
    border-radius: 1.5rem;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: all 0.3s;
}

.quote-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.quote-icon { font-size: 3rem; color: #e74c3c; margin-bottom: 1rem; }
.quote-text { font-size: 1.1rem; line-height: 1.6; color: #333; font-style: italic; margin-bottom: 1rem; }
.quote-author { font-weight: 600; color: #1e3c72; }

/* ---------- 12. EXAMS SECTION ---------- */
.exams-section {
    background: linear-gradient(135deg, #f8f9fc 0%, #f0f2f5 100%);
    padding: 4rem 2rem;
}

.exams-container { max-width: 1200px; margin: 0 auto; }
.exams-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.exam-card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    border-left: 5px solid #e74c3c;
    transition: all 0.3s;
}

.exam-card:hover {
    transform: translateX(5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.exam-card h3 { font-size: 1.3rem; margin-bottom: 0.5rem; color: #1e3c72; }
.exam-card p { color: #666; font-size: 0.9rem; margin-bottom: 1rem; }
.exam-badge {
    display: inline-block;
    background: #e74c3c10;
    color: #e74c3c;
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* ---------- 13. TESTIMONIALS SECTION ---------- */
.testimonials-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.testimonial-card {
    background: white;
    border-radius: 1.5rem;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    position: relative;
}

.testimonial-card::before {
    content: '"';
    position: absolute;
    top: 10px;
    left: 20px;
    font-size: 4rem;
    color: #e74c3c20;
    font-family: serif;
}

.testimonial-avatar {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.8rem;
    color: white;
}

.testimonial-text { font-size: 0.95rem; line-height: 1.6; color: #444; margin-bottom: 1rem; }
.testimonial-name { font-weight: 700; color: #1e3c72; }
.testimonial-role { font-size: 0.8rem; color: #e74c3c; }
.stars { color: #ffc107; margin: 0.5rem 0; font-size: 0.9rem; }

/* ---------- 14. CTA BANNER ---------- */
.cta-banner {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    margin: 2rem;
    border-radius: 2rem;
    padding: 3rem 2rem;
    text-align: center;
    color: white;
}

.cta-banner h3 { font-size: clamp(1.5rem, 4vw, 2rem); margin-bottom: 1rem; }
.cta-banner button {
    background: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    color: #e74c3c;
    cursor: pointer;
    transition: all 0.3s;
}
.cta-banner button:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

/* ---------- 15. FOOTER ---------- */
.footer {
    background: #1a1a2e;
    color: #ccc;
    margin-top: 3rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem 1rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.footer-section h4 { color: white; margin-bottom: 1rem; }
.footer-section a {
    display: block;
    color: #aaa;
    text-decoration: none;
    margin: 0.5rem 0;
    transition: color 0.3s;
}
.footer-section a:hover { color: #e74c3c; }
.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}
.social-links a {
    background: #333;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.copyright {
    text-align: center;
    padding: 1.5rem;
    border-top: 1px solid #333;
    margin-top: 2rem;
    font-size: 0.8rem;
}

/* ---------- 16. BUTTONS ---------- */
.btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    color: white;
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(30,60,114,0.3);
}

.btn-danger {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
}
.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(231,76,60,0.3);
}

/* ---------- 17. LOADING SPINNER ---------- */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e0e0e0;
    border-top-color: #2a5298;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 18. RESPONSIVE BREAKPOINTS ---------- */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        text-align: center;
    }
    .nav-links {
        justify-content: center;
    }
    .hero {
        padding: 2rem 1rem;
    }
    .hero-stats {
        flex-direction: column;
        gap: 1rem;
    }
    .quotes-section, .testimonials-section, .exams-section {
        padding: 2rem 1rem;
    }
    .quotes-grid, .exams-grid, .testimonials-grid {
        grid-template-columns: 1fr !important;
    }
    .footer-content {
        grid-template-columns: 1fr !important;
        text-align: center;
    }
    .social-links {
        justify-content: center;
    }
    .cta-banner {
        margin: 1rem;
        padding: 1.5rem;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .quotes-grid, .exams-grid, .testimonials-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (min-width: 1400px) {
    .quotes-section, .exams-container, .testimonials-section {
        max-width: 1400px;
        margin: 0 auto;
    }
}

/* ---------- 19. QUIZ/TEST PAGE STYLES ---------- */
.quiz-container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 2rem;
    background: white;
    border-radius: 1.5rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.question {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: #1e3c72;
}

.options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.option {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #f8f9fc;
    border-radius: 1rem;
    cursor: pointer;
    transition: all 0.3s;
}
.option:hover { background: #e8f0fe; }
.option input { cursor: pointer; }
.option label { cursor: pointer; flex: 1; }

.quiz-timer {
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    padding: 1rem;
    background: #1e3c72;
    color: white;
    border-radius: 1rem;
    margin-bottom: 1.5rem;
}

.quiz-progress {
    text-align: center;
    margin-bottom: 1rem;
    color: #666;
}

/* ---------- 20. SCORECARD PAGE STYLES ---------- */
.scorecard {
    max-width: 600px;
    margin: 2rem auto;
    padding: 2rem;
    background: white;
    border-radius: 1.5rem;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.score-number {
    font-size: 4rem;
    font-weight: 800;
    color: #e74c3c;
    margin: 1rem 0;
}

.score-percentage {
    font-size: 2rem;
    font-weight: 700;
    color: #2ecc71;
}

/* ---------- 21. SEARCH PAGE STYLES ---------- */
.search-box-large {
    max-width: 600px;
    margin: 2rem auto;
    display: flex;
    gap: 0.5rem;
}
.search-box-large input {
    flex: 1;
    padding: 1rem;
    border: 2px solid #ddd;
    border-radius: 50px;
    font-size: 1rem;
    outline: none;
}
.search-box-large button {
    padding: 1rem 2rem;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
}

/* ---------- 22. LEADERBOARD STYLES ---------- */
.leaderboard-table {
    width: 100%;
    max-width: 800px;
    margin: 2rem auto;
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}
.leaderboard-table th, .leaderboard-table td {
    padding: 1rem;
    text-align: center;
    border-bottom: 1px solid #eee;
}
.leaderboard-table th {
    background: #1e3c72;
    color: white;
}
.rank-1 { background: #ffd70020; font-weight: bold; color: #ff8c00; }
.rank-2 { background: #c0c0c020; }
.rank-3 { background: #cd7f3220; }

/* ---------- 23. FORM STYLES ---------- */
.form-group {
    margin-bottom: 1.5rem;
}
.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}
.form-group input, .form-group textarea, .form-group select {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 0.8rem;
    font-size: 1rem;
}
.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: #e74c3c;
}

/* ---------- 24. UTILITY CLASSES ---------- */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

/* ---------- STYLISH HERO SECTION (No Stats) ---------- */
.hero {
    text-align: center;
    padding: 5rem 2rem 8rem;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 50%, #1e3c72 100%);
    color: white;
    position: relative;
    overflow: hidden;
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero::before {
    content: "🩺";
    position: absolute;
    font-size: 400px;
    opacity: 0.08;
    bottom: -100px;
    right: -80px;
    animation: float 10s ease-in-out infinite;
}

.hero::after {
    content: "📚";
    position: absolute;
    font-size: 250px;
    opacity: 0.06;
    top: -80px;
    left: -60px;
    animation: float 8s ease-in-out infinite reverse;
}

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

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1rem;
}

.hero-badge {
    display: inline-block;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    padding: 0.5rem 1.2rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    letter-spacing: 1px;
    border: 1px solid rgba(255,255,255,0.2);
}

.hero h2 {
    font-size: clamp(2.2rem, 6vw, 4rem);
    font-weight: 800;
    font-family: 'Playfair Display', serif;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero h2 .highlight {
    background: linear-gradient(135deg, #ff6b6b, #feca57);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    position: relative;
    display: inline-block;
}

.hero p {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    max-width: 650px;
    margin: 0 auto 2rem;
    opacity: 0.9;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-btn-primary {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    padding: 0.9rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(231,76,60,0.3);
}

.hero-btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(231,76,60,0.4);
}

.hero-btn-secondary {
    background: transparent;
    color: white;
    padding: 0.9rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: 2px solid rgba(255,255,255,0.3);
}

.hero-btn-secondary:hover {
    border-color: white;
    transform: translateY(-3px);
    background: rgba(255,255,255,0.1);
}

.hero-wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    transform: rotate(180deg);
}

.hero-wave svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 60px;
}

@media (max-width: 768px) {
    .hero {
        padding: 3rem 1rem 5rem;
        min-height: auto;
    }
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    .hero-btn-primary, .hero-btn-secondary {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
    .hero-wave svg {
        height: 40px;
    }
}

/* ---------- STYLISH DROPDOWN MENU (Click + Hover Both) ---------- */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-btn {
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s;
}

.dropdown-btn:hover {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    transform: translateY(-2px);
}

.dropdown-btn i {
    font-size: 0.8rem;
    transition: transform 0.3s;
}

.dropdown.active .dropdown-btn i {
    transform: rotate(180deg);
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    min-width: 260px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
    border-radius: 1rem;
    z-index: 1000;
    margin-top: 0.5rem;
    overflow: hidden;
}

.dropdown-content a {
    color: #333;
    padding: 12px 20px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.dropdown-content a i {
    width: 24px;
    font-size: 1.1rem;
    color: #e74c3c;
}

.dropdown-content a:hover {
    background: #f8f9fc;
    border-left-color: #e74c3c;
    padding-left: 25px;
}

/* Show dropdown on hover (desktop) */
.dropdown:hover .dropdown-content {
    display: block;
}

/* Show dropdown on click (mobile/tablet) */
.dropdown.show .dropdown-content {
    display: block;
}

