/* ========================================
   REVAKAA - STUDY SERVICES PAGE
   styles.css
   ======================================== */

/* === CSS Variables (Design System) === */
:root {
    --primary: 210 100% 50%;
    --primary-foreground: 0 0% 100%;
    --accent: 210 40% 95%;
    --background: 0 0% 100%;
    --foreground: 0 0% 15%;
    --muted: 210 40% 96%;
    --muted-foreground: 215.4 16.3% 46.9%;
    --border: 214.3 31.8% 91.4%;
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease-out;
}

/* Dark Theme */
html.dark-theme {
    --primary: 210 100% 50%;
    --accent: 217.2 32.6% 17.5%;
    --background: 222.2 84% 4.9%;
    --foreground: 210 40% 98%;
    --muted: 217.2 32.6% 17.5%;
    --muted-foreground: 215 20.2% 65.1%;
    --border: 217.2 32.6% 17.5%;
}

/* === Base Styles === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: hsl(var(--background));
    color: hsl(var(--foreground));
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* === Layout Container === */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* === Buttons === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    background: transparent;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
    box-shadow: var(--shadow);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.btn-outline {
    border: 1px solid hsl(var(--border));
    color: hsl(var(--foreground));
}

.btn-outline:hover {
    background: hsl(var(--accent));
    border-color: hsl(var(--primary));
}

.btn-ghost {
    color: hsl(var(--foreground));
}

.btn-ghost:hover {
    background: hsl(var(--accent));
}

.btn-icon {
    color: hsl(var(--foreground));
    width: 2.5rem;
    height: 2.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

/* === Header & Navigation === */
.header {
    position: sticky;
    top: 0;
    z-index: 50;
    width: 100%;
    background: hsl(var(--background) / 0.95);
    border-bottom: 1px solid hsl(var(--border));
    backdrop-filter: blur(10px);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 4rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.logo img {
    height: 2rem;
    width: auto;
}

.nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    color: inherit;
    text-decoration: none;
    padding: 3px 0;
    transition: var(--transition);
}

.nav-item:hover {
    color: hsl(var(--primary));
}

.nav-item.active {
    font-weight: 600;
    color: hsl(var(--primary));
}

.user-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* === Mobile Navigation Drawer === */
.mobile-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: #fff;
    z-index: 56;
    padding: 2rem 1rem;
    box-shadow: -2px 0 10px rgba(0,0,0,0.09);
    transition: right 0.3s ease;
    overflow-y: auto;
}

.mobile-nav.is-open {
    right: 0;
}

.mobile-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-nav ul li {
    margin-bottom: 1rem;
}

.mobile-nav ul li a,
.mobile-nav ul li button {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: hsl(var(--foreground));
    font-weight: 500;
    padding: 0.75rem;
    border-radius: 0.375rem;
    background: none;
    border: none;
    font: inherit;
    width: 100%;
    transition: background 0.2s;
}

.mobile-nav ul li a:hover,
.mobile-nav ul li button:hover {
    background: hsl(var(--muted));
}

/* === Overlay === */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 55;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0s 0.3s;
}

.overlay.is-open {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s;
}

/* === Responsive Breakpoints === */
@media (max-width: 768px) {
    .nav,
    .user-actions .btn-outline,
    .user-actions .btn-primary,
    .user-actions .btn-ghost {                      
        display: none;
    }
    .mobile-menu-toggle {
        display: inline-flex;
        z-index: 60;
    }
}

@media (min-width: 769px) {
    .mobile-nav,
    .overlay {
        display: none !important;
    }
}

/* Dark Theme Styling */
html.dark-theme .header,
html.dark-theme body {
    background: hsl(var(--background));
    color: hsl(0deg 0% 100%);
}

html.dark-theme .nav-item,
html.dark-theme .btn-outline,
html.dark-theme .btn-ghost {
    color: hsl(0deg 0% 0%);
}

html.dark-theme .mobile-nav {
    background: #242a37;
}

html.dark-theme .mobile-nav ul li a,
html.dark-theme .mobile-nav ul li button {
    color: #fff;
}

html.dark-theme .mobile-nav ul li a:hover,
html.dark-theme .mobile-nav ul li button:hover {
    background: #303646;
}

/* === Hero Section === */
.hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, hsl(210, 100%, 95%), hsl(210, 100%, 98%));
    padding: 5rem 0;
    border-bottom: 1px solid hsl(var(--border));
}

.hero-content {
    color: hsl(var(--foreground));
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.page-title {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
    color: hsl(0deg 0% 0%);
}

.page-subtitle {
    font-size: 1.125rem;
    color: hsl(0deg 0% 0%);
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-hero {
    min-width: 180px;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
}

/* === Features Section === */
.features-section {
    padding: 5rem 0;
}

.section-title {
    font-size: 2.25rem;
    font-weight: bold;
    text-align: center;
    margin-bottom: 3rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: hsl(var(--accent));
    border-radius: 0.5rem;
    padding: 1.5rem;
    transition: var(--transition);
    border: 1px solid hsl(var(--border));
}

.feature-card:hover {
    transform: translateY(-0.25rem);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.5rem;
    height: 3.5rem;
    margin-bottom: 1rem;
    background: hsl(var(--primary) / 0.1);
    border-radius: 50%;
    transition: var(--transition);
}

.feature-icon i {
    width: 1.75rem;
    height: 1.75rem;
    color: hsl(var(--primary));
}

.feature-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.feature-desc {
    color: hsl(var(--muted-foreground));
    line-height: 1.6;
}

/* === How It Works === */
.how-it-works {
    padding: 5rem 0;
    background: hsl(var(--accent));
}

.how-it-works .section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.step-card {
    /* background: white; */
    border-radius: 0.5rem;
    padding: 1.5rem;
    text-align: center;
    border: 1px solid hsl(var(--border));
    box-shadow: var(--shadow);
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    background: hsl(var(--primary));
    color: #ffffff;
    border-radius: 50%;
    font-weight: bold;
    margin-bottom: 1rem;
}

/* === Subjects Section === */
.subjects-section {
    padding: 5rem 0;
}

.subjects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.subject-item {
    background: hsl(var(--accent));
    border: 1px solid hsl(var(--border));
    border-radius: 0.375rem;
    padding: 0.75rem;
    text-align: center;
    font-weight: 500;
    transition: var(--transition);
}

.subject-item:hover {
    background: hsl(var(--primary) / 0.1);
    transform: translateY(-2px);
}

/* === CTA Section === */
.cta-section {
    padding: 5rem 0;
    background: linear-gradient(135deg, hsl(var(--primary) / 0.1), hsl(var(--accent)));
    border-radius: 1rem;
    margin: 0 1rem;
}

.cta-section .container {
    max-width: 800px;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* === Testimonials === */
.testimonials-section {
    padding: 5rem 0;
    background: hsl(var(--accent));
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.testimonial-card {
    background: white;
    border-radius: 0.5rem;
    padding: 1.5rem;
    border: 1px solid hsl(var(--border));
    box-shadow: var(--shadow);
}

.testimonial-content {
    margin-bottom: 1.5rem;
}

.testimonial-content p {
    font-style: italic;
    color: hsl(var(--muted-foreground));
    line-height: 1.7;
}

.testimonial-author {
    text-align: right;
}

.testimonial-author strong {
    display: block;
    color: hsl(var(--foreground));
    margin-bottom: 0.25rem;
}

.testimonial-author span {
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
}

/* === FAQ Section === */
.faq-section {
    padding: 5rem 0;
}

.faq-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    border: 1px solid hsl(var(--border));
    border-radius: 0.5rem;
    overflow: hidden;
    background: hsl(var(--accent));
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.faq-question:hover {
    background: hsl(var(--muted));
}

.faq-question i {
    transition: transform 0.2s ease;
    flex-shrink: 0;
    margin-left: 1rem;
}

.faq-item.is-open .faq-question i {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s ease-out;
}

.faq-answer p {
    padding: 0 1.5rem 1.5rem;
    color: hsl(var(--muted-foreground));
}

.faq-item.is-open .faq-answer {
    max-height: 200px;
}

/* === Footer === */
.footer {
    background: hsl(var(--background));
    color: hsl(var(--foreground));
    padding: 4rem 0 2rem;
    border-top: 1px solid hsl(var(--border));
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-logo img {
    height: 2.5rem;
    margin-bottom: 1rem;
}

.footer-description {
    color: hsl(var(--muted-foreground));
    line-height: 1.7;
}

.footer-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: hsl(var(--foreground));
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-link {
    color: hsl(var(--muted-foreground));
    text-decoration: none;
    transition: var(--transition);
}

.footer-link:hover {
    color: hsl(var(--primary));
}

.footer-bottom {
    border-top: 1px solid hsl(var(--border));
    padding-top: 2rem;
}

.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.copyright {
    color: hsl(var(--muted-foreground));
    font-size: 0.875rem;
}

.footer-bottom-links {
    display: flex;
    gap: 1.5rem;
}

.footer-bottom-link {
    color: hsl(var(--muted-foreground));
    text-decoration: none;
    font-size: 0.875rem;
    transition: var(--transition);
}

.footer-bottom-link:hover {
    color: hsl(var(--primary));
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .page-title {
        font-size: 2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-hero {
        width: 100%;
        max-width: 300px;
    }
    
    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
    }
}