/* style.css */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Modern Color Palette */
    --primary: #4f46e5;       /* Indigo 600 */
    --primary-dark: #4338ca;  /* Indigo 700 */
    --primary-light: #e0e7ff; /* Indigo 100 */
    --secondary: #0f172a;     /* Slate 900 */
    --text: #334155;          /* Slate 700 */
    --text-light: #64748b;    /* Slate 500 */
    --bg-body: #f8fafc;       /* Slate 50 */
    --white: #ffffff;
    --border: #e2e8f0;

    
    /* Shadows & Gradients */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --bg-gradient: radial-gradient(circle at top right, #eef2ff, #f8fafc);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Outfit', sans-serif;
    background: var(--bg-body);
    background-image: var(--bg-gradient);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* --- NAVIGATION --- */
nav {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--secondary);
    text-decoration: none;
    letter-spacing: -0.5px;
}
.logo span { color: var(--primary); }

.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a {
    text-decoration: none;
    color: var(--secondary);
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}
.nav-links a:hover, .nav-links a.active { color: var(--primary); }

.btn-nav {
    background: var(--primary);
    color: white !important;
    padding: 10px 24px;
    border-radius: 50px;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.2);
}
.btn-nav:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(79, 70, 229, 0.3);
}

.menu-icon { display: none; font-size: 1.5rem; color: var(--secondary); cursor: pointer; }

/* --- HERO SECTION (Home) --- */
.hero {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 80px 20px;
    position: relative;
}
.hero h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    font-weight: 800;
    color: var(--secondary);
    margin-bottom: 20px;
}
.hero h1 span {
    background: linear-gradient(to right, var(--primary), #818cf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero p {
    font-size: 1.25rem;
    color: var(--text-light);
    max-width: 600px;
    margin-bottom: 40px;
    line-height: 1.6;
}

.cta-group { display: flex; gap: 15px; flex-wrap: wrap; justify-content: center; }
.btn-primary, .btn-secondary {
    padding: 16px 32px;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: 0.3s;
    display: inline-flex; align-items: center; gap: 8px;
}
.btn-primary {
    background: var(--secondary);
    color: white;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.15);
}
.btn-primary:hover { transform: translateY(-3px); background: #1e293b; }

.btn-secondary {
    background: white;
    color: var(--secondary);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}
.btn-secondary:hover { border-color: var(--secondary); }

/* --- REVIEWS DASHBOARD --- */
.dashboard-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.search-container { position: relative; margin-bottom: 30px; }
.search-bar {
    width: 100%;
    padding: 20px 20px 20px 55px;
    border-radius: 16px;
    border: 1px solid var(--border);
    font-size: 1.1rem;
    outline: none;
    background: white;
    box-shadow: var(--shadow-md);
    transition: 0.3s;
}
.search-bar:focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-light); }
.search-icon { position: absolute; left: 22px; top: 50%; transform: translateY(-50%); color: var(--text-light); font-size: 1.2rem; }

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
}
.course-card {
    background: white;
    padding: 25px;
    border-radius: 16px;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: 0.3s;
    display: flex; justify-content: space-between; align-items: center;
}
.course-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}
.course-code { font-weight: 700; font-size: 1.2rem; color: var(--secondary); }
.review-count { background: var(--primary-light); color: var(--primary); padding: 5px 12px; border-radius: 20px; font-size: 0.8rem; font-weight: 600; }

/* --- REVIEWS DETAIL CARD DESIGN (IMPROVED) --- */
.review-detail-card {
    background: white;
    border-radius: 16px;
    padding: 35px; /* Increased Padding */
    margin-bottom: 30px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

/* Left colored border based on difficulty (Handled in JS logic roughly, but here is base) */
.review-detail-card::before {
    content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 5px;
    background: var(--primary); /* Default */
}
.review-detail-card.diff-easy::before { background: #10b981; }
.review-detail-card.diff-medium::before { background: #f59e0b; }
.review-detail-card.diff-hard::before { background: #ef4444; }

.review-header {
    display: flex; justify-content: space-between; align-items: flex-start;
    margin-bottom: 20px; padding-bottom: 20px;
    border-bottom: 1px dashed var(--border);
}

.user-profile { display: flex; gap: 15px; align-items: center; }
.avatar-circle {
    width: 50px; height: 50px; background: var(--bg-body); border: 2px solid white;
    box-shadow: var(--shadow-sm); border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem; font-weight: 700; color: var(--primary);
}

/* Difficulty Badges */
.badge { padding: 6px 14px; border-radius: 50px; font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.badge-easy { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.badge-medium { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }
.badge-hard { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }

/* --- TEXT FORMATTING (MOST IMPORTANT) --- */
.review-heading-text {
    font-size: 1.2rem; font-weight: 700; color: var(--secondary);
    margin-bottom: 15px; display: block;
}

.review-body-text {
    font-size: 1.05rem;
    line-height: 1.8; /* Improves readability */
    color: #475569;
    
    /* This makes line breaks work! */
    white-space: pre-wrap; 
    font-family: 'Outfit', sans-serif;
}

/* --- ADS & SPONSORS --- */
.ad-slot {
    background: #f1f5f9;
    border-radius: 12px;
    display: flex; justify-content: center; align-items: center;
    color: #94a3b8; font-weight: 600; text-transform: uppercase; letter-spacing: 1px;
    margin-bottom: 20px;
}
.ad-header { width: 100%; height: 90px; max-width: 728px; margin: 20px auto; }
.ad-sidebar { width: 100%; height: 250px; position: sticky; top: 100px; }
.ad-feed { width: 100%; padding: 20px; border: 2px dashed var(--border); background: transparent; margin: 30px 0; }

/* --- CONTACT PAGE DESIGN (FULLY RESPONSIVE) --- */
.contact-hero {
    text-align: center;
    padding: 80px 20px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.contact-hero h1 {
    font-size: 3rem;
    font-weight: 800;
    color: var(--secondary);
    margin-bottom: 15px;
    line-height: 1.2;
}

.contact-hero p {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Container for Cards */
.contact-cards-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin-top: 50px;
    flex-wrap: wrap; /* Important: Allows stacking on mobile */
    padding: 0 10px;
}

/* Individual Card Styling */
.contact-card {
    background: white;
    padding: 40px 30px;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
    
    /* Responsive Logic */
    flex: 1 1 300px; /* Grow, Shrink, Basis */
    max-width: 400px; /* Maximum width on desktop */
    min-width: 280px; /* Minimum width on small phones */
    width: 100%;
    
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.contact-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Icon Box */
.icon-box {
    width: 80px;
    height: 80px;
    margin: 0 auto 25px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    transition: 0.3s;
}

.email-icon { background: #e0f2fe; color: #0284c7; }
.app-icon { background: #dcfce7; color: #16a34a; }

.contact-card:hover .email-icon { background: #0284c7; color: white; }
.contact-card:hover .app-icon { background: #16a34a; color: white; }

/* Text in Card */
.contact-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 12px;
}

.contact-card p {
    color: var(--text-light);
    margin-bottom: 25px;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Button/Link */
.contact-link {
    display: inline-block;
    padding: 12px 28px;
    background: var(--secondary);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: 0.3s;
    width: 100%; /* Full width button on card */
}

.contact-link:hover {
    background: var(--primary);
    box-shadow: 0 5px 15px rgba(79, 70, 229, 0.4);
}

/* --- MOBILE SPECIFIC ADJUSTMENTS --- */
@media (max-width: 768px) {
    .contact-hero {
        padding: 50px 15px;
    }

    .contact-hero h1 {
        font-size: 2.2rem; /* Smaller font for mobile */
    }

    .contact-cards-container {
        gap: 20px;
        margin-top: 30px;
    }

    .contact-card {
        padding: 30px 20px;
        max-width: 100%; /* Take full width on mobile */
    }
}

/* --- FOOTER --- */
footer { text-align: center; padding: 40px; color: var(--text-light); font-size: 0.9rem; margin-top: auto; border-top: 1px solid var(--border); }

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .menu-icon { display: block; }
    .nav-links {
        display: none;
        position: absolute; top: 100%; left: 0; width: 100%;
        background: white; flex-direction: column; padding: 20px;
        box-shadow: var(--shadow-lg);
    }
    .nav-links.active { display: flex; animation: slideDown 0.3s forwards; }
    .hero h1 { font-size: 2.5rem; }
    .dashboard-layout { grid-template-columns: 1fr; }
    .ad-sidebar { display: none; }
}
@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
