/*
|==========================================================================
| 🎨 Global Styles & Variables
|==========================================================================
*/

/* 🎨 CSS Variables */

/* 🎨 Global Reset and Body */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-family-base);
}
body {
    background-color: var(--light-bg);
    color: var(--text-color);
    line-height: 1.6;
}
/* Font Awesome dependency is noted here for Exercise component's pseudo-element */
/* .exercise::before { content: '\f303'; font-family: 'Font Awesome 5 Free'; font-weight: 900; } */


/*
|==========================================================================
| 🧱 Layout & Containers
|==========================================================================
*/

/* 🧱 Standard Containers */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}
.page-container {
    max-width: 900px;
    margin: 20px auto;
    padding: 10px;
    background-color: var(--white);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    text-align: right;
}
.content {
    padding: 0 30px 30px; /* Merged: used for content padding */
}


/*
|==========================================================================
| ⚙️ Header, Footer & Navigation
|==========================================================================
*/

/* ⚙️ Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem; /* Adjusted for consistency, previously 1.5rem 2rem and 1rem 2rem */
    background-color: var(--white);
    box-shadow: var(--box-shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}
.logo {
    font-weight: bold;
    font-size: 1.2rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
}
.logo svg {
    width: 24px;
    height: 24px;
    margin-left: 10px;
}

/* ⚙️ Footer (Merged Duplicates) */
.footer, footer {
    /* .footer was used for the blue/white theme footer */
    /* footer was used for the grey theme footer */
    background-color: var(--white); /* Default to white from the .footer definition */
    padding: 2rem;
    text-align: center;
    box-shadow: 0 -4px 6px rgba(0, 0, 0, 0.05); /* Default to subtle shadow */
}
footer {
    /* Overwrite for the secondary, darker footer style */
    background: #f8f9fa; /* Light grey background */
    color: var(--footer-text);
    padding: 30px;
    font-size: 1rem;
    margin-top: 40px;
    box-shadow: none;
    border-top: 1px solid #e9ecef;
}


/*
|==========================================================================
| 🖼️ Buttons & Actions
|==========================================================================
*/
button {
  background-color: #1a5276;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  margin: 8px;
  cursor: pointer;
  font-size: 16px;
  transition: 0.3s;
}

button:hover {
  background-color: #154360;
}

/*select button */
select {
     background-color: green;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  margin: 8px;
  cursor: pointer;
  font-size: 16px;
  transition: 0.3s;
}

/* 🖼️ Standard Button (Merged Duplicates) */
.btn {
    /* Primary brand button style */
    display: inline-block;
    background-color: var(--primary-color); /* Fallback/Initial */
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)); /* Standard brand gradient */
    color: var(--white);
    padding: 14px 25px; /* Adopted larger padding */
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: bold;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 1.1rem; /* Adopted larger font size */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15); /* Adopted shadow */
    margin: 15px; /* Added margin for inline-block usage */
}
.btn:hover {
    background-color: var(--secondary-color); /* Fallback */
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color)); /* Hover gradient */
    transform: translateY(-3px); /* Adopted larger translation */
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2); /* Adopted larger shadow */
}

/* Specific Button Styles */
.nav-btn, .quiz-btn, .restart-btn { /* Utility/Quiz Buttons base */
    padding: 12px 25px; /* Slightly smaller padding */
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    border: none;
    cursor: pointer;
}
.nav-btn:hover, .quiz-btn:hover, .restart-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

/* Quiz Option Button */
.quiz-btn {
    background: linear-gradient(135deg, var(--theme-blue-1), var(--theme-blue-2));
}
.quiz-btn:hover {
    background: linear-gradient(135deg, var(--theme-blue-2), #2573a7);
}

/* Navigation Buttons */
.nav-btn {
    background: linear-gradient(135deg, var(--theme-green-1), var(--theme-green-2)); /* Default to green */
}
.nav-btn.prev {
    background: linear-gradient(135deg, #95a5a6, #7f8c8d); /* Grey for previous */
}
.nav-btn.submit {
    background: linear-gradient(135deg, var(--theme-red-1), var(--theme-red-2)); /* Red for submit */
}

/* Final Quiz/Setup Buttons (Green/Blue/Red variations) */
.btn-check { /* Blue gradient */
    background: linear-gradient(135deg, var(--theme-blue-1), var(--theme-blue-2));
}
.btn-check:hover {
    background: linear-gradient(135deg, var(--theme-blue-2), #2471a3);
}
.btn-restart, .restart-btn { /* Red gradient */
    background: linear-gradient(135deg, var(--theme-red-1), var(--theme-red-2));
}
.btn-restart:hover {
    background: linear-gradient(135deg, var(--theme-red-2), #a93226);
}

/* Main Page Action Button (e.g., in level-check, grammar-test) */
.main-btn, .gram-main-btn {
    display: inline-block;
    padding: 15px 30px;
    font-size: 20px;
    font-weight: bold;
    color: var(--white);
    background: #0073e6;
    border-radius: var(--border-radius-lg);
    text-decoration: none;
    transition: var(--transition);
}
.main-btn:hover, .gram-main-btn:hover {
    background: #005bb5;
}


/*
|==========================================================================
| 📈 Page Sections & Layouts
|==========================================================================
*/

/* 📈 Hero Section (Merged Duplicates) */
.hero-section {
    text-align: center;
    padding: 4rem 2rem; /* Adopted the 4rem 2rem padding for consistency */
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    border-radius: 0 0 20px 20px;
    margin-bottom: 3rem;
}
.hero-section h2 {
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hero-section h2 svg {
    width: 30px;
    height: 30px;
    margin-left: 10px;
}
.hero-section p {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* 📈 Call-to-Action Section (Merged Duplicates) */
.cta-section {
    text-align: center;
    padding: 3rem 2rem; /* Adopted 3rem 2rem for primary style */
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    color: var(--white);
    border-radius: 20px;
    margin-bottom: 3rem;
    max-width: 1000px; /* Adopted larger max-width */
    margin-left: auto;
    margin-right: auto;
}
/* Secondary CTA Style from page-content section */
.cta-section:last-of-type { /* Targeting the non-gradient CTA which appeared later */
    background-color: #e9ecef;
    background: none;
    color: var(--text-color);
    padding: 40px;
    margin-top: 30px;
    margin-bottom: 0;
}
.cta-section h2 {
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cta-section h2 svg {
    width: 30px;
    height: 30px;
    margin-left: 10px;
}
.cta-section p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}


/*
|==========================================================================
| 🧩 Component: Cards & Features
|==========================================================================
*/

/* 🧩 Features Section Grid */
.features-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Adopted 300px min-width */
    gap: 2rem;
    padding: 2rem; /* Adopted 2rem padding */
    margin-bottom: 3rem;
}

/* 🧩 Feature Card */
.feature-card {
    background-color: var(--white);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    text-align: center;
}
.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}
.feature-card svg {
    width: 50px;
    height: 50px;
    color: var(--primary-color);
    margin-bottom: 1rem;
}
.feature-card h2 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}
.feature-card p {
    margin-bottom: 1.5rem;
}
.feature-card a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
    transition: var(--transition);
    display: inline-block;
}
.feature-card a:hover {
    color: var(--secondary-color);
}

/* 🧩 Level Card & Grammar Card (Similar Styles Merged) */
.level-card, .gram-grammar-card {
    background: var(--white);
    border-radius: var(--border-radius-xl);
    padding: 25px 20px;
    text-decoration: none;
    color: var(--text-color);
    box-shadow: var(--shadow-md);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    text-align: center;
}
.level-card:hover, .gram-grammar-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}
.level-card .emoji, .gram-grammar-card .emoji {
    font-size: 60px;
}
.level-card h4, .gram-grammar-card h4 {
    font-size: 20px;
    color: #0078d7; /* Theme blue for titles */
    margin: 0;
}
.level-card p, .gram-grammar-card p {
    font-size: 16px;
    line-height: 1.6;
    color: #555;
}
/* Specific box-card override for leveles page */
.box-card {
    background-color:fff;
    border-radius: 15px;
    padding: 25px 20px;
    text-decoration: none;
    color: var(--text-color);
    box-shadow: var(--shadow-md);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    text-align: center;
    font-size:34px;
    width:auto;
    with-max:800px;
    border-width:5px;
    border-style:double;
    border-color:black;
}


/*
|==========================================================================
| 💬 Testimonials & Slideshow
|==========================================================================
*/

/* 💬 Testimonials Section */
.testimonials-section {
    background-color: var(--white);
    padding: 3rem 2rem;
    text-align: center;
    margin-bottom: 3rem;
}
.testimonials-section h2 {
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.testimonials-section h2 svg {
    width: 30px;
    height: 30px;
    margin-left: 10px;
}

/* 💬 Testimonial Card */
.testimonial-card {
    background-color: var(--light-bg);
    padding: 2rem;
    border-radius: var(--border-radius);
    max-width: 800px;
    margin: 0 auto;
    box-shadow: var(--box-shadow);
}
.testimonial-card p {
    margin-bottom: 1rem;
    font-style: italic;
}

/* 💬 Slideshow (Specific Testimonials Component) */
.slideshow-container {
    position: relative;
    height: 450px;
    overflow: hidden;
    border-radius: 15px;
    margin-bottom: 20px;
    background: var(--white);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}
.comment-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 30px;
    opacity: 0;
    transition: opacity 0.8s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.comment-slide.active {
    opacity: 1;
}
.comment-text {
    font-size: 1.5rem;
    line-height: 1.6;
    color: #2c3e50;
    text-align: center;
    margin-bottom: 20px;
    padding: 0 20px;
    font-style: italic;
}
.arabic {
    direction: rtl;
    font-family: var(--font-family-base);
    font-size: 1.7rem;
    line-height: 1.8;
}


/*
|==========================================================================
| 📝 Page Content & Typography
|==========================================================================
*/

/* 📝 Custom Intro (Specific) */
.myintro {
    background-color: #ffdfc1; /* Specific color */
    margin: 40px;
    padding: 40px;
}
.myh2 {
    font-size: 22px;
    color: #0016ff; /* Specific color */
}

/* 📝 Page Banner (Specific) */
.hero-banner {
    background-color: #007bff; /* Specific color */
    color: var(--white);
    padding: 40px;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    text-align: center;
}
.hero-banner h1 {
    margin: 0;
    font-size: 48px;
}
.hero-banner p {
    font-size: 20px;
}

/* 📝 Content Section Headings & Structure (Merged Duplicates) */
.content-section {
    padding: 30px 0;
}
.content-section h2 {
    color: #0056b3; /* Specific content header color */
    font-size: 32px;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 20px;
}
.content-section h3 {
    color: #555;
    font-size: 24px;
    margin-top: 30px;
}

/*
|==========================================================================
| 💡 Special Content Boxes
|==========================================================================
*/

/* 💡 Example Box */
.example {
    background: linear-gradient(135deg, #f5eef8 0%, #e8daef 100%);
    padding: 20px;
    border-radius: var(--border-radius-lg);
    margin: 20px 0;
    border-right: 5px solid var(--theme-purple-1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}
.example p {
    margin: 10px 0;
    position: relative;
    padding-right: 25px;
}
.example p::before {
    content: '•';
    position: absolute;
    right: 10px;
    color: var(--theme-red-1);
    font-weight: bold;
    font-size: 1.2rem;
}

/* 💡 Exercise Box */
.exercise {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 25px;
    border-radius: var(--border-radius-lg);
    margin: 30px 0;
    border: 2px dashed var(--theme-purple-1);
    position: relative;
}
.exercise h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    text-align: center;
    font-size: 1.4rem;
}

/* 💡 Highlight Box */
.highlight {
    background: linear-gradient(120deg, #fef9e7 0%, #fdebd0 100%);
    padding: 25px;
    border-radius: var(--border-radius-lg);
    margin: 25px 0;
    border-right: 4px solid var(--theme-orange-1);
}

/* 💡 Tips Box */
.tips {
    background: linear-gradient(135deg, #e8f4fc 0%, #d1e9fa 100%);
    padding: 25px;
    border-radius: var(--border-radius-lg);
    margin: 25px 0;
    border-left: 4px solid var(--theme-purple-1);
}
.tips h3 {
    color: #2980b9;
    border-left: none;
    padding-left: 0;
    text-align: center;
}
.tips li {
    margin-bottom: 15px;
    position: relative;
    padding-right: 25px;
    background: none; /* Override list background */
    border-right: none; /* Override list border */
}

/* 💡 Structure Box */
.structure-box {
    background: linear-gradient(135deg, #e8f6f3 0%, #d1f2eb 100%);
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
    border-left: 4px solid var(--theme-green-1);
}
.structure-box h4 {
    color: var(--theme-green-2);
    margin-bottom: 15px;
}

/* 💡 Advanced Box */
.advanced-box {
    background: linear-gradient(135deg, #fef5e7 0%, #fdebd0 100%);
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
    border-right: 4px solid var(--theme-orange-2);
}
.advanced-box h4 {
    color: #d35400; /* Darker orange */
    margin-bottom: 15px;
}

/* 💡 Level Info Box (Quiz) */
.level-info {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
    border-right: 4px solid var(--theme-blue-1);
}


/*
|==========================================================================
| 📊 Tables & Data Display
|==========================================================================
*/

/* 📊 Table Styles */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 25px 0;
    background: var(--white);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    overflow: hidden;
}
th, td {
    padding: 18px 15px;
    text-align: right;
    border-bottom: 1px solid #e0e0e0;
}
th {
    background: linear-gradient(135deg, var(--theme-purple-1), var(--theme-purple-2));
    color: var(--white);
    font-weight: 600;
    font-size: 1.1rem;
}
tr:last-child td {
    border-bottom: none;
}
tr:nth-child(even) {
    background-color: #f8f9fa;
}
tr:hover {
    background-color: #f5eef8;
}

/* 📊 Comparison Section */
.comparison {
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
    margin: 30px 0;
}
.comparison-box {
    flex: 1;
    min-width: 300px;
    background: var(--white);
    padding: 25px;
    border-radius: var(--border-radius-lg);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
}
.comparison-box:hover {
    transform: translateY(-5px);
}
.comparison-box h3 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--theme-orange-1);
}


/*
|==========================================================================
| ❓ Quiz Components
|==========================================================================
*/

/* ❓ Quiz Screen Control */
.question-container, .quiz-screen, .results-screen {
    display: none;
}
.setup-screen, .quiz-screen, .results-screen {
    padding: 25px;
    text-align: center;
}
.content-section.active {
    display: block;
}

/* ❓ Quiz Questions (Merged Duplicates) */
.question {
    background: var(--white); /* Adopted white background */
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    border-right: 4px solid var(--theme-blue-1); /* Adopted border-right */
    text-align: right;
}
.question-number {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--theme-blue-1);
    margin-bottom: 10px;
}
.question-text {
    font-weight: 600;
    margin-bottom: 15px;
    color: #2c3e50;
    font-size: 1.1rem;
}

/* ❓ Quiz Options (Merged Duplicates) */
.options {
    display: grid;
    grid-template-columns: 1fr; /* Set to single column for better mobile default */
    gap: 12px;
    margin-top: 15px;
}
.option {
    padding: 12px 15px;
    background: #f8f9fa; /* Adopted f8f9fa background */
    border: 2px solid #e9ecef; /* Adopted lighter border */
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: right;
}
.option:hover {
    background: #e3f2fd;
    border-color: var(--theme-blue-1);
}
.option.selected {
    background: #d1e9fa;
    border-color: var(--theme-blue-2);
    font-weight: 600;
}

/* ❓ Quiz Navigation */
.navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 25px;
}
.number-selector {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin: 30px 0;
}
.number-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--theme-blue-1), var(--theme-blue-2));
    color: var(--white);
    border: none;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}
.number-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
    background: linear-gradient(135deg, var(--theme-blue-2), #2471a3);
}

/* ❓ Quiz Progress Bar (Merged Duplicates) */
.progress-container, .quiz-progress-bar {
    margin: 20px 0;
    background: #f0f0f0;
    border-radius: 10px;
    height: 20px; /* Adopted larger height from progress-container */
    overflow: hidden;
}
.quiz-progress-bar {
    height: 10px; /* Specific override for the smaller quiz progress bar */
    margin: 15px 0;
}
.progress-bar, .quiz-progress {
    height: 100%;
    background: linear-gradient(135deg, var(--theme-green-1), var(--theme-green-2));
    border-radius: 10px; /* Note: this will be clipped by parent's overflow: hidden */
    width: 0%;
    transition: width 0.3s ease;
}
.quiz-progress {
    transition: width 0.5s ease;
}

/* ❓ Results (Merged Duplicates) */
.result-container {
    display: none;
    text-align: center;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 10px;
    margin-top: 20px;
}
.score {
    font-size: 2.5rem;
    font-weight: bold;
    color: #2c3e50;
    margin: 15px 0;
}
.pass {
    color: var(--theme-green-2);
}
.fail {
    color: var(--theme-red-1);
}
.message {
    font-size: 1.2rem;
    margin: 20px 0;
    line-height: 1.6;
}
.result { /* The specific result message box */
    text-align: center;
    padding: 20px;
    margin: 20px 0;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1.2rem;
}
.result.success {
    background: #e8f6f3;
    color: var(--theme-green-2);
    border: 2px solid var(--theme-green-1);
}
.result.error {
    background: #fdedec;
    color: var(--theme-red-1);
    border: 2px solid var(--theme-red-1);
}
.explanation {
    background: #fef9e7;
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
    border-right: 3px solid var(--theme-orange-1);
    text-align: right;
    display: none;
}
.score-container {
    text-align: center;
    margin: 20px 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: #2c3e50;
}
.results-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
    text-align: right;
}


/*
|==========================================================================
| 📱 Media Queries (Mobile Adjustments)
|==========================================================================
*/

@media (max-width: 768px) {
    /* Header/Navigation */
    .header {
        flex-direction: column;
        text-align: center;
        padding: 1rem;
    }
    .logo {
        margin-bottom: 1rem;
    }

    /* Hero */
    .hero-section {
        padding: 2rem 1rem;
    }
    .hero-section h2 {
        font-size: 1.8rem;
    }

    /* Grids */
    .features-section {
        grid-template-columns: 1fr;
        padding: 1rem;
    }
    .testimonials-section,
    .cta-section {
        padding: 2rem 1rem;
    }

    /* Content & Typography */
    .content {
        padding: 0 20px 20px;
    }
    h1 {
        font-size: 2.2rem; /* Adjusted for smaller screens */
    }

    /* Comparison & Quiz */
    .comparison {
        flex-direction: column;
    }
    .quiz-options {
        flex-direction: column;
    }
    .quiz-btn {
        width: 100%;
    }
}

/*
|==========================================================================
| ⚡ Animations
|==========================================================================
*/
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
butto {
    background-color:blue;
    color:white;
}
#next-btn{
     background-color:green;
}

#prev-btn{
     background-color:red;
}
}