:root {
    --orange-primary: #f97316;
    --orange-hover: #ea580c;
    --orange-soft: #ffedd5;
    --green-primary: #10b981;
    --green-hover: #059669;
    --green-soft: #d1fae5;
    --dark-slate: #0f172a;
    --footer-bg: #01003C;

    --orange-border: #fdba74;
    --green-border: #86efac;

    --text-main: #1e293b;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    --text-whit: #ffffff;

    --border-color: #e2e8f0;
    --bg-surface: #ffffff;
    --bg-global: #fafafa;

    --font-family: 'Vazirmatn', system-ui, -apple-system, sans-serif;

    --border-radius-m: 16px;
    --border-radius-l: 24px;

    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.08);
}
body {
    font-family: var(--font-family);
    background-color: var(--bg-light);
    color: var(--text-main);
    overflow-x: hidden;
    min-height: 100%;
    position: relative;
}

/* --- Main Layout Grid --- */
.hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 48px;
    max-width: 1280px;
    margin: 40px auto 0 auto;
    padding: 0 40px 80px 40px;
    align-items: center;
}

.badge-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #fef3c7;
    border: 1px solid #fde68a;
    padding: 6px 16px;
    border-radius: 30px;
    margin-bottom: 24px;
}
.badge-dot {
    width: 8px;
    height: 8px;
    background-color: var(--green-primary);
    border-radius: 50%;
}
.badge-text {
    color: var(--orange-hover);
    font-size: 0.85rem;
    font-weight: 700;
}

.hero-header h1 {
    font-size: 3.25rem;
    font-weight: 800;
    line-height: 1.4;
    margin-bottom: 20px;
    word-break: keep-all;
}
.hero-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
    line-height: 1.85;
    margin-bottom: 36px;
    max-width: 540px;
    text-align: justify;
}

/* --- Hero CTA Area --- */
.hero-cta {
    display: flex;
    gap: 16px;
    margin-bottom: 40px;
}
.btn-primary {
    background-color: var(--orange-primary);
    color: #ffffff;
    padding: 14px 32px;
    border-radius: 14px;
    font-weight: 700;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 6px 20px rgba(226, 115, 25, 0.25);
}
.btn-primary:hover {
    background-color: var(--orange-hover);
}
.btn-secondary {
    background-color: #ffffff;
    color: var(--green-primary);
    border: 2px solid var(--green-border);
    padding: 14px 32px;
    border-radius: 14px;
    font-weight: 700;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    gap: 8px;
}
.btn-secondary:hover {
    background-color: #f0fdf4;
}

/* --- Inline Feature Checklist --- */
.benefits-list {
    display: flex;
    gap: 24px;
    list-style: none;
}
.benefits-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-main);
    font-weight: 500;
    font-size: 0.95rem;
}
.check-icon {
    color: var(--green-primary);
    background-color: #e6f7ed;
    padding: 3px;
    border-radius: 50%;
}

/* --- Hero Image Layout & Positioning --- */
.hero-visual {
    display: flex;
    justify-content: center;
    position: relative;
}
.image-wrapper {
    position: relative;
    width: 100%;
    max-width: 520px;
}
.hero-image {
    width: 100%;
    height: 420px;
    object-fit: cover;
    border-radius: 40px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.06);
}

/* --- Floating Performance Badges --- */
.floating-card {
    position: absolute;
    background-color: #ffffff;
    padding: 12px 20px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    animation: float 4s ease-in-out infinite;
}

@keyframes float {
    0% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0); }
}

.card-students {
    top: 40px;
    right: -30px; /* Positions perfectly off the right visual edge */
}
.card-languages {
    bottom: 40px;
    left: -20px; /* Positions perfectly off the left visual edge */
}

.icon-box {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
}
.icon-green {
    background-color: #e6f7ed;
    color: var(--green-primary);
}
.icon-orange {
    background-color: #fff1f2;
    color: var(--orange-primary);
}

.card-info {
    display: flex;
    flex-direction: column;
}
.card-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}
.card-value {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-main);
}

/* --- Stats Grid Strip --- */
.stats-section {
    max-width: 1280px;
    margin: 60px 220px;
    padding: 0 40px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.stat-card {
    padding: 24px;
    border: 1px solid;
    border-radius: var(--border-radius-m);
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.02);
}

.border-orange {
    background: var(--orange-soft);
    border-color: var(--orange-border); 
}

.border-green {
    background: var(--green-soft);
    border-color: var(--green-border); 
}

.stat-icon {
    width: 50px;
    height: 50px;
    margin: 0 auto 12px auto;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 🌟 FIX 1: Added explicit hex color fallbacks in case vars aren't loading */
.bg-orange-light { 
    background-color: var(--orange-primary, #f97316) !important; 
}
.bg-green-light { 
    background-color: var(--green-primary, #10b981) !important; 
}
.stat-section{
    align-items: center;
}

/* 🌟 FIX 2: Managing the SVG icon graphics color */
.stat-icon img {
    width: 24px;
    height: 24px;
    /* This filter forces the icon lines to be PURE WHITE so they pop against the background */
    filter: invert(100%) sepia(0%) saturate(0%) hue-rotate(0deg) brightness(100%) contrast(100%);
}

.stat-card h3 {
    font-size: 1.6rem;
    font-weight: 800;
    margin: 10px 0 5px 0;
}

.stat-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0;
}

/* --- Language --- */
.language-explore{
    margin-bottom: 48px;
    background: rgb(241, 241, 241)
}

.language-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 60px 20px;
}

.section-header {
    text-align: center;
    margin-bottom: 48px;
}

.badge-green {
    display: inline-block;
    background-color: var(--green-soft);
    color: var(--green-primary);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 24px;
}

.section-header h2 {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-main);
}

.text-orange {
    color: var(--orange-primary);
}

/* --- Language Cards --- */
.cards-wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
}

.lang-card {
    color: var(--text-main);
    width: 200px;
    padding: 32px 20px;
    border-radius: 20px;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid transparent;
}

.lang-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

/* Orange Tinted Cards */
.card-orange {
    background-color: var(--orange-soft);
    border-color: var(--orange-border);
}

/* Green Tinted Cards */
.card-green {
    background-color: var(--green-soft);
    border-color: var(--green-border);
}

/* Card Content Typography & Flags */
.card-flag {
    font-size: 3rem; /* Using emoji flags means we just scale the text size */
    margin-bottom: 16px;
    line-height: 1;
}

.lang-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-main);
}

.lang-card p {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* --- View All Link --- */
.view-all {
    text-align: center;
    margin-top: 20px;
}

.view-all-link {
    color: var(--orange-primary);
    font-weight: 700;
    font-size: 1.05rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: color 0.2s ease;
}

.view-all-link:hover {
    color: var(--orange-hover); /* Darker orange on hover */
}

.arrow {
    font-size: 0.9rem;
}

/* --- Course Grid --- */
.courses-section{
    margin-bottom: 60px;
}

.badge-orange{
    display: inline-block;
    background-color: var(--orange-soft);
    color: var(--orange-primary);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 24px;
}

.courses-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 28px;
    margin: 25px 30px;
}

/* --- Course Card Layout --- */
.course-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-l);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s;
}

.course-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

/* Card Image Area */
.card-image {
    position: relative;
    height: 180px;
    width: 100%;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.badge {
    position: absolute;
    top: 12px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.badge-top-right {
    right: 12px;
    background-color: var(--orange-primary);
    color: white;
}

.badge-top-left {
    left: 12px;
    background-color: rgba(255, 255, 255, 0.9);
    color: var(--text-main);
}

/* Card Body Area */
.card-body {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-meta-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.tag-level {
    background-color: var(--green-soft);
    color: var(--green-primary);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
}

.tag-partner {
    font-size: 0.75rem;
    color: var(--orange-primary);
    font-weight: 700;
    background: var(--orange-soft);
    padding: 4px 10px;
    border-radius: 6px;
}

.course-title {
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.5;
    margin-bottom: 8px;
    color: var(--text-main);
}

.instructor {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.course-desc {
    font-size: 0.85rem;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 16px;
    flex-grow: 1; /* Pushes footer down */
}

/* Ratings */
.course-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 16px;
    font-size: 0.85rem;
}

.stars {
    color: #fbbf24; /* Golden yellow for stars */
    letter-spacing: -2px;
}

.score {
    font-weight: 700;
    color: var(--orange-primary);
}

.reviews {
    color: var(--text-light);
}

/* Specs (Time, Sessions, Location) */
.course-specs {
    display: flex;
    justify-content: space-between;
    border-top: 1px solid var(--border-color);
    padding-top: 16px;
}

.spec-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

.spec-item svg {
    color: var(--text-light);
}

/* Card Footer (Price & CTA) */
.card-footer {
    padding: 16px 20px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #fafaf9;
}

.price {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--orange-primary);
}

.btn-enroll {
    background-color: var(--green-primary);
    color: white;
    border: none;
    padding: 0px 24px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.9rem;
}

.btn-enroll:hover {
    background-color: #059669;
}


/* --- Methodology Component Block --- */
.features-section {
    background-color: var(--green-soft);
    padding: 80px 0;
    margin-bottom: 0px;
}

.features-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 40px;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 40px;
    align-items: center;
}

.features-text h2 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 16px;
}

.features-text p {
    color: var(--text-muted);
    margin-bottom: 32px;
}

.feature-item-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.f-item {
    background: white;
    padding: 16px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.f-item h4 { font-size: 0.95rem; font-weight: 700; }

.certificate-mockup {
    background: white;
    border-radius: var(--border-radius-m);
    padding: 40px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0,0,0,0.04);
    max-width: 460px;
    width: 100%;
    margin: 0 auto;
}

/* --- Add this to your Main/Desktop styles area --- */
.cert-body {
    background: #f8fafc; 
    padding: 12px; 
    border-radius: 8px; 
    border: 1px solid #e2e8f0; 
    text-align: center;
    box-sizing: border-box;
}


.cert-student-name {
    display: block; 
    font-size: 1.1rem; 
    color: #0f172a; 
    margin-bottom: 8px;
}

.cert-details {
    font-size: 0.9rem; 
    color: #475569;
}

.cert-score {
    color: #f97316;
}

/* --- Levels Section --- */
.levels-section { 
    padding: 60px 0px;
    background-color: transparent;
}
.section-title { text-align: center; font-size: 2.2rem; margin-bottom: 48px; }

.levels-grid {
    margin: 0px 30px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.level-card {
    padding: 40px 30px;
    border-radius: var(--radius-lg);
    text-align: center;
    transition: transform 0.3s ease;
    border-radius: 20px;
}

.level-card:hover { transform: translateY(-5px); }

.bg-green-soft { 
    background-color: var(--green-soft);
    border: 1px solid var(--green-border);
}
.bg-orange-soft { 
    background-color: var(--orange-soft);
    border: 1px solid var(--orange-border);
}

.level-icon { font-size: 3rem; margin-bottom: 20px; }
.level-card h3 { font-size: 1.5rem; margin-bottom: 16px; }
.level-card p { color: var(--text-muted); margin-bottom: 24px; font-size: 0.95rem; }

.btn-solid-orange{
    padding: 10px 15px;
    border-radius: 10px;
    text-decoration: none;
    background-color: var(--orange-primary);
    color: var(--bg-surface);
}

.btn-solid-green{
    padding: 10px 15px;
    border-radius: 10px;
    text-decoration: none;
    background-color: var(--green-primary);
    color: var(--bg-surface);
}

/* --- Testimonials / Reviews --- */
.testimonials-section {
    max-width: 100%;
    margin: 80px auto;
    padding: 60px 40px;
    text-align: center;
    background: rgb(241, 241, 241);
}

.testimonials-section h2 { font-size: 1.8rem; margin-bottom: 40px; }

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.testimonials-slider-wrapper {
    margin-top: 30px;
    direction: ltr; /* برای حرکت صحیح اسلایدر */
}

.testimonials-slider {
    display: flex;
    padding: 10px;
}

.review-card {
    background: white;
    padding: 32px;
    border-radius: var(--border-radius-m);
    box-shadow: 0 4px 20px rgba(0,0,0,0.02);
    text-align: right;
    direction: rtl;
}

.stars { margin-bottom: 12px; }

.review-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 16px;
}

.user-name {
    display: block;
    font-size: 0.95rem;
    font-weight: 700;
}

/* --- Banner CTA Element --- */
.cta-banner {
    max-width: 1280px;
    margin: 80px auto;
    padding: 0 40px;
}

.cta-inner {
    background: linear-gradient(135deg, var(--orange-primary), #ea580c);
    border-radius: var(--border-radius-l);
    padding: 48px;
    text-align: center;
    color: white;
}

.cta-inner h2 { font-size: 2rem; margin-bottom: 12px; }
.cta-inner p { opacity: 0.9; margin-bottom: 24px; }

.btn-white {
    background: white;
    color: var(--orange-hover);
    padding: 12px 32px;
    border-radius: 12px;
    font-weight: 700;
    display: inline-block;
}

/* Floating Action Buttons Container */
/* Floating Action Buttons Container */
.floating-buttons {
    display: flex;
    flex-direction: column;
    /* 🌟 FIX: Lock all buttons to the left edge so they don't slide right */
    align-items: flex-start; 
    direction: ltr; /* Ensures flex-start means the physical left side */
    gap: 12px;
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 1000;
}

.fab {
    display: flex;
    align-items: center;
    direction: ltr; 
    justify-content: flex-start;
    width: 48px;
    height: 48px;
    border-radius: 24px;
    color: #ffffff;
    overflow: hidden;
    padding-left: 13px; 
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.fab-telegram {
    background-color: #0088cc;
}

.fab-call {
    background-color: var(--green-primary, #16a34a);
}

/* 🌟 Removed :hover - Now only triggers via your JS .expanded class */
.fab.expanded { 
    width: 180px; 
}

.fab svg {
    width: 22px;
    height: 22px;
    min-width: 22px;
    fill: currentColor;
}

.fab-text {
    direction: rtl; 
    font-size: 14px;
    font-weight: bold;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.2s ease;
    margin-left: 12px; 
}

/* Show text when expanded */
.fab.expanded .fab-text {
    opacity: 1;
    transition-delay: 0.1s;
}

/* --- General Responsive Media Rules --- */
@media (max-width: 1024px) {
    .hero-grid, .features-container { grid-template-columns: 1fr; text-align: center; }
    .hero-content p, .hero-content { align-items: center; margin: 0 auto; }
    .hero-cta, .hero-features { justify-content: center; }
    
    .stats-grid, .courses-grid, .testimonials-grid, .levels-grid { grid-template-columns: 1fr 1fr; }
    
    /* 👇 CHANGE THIS FROM 1fr TO 1fr 1fr */
    .feature-item-grid { grid-template-columns: 1fr 1fr; }
    
    .benefits-list { flex-wrap: wrap; justify-content: center; }
    .cards-wrapper { gap: 16px; }
    .lang-card { width: calc(33.333% - 16px); min-width: 140px; }
    .card-students { right: -10px; }
    .card-languages { left: -10px; }
}

@media (max-width: 640px) {
    /* 1. Global Reset */
    html, body {
        overflow-x: hidden;
        width: 100%;
        margin: 0;
        padding: 0;
    }

    /* 2. Fix Alignment: Using 'auto' centers these containers instead of pinning to the left */
    .stats-section, 
    .features-container, 
    .courses-grid, 
    .levels-grid, 
    .testimonials-grid, 
    .hero-grid {
        width: calc(100% - 30px) !important; /* Leaves 15px space on both sides */
        margin: 20px auto !important;        /* The 'auto' centers the section */
        padding: 0 15px !important;          /* Padding ensures content doesn't touch borders */
        box-sizing: border-box;
    }

    /* 3. Force 1-Column Layout */
    .courses-grid, 
    .levels-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }

    .testimonials-grid{
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 15px !important;
        padding: 0 5px !important;
    }

    /* 4. Compact Cards */
    .course-card, .level-card, .review-card {
        width: 100% !important;
        padding: 15px !important;
        margin: 0 !important;
        box-sizing: border-box;
    }

    /* 5. Shrink Heights/Assets */
    .course-card .card-image { height: 140px !important; }
    .features-section {
        width: 100% !important;
        padding: 30px 15px !important; /* Adds padding on the sides */
        margin: 0 auto !important;
        box-sizing: border-box;
    }

    /* 2. Force the container to be centered */
    .features-container {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important; /* This centers the items horizontally */
        justify-content: center !important;
        margin: 0 auto !important;
        padding: 0 !important;
        width: 100% !important;
        text-align: center; /* Ensures text inside is centered too */
    }

    /* 3. Ensure the visual part also centers */
    .features-visual {
        width: 100% !important;
        margin: 20px auto 0 auto !important;
    }
    .certificate-mockup img { 
        height: auto !important; /* Allows the image to scale naturally instead of being forced to 350px */
        max-height: 400px;        /* Sets a safe limit for mobile */
        width: 100% !important;
    }
    .cert-body {
        padding: 8px !important;    /* Tighten the wrapper on mobile */
        margin-top: 5px !important;
    }
    
    .cert-student-name {
        font-size: 0.95rem !important; /* Make text smaller on phones */
        margin-bottom: 4px !important;
    }
    
    .cert-details {
        font-size: 0.8rem !important;  /* Stops text from overflowing or forcing multi-line breaks */
    }
    
    .level-icon { font-size: 2rem !important; }

    /* 6. Typography */
    .hero-content h1 { font-size: 1.8rem !important; }
    .section-header h2 { font-size: 1.5rem !important; }
    .course-title { font-size: 0.95rem !important; }

    .review-card {
        margin: 0;
        padding: 15px !important; /* Increased from 15px to 25px */
        width: 100% !important;
        box-sizing: border-box;
    }
    
    /* 7. Hero/Buttons/Floating elements */
    .hero-cta { flex-direction: column !important; width: 100% !important; gap: 10px !important; }
    .btn-primary, .btn-secondary { width: 100% !important; justify-content: center !important; }
    
    .card-students, .card-languages { 
        transform: scale(0.6) !important; 
        transform-origin: center center !important; 
    }
    .cta-inner { padding: 20px 15px !important; }
}



