/* General Styles */
:root {
    --primary-color: #2E7D32; /* سبز تیره */
    --secondary-color: #FFC107; /* نارنجی / طلایی */
    --background-color: #FFFFFF;
    --light-gray: #F8F8F8;
    --dark-navy: #1A237E; /* سرمه‌ای تیره */
    --text-color: #333333; /* خاکستری تیره */
    --light-text-color: #666666;
}

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

body {
    font-family: 'Vazirmatn', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    direction: rtl;
    text-align: right;
    /* Enable Persian numerals */
    font-feature-settings: "tnum"; /* Or "tnum" if font supports */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

a {
    text-decoration: none;
    color: var(--text-color);
}

ul {
    list-style: none;
}

.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: #fff;
    padding: 10px 20px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-family: inherit; /* Inherit font from body */
}

.btn:hover {
    background-color: #388E3C; /* سبز تیره‌تر */
}

.btn.primary-btn {
    background-color: var(--primary-color);
}

.btn.primary-btn:hover {
    background-color: #388E3C;
}

.btn.secondary-btn {
    background-color: var(--secondary-color);
    color: var(--text-color);
}

.btn.secondary-btn:hover {
    background-color: #FFD700;
}

/* Header */
.header {
    background-color: var(--background-color);
    padding: 15px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header .logo h1 {
    font-size: 22px;
    margin: 0;
    color: var(--primary-color);
}

.header .logo h1 span {
    color: var(--light-text-color);
    font-size: 20px;
    margin-right: 5px;
}

.header .main-nav ul {
    display: flex;
    gap: 25px;
}

.header .main-nav a {
    font-size: 17px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.header .main-nav a:hover {
    color: var(--primary-color);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-actions .theme-toggle {
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: var(--text-color);
    transition: color 0.3s ease;
}

.header-actions .theme-toggle:hover {
    color: var(--primary-color);
}

.header-actions .auth-button {
    background-color: var(--primary-color);
    color: #fff;
    padding: 8px 15px;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-family: inherit; /* Inherit font from body */
}

.header-actions .auth-button:hover {
    background-color: #388E3C;
}

/* Hero Section */
.hero-section {
    background-color: var(--secondary-color);
    color: #fff;
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.hero-section .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255,193,7,0.8) 0%, rgba(255,160,0,0.8) 100%);
    z-index: 0;
}

.hero-content {
    flex: 1;
    padding-left: 50px;
}

.hero-content h2 {
    font-size: 48px;
    line-height: 1.2;
    margin-bottom: 20px;
    color: #fff;
}

.hero-content p {
    font-size: 18px;
    margin-bottom: 30px;
    max-width: 500px;
}

.hero-content .cta-buttons .btn {
    margin-left: 15px;
}

.hero-image {
    flex: 0 0 400px;
    text-align: center;
}

.hero-image img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.design-tools {
    display: flex;
    gap: 30px;
    margin-top: 50px;
    justify-content: flex-start;
}

.tool-card {
    background-color: rgba(255,255,255,0.2);
    padding: 15px 25px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-weight: bold;
    font-size: 18px;
    transition: background-color 0.3s ease;
}

.tool-card:hover {
    background-color: rgba(255,255,255,0.4);
}

.tool-card i {
    font-size: 28px;
}

/* Category Boxes Section */
.category-boxes-section {
    padding: 60px 0;
    background-color: var(--background-color);
}

.category-boxes {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 30px;
}

.category-box {
    background-color: var(--light-gray);
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    padding: 30px;
    text-align: center;
    flex: 1;
    min-width: 220px;
    max-width: 280px;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.category-box:hover {
    transform: translateY(-10px);
    background-color: var(--primary-color);
    color: #fff;
}

.category-box:hover i,
.category-box:hover h3,
.category-box:hover p {
    color: #fff;
}

.category-box i {
    font-size: 45px;
    color: var(--primary-color);
    margin-bottom: 20px;
    transition: color 0.3s ease;
}

.category-box h3 {
    font-size: 24px;
    color: var(--text-color);
    margin-bottom: 10px;
    transition: color 0.3s ease;
}

.category-box p {
    font-size: 15px;
    color: var(--light-text-color);
    transition: color 0.3s ease;
}

/* Courses Section */
.courses-section {
    padding: 80px 0;
    background-color: var(--light-gray);
}

.courses-section h2 {
    text-align: center;
    margin-bottom: 50px;
    font-size: 36px;
    color: var(--text-color);
}

.course-slider {
    display: flex;
    gap: 30px;
    justify-content: center;
}

.course-card {
    background-color: var(--background-color);
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    overflow: hidden;
    width: 350px;
    text-align: center;
    padding-bottom: 20px;
    transition: transform 0.3s ease;
}

.course-card:hover {
    transform: translateY(-10px);
}

.course-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    margin-bottom: 15px;
}

.course-card h3 {
    font-size: 24px;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.course-card p {
    font-size: 15px;
    color: var(--light-text-color);
    padding: 0 20px;
    margin-bottom: 20px;
}

.course-info {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.course-info .price {
    font-size: 18px;
    font-weight: bold;
    color: var(--primary-color);
}

.course-info .discount {
    background-color: #F44336; /* قرمز برای تخفیف */
    color: #fff;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 14px;
}

/* Testimonials Section */
.testimonials-section {
    padding: 80px 0;
    background-color: var(--background-color);
}

.testimonials-section h2 {
    text-align: center;
    margin-bottom: 50px;
    font-size: 36px;
    color: var(--text-color);
}

.testimonial-cards {
    display: flex;
    justify-content: center;
    gap: 30px;
}

.testimonial-card {
    background-color: #E8F5E9; /* سبز ملایم */
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    padding: 30px;
    max-width: 450px;
    text-align: center;
    transition: transform 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-10px);
}

.testimonial-card img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 15px;
    border: 3px solid var(--primary-color);
}

.testimonial-card h4 {
    font-size: 20px;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.testimonial-card .stars {
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.testimonial-card .stars i {
    font-size: 18px;
    margin: 0 2px;
}

.testimonial-card p {
    font-style: italic;
    color: var(--light-text-color);
    line-height: 1.8;
}

/* Special Offers Section */
.special-offers-section {
    background-color: var(--dark-navy);
    padding: 80px 0;
    color: #fff;
}

.special-offers-section .container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.offer-slider {
    width: 100%;
}

.offer-item {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px; /* Adjusted gap */
    background-color: rgba(0,0,0,0.2);
    border-radius: 15px;
    padding: 30px; /* Adjusted padding */
    flex-direction: row-reverse; /* Content on left, image on right for RTL */
    /* flex-wrap: wrap; */ /* Removed to prevent wrapping */
}

.offer-content {
    flex: 1; /* Allow content to take available space */
    text-align: right;
    padding-left: 20px; /* Adjusted padding */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    order: 1; /* Content on the left */
}

.offer-details .offer-category {
    font-size: 16px;
    color: var(--secondary-color);
    margin-bottom: 5px;
}

.offer-details .offer-title {
    font-size: 38px; /* Larger title */
    line-height: 1.2;
    margin-bottom: 10px;
    color: #fff;
}

.offer-details .offer-description {
    font-size: 16px;
    margin-bottom: 20px;
    color: rgba(255,255,255,0.7);
}

.offer-meta {
    display: flex;
    gap: 25px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.meta-item {
    background-color: rgba(255,255,255,0.1);
    padding: 8px 15px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    font-size: 15px;
}

.meta-item i {
    color: var(--secondary-color);
}

.offer-content .prices {
    margin-bottom: 30px;
    display: flex;
    flex-direction: column; /* Stack prices vertically */
    align-items: flex-start;
}

.offer-content .old-price {
    font-size: 18px; /* Slightly smaller */
    color: rgba(255,255,255,0.5);
    text-decoration: line-through;
    margin-left: 0;
    margin-bottom: 5px; /* Space between old and new price */
}

.offer-content .new-price {
    font-size: 32px; /* Larger new price */
    font-weight: bold;
    color: var(--secondary-color);
}

.offer-image {
    flex: 0 0 500px; /* Fixed width for the image */
    /* max-width: 50%; */ /* Removed to ensure it takes its flex-basis */
    text-align: center;
    position: relative;
    height: 350px; /* Adjusted height */
    background-color: #333;
    border-radius: 10px;
    overflow: hidden;
    order: 2; /* Image on the right */
}

.prereq-badge,
.level-badge {
    position: absolute;
    background-color: #6C63FF; /* Green-like color from image */
    color: #fff;
    padding: 6px 10px;
    border-radius: 5px;
    font-size: 14px;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.prereq-badge {
    top: 60px;
    right: 20px;
}

.level-badge {
    top: 100px;
    right: 20px;
}

.offer-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Cover the entire area */
    border-radius: 0;
    box-shadow: none;
}

.discount-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background-color: #fff; /* White background for the badge */
    color: var(--primary-color);
    padding: 8px 12px;
    border-radius: 5px;
    font-size: 18px;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* Footer */
.footer {
    background-color: var(--background-color);
    padding: 60px 0 0;
    border-top: 1px solid #eee;
}

.footer .footer-columns {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.footer-col {
    flex: 1;
    min-width: 250px;
}

.footer-col h4 {
    font-size: 20px;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.footer-col ul {
    padding: 0;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a {
    color: var(--light-text-color);
    transition: color 0.3s ease;
}

.footer-col ul li a:hover {
    color: var(--primary-color);
}

.newsletter-form {
    display: flex;
    flex-direction: column; /* Stack input and button vertically */
    gap: 10px;
}

.newsletter-form input[type="email"] {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    font-family: inherit; /* Inherit font from body */
}

.newsletter-form .btn {
    padding: 10px 20px;
    background-color: var(--primary-color);
    width: 100%; /* Make button full width */
}

.support-link {
    display: block;
    margin-top: 10px;
    color: var(--primary-color);
    font-weight: bold;
    transition: color 0.3s ease;
}

.support-link:hover {
    color: #388E3C;
}

.social-icons {
    display: flex;
    gap: 15px;
    font-size: 24px;
}

.social-icons a {
    color: var(--light-text-color);
    transition: color 0.3s ease;
}

.social-icons a:hover {
    color: var(--primary-color);
}

.extra-social-images {
    display: flex;
    gap: 15px;
    margin-top: 20px; /* Space between icons and images */
    justify-content: center; /* Center images */
}

.extra-social-images img {
    width: 60px; /* Larger size for these images */
    height: 60px; /* Larger size for these images */
    object-fit: contain; /* Ensure image fits without cropping */
    border-radius: 5px;
    transition: transform 0.3s ease;
}

.extra-social-images img:hover {
    transform: scale(1.1);
}

.footer-bottom-bar {
    display: flex;
    justify-content: center; /* Center the copyright text */
    align-items: center;
    padding: 20px 0;
    border-top: 1px solid #eee;
    background-color: var(--primary-color);
    color: #fff;
    margin-top: 20px;
}

.footer-bottom-bar .container {
    display: flex;
    justify-content: center; /* Center the copyright text */
    align-items: center;
    width: 100%;
}

.footer-bottom-bar .contact-email span {
    font-size: 16px;
    font-weight: bold;
    color: var(--secondary-color);
}

.footer-bottom-bar .copyright p {
    margin: 0;
    font-size: 14px;
    color: rgba(255,255,255,0.8);
}

/* Dark Mode Styles */
body.dark-mode {
    background-color: #1a1a2e;
    color: #e0e0e0;
}

body.dark-mode .header {
    background-color: #1a1a2e;
    box-shadow: 0 2px 5px rgba(255,255,255,0.1);
}

body.dark-mode .header .logo h1 {
    color: #6C63FF;
}

body.dark-mode .header .logo h1 span {
    color: #a0a0a0;
}

body.dark-mode .header .main-nav a {
    color: #e0e0e0;
}

body.dark-mode .header .main-nav a:hover {
    color: #6C63FF;
}

body.dark-mode .header-actions .theme-toggle {
    color: #e0e0e0;
}

body.dark-mode .header-actions .theme-toggle:hover {
    color: #6C63FF;
}

body.dark-mode .header-actions .auth-button {
    background-color: #6C63FF;
    font-family: inherit; /* Inherit font from body in dark mode */
}

body.dark-mode .header-actions .auth-button:hover {
    background-color: #5d56d6;
}

body.dark-mode .hero-section {
    background-color: #FFD700;
}

body.dark-mode .hero-section::before {
    background: linear-gradient(135deg, rgba(255,215,0,0.8) 0%, rgba(255,165,0,0.8) 100%);
}

body.dark-mode .hero-content h2 {
    color: #1a1a2e;
}

body.dark-mode .hero-content p {
    color: #333333;
}

body.dark-mode .design-tools .tool-card {
    background-color: rgba(0,0,0,0.2);
    color: #1a1a2e;
}

body.dark-mode .design-tools .tool-card:hover {
    background-color: rgba(0,0,0,0.4);
}

body.dark-mode .category-boxes-section {
    background-color: #282a3a;
}

body.dark-mode .category-boxes .category-box {
    background-color: #1a1a2e;
    box-shadow: 0 5px 15px rgba(255,255,255,0.1);
}

body.dark-mode .category-boxes .category-box:hover {
    background-color: #6C63FF;
}

body.dark-mode .category-boxes .category-box:hover i,
body.dark-mode .category-boxes .category-box:hover h3,
body.dark-mode .category-boxes .category-box:hover p {
    color: #fff;
}

body.dark-mode .courses-section {
    background-color: #282a3a;
}

body.dark-mode .courses-section h2 {
    color: #e0e0e0;
}

body.dark-mode .course-card {
    background-color: #1a1a2e;
    box-shadow: 0 5px 15px rgba(255,255,255,0.1);
}

body.dark-mode .course-card h3 {
    color: #6C63FF;
}

body.dark-mode .course-card p {
    color: #a0a0a0;
}

body.dark-mode .course-info .price {
    color: #6C63FF;
}

body.dark-mode .testimonials-section {
    background-color: #1a1a2e;
}

body.dark-mode .testimonials-section h2 {
    color: #e0e0e0;
}

body.dark-mode .testimonial-card {
    background-color: #282a3a;
    box-shadow: 0 5px 15px rgba(255,255,255,0.1);
}

body.dark-mode .testimonial-card img {
    border-color: #6C63FF;
}

body.dark-mode .testimonial-card h4 {
    color: #6C63FF;
}

body.dark-mode .testimonial-card .stars {
    color: #FFD700;
}

body.dark-mode .testimonial-card p {
    color: #a0a0a0;
}

body.dark-mode .special-offers-section {
    background-color: #0f0f1a;
}

body.dark-mode .offer-item {
    background-color: rgba(255,255,255,0.1);
}

body.dark-mode .offer-content h3 {
    color: #e0e0e0;
}

body.dark-mode .offer-content p {
    color: #a0a0a0;
}

body.dark-mode .offer-content .old-price {
    color: #a0a0a0;
}

body.dark-mode .offer-content .new-price {
    color: #FFD700;
}

body.dark-mode .offer-details .offer-category {
    color: var(--secondary-color);
}

body.dark-mode .offer-details .offer-description {
    color: rgba(255,255,255,0.7);
}

body.dark-mode .meta-item {
    background-color: rgba(255,255,255,0.1);
    color: #fff;
}

body.dark-mode .meta-item i {
    color: var(--secondary-color);
}

body.dark-mode .prereq-badge,
body.dark-mode .level-badge {
    background-color: #6C63FF;
    color: #fff;
}

body.dark-mode .footer {
    background-color: #1a1a2e;
    border-top-color: #282a3a;
}

body.dark-mode .footer-col h4 {
    color: #6C63FF;
}

body.dark-mode .footer-col ul li a {
    color: #a0a0a0;
}

body.dark-mode .footer-col ul li a:hover {
    color: #6C63FF;
}

body.dark-mode .newsletter-form input {
    background-color: #282a3a;
    border-color: #3a3a52;
    color: #e0e0e0;
}

body.dark-mode .newsletter-form input::placeholder {
    color: #a0a0a0;
}

body.dark-mode .newsletter-form .btn {
    background-color: #6C63FF;
}

body.dark-mode .support-link {
    color: #6C63FF;
}

body.dark-mode .social-icons a {
    color: #a0a0a0;
}

body.dark-mode .social-icons a:hover {
    color: #6C63FF;
}

body.dark-mode .extra-social-images img {
    border-color: #6C63FF; /* Added for dark mode */
}

body.dark-mode .footer-bottom-bar {
    background-color: #0f0f1a;
    border-top-color: #282a3a;
}

body.dark-mode .footer-bottom-bar .contact-email span {
    color: #FFD700;
}

body.dark-mode .footer-bottom-bar .copyright p {
    color: #a0a0a0;
}

body.dark-mode .discount-badge {
    background-color: #6C63FF;
    color: #fff;
}

/* Fade-in Animation */
.fade-in {
    /* opacity: 0; */
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.animated {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .container {
        padding: 0 15px;
    }

    .header .main-nav ul {
        gap: 15px;
    }

    .hero-content h2 {
        font-size: 40px;
    }

    .hero-image {
        flex: 0 0 350px;
    }

    .design-tools {
        gap: 20px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .course-slider {
        flex-wrap: wrap;
        justify-content: center;
    }

    .course-card {
        width: 45%;
    }

    .testimonial-cards {
        flex-wrap: wrap;
    }

    .testimonial-card {
        max-width: 90%;
    }

    .offer-item {
        flex-direction: column;
        text-align: center;
        gap: 30px;
    }

    .offer-image {
        flex: none;
        width: 100%;
    }

    .footer .footer-columns {
        justify-content: center;
    }

    .footer-col {
        text-align: center;
    }

    .newsletter-form {
        justify-content: center;
    }

    .social-icons {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .header .main-nav {
        display: none; /* Hide main nav on small screens */
    }

    .header .container {
        flex-wrap: wrap;
        justify-content: center;
        gap: 20px;
    }

    .header-actions {
        order: -1; /* Move actions to top */
        width: 100%;
        justify-content: space-between;
    }

    .header .logo {
        width: 100%;
        text-align: center;
    }

    .hero-section .container {
        flex-direction: column-reverse;
        text-align: center;
    }

    .hero-content {
        padding-left: 0;
        padding-top: 40px;
    }

    .hero-content h2 {
        font-size: 32px;
    }

    .hero-content .cta-buttons .btn {
        margin: 0 5px;
    }

    .hero-image {
        flex: none;
        width: 80%;
    }

    .design-tools {
        margin-top: 30px;
    }

    .course-card {
        width: 90%;
    }

    .testimonial-card {
        max-width: 95%;
    }

    .special-offers-section .container {
        flex-direction: column;
    }

    .offer-item {
        padding: 30px;
    }

    .offer-image img {
        width: 100%;
    }

    .footer-bottom-bar {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .footer-bottom-bar .contact-email {
        order: 2;
    }
}

@media (max-width: 480px) {
    .header .logo h1 {
        font-size: 24px;
    }

    .header .logo h1 span {
        font-size: 16px;
    }

    .header-actions .auth-button {
        padding: 6px 12px;
        font-size: 14px;
    }

    .hero-content h2 {
        font-size: 28px;
    }

    .hero-content p {
        font-size: 16px;
    }

    .hero-content .cta-buttons .btn {
        width: 100%;
        margin-bottom: 10px;
    }

    .design-tools {
        flex-direction: column;
        align-items: center;
    }

    .tool-card {
        width: 80%;
        justify-content: center;
    }

    .course-card {
        width: 100%;
    }

    .testimonial-card {
        padding: 20px;
    }

    .offer-content h3 {
        font-size: 28px;
    }

    .offer-content .new-price {
        font-size: 24px;
    }

    .footer-col {
        min-width: unset;
        width: 100%;
        margin-bottom: 20px;
    }

    .newsletter-form {
        flex-direction: column;
        align-items: center;
    }

    .newsletter-form input {
        width: 80%;
        margin-bottom: 10px;
    }

    .newsletter-form .btn {
        width: 80%;
    }
}
