/*color variables compatible with the header */
:root {
    --primary: #30f4e0;
    --primary-dark: #e0a820;
    --primary-light: #ffe680;
    --accent: #f4c430;
    --black: #1a1a1a;
    --light: #f8f8f8;
    --gray: #888;
    --error: #ff3333;
    --success: #4CAF50;
}

/* ================= Hero Section ================= */
.hero-section {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.7)), url('/static/lessons/images/range-bg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    padding: 100px 0 80px;
    text-align: center;
    margin-top: 56px;
    position: relative;
    overflow: hidden;
    min-height: calc(100vh - 56px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

.tagline {
    font-size: 3.2rem;
    color: var(--light);
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1.8px;
    font-weight: 800;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    animation: fadeInUp 1s ease-out;
}

.tagline span {
    color: var(--primary);
    font-weight: 900;
    background: linear-gradient(to right, var(--primary), var(--primary-light));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-description {
    font-size: 1.3rem;
    max-width: 700px;
    margin: 0 auto 28px;
    line-height: 1.8;
    color: var(--light);
    opacity: 0.95;
    animation: fadeInUp 1.2s ease-out 0.2s;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 28px;
    flex-wrap: wrap; /* اجازه می‌دهد دکمه‌ها در صورت نیاز به خط بعدی بروند */
    animation: fadeInUp 1.4s ease-out 0.4s;
}

.hero-buttons .btn {
    padding: 12px 28px; /* کاهش padding برای فشردگی */
    font-size: 1rem;
    max-width: 220px; /* محدود کردن عرض دکمه‌ها */
    width: 100%; /* عرض کامل در موبایل */
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.hero-buttons .btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--black);
    border: none;
}

.hero-buttons .btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(244, 196, 48, 0.5);
}

.hero-buttons .btn-secondary {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.hero-buttons .btn-secondary:hover {
    background: var(--primary);
    color: var(--black);
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(244, 196, 48, 0.4);
}

.target-icon {
    position: absolute;
    color: rgba(244, 196, 48, 0.2);
    font-size: 5.5rem;
    z-index: 1;
    transition: transform 0.5s ease, opacity 0.5s ease;
}

.target-icon:nth-child(1) {
    top: 10%;
    left: 8%;
    transform: rotate(-15deg);
}

.target-icon:nth-child(2) {
    bottom: 10%;
    right: 8%;
    transform: rotate(15deg);
}

.hero-section:hover .target-icon {
    transform: scale(1.15) rotate(0deg);
    opacity: 0.3;
}

/* ================= Services Section ================= */
.services-section {
    padding: 80px 0;
    background: linear-gradient(to bottom, rgba(18, 18, 18, 0.95), rgba(26, 26, 26, 0.9));
}

.section-title {
    text-align: center;
    font-size: 2.8rem;
    color: var(--primary);
    margin-bottom: 48px;
    text-transform: uppercase;
    font-weight: 800;
    position: relative;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.section-title::after {
    content: '';
    display: block;
    width: 120px;
    height: 4px;
    background: linear-gradient(to right, var(--primary), var(--primary-dark));
    margin: 12px auto 0;
    border-radius: 2px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    max-width: 1240px;
    margin: 0 auto;
}

.service-card {
    background: rgba(40, 40, 40, 0.8);
    border-radius: 10px;
    padding: 28px;
    text-align: center;
    transition: all 0.4s ease;
    border: 1px solid rgba(244, 196, 48, 0.25);
    backdrop-filter: blur(5px);
}

.service-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.5);
    border-color: var(--primary);
    background: rgba(40, 40, 40, 0.9);
}

.service-icon {
    font-size: 2.8rem;
    color: var(--primary);
    margin-bottom: 16px;
    transition: transform 0.3s ease;
}

.service-card:hover .service-icon {
    transform: scale(1.25);
}

.card-title {
    font-size: 1.5rem;
    margin-bottom: 12px;
    color: var(--light);
    font-weight: 700;
}

.service-card p {
    margin-bottom: 20px;
    color: var(--light);
    font-size: 0.95rem;
    line-height: 1.6;
    opacity: 0.9;
}

.service-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.service-link:hover {
    color: var(--primary-light);
    text-decoration: underline;
}

/* ================= Gallery Section ================= */
.gallery-section {
    padding: 80px 0;
    background: linear-gradient(to bottom, rgba(26, 26, 26, 0.95), rgba(18, 18, 18, 0.9));
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    max-width: 1240px;
    margin: 0 auto;
}

.gallery-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    height: 220px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: transform 0.4s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease, filter 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.2);
    filter: brightness(1.15);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    padding: 16px;
    color: var(--light);
    transform: translateY(100%);
    transition: transform 0.4s ease;
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

.gallery-overlay h3 {
    margin-bottom: 10px;
    color: var(--primary);
    font-size: 1.2rem;
    font-weight: 700;
}

.gallery-overlay p {
    font-size: 0.9rem;
    opacity: 0.95;
}

/* ================= Testimonials Section ================= */
.testimonials-section {
    padding: 80px 0;
    background: linear-gradient(to bottom, rgba(18, 18, 18, 0.95), rgba(26, 26, 26, 0.9));
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
    max-width: 1240px;
    margin: 0 auto;
}

.testimonial-card {
    background: rgba(40, 40, 40, 0.8);
    border-radius: 10px;
    padding: 24px;
    border: 1px solid rgba(244, 196, 48, 0.25);
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

.testimonial-card:hover {
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
    border-color: var(--primary);
    transform: translateY(-5px);
}

.rating {
    color: var(--primary);
    margin-bottom: 14px;
    font-size: 1.2rem;
}

.testimonial-text {
    font-style: italic;
    margin-bottom: 14px;
    position: relative;
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--light);
}

.testimonial-text:before,
.testimonial-text:after {
    color: var(--primary);
    font-size: 1.6rem;
    position: absolute;
}

.testimonial-text:before {
    content: '“';
    left: -12px;
    top: -8px;
}

.testimonial-text:after {
    content: '”';
    right: -12px;
    bottom: -8px;
}

.client-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.client-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
    transition: transform 0.3s ease;
}

.client-info:hover .client-avatar {
    transform: scale(1.15);
}

.client-name {
    margin: 0;
    color: var(--light);
    font-size: 1.1rem;
    font-weight: 700;
}

.client-type {
    color: var(--gray);
    font-size: 0.85rem;
    opacity: 0.85;
}

/* ================= CTA Section ================= */
.cta-section {
    padding: 80px 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.75)), url('/static/lessons/images/gallery5.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    text-align: center;
    color: var(--light);
}

.cta-title {
    font-size: 2.8rem;
    color: var(--primary);
    margin-bottom: 20px;
    text-transform: uppercase;
    font-weight: 800;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.cta-description {
    font-size: 1.2rem;
    margin-bottom: 28px;
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
    opacity: 0.95;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
}

/* ================= Animations ================= */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ================= Responsive Styles ================= */
@media (max-width: 992px) {
    .hero-section {
        padding: 80px 0 60px;
        min-height: calc(100vh - 56px);
    }

    .tagline {
        font-size: 2.8rem;
    }

    .hero-description {
        font-size: 1.2rem;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 16px;
        padding: 0 20px; /* اضافه کردن padding برای فاصله از لبه‌ها */
    }

    .hero-buttons .btn {
        max-width: 300px; /* عرض مناسب برای تبلت */
        padding: 10px 24px;
        font-size: 0.95rem;
    }

    .section-title {
        font-size: 2.4rem;
    }

    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }

    .testimonials-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .hero-section {
        padding: 60px 0 40px;
    }

    .tagline {
        font-size: 2.4rem;
    }

    .hero-description {
        font-size: 1.1rem;
    }

    .hero-buttons {
        gap: 14px;
    }

    .hero-buttons .btn {
        max-width: 260px; /* عرض کمتر برای موبایل */
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .section-title {
        font-size: 2.2rem;
    }

    .cta-title {
        font-size: 2.4rem;
    }

    .cta-description {
        font-size: 1.1rem;
    }

    .target-icon {
        font-size: 4.5rem;
    }

    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    }

    .gallery-item {
        height: 200px;
    }
}

@media (max-width: 576px) {
    .hero-section {
        padding: 50px 0 30px;
    }

    .tagline {
        font-size: 2rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .hero-buttons {
        gap: 12px;
        padding: 0 16px;
    }

    .hero-buttons .btn {
        max-width: 240px; /* عرض بهینه برای موبایل‌های کوچک */
        padding: 8px 18px;
        font-size: 0.85rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .testimonials-grid {
        grid-template-columns: 1fr;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .gallery-item {
        height: 180px;
    }

    .service-card {
        padding: 20px;
    }

    .testimonial-card {
        padding: 20px;
    }

    .cta-title {
        font-size: 2rem;
    }

    .cta-description {
        font-size: 1rem;
    }

    .cta-buttons {
        flex-direction: column;
        gap: 16px;
    }
}
.cta-target {
    display: inline-block;
    padding: 12px 28px;
    font-size: 1rem;
    font-weight: bold;
    color: var(--black);
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border: none;
    border-radius: 50px;
    text-decoration: none;
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}
.cta-target:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(244, 196, 48, 0.5);
}
.cta-target::before {
    content: '\f05b'; /* fa-crosshairs icon */
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    position: absolute;
    font-size: 1.5rem;
    color: var(--primary-light);
    opacity: 0;
    top: -20px;
    left: 50%;
    transform: translateX(-50%) scale(1.5);
    transition: all 0.4s ease;
}
.cta-target:hover::before {
    top: 50%;
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    animation: crosshairFade 0.6s ease forwards;
}
@keyframes crosshairFade {
    0% { opacity: 1; }
    80% { opacity: 1; }
    100% { opacity: 0; }
}