/*
Theme Name: Devix
Theme URI: https://elipi-co.ir
Author: Devix
Author URI: https://faranirou.ir
Description: قالب اختصاصی شرکت Devix
Version: 1.0.0
Requires at least: 5.8
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: faraniro
Tags: rtl-language, one-page, solar, persian
*/

/* =============================================
   فونت‌های محلی
   ============================================= */
@font-face {
    font-family: devix;
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('fonts/woff/YekanBakhFaNum-Regular.woff') format('woff'),
         url('fonts/woff2/YekanBakhFaNum-Regular.woff2') format('woff2');
}
@font-face {
    font-family: devix;
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('fonts/woff/YekanBakhFaNum-SemiBold.woff') format('woff'),
         url('fonts/woff2/YekanBakhFaNum-SemiBold.woff2') format('woff2');
}
@font-face {
    font-family: devix;
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('fonts/woff/YekanBakhFaNum-Bold.woff') format('woff'),
         url('fonts/woff2/YekanBakhFaNum-Bold.woff2') format('woff2');
}
@font-face {
    font-family: devix;
    font-style: normal;
    font-weight: 900;
    font-display: swap;
    src: url('fonts/woff/YekanBakhFaNum-ExtraBlack.woff') format('woff'),
         url('fonts/woff2/YekanBakhFaNum-ExtraBlack.woff2') format('woff2');
}

/* =============================================
   متغیرها
   ============================================= */
:root {
    --navy-deep: #0A192F;
    --navy-mid: #112240;
    --navy-light: #1D3461;
    --gold: #F5B041;
    --gold-bright: #FFC107;
    --gold-dark: #D4950F;
    --white: #FFFFFF;
    --light-gray: #8892B0;
    --dark-bg: #060B14;
    --glass-bg: rgba(10, 25, 47, 0.75);
    --glass-border: rgba(245, 176, 65, 0.2);
    --card-bg: rgba(17, 34, 64, 0.6);
}

/* =============================================
   ریست و پایه
   ============================================= */
*, *::before, *::after {
    box-sizing: border-box;
}

::selection {
    color: #FFF;
    background: #000;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0 !important;
    padding: 0;
    background-color: var(--navy-deep);
    color: var(--white);
    line-height: 1.7;
    overflow-x: hidden;
    cursor: default;
    direction: rtl;
    text-align: right;
}

a {
    text-decoration: none !important;
}

ul, li {
    list-style: none;
    margin: 0;
    padding: 0;
}

a, b, button, div, h1, h2, h3, h4, h5, h6, i, input, label, p, section, select, strong, textarea, time, ul {
    font-family: devix, serif !important;
    margin: 0;
}

h1, h2, h3, h4 {
    line-height: 1.3;
}

img {
    max-width: 100%;
    height: auto;
}

/* فونت ایکون‌ها */
.fa-classic, .fa-regular, .fa-solid, .far, .fas {
    font-family: "Font Awesome 6 Free" !important;
}
.fa-brands, .fab {
    font-family: "Font Awesome 6 Brands" !important;
}

/* =============================================
   کانتینر
   ============================================= */
.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 2rem;
    width: 100%;
}

.gold-text {
    background: linear-gradient(135deg, var(--gold-bright), var(--gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* =============================================
   Preloader
   ============================================= */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--navy-deep);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#preloader.fade-out {
    opacity: 0;
    visibility: hidden;
}

.loader-sun {
    width: 80px;
    height: 80px;
    border: 4px solid var(--glass-border);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* =============================================
   ذرات طلایی
   ============================================= */
#particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.particle {
    position: absolute;
    background: var(--gold);
    border-radius: 50%;
    animation: floatUp linear infinite;
    opacity: 0;
}

@keyframes floatUp {
    0% { transform: translateY(100vh) scale(0); opacity: 0; }
    10% { opacity: 0.8; }
    90% { opacity: 0.2; }
    100% { transform: translateY(-10vh) scale(1.5); opacity: 0; }
}

/* =============================================
   هدر
   ============================================= */
#header {
    background: rgba(10, 25, 47, 0.92);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

#header.scrolled {
    padding: 0;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 0;
    transition: padding 0.3s ease;
    position: relative;
}

#header.scrolled .header-inner {
    padding: 0.4rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.6rem;
    color: var(--white);
    text-decoration: none;
    flex-shrink: 0;
}

.logo span {
    color: var(--gold);
}

.logo-icon {
    width: 90px;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
    border-radius: 0;
    flex-shrink: 0;
}

.logo-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.logo-icon i {
    font-size: 1.5rem;
    color: var(--navy-deep);
}

/* منوی ناوبری */
nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
    margin: 0;
    padding: 0;
}

nav a {
    color: var(--light-gray);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s ease;
    position: relative;
    padding: 0.5rem 0;
}

nav a:hover {
    color: var(--gold);
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold));
    transition: width 0.4s ease;
    border-radius: 2px;
}

nav a:hover::after {
    width: 100%;
    right: auto;
    left: 0;
}

.btn-nav {
    background: var(--gold) !important;
    color: var(--navy-deep) !important;
    padding: 0.6rem 1.5rem !important;
    border-radius: 50px;
    font-weight: 700 !important;
    transition: all 0.3s ease !important;
    white-space: nowrap;
}

.btn-nav:hover {
    background: var(--gold-bright) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(245, 176, 65, 0.5);
    color: var(--navy-deep) !important;
}

.btn-nav::after {
    display: none !important;
}

.menu-toggle {
    display: none;
    background: none;
    border: 2px solid var(--gold);
    color: var(--gold);
    font-size: 1.4rem;
    cursor: pointer;
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    line-height: 1;
}

.menu-toggle:hover {
    background: var(--gold);
    color: var(--navy-deep);
}

/* =============================================
   بخش Hero
   ============================================= */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding-top: 6rem;
    padding-bottom: 4rem;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    animation: fadeInUp 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(60px); }
    to { opacity: 1; transform: translateY(0); }
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(245, 176, 65, 0.1);
    border: 1px solid rgba(245, 176, 65, 0.3);
    padding: 0.5rem 1.2rem;
    border-radius: 50px;
    color: var(--gold);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    font-weight: 900;
    line-height: 1.3;
}

.hero p {
    font-size: 1.15rem;
    color: var(--light-gray);
    margin-bottom: 2.5rem;
    line-height: 1.9;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}
.section-title h2 a{
    color: var(--gold);
    text-decoration: none;
}
/* دکمه‌ها */
.btn-primary {
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: var(--navy-deep);
    padding: 0.9rem 2.2rem;
    font-size: 1rem;
    font-weight: 700;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 8px 30px rgba(245, 176, 65, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(245, 176, 65, 0.5);
    color: var(--navy-deep);
}

.btn-outline {
    background: transparent;
    color: var(--white);
    padding: 0.9rem 2.2rem;
    font-size: 1rem;
    font-weight: 600;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-outline:hover {
    border-color: var(--gold);
    color: var(--gold);
}

/* =============================================
   بخش آمار سریع
   ============================================= */
.stats-section {
    padding: 2rem 0 4rem;
    position: relative;
    z-index: 1;
    margin-top: -2rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem;
}

.stat-item {
    text-align: center;
    padding: 1rem;
}

.stat-item:not(:last-child) {
    border-left: 1px solid var(--glass-border);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--gold);
    font-family: 'Poppins', devix, sans-serif !important;
}

.stat-label {
    color: var(--light-gray);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* =============================================
   بخش شمارشگر انرژی
   ============================================= */
.counter-section {
    padding: 5rem 0;
    position: relative;
}

.counter-card {
    background: linear-gradient(135deg, rgba(17, 34, 64, 0.9), rgba(10, 25, 47, 0.95));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 2px solid var(--glass-border);
    border-radius: 30px;
    padding: 3.5rem 2.5rem;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 80px rgba(245, 176, 65, 0.1);
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

.counter-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg, transparent, rgba(245, 176, 65, 0.05), transparent, rgba(245, 176, 65, 0.08), transparent);
    animation: rotate-conic 20s linear infinite;
}

@keyframes rotate-conic {
    to { transform: rotate(360deg); }
}

.counter-card > * {
    position: relative;
    z-index: 1;
}

.counter-icon {
    font-size: 3rem;
    color: var(--gold);
    margin-bottom: 1rem;
    animation: pulse-sun 3s infinite;
}

@keyframes pulse-sun {
    0%, 100% { text-shadow: 0 0 20px rgba(245, 176, 65, 0.4); }
    50% { text-shadow: 0 0 40px rgba(245, 176, 65, 0.8); }
}

.counter-label {
    font-size: 1.1rem;
    color: var(--light-gray);
    margin-bottom: 1.5rem;
    padding: 0 1rem;
}

.energy-display {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 8px;
    margin: 1.5rem 0;
    flex-wrap: wrap;
}

.energy-value {
    font-size: 4.5rem;
    font-weight: 900;
    color: var(--gold);
    font-family: 'Poppins', devix, sans-serif !important;
    text-shadow: 0 0 30px rgba(245, 176, 65, 0.6), 0 0 60px rgba(245, 176, 65, 0.3);
    transition: all 0.05s ease;
    letter-spacing: 2px;
}

.unit {
    font-size: 1.4rem;
    color: var(--white);
    font-weight: 500;
}

.counter-divider {
    width: 50%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    margin: 1.5rem auto;
}

.counter-info {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.counter-info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--light-gray);
    font-size: 0.9rem;
}

.counter-info-item i {
    color: var(--gold);
}

.live-dot {
    width: 10px;
    height: 10px;
    background: #00FF88;
    border-radius: 50%;
    animation: live-pulse 1.5s infinite;
    flex-shrink: 0;
}

@keyframes live-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(1.3); }
}

/* =============================================
   بخش خدمات
   ============================================= */
.services {
    padding: 6rem 0;
    background: var(--navy-mid);
    position: relative;
}

.section-title {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title h2 {
    font-size: 2.4rem;
    font-weight: 900;
    margin-bottom: 0.5rem;
}

.subtitle {
    color: var(--gold);
    font-size: 1rem;
    margin-bottom: 1rem;
}

.underline {
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--gold), var(--gold-bright));
    margin: 0.8rem auto 0;
    border-radius: 2px;
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--card-bg);
    border: 1px solid transparent;
    border-radius: 20px;
    padding: 2.5rem 2rem;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(245, 176, 65, 0.05), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.service-card:hover::before {
    opacity: 1;
}

.service-card:hover {
    transform: translateY(-12px);
    border-color: var(--gold);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3), 0 0 40px rgba(245, 176, 65, 0.1);
}

.service-icon {
    width: 80px;
    height: 80px;
    background: rgba(245, 176, 65, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    transition: background 0.4s ease;
}

.service-card:hover .service-icon {
    background: var(--gold);
}

.service-icon i {
    font-size: 2rem;
    color: var(--gold);
    transition: color 0.4s ease;
}

.service-card:hover .service-icon i {
    color: var(--navy-deep);
}

.service-card h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.service-card p {
    color: var(--light-gray);
    font-size: 0.95rem;
}

/* =============================================
   بخش درباره ما - تایم‌لاین
   ============================================= */
.about {
    padding: 6rem 0;
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    right: 50%;
    width: 2px;
    background: linear-gradient(to bottom, transparent, var(--gold), transparent);
    transform: translateX(50%);
}

.timeline-item {
    display: flex;
    align-items: center;
    margin-bottom: 3rem;
    position: relative;
}

.timeline-item:nth-child(odd) {
    flex-direction: row-reverse;
}

.timeline-content {
    width: 43%;
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.2rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.timeline-content:hover {
    border-color: var(--gold);
    box-shadow: 0 10px 30px rgba(245, 176, 65, 0.15);
}

.timeline-dot {
    width: 55px;
    height: 55px;
    background: var(--navy-deep);
    border: 3px solid var(--gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    right: 50%;
    transform: translateX(50%);
    z-index: 2;
    font-weight: 900;
    color: var(--gold);
    font-size: 1.1rem;
    flex-shrink: 0;
}

.timeline-year {
    color: var(--gold);
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 0.4rem;
}

.timeline-content h4 {
    margin-bottom: 0.4rem;
    font-size: 1rem;
}

.timeline-content p {
    color: var(--light-gray);
    font-size: 0.9rem;
    margin: 0;
}

/* =============================================
   بخش پروژه‌ها
   ============================================= */
.projects {
    padding: 6rem 0;
    background: var(--navy-mid);
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.project-item {
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    aspect-ratio: 4 / 3;
    cursor: pointer;
    border: 1px solid var(--glass-border);

    display: block;
    text-decoration: none;
    color: inherit;
}

.project-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
    display: block;
}

.project-item:hover img {
    transform: scale(1.08);
}

.project-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(10, 25, 47, 0.95) 0%, transparent 60%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.5rem;
    transition: background 0.4s ease;
}

.project-overlay h4 {
    color: var(--gold);
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
}

.project-overlay span {
    color: var(--light-gray);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* =============================================
   بخش نظرات
   ============================================= */
.testimonials {
    padding: 6rem 0;
}

.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.testimonial-card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem;
    position: relative;
    transition: border-color 0.3s ease, transform 0.3s ease;
}

.testimonial-card:hover {
    border-color: var(--gold);
    transform: translateY(-5px);
}

.quote-icon {
    font-size: 3rem;
    color: rgba(245, 176, 65, 0.2);
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    line-height: 1;
}

.testimonial-card p {
    font-style: italic;
    margin: 1rem 0;
    color: var(--light-gray);
    font-size: 0.95rem;
    line-height: 1.8;
}

.stars {
    color: var(--gold);
    font-size: 1.1rem;
    letter-spacing: 2px;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

.author-avatar {
    width: 50px;
    height: 50px;
    background: var(--gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--navy-deep);
    font-size: 0.85rem;
    flex-shrink: 0;
}

.testimonial-author strong {
    display: block;
    margin-bottom: 3px;
    font-size: 0.95rem;
}

.testimonial-author .author-role {
    font-size: 0.8rem;
    color: var(--light-gray);
    margin: 0;
} 

/* =============================================
   بخش CTA (تماس)
   ============================================= */
.cta-section {
    padding: 5rem 0;
    background: linear-gradient(135deg, var(--navy-mid), var(--navy-deep));
    text-align: center;
}

.cta-box {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    padding: 4rem 2.5rem;
    max-width: 800px;
    margin: 0 auto;
}

.cta-box h2 {
    font-size: 2.1rem;
    margin-bottom: 1rem;
}

.cta-description {
    color: var(--light-gray);
    margin-bottom: 1rem;
    font-size: 1rem;
}

.cta-box .btn-primary {
    margin-top: 2rem;
    font-size: 1.05rem;
}

.cta-email {
    margin-top: 1.2rem;
    font-size: 0.9rem;
    color: var(--light-gray);
}

.cta-email span {
    color: var(--gold);
}

/* =============================================
   فوتر
   ============================================= */
footer {
    background: var(--dark-bg);
    padding: 4rem 0 1.5rem;
    border-top: 1px solid var(--glass-border);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.footer-col h4 {
    color: var(--gold);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.footer-col p,
.footer-col a {
    color: var(--light-gray);
    text-decoration: none;
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin-bottom: 0.8rem;
    transition: color 0.3s ease, transform 0.3s ease;
    font-size: 0.9rem;
    line-height: 1.6;
}

.footer-col a:hover {
    color: var(--gold);
    transform: translateX(-5px);
}

.footer-icon {
    color: var(--gold);
    margin-left: 8px;
    flex-shrink: 0;
    margin-top: 4px;
}

.social-links {
    display: flex;
    gap: 0.8rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.social-links a {
    width: 42px;
    height: 42px;
    background: rgba(245, 176, 65, 0.1);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 1.1rem;
    margin-bottom: 0;
    color: var(--light-gray);
    flex-shrink: 0;
    padding: 0;
}

.social-links a:hover {
    background: var(--gold);
    color: var(--navy-deep);
    transform: translateY(-3px);
    border-color: var(--gold);
}

.copyright {
    text-align: center;
    color: var(--light-gray);
    padding-top: 1.5rem;
    border-top: 1px solid var(--glass-border);
    font-size: 0.85rem;
    line-height: 1.8;
}

/* =============================================
   دکمه بازگشت به بالا
   ============================================= */
.back-to-top {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 50px;
    height: 50px;
    background: var(--gold);
    color: var(--navy-deep);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.3rem;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(245, 176, 65, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(245, 176, 65, 0.6);
}

/* =============================================
   ریسپانسیو - تبلت بزرگ (max-width: 1024px)
   ============================================= */
@media (max-width: 1024px) {
    .hero h1 {
        font-size: 3rem;
    }
    nav ul {
        gap: 1.5rem;
    }
    .timeline-content {
        width: 42%;
    }
}

/* =============================================
   ریسپانسیو - تبلت (max-width: 768px)
   ============================================= */

@media (max-width: 768px) {

    .menu-toggle{
        display:flex;
        align-items:center;
        justify-content:center;
        font-size:1.4rem;
    }

    nav{
        position:relative;
    }

	
	
    /* پنل منو */
    nav ul{
        display:none;
        flex-direction:column;
        position:absolute;
        top:100%;
        right:0;
        left:auto;
        width:min(320px,85vw);
        background:var(--navy-mid);
        padding:1.2rem 1rem;
        border-radius:18px 0 18px 18px;
        border:1px solid var(--glass-border);
        border-top:none;
        gap:0.7rem;
        text-align:right;
        box-shadow:0 20px 40px rgba(0,0,0,0.45);
        z-index:9999;
    }

    nav ul.active{
        display:flex;
    }

    nav ul li{
        width:100%;
    }

    nav ul li a{
        display:flex;
        align-items:center;
        justify-content:space-between;
        padding:0.65rem 0.4rem;
        font-size:1rem;
    }

    /* زیرمنو */
    nav .sub-menu{
        display:none;
        flex-direction:column;
        gap:0.35rem;
        margin-top:0.3rem;
        padding-right:0.8rem;
        position:static;
        background:transparent;
        border:none;
        box-shadow:none;
    }

    nav .menu-item-has-children.open > .sub-menu{
        display:flex;
    }

    nav .sub-menu li a{
        font-size:0.95rem;
        padding:0.5rem 0.3rem;
        opacity:0.9;
    }

    /* فلش زیرمنو */
    nav .menu-item-has-children > a::after{
        content:"▾";
        font-size:0.75rem;
        transition:transform .25s ease;
    }

    nav .menu-item-has-children.open > a::after{
        transform:rotate(180deg);
    }

}


/* =============================================
   ریسپانسیو - موبایل کوچک (max-width: 480px)
   ============================================= */
@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .logo {
        font-size: 1.3rem;
        gap: 8px;
    }

    .logo-icon {
        width: 36px;
        height: 36px;
    }

    .logo-icon img {
        width: 36px;
        height: 36px;
    }

    .hero h1 {
        font-size: 1.7rem;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 0.8rem;
    }

    .btn-primary,
    .btn-outline {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    .energy-value {
        font-size: 2.2rem;
    }

    .unit {
        font-size: 1.1rem;
    }

    .section-title h2 {
        font-size: 1.6rem;
    }

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

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

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

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

    .cta-box h2 {
        font-size: 1.5rem;
    }

    .counter-label {
        font-size: 0.95rem;
    }

    .timeline-item,
    .timeline-item:nth-child(odd) {
        padding-right: 55px;
    }

    .timeline-dot {
        width: 38px;
        height: 38px;
        font-size: 0.8rem;
    }

    /* تایم‌لاین خط عمودی */
    .timeline::before {
        right: 18px;
    }
}

/* =============================================
   ریسپانسیو - موبایل خیلی کوچک (max-width: 360px)
   ============================================= */
@media (max-width: 360px) {
    .hero h1 {
        font-size: 1.5rem;
    }

    .energy-value {
        font-size: 1.9rem;
    }

    .btn-primary,
    .btn-outline {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }

    .section-title h2 {
        font-size: 1.4rem;
    }
}

/* =============================================
   WordPress Admin Bar Fix
   ============================================= */
.admin-bar #header {
    top: 32px;
}

@media (max-width: 782px) {
    .admin-bar #header {
        top: 46px;
    }
}

@media (max-width: 600px) {
    .admin-bar #header {
        top: 0;
    }
}




/* ===== RTL Dropdown Menu Fix ===== */

/* منوی اصلی */
nav > ul#nav-menu {
    position: relative;
    direction: rtl;
}

/* آیتم‌های سطح اول */
nav > ul#nav-menu > li {
    position: relative;
}

/* زیرمنوی سطح اول و همه سطوح بعدی */
nav .sub-menu {
    display: none !important;
    position: absolute;
    top: 100%;
    right: 0;
    left: auto;
    min-width: 220px;
    width: max-content;
    max-width: 90vw;
    margin: 0;
    padding: 0.6rem 0;
    list-style: none;
    background: var(--navy-mid);
    border-radius: 12px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.35);
    z-index: 1000;
    text-align: right;
    direction: rtl;
}

/* نمایش زیرمنوی سطح اول */
nav > ul#nav-menu > li:hover > .sub-menu {
    display: block !important;
}

/* آیتم‌های داخل زیرمنو */
nav .sub-menu li {
    position: relative;
    display: block;
    width: 100%;
}

/* لینک‌های زیرمنو */
nav .sub-menu li a {
    display: block;
    padding: 0.75rem 1rem;
    white-space: nowrap;
    text-align: right;
}

/* نمایش زیرمنوی سطح دوم و بیشتر */
nav .sub-menu li:hover > .sub-menu {
    display: block !important;
    top: 0;
    right: 100%;
    left: auto;
    margin-right: 0.25rem;
}

/* اگر خواستی فاصله و خوانایی بهتر شود */
nav .sub-menu li a:hover {
    background: rgba(255, 255, 255, 0.06);
}

/* آیتم‌های دارای زیرمنو */
nav .menu-item-has-children > a {
    padding-left: 0;
    padding-right: 0;
}

/* موبایل */
@media (max-width: 768px) {
    nav > ul#nav-menu {
        direction: rtl;
        text-align: right;
        align-items: stretch;
    }

    nav > ul#nav-menu > li {
        width: 100%;
        text-align: right;
    }

    nav > ul#nav-menu > li > a {
        display: block;
        text-align: right;
        width: 100%;
    }

    /* در موبایل زیرمنو absolute نباشد که متن بیرون نزند */
    nav .sub-menu {
        position: static;
        display: none !important;
        width: 100%;
        max-width: 100%;
        min-width: 100%;
        box-shadow: none;
        border-radius: 8px;
        margin-top: 0.4rem;
        margin-right: 0;
        padding: 0.4rem 0;
        background: rgba(255, 255, 255, 0.04);
    }

    /* سطح دوم هم در موبایل داخل خودش باز شود */
    nav .sub-menu .sub-menu {
        position: static;
        margin-right: 0;
    }

    /* باز شدن زیرمنو با کلاس */
nav .menu-item-has-children.open > .sub-menu{
    display:block !important;
}


    nav .sub-menu li a {
        white-space: normal;
        word-break: break-word;
        padding: 0.7rem 1rem;
        text-align: right;
    }
}


/* ===== FINAL RTL HEADER LAYOUT ===== */

#header{
    direction: rtl;
}

.header-inner{
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 1rem;
    flex-direction: row;
}

/* لوگو و نام شرکت بروند سمت چپ */
.logo{
  /*  order: 2;
    margin-right: auto;  */
	order: 1;
    margin-left: 0;
    margin-right: 0;
}

/* منو برود سمت راست */
nav{
    order: 1;
    margin-left: 0;
    margin-right: 6rem ;
}

nav > ul#nav-menu{
    align-items: center;
    justify-content: flex-start;
    gap: 2rem;
    margin: 0;
    padding: 0;
    direction: rtl;
}


/* موبایل */
@media (max-width: 991px){
    .header-inner{
        flex-wrap: wrap;
    }

    nav{
        width: 100%;
        order: 3;
        margin-top: 1rem;
    }
}

/* ===== MOBILE MENU FIX ===== */

@media (max-width:768px){

#nav-menu{
    flex-direction:column;
    align-items:flex-start;
}

#nav-menu li{
    width:100%;
}

#nav-menu li a{
    width:100%;
    display:flex;
    align-items:center;
    justify-content:flex-start;
    padding:12px 0;
}

/* زیرمنو بسته */
#nav-menu .sub-menu{
    display:none;
    padding-right:15px;
}

/* زیرمنو باز */
#nav-menu .menu-item-has-children.open > .sub-menu{
    display:block;
}

}












