/* تنظیمات عمومی و متغیرها */
/* تعریف رنگ ها کلی */
:root {
    --primary-color: #007bff; /* آبی */
    --secondary-color: #6c757d; /* خاکستری */
    --success-color: #28a745; /* سبز */
    --danger-color: #dc3545; /* قرمز */
    --warning-color: #ffc107; /* زرد */
    --info-color: #17a2b8; /* فیروزه‌ای */
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --background-light: #ffffff;
    --text-light: #212529;
    --background-dark: #1a1a1a;
    --text-dark: #e0e0e0;
    --header-bg-light: rgba(255, 255, 255, 0.8);
    --header-bg-dark: rgba(26, 26, 26, 0.8);
    --hover-effect-light: rgba(0, 0, 0, 0.08);
    --hover-effect-dark: rgba(255, 255, 255, 0.1);
    --border-radius-soft: 8px;
    --transition-speed: 0.3s;
}

/* حالت تاریک */
body.dark-mode {
    --background-color: var(--background-dark);
    --text-color: var(--text-dark);
    --header-bg: var(--header-bg-dark);
    --hover-effect: var(--hover-effect-dark);
    --button-bg: var(--primary-color);
    --button-text: var(--background-light);
}


body {
    --background-color: var(--background-light);
    --text-color: var(--text-light);
    --header-bg: var(--header-bg-light);
    --hover-effect: var(--hover-effect-light);
    --button-bg: var(--primary-color);
    --button-text: var(--background-light);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;/**/
}

html {
    scroll-behavior: smooth; /* اسکرول نرم */
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: background-color var(--transition-speed) ease, color var(--transition-speed) ease;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

h1, h2, h3 {
    margin-bottom: 15px;
    line-height: 1.3;
}

h1 { font-size: 2.8rem; }
h2 { font-size: 2.2rem; color: var(--primary-color); }
h3 { font-size: 1.6rem; }

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-speed) ease;
}

a:hover {
    color: var(--primary-color); /* یا رنگ تیره‌تر */
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* دکمه عمومی */
.btn {
    display: inline-block;
    background-color: var(--button-bg);
    color: var(--button-text);
    padding: 12px 25px;
    border-radius: var(--border-radius-soft);
    font-weight: bold;
    text-align: center;
    transition: background-color var(--transition-speed) ease, transform 0.2s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn:hover {
    background-color: var(--primary-color); /* یا رنگ تیره‌تر */
    transform: translateY(16px);
    box-shadow: 0 6px 8px rgba(4, 255, 67, 0.15);
    
}

/* هدر و نویگیشن */
#main-header {
    position: fixed; /* چسبیده به بالا */
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: var(--header-bg);
    backdrop-filter: blur(10px); /* افکت بوکه */
    border-bottom: 1px solid rgba(0,0,0,0.05);
    transition: background-color var(--transition-speed) ease;
}

#navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo a {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--text-color);
}

#nav-menu {
    display: flex;
}

#nav-menu li {
    margin-left: 25px;
}

#nav-menu a {
    color: var(--text-color);
    font-weight: 500;
    padding: 5px 0;
    position: relative;
    transition: color var(--transition-speed) ease;
}

#nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width var(--transition-speed) ease;
}

#nav-menu a:hover {
    color: var(--primary-color);
}

#nav-menu a:hover::after {
    width: 100%;
}
.mobile-menu-button {
    display: none; /* در حالت دسکتاپ مخفی است */
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-color);
}

/* افکت موس روی آیتم‌های منو (در حالت دسکتاپ) */
#nav-menu a {
    transition: all var(--transition-speed) ease-out;
}
#nav-menu a:hover {
    transform: scale(1.05);
    color: var(--primary-color);
}

/* دکمه تغییر تم */
.theme-toggle-button {
    position: fixed;
    top: 80px; /* زیر هدر */
    left: 20px;
    z-index: 1001;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    transition: background-color var(--transition-speed) ease, transform 0.3s ease;
}

.theme-toggle-button:hover {
    transform: rotate(180deg) scale(1.1);
    background-color: var(--warning-color);
}

/* بخش Hero */
#hero {
    position: relative;
    height: 100vh; /* کل ارتفاع صفحه */
    display: flex;
    justify-content: center;
    align-items: center;
    text-align:right;
    overflow: hidden;
    color: var(--text-color); /* رنگ متن در حالت مناسب */
    padding-top: 70px; /* فضای هدر */
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f0f4f8, #d9e4f5); /* گرادیان روشن */
    animation: gradientShift 15s ease infinite;
    z-index: 0;
}

body.dark-mode .hero-background {
    background: linear-gradient(135deg, #2c3e50, #1f3a50); /* گرادیان تاریک */
    animation: gradientShiftDark 15s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes gradientShiftDark {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 700px;
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.1); /* کمی شفافیت */
    border-radius: var(--border-radius-soft);
    backdrop-filter: blur(5px);
}

body.dark-mode .hero-content {
    background-color: rgba(26, 26, 26, 0.15);
}

#hero h1 {
    font-size: 3rem;
    margin-bottom: 15px;
    color: var(--text-color); /* اطمینان از خوانایی */
}

#hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    color: var(--text-color);
}

/* بخش‌های صفحه */
.page-section {
    padding: 80px 0; /* فضای بالا و پایین */
    overflow: hidden;
}

.page-section h2 {
    text-align: center;
    margin-bottom: 50px;
    position: relative;
}
.page-section h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

/* درباره ما */
#about .about-content {
    display: flex;
    align-items: center;
    gap: 40px;
}

#about .about-text {
    flex: 1;
}
#about .about-image {
    flex: 1;
    text-align: center;
}

#about .about-image img {
    border-radius: var(--border-radius-soft);
    box-shadow: 10px 10px 20px rgba(228, 5, 5, 0.1);
    max-width: 450px;
    margin: 0 auto;
}
 
body.dark-mode #about .about-image img {
     box-shadow: 0 10px 20px rgba(255,255,255,0.1);
}

/* خدمات */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    text-align: center;
}

.service-item {
    padding: 30px 20px;
    background-color: var(--background-color);
    border-radius: var(--border-radius-soft);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

body.dark-mode .service-item {
     box-shadow: 0 5px 15px rgba(255,255,255,0.08);
}
.service-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}
body.dark-mode .service-item:hover {
     box-shadow: 0 15px 30px rgba(255,255,255,0.15);
}


.service-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px auto;
    filter: invert(var(--invert-filter, 0)); /* برای حالت تاریک */
}

body.dark-mode .service-icon {
    filter: invert(1);
}

/* پیشنهاد ویژه */
.offer-section {
    background-color: var(--primary-color);
    color: white;
    text-align: center;
}

.offer-section h2 {
    color: white;
}

.offer-section p {
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.offer-section strong {
    font-size: 1.4rem;
}

.offer-section .btn-offer {
    background-color: var(--warning-color);
    color: var(--dark-color);
}
.offer-section .btn-offer:hover {
    background-color: #e0a800;
}

#countdown-timer {
    font-size: 1.8rem;
    font-weight: bold;
    margin: 30px 0;
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

#countdown-timer span {
    background-color: rgba(255, 255, 255, 0.2);
    padding: 10px 15px;
    border-radius: var(--border-radius-soft);
    min-width: 50px;
    text-align: center;
}

/* نمونه کارها */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.portfolio-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius-soft);
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
body.dark-mode .portfolio-item {
    box-shadow: 0 5px 15px rgba(255,255,255,0.1);
}


.portfolio-item img {
    width: 100%;
    height: 250px; /* ارتفاع ثابت برای تصاویر */
    object-fit: cover; /* پوشش دادن ناحیه */
    transition: transform 0.4s ease-out;
}

.portfolio-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 25px rgba(0,0,0,0.15);
}
body.dark-mode .portfolio-item:hover {
    box-shadow: 0 15px 25px rgba(255,255,255,0.15);
}

.portfolio-item:hover img {
    transform: scale(1.05);
}

.portfolio-item .overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.4s ease, background-color 0.4s ease;
    transform: translateY(100%); /* مخفی در پایین */
}

.portfolio-item:hover .overlay {
    opacity: 1;
    transform: translateY(0);
}

body.dark-mode .portfolio-item .overlay {
    background-color: rgba(26, 26, 26, 0.8);
}

.portfolio-item .overlay h3 {
    margin-bottom: 5px;
}

/* تماس با ما */
.contact-content {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    justify-content: center;
}

.contact-form {
    flex: 1;
    min-width: 300px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: var(--border-radius-soft);
    background-color: var(--background-color);
    color: var(--text-color);
    transition: border-color var(--transition-speed) ease, background-color var(--transition-speed) ease;
}

body.dark-mode .contact-form input,
body.dark-mode .contact-form textarea {
    border-color: #555;
}


.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.2);
}

body.dark-mode .contact-form input:focus,
body.dark-mode .contact-form textarea:focus {
     box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.4);
}

.contact-info {
    flex: 1;
    min-width: 250px;
}

.contact-info p {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.contact-info p i { /* اگر از آیکون فونت استفاده کنید */
    font-size: 1.2rem;
    color: var(--primary-color);
}
.map-placeholder {
    width: 100%;
    height: 200px;
    background-color: var(--light-color);
    border-radius: var(--border-radius-soft);
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
    border: 1px dashed #ccc;
}

body.dark-mode .map-placeholder {
    background-color: #222;
    border-color: #444;
}


/* فوتر */
footer {
    background-color: var(--dark-color);
    color: var(--light-color);
    text-align: center;
    padding: 25px 0;
    margin-top: 50px; /* فاصله از آخرین بخش */
}

footer p {
    margin: 0;
}

/* ریپانسیو - موبایل */
@media (max-width: 991px) {
    #nav-menu {
        display: none; /* مخفی در موبایل */
        flex-direction: column;
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background-color: var(--header-bg);
        backdrop-filter: blur(15px);
        padding: 20px 0;
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    }

    #nav-menu.active {
        display: flex; /* نمایش در حالت فعال */
    }

    #nav-menu li {
        margin: 10px 0;
        text-align: center;
        padding: 10px;
    }

    .mobile-menu-button {
        display: block; /* نمایش دکمه منو در موبایل */
    }

    #hero h1 { font-size: 2.5rem; }
    #hero p { font-size: 1.1rem; }

    .page-section { padding: 60px 0; }
    h2 { font-size: 2rem; }

    #about .about-content {
        flex-direction: column;
    }
    #about .about-image {
        margin-top: 30px;
        order: 1; /* تصویر بیاید بالا */
    }
     #about .about-text {
        order: 2;
    }

    .contact-content {
        flex-direction: column;
    }
    .contact-form, .contact-info {
        width: 100%;
    }
}

/* ریپانسیو - تبلت */
@media (min-width: 768px) and (max-width: 991px) {
    .container { padding: 0 30px; }
    #nav-menu li { margin-left: 15px; }
    .hero-content { max-width: 600px; }
}

/* استایل‌های اضافی برای افکت‌های دسکتاپ */
/* وقتی موس روی هدر می‌رود، کمی گردتر شود */

/* گرد کردن گوشه هدر در حالت دسکتاپ */
#navbar {
    border-radius: 0 0 var(--border-radius-soft) var(--border-radius-soft);
}

/* افکت موس روی آیتم‌های منو */
@media (min-width: 992px) { /* فقط برای دسکتاپ */
    #nav-menu a {
        position: relative;
        transition: color var(--transition-speed) ease;
        padding-bottom: 5px;
    }
    #nav-menu a::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        width: 0;
        height: 2px;
        background-color: var(--primary-color);
        transition: width var(--transition-speed) ease-out;
    }
    #nav-menu a:hover {
        color: var(--primary-color);
    }
    #nav-menu a:hover::after {
        width: 100%;
    }
}

.charkhesh {
    font-size: 300%;
    animation: charkhesh 1s infinite;
}
/*   بخش لوگو سایت  */
 .charkhesh {

  font-size: 250%;

}
.imsgtranzeshn:hover{
    transform: scale(1.05);
 box-shadow:10px 10px 10px 10px #000000;
}