/* ============================================
   کارتن سازی پارس ایران - استایل اصلی
   طراحی مدرن و ریسپانسیو - نسخه ۲.۰
============================================= */

/* Reset & Base Styles */
:root {
    --primary-color: #d32f2f;
    --primary-dark: #b71c1c;
    --primary-light: #ff6659;
    --secondary-color: #2c3e50;
    --accent-color: #3498db;
    --text-color: #333333;
    --text-light: #666666;
    --background-light: #f8f9fa;
    --border-color: #e0e0e0;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --white: #ffffff;
    --black: #000000;
    --shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 10px 30px rgba(0, 0, 0, 0.12);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --border-radius: 8px;
    --container-width: 1200px;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'IRANSans', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: var(--white);
    overflow-x: hidden;
    text-align: right;
    direction: rtl;
}

.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
}

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

a:hover {
    color: var(--primary-dark);
}

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

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: var(--border-radius);
    font-weight: 600;
    font-size: 1rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, #d32f2f, #b71c1c);
    color: var(--white);
    border-color: #d32f2f;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #b71c1c, #d32f2f);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
    color: var(--white);
}

.btn-outline {
    background: transparent;
    color: #d32f2f;
    border-color: #d32f2f;
}

.btn-outline:hover {
    background: #d32f2f;
    color: var(--white);
    transform: translateY(-2px);
}

.btn-success {
    background: #27ae60;
    color: var(--white);
    border-color: #27ae60;
}

.btn-success:hover {
    background: #229954;
    transform: translateY(-2px);
}

.btn-light {
    background: var(--white);
    color: #d32f2f;
    border-color: var(--white);
}

.btn-light:hover {
    background: #d32f2f;
    color: var(--white);
}

/* Header Top Bar */
.header-topbar {
    background: linear-gradient(135deg, #2c3e50, #1a252f);
    color: var(--white);
    padding: 10px 0;
    font-size: 0.9rem;
}

.topbar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.contact-info {
    display: flex;
    gap: 20px;
}

.contact-info a {
    color: var(--white);
    display: flex;
    align-items: center;
    gap: 8px;
}

.contact-info a:hover {
    color: #ff6659;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.catalog-btn {
    background: #d32f2f;
    color: var(--white);
    padding: 6px 15px;
    border-radius: 4px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.catalog-btn:hover {
    background: #b71c1c;
    color: var(--white);
}

.social-links {
    display: flex;
    gap: 10px;
}

.social-links a {
    color: var(--white);
    font-size: 1rem;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
}

.social-links a:hover {
    background: #d32f2f;
    transform: translateY(-2px);
}

/* Main Header */
.main-header {
    background: var(--white);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
}

.logo-wrapper img {
    height: 50px;
    width: auto;
}

/* Navigation */
.main-navigation {
    display: flex;
    align-items: center;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: #2c3e50;
    border-radius: 2px;
    transition: var(--transition);
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
    margin: 0;
    padding: 0;
}

.nav-menu li {
    position: relative;
}

.nav-menu a {
    color: #2c3e50;
    font-weight: 600;
    padding: 8px 0;
    position: relative;
    display: block;
}

.nav-menu a:hover,
.nav-menu .current-menu-item a {
    color: #d32f2f;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 2px;
    background: #d32f2f;
    transition: var(--transition);
}

.nav-menu a:hover::after,
.nav-menu .current-menu-item a::after {
    width: 100%;
}

/* Header CTA */
.header-cta {
    display: flex;
    gap: 15px;
    align-items: center;
}

.whatsapp-cta,
.price-cta {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--border-radius);
    font-weight: 600;
    font-size: 0.9rem;
}

.whatsapp-cta {
    background: #25D366;
    color: var(--white);
}

.whatsapp-cta:hover {
    background: #128C7E;
    color: var(--white);
}

.price-cta {
    background: linear-gradient(135deg, #d32f2f, #b71c1c);
    color: var(--white);
}

.price-cta:hover {
    background: linear-gradient(135deg, #b71c1c, #d32f2f);
}

/* Floating Buttons */
.floating-buttons {
    position: fixed;
    bottom: 30px;
    left: 30px;
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.floating-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    color: var(--white);
    font-size: 1.5rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.floating-btn:hover {
    width: 180px;
    border-radius: 30px;
    justify-content: flex-start;
    padding-right: 20px;
}

.floating-btn .btn-text {
    display: none;
    margin-right: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
}

.floating-btn:hover .btn-text {
    display: block;
}

.whatsapp-btn { background: #25D366; }
.price-btn { background: #d32f2f; }
.call-btn { background: #3498db; }

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, rgba(45, 62, 80, 0.9), rgba(26, 37, 47, 0.9));
    background-size: cover;
    background-position: center;
    color: var(--white);
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: url('images/hero-bg.jpg') center/cover no-repeat;
    opacity: 0.1;
    z-index: 1;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 2.8rem;
    color: var(--white);
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-description {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 30px;
    line-height: 1.8;
}

.hero-cta {
    display: flex;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.hero-features {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
}

.feature-item i {
    color: #ff6659;
    font-size: 1.2rem;
}

.hero-image {
    position: relative;
}

.hero-image img {
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-hover);
    transform: perspective(1000px) rotateY(-10deg);
    transition: var(--transition);
}

.hero-image:hover img {
    transform: perspective(1000px) rotateY(0deg);
}

/* Section Common Styles */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: 2.2rem;
    color: #2c3e50;
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    right: 50%;
    transform: translateX(50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(to right, #d32f2f, #3498db);
    border-radius: 2px;
}

.section-subtitle {
    color: #666666;
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* About Section */
.about-section {
    padding: 100px 0;
    background: #f8f9fa;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-image img {
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.about-content {
    padding-left: 20px;
}

.about-text {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 40px;
    color: #333333;
}

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

.stat-item {
    text-align: center;
    padding: 20px;
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    min-width: 120px;
    transition: var(--transition);
}

.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: #d32f2f;
    line-height: 1;
    margin-bottom: 10px;
}

.stat-label {
    color: #666666;
    font-size: 0.95rem;
}

/* Services Section */
.services-section {
    padding: 100px 0;
    background: var(--white);
}

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

.service-card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
    border: 2px solid transparent;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
    border-color: #d32f2f;
}

.service-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #d32f2f, #b71c1c);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 2rem;
}

.service-title {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: #2c3e50;
}

.service-desc {
    color: #666666;
    line-height: 1.7;
}

/* Portfolio Section */
.portfolio-section {
    padding: 100px 0;
    background: #f8f9fa;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.portfolio-item {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.portfolio-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.portfolio-link {
    display: block;
    color: inherit;
}

.portfolio-image {
    position: relative;
    overflow: hidden;
    height: 250px;
}

.portfolio-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.portfolio-item:hover .portfolio-image img {
    transform: scale(1.05);
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-overlay i {
    color: var(--white);
    font-size: 2.5rem;
    transform: scale(0.8);
    transition: var(--transition);
}

.portfolio-item:hover .portfolio-overlay i {
    transform: scale(1);
}

.portfolio-title {
    padding: 20px;
    font-size: 1.2rem;
    color: #2c3e50;
    margin: 0;
}

/* CTA Section */
.cta-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #d32f2f, #b71c1c);
    color: var(--white);
    text-align: center;
}

.cta-title {
    font-size: 2.5rem;
    color: var(--white);
    margin-bottom: 20px;
}

.cta-description {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 40px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

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

/* Clients Section */
.clients-section {
    padding: 80px 0;
    background: var(--white);
}

.clients-slider {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 40px;
}

.client-item {
    width: 150px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.client-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.client-item img {
    max-width: 100%;
    max-height: 100%;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: var(--transition);
}

.client-item:hover img {
    filter: grayscale(0);
    opacity: 1;
}

/* Footer */
.main-footer {
    background: #2c3e50;
    color: var(--white);
}

.footer-top {
    padding: 80px 0 40px;
}

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

.footer-column {
    margin-bottom: 30px;
}

.footer-logo img {
    height: 50px;
    width: auto;
    margin-bottom: 20px;
}

.footer-about {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.8;
    margin-bottom: 20px;
}

.footer-social {
    display: flex;
    gap: 15px;
}

.footer-social a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.1rem;
    transition: var(--transition);
}

.footer-social a:hover {
    background: #d32f2f;
    transform: translateY(-3px);
}

.footer-title {
    font-size: 1.3rem;
    color: var(--white);
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.footer-menu,
.footer-services,
.footer-contact {
    list-style: none;
    padding: 0;
}

.footer-menu li,
.footer-services li,
.footer-contact li {
    margin-bottom: 15px;
}

.footer-menu a,
.footer-services a {
    color: rgba(255, 255, 255, 0.8);
    display: block;
    transition: var(--transition);
}

.footer-menu a:hover,
.footer-services a:hover {
    color: #ff6659;
    padding-right: 10px;
}

.footer-contact li {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    color: rgba(255, 255, 255, 0.8);
}

.footer-contact i {
    color: #ff6659;
    width: 20px;
    margin-top: 3px;
}

.footer-contact a {
    color: rgba(255, 255, 255, 0.8);
}

.footer-contact a:hover {
    color: #ff6659;
}

.footer-map {
    height: 300px;
    background: #f8f9fa;
}

#map-footer {
    height: 100%;
    width: 100%;
}

.footer-bottom {
    background: #1a252f;
    padding: 25px 0;
}

.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.copyright p {
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    gap: 25px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    transition: var(--transition);
}

.footer-links a:hover {
    color: #ff6659;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hero-grid,
    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .hero-title {
        font-size: 2.2rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .header-inner {
        flex-wrap: wrap;
        gap: 15px;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 100px;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: calc(100vh - 100px);
        background: var(--white);
        flex-direction: column;
        padding: 30px 20px;
        box-shadow: var(--shadow-hover);
        transition: var(--transition);
        overflow-y: auto;
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .header-cta {
        display: none;
    }
    
    .hero-section {
        padding: 60px 0;
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .hero-cta {
        flex-direction: column;
    }
    
    .hero-cta .btn {
        width: 100%;
        justify-content: center;
    }
    
    .about-section,
    .services-section,
    .portfolio-section,
    .cta-section {
        padding: 60px 0;
    }
    
    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
    }
    
    .floating-buttons {
        left: 15px;
        bottom: 15px;
    }
    
    .floating-btn {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .floating-btn:hover {
        width: 150px;
    }
}

@media (max-width: 480px) {
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.3rem; }
    
    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .topbar-content {
        justify-content: center;
        text-align: center;
    }
    
    .contact-info {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .hero-features {
        flex-direction: column;
        gap: 15px;
    }
    
    .about-stats {
        flex-direction: column;
        gap: 20px;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
    
    .cta-buttons {
        flex-direction: column;
    }
    
    .cta-buttons .btn {
        width: 100%;
    }
}

/* Animation Keyframes */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

:focus {
    outline: 3px solid #ff6659;
    outline-offset: 3px;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #0044cc;
        --secondary-color: #000000;
        --text-color: #000000;
    }
    
    .btn {
        border: 2px solid currentColor;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Print Styles */
@media print {
    .header-topbar,
    .main-header,
    .floating-buttons,
    .footer-social,
    .footer-map,
    .cta-section,
    .hero-cta {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
    }
    
    .container {
        max-width: 100%;
        padding: 0;
    }
    
    a {
        color: var(--black) !important;
        text-decoration: underline !important;
    }
    
    .btn {
        display: none !important;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #d32f2f;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #b71c1c;
}

/* Loading Animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.loading {
    animation: pulse 1.5s ease-in-out infinite;
}

/* Tooltip */
[data-tooltip] {
    position: relative;
}

[data-tooltip]:hover::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #2c3e50;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    white-space: nowrap;
    z-index: 1000;
}

[data-tooltip]:hover::after {
    content: '';
    position: absolute;
    bottom: calc(100% - 5px);
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #2c3e50;
}