/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #3498db;
    --primary-dark: #2980b9;
    --secondary: #e74c3c;
    --accent: #9b59b6;
    --dark: #2c3e50;
    --gray: #7f8c8d;
    --light-gray: #f8f9fa;
    --white: #ffffff;
    --shadow: 0 10px 30px rgba(0,0,0,0.1);
    --shadow-hover: 0 20px 40px rgba(0,0,0,0.15);
    --transition: all 0.3s ease;
    --radius: 15px;
    --container: 1200px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Vazir', 'Segoe UI', Tahoma, sans-serif;
    line-height: 1.7;
    color: var(--dark);
    background: var(--white);
    padding-top: 80px;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 2rem;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.btn-primary {
    background: var(--secondary);
    color: var(--white);
}

.btn-primary:hover {
    background: #c0392b;
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(231,76,60,0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.btn-secondary:hover {
    background: var(--white);
    color: var(--primary);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--white);
}

.btn-sm {
    padding: 0.5rem 1.5rem;
    font-size: 0.9rem;
}

.btn-lg {
    padding: 1rem 3rem;
    font-size: 1.2rem;
}

/* ===== HEADER ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
    transition: var(--transition);
}

.header.scrolled {
    background: rgba(255,255,255,0.98);
    box-shadow: 0 5px 25px rgba(0,0,0,0.12);
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo h2 {
    font-size: 1.5rem;
    color: var(--dark);
}

.logo-tagline {
    font-size: 0.75rem;
    color: var(--gray);
    background: var(--light-gray);
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    font-weight: 500;
    color: var(--dark);
    transition: var(--transition);
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    right: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.search-toggle {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--dark);
    cursor: pointer;
    transition: var(--transition);
}

.search-toggle:hover {
    color: var(--primary);
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-menu-btn span {
    width: 28px;
    height: 3px;
    background: var(--dark);
    border-radius: 3px;
    transition: var(--transition);
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* ===== SEARCH MODAL ===== */
.search-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.search-modal.active {
    display: flex;
}

.search-container {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--radius);
    width: 90%;
    max-width: 500px;
    position: relative;
}

.search-container form {
    display: flex;
    gap: 0.5rem;
}

.search-container input {
    flex: 1;
    padding: 1rem;
    border: 2px solid var(--primary);
    border-radius: 25px;
    font-size: 1rem;
    font-family: inherit;
    outline: none;
}

.search-container input:focus {
    border-color: var(--secondary);
}

.search-container button[type="submit"] {
    padding: 1rem 1.5rem;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: var(--transition);
}

.search-container button[type="submit"]:hover {
    background: var(--primary-dark);
}

.search-close {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--gray);
    cursor: pointer;
}

/* ===== SECTION HEADERS ===== */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.section-header p {
    color: var(--gray);
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

/* ===== PAGE HERO ===== */
.page-hero {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: var(--white);
    padding: 4rem 0;
    text-align: center;
}

.page-hero h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.page-hero p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* ===== HERO SLIDER ===== */
.hero {
    position: relative;
    height: 90vh;
    min-height: 500px;
    overflow: hidden;
}

.hero-slider {
    position: relative;
    width: 100%;
    height: 100%;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.slide.active {
    opacity: 1;
}

.slide-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.slide-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0,0,0,0.6), rgba(0,0,0,0.3));
    z-index: 1;
}

.slide-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    color: var(--white);
    text-align: center;
    padding: 0 2rem;
}

.slide-content h1 {
    font-size: 3.5rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.slide-subtitle {
    font-size: 1.5rem;
    color: #ffd700;
    margin-bottom: 0.5rem;
}

.slide-desc {
    font-size: 1.2rem;
    max-width: 600px;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

/* Slider Controls */
.slider-controls {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    z-index: 10;
}

.slider-nav {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.5);
    background: rgba(255,255,255,0.15);
    color: var(--white);
    cursor: pointer;
    transition: var(--transition);
    backdrop-filter: blur(5px);
}

.slider-nav:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.1);
}

.slider-indicators {
    display: flex;
    gap: 0.5rem;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.5);
    background: transparent;
    cursor: pointer;
    transition: var(--transition);
}

.indicator.active {
    background: var(--white);
    transform: scale(1.2);
}

/* ===== FEATURES ===== */
.features {
    padding: 4rem 0;
    background: var(--light-gray);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.feature-item {
    text-align: center;
    padding: 2rem;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.feature-icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.feature-item h3 {
    margin-bottom: 0.5rem;
}

.feature-item p {
    color: var(--gray);
}

/* ===== PRODUCTS ===== */
.products-preview {
    padding: 4rem 0;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.product-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.product-image {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--white);
}

.product-badge.spherical { background: #e74c3c; }
.product-badge.tetrahedral { background: #3498db; }
.product-badge.cubic { background: #9b59b6; }
.product-badge.cylindrical { background: #2ecc71; }
.product-badge.flag { background: #f39c12; }
.product-badge.mobile { background: #1abc9c; }

.product-info {
    padding: 1.5rem;
}

.product-info h3 {
    margin-bottom: 0.3rem;
}

.product-info p {
    color: var(--gray);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

/* ===== STATS ===== */
.stats {
    padding: 4rem 0;
    background: linear-gradient(135deg, var(--dark), #1a252f);
    color: var(--white);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 2rem;
    text-align: center;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    display: block;
}

.stat-label {
    font-size: 1rem;
    opacity: 0.8;
}

/* ===== BLOG ===== */
.blog-preview {
    padding: 4rem 0;
    background: var(--light-gray);
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.blog-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.blog-image {
    height: 200px;
    overflow: hidden;
}

.blog-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.blog-card:hover .blog-image img {
    transform: scale(1.05);
}

.blog-content {
    padding: 1.5rem;
}

.blog-date {
    font-size: 0.85rem;
    color: var(--gray);
}

.blog-content h3 {
    margin: 0.5rem 0;
}

.blog-content h3 a {
    transition: var(--transition);
}

.blog-content h3 a:hover {
    color: var(--primary);
}

.read-more {
    display: inline-block;
    margin-top: 0.5rem;
    color: var(--primary);
    font-weight: 500;
    transition: var(--transition);
}

.read-more:hover {
    color: var(--primary-dark);
}

/* ===== CTA ===== */
.cta {
    padding: 4rem 0;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: var(--white);
    text-align: center;
}

.cta h2 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.cta p {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

/* ===== ABOUT / VALUES / TEAM ===== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.about-text h2 {
    margin-bottom: 1rem;
}

.about-text p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

.values-grid,
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.value-item,
.team-member {
    text-align: center;
    padding: 2rem;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.value-item i {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.team-member img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 1rem;
}

/* ===== CONTACT ===== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 3rem;
    padding: 3rem 0;
}

.contact-info .info-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.contact-info .info-item i {
    font-size: 1.5rem;
    color: var(--primary);
    width: 40px;
    text-align: center;
}

.contact-form-wrapper {
    background: var(--light-gray);
    padding: 2rem;
    border-radius: var(--radius);
}

.contact-form .form-group {
    margin-bottom: 1.5rem;
}

.contact-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
    border-color: var(--primary);
    outline: none;
}

/* ===== FOOTER ===== */
.footer {
    background: var(--dark);
    color: var(--white);
    padding: 4rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-col h3,
.footer-col h4 {
    margin-bottom: 1rem;
}

.footer-col p {
    color: #bdc3c7;
    line-height: 1.8;
}

.footer-col ul li {
    margin-bottom: 0.5rem;
}

.footer-col ul a {
    color: #bdc3c7;
    transition: var(--transition);
}

.footer-col ul a:hover {
    color: var(--white);
}

.social-links {
    display: flex;
    gap: 0.8rem;
    margin-top: 1rem;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    color: var(--white);
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: #bdc3c7;
}

/* ===== BACK TO TOP ===== */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
    opacity: 0;
    visibility: hidden;
    z-index: 999;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--secondary);
    transform: translateY(-3px);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {
    .about-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .slide-content h1 {
        font-size: 2.8rem;
    }
}

@media (max-width: 768px) {
    body {
        padding-top: 70px;
    }
    
    .nav-links {
        position: fixed;
        top: 80px;
        right: -100%;
        width: 80%;
        height: calc(100vh - 80px);
        background: var(--white);
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding: 2rem 0;
        box-shadow: -5px 0 20px rgba(0,0,0,0.1);
        transition: var(--transition);
        gap: 1.5rem;
    }
    
    .nav-links.active {
        right: 0;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .hero {
        height: 70vh;
        min-height: 400px;
    }
    
    .slide-content h1 {
        font-size: 2rem;
    }
    
    .slide-subtitle {
        font-size: 1.1rem;
    }
    
    .slide-desc {
        font-size: 1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 280px;
    }
    
    .product-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }
    
    .product-grid {
        grid-template-columns: 1fr;
    }
    
    .slide-content h1 {
        font-size: 1.6rem;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
    }
}