/**
 * VINA MASTER BATCH (وینا مستربچ بایگان)
 * Corporate Design System & Stylesheet
 * 
 * Theme: Instagram Brand Identity
 * - Forest & Sage Polymer Green (#2D5542)
 * - Soft Warm Cream / Linen (#F7F8F4)
 * - Warm Gold / Amber Accent (#D9992B)
 */

:root {
    /* ─── Primary Brand Colors (Forest & Sage Polymer Green from Instagram) ─── */
    --primary: #2d5542;
    --primary-hover: #214032;
    --primary-dark: #183025;
    --primary-light: #eaf1ed;
    --primary-rgb: 45, 85, 66;

    /* ─── Secondary Industrial & Dark Colors ─── */
    --secondary: #182820;
    --secondary-hover: #23382d;
    --secondary-light: #3d5347;
    --secondary-rgb: 24, 40, 32;

    /* ─── Accent Colors (Instagram Gold Sparkle & Polymer Pellets) ─── */
    --accent-gold: #d9992b;
    --accent-gold-light: #fef6e9;
    --accent-blue: #1d64b4;
    --accent-cyan: #0d9488;
    --accent-red: #e11d48;

    /* ─── Neutral & Background Colors (Warm Cream/Ivory Instagram Look) ─── */
    --bg-body: #f7f8f4;
    --bg-surface: #ffffff;
    --bg-subtle: #edf0ea;
    --bg-dark: #101c15;
    --bg-card: #ffffff;

    /* ─── Text & Typography Colors ─── */
    --text-main: #1f3027;
    --text-muted: #5e7166;
    --text-light: #8e9f95;
    --text-inverse: #ffffff;

    /* ─── Border & Divider Colors ─── */
    --border-color: #dde3db;
    --border-light: #edf1eb;
    --border-focus: #2d5542;

    /* ─── Box Shadows (Soft Natural) ─── */
    --shadow-sm: 0 1px 3px 0 rgba(24, 40, 32, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(24, 40, 32, 0.07), 0 2px 4px -2px rgba(24, 40, 32, 0.04);
    --shadow-lg: 0 10px 15px -3px rgba(24, 40, 32, 0.08), 0 4px 6px -4px rgba(24, 40, 32, 0.04);
    --shadow-xl: 0 20px 25px -5px rgba(24, 40, 32, 0.09), 0 8px 10px -6px rgba(24, 40, 32, 0.03);
    --shadow-hover: 0 20px 30px -10px rgba(45, 85, 66, 0.25);

    /* ─── Border Radii ─── */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* ─── Transitions ─── */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease-in-out;
}

/* ─── Typography & Base Setup ─── */
html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    font-size: 15px;
    line-height: 1.75;
    font-weight: 400;
    overflow-x: hidden;
}

/* Font Families: Vazir for Persian, Modern Sans for English */
html[lang^="fa"] body {
    font-family: 'Vazir', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

html[lang^="en"] body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    letter-spacing: -0.01em;
}

/* Headings */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    color: var(--secondary);
    font-weight: 700;
    line-height: 1.35;
}

html[lang^="fa"] h1,
html[lang^="fa"] h2,
html[lang^="fa"] h3 {
    font-weight: 900;
}

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

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

/* ─── Decorative Polymer Rhombus & Shapes (Instagram Brand Accent) ─── */
.cube-accent-wrap {
    position: relative;
    overflow: hidden;
}

.cube-shape {
    position: absolute;
    width: 22px;
    height: 22px;
    transform: rotate(45deg);
    border-radius: 4px;
    z-index: 1;
    pointer-events: none;
    opacity: 0.85;
}

.cube-shape.primary {
    background: linear-gradient(135deg, var(--primary), #477b61);
    box-shadow: 0 4px 10px rgba(45, 85, 66, 0.3);
}

.cube-shape.secondary {
    background: linear-gradient(135deg, var(--accent-gold), #f59e0b);
    box-shadow: 0 4px 10px rgba(217, 153, 43, 0.3);
}

.cube-shape.dark {
    background: linear-gradient(135deg, #182820, #2f4539);
}

.cube-group {
    display: inline-flex;
    gap: 8px;
    align-items: center;
}

/* ─── Top Bar ─── */
.topbar {
    background: #14221a;
    color: #a3b8ad;
    font-size: 13px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
    z-index: 1030;
}

.topbar a {
    color: #cbdad1;
}

.topbar a:hover {
    color: #ffffff;
}

.topbar-divider {
    display: inline-block;
    width: 1px;
    height: 12px;
    background: rgba(255, 255, 255, 0.15);
    margin: 0 10px;
    vertical-align: middle;
}

/* Language Switcher in Topbar (FIXED HIGH-CONTRAST DROPDOWN) */
.lang-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 600;
    color: #ffffff !important;
    transition: var(--transition);
    cursor: pointer;
}

.lang-badge:hover,
.lang-badge:focus {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.35);
    color: #ffffff !important;
}

.topbar .dropdown {
    position: relative;
}

.topbar .dropdown-menu {
    background-color: #ffffff !important;
    border: 1px solid #dde3db !important;
    border-radius: var(--radius-md) !important;
    box-shadow: 0 12px 30px rgba(24, 40, 32, 0.2) !important;
    min-width: 155px !important;
    padding: 6px !important;
    margin-top: 8px !important;
    z-index: 2000 !important;
}

.topbar .dropdown-item {
    color: #1f3027 !important;
    font-size: 13.5px !important;
    font-weight: 600 !important;
    padding: 8px 14px !important;
    border-radius: var(--radius-sm) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    transition: var(--transition-fast) !important;
}

.topbar .dropdown-item:hover,
.topbar .dropdown-item:focus {
    background-color: var(--primary-light) !important;
    color: var(--primary) !important;
}

.topbar .dropdown-item.active {
    background-color: var(--primary-light) !important;
    color: var(--primary) !important;
    font-weight: 700 !important;
}

/* ─── Main Navigation Bar ─── */
.main-navbar {
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 20px rgba(24, 40, 32, 0.05);
    transition: var(--transition);
    padding: 14px 0;
    position: sticky;
    top: 0;
    z-index: 1020;
    border-bottom: 1px solid var(--border-color);
}

.brand-logo-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-logo-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--primary) 0%, #1e3d2f 100%);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 22px;
    box-shadow: 0 6px 14px rgba(45, 85, 66, 0.35);
    transform: rotate(3deg);
    transition: var(--transition);
}

.brand-logo-wrap:hover .brand-logo-icon {
    transform: rotate(0deg) scale(1.05);
}

.brand-text-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--secondary);
    line-height: 1.2;
    margin: 0;
}

.brand-text-sub {
    font-size: 11px;
    color: var(--text-muted);
    margin: 0;
    font-weight: 500;
}

/* Nav Links */
.navbar-nav .nav-link {
    color: #2b3e34;
    font-weight: 600;
    font-size: 15px;
    padding: 8px 14px !important;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    position: relative;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--primary);
    background-color: var(--primary-light);
}

.navbar-nav .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 14px;
    right: 14px;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
}

/* ─── Buttons ─── */
.btn-primary-custom {
    background: linear-gradient(135deg, var(--primary) 0%, #1e3d2f 100%);
    color: #ffffff !important;
    font-weight: 700;
    padding: 10px 22px;
    border-radius: var(--radius-md);
    border: none;
    box-shadow: 0 4px 14px rgba(45, 85, 66, 0.3);
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary-custom:hover {
    background: linear-gradient(135deg, #224233 0%, #162e23 100%);
    box-shadow: 0 6px 20px rgba(45, 85, 66, 0.45);
    transform: translateY(-2px);
    color: #ffffff !important;
}

.btn-outline-custom {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary) !important;
    font-weight: 700;
    padding: 9px 20px;
    border-radius: var(--radius-md);
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-outline-custom:hover {
    background: var(--primary);
    color: #ffffff !important;
    border-color: var(--primary);
    transform: translateY(-2px);
}

/* ─── Hero Section ─── */
.hero-section {
    position: relative;
    background: linear-gradient(135deg, #f7f8f4 0%, #edf0ea 50%, #e2ece5 100%);
    padding: 85px 0 75px;
    overflow: hidden;
    border-bottom: 1px solid var(--border-color);
}

.hero-pattern-bg {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(#cad2c9 1px, transparent 1px);
    background-size: 24px 24px;
    opacity: 0.6;
    pointer-events: none;
}

.hero-title {
    font-size: 2.85rem;
    font-weight: 900;
    color: var(--secondary);
    line-height: 1.25;
    margin-bottom: 20px;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 30px;
    max-width: 580px;
}

/* Instagram Pill Badge Style */
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 18px;
    background: var(--primary);
    color: #ffffff;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 13px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(45, 85, 66, 0.25);
}

.hero-visual-card {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    border: 4px solid #ffffff;
    background: #ffffff;
}

.hero-visual-img {
    width: 100%;
    height: 420px;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.hero-visual-card:hover .hero-visual-img {
    transform: scale(1.03);
}

.hero-floating-stat {
    position: absolute;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    padding: 14px 20px;
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 25px rgba(24, 40, 32, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 2;
}

.hero-floating-stat.stat-bottom {
    bottom: 20px;
    left: 20px;
}

html[lang^="fa"] .hero-floating-stat.stat-bottom {
    left: auto;
    right: 20px;
}

.stat-icon-wrap {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

/* ─── Section Header ─── */
.section-header {
    text-align: center;
    margin-bottom: 50px;
    position: relative;
}

.section-tag {
    display: inline-block;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary);
    background: var(--primary-light);
    padding: 5px 16px;
    border-radius: var(--radius-full);
    margin-bottom: 12px;
}

.section-title {
    font-size: 2.15rem;
    font-weight: 800;
    color: var(--secondary);
    margin-bottom: 12px;
}

.section-subtitle {
    font-size: 1.05rem;
    color: var(--text-muted);
    max-width: 620px;
    margin: 0 auto;
}

/* ─── Product Cards (ImanPolymer Style Grid) ─── */
.product-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    padding: 24px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent-gold));
    opacity: 0;
    transition: var(--transition);
}

.product-card:hover {
    border-color: rgba(45, 85, 66, 0.4);
    box-shadow: var(--shadow-hover);
    transform: translateY(-6px);
}

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

.product-img-wrap {
    height: 200px;
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 20px;
    background: var(--bg-subtle);
    position: relative;
}

.product-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-img {
    transform: scale(1.08);
}

.product-icon-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 38px;
    height: 38px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(4px);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 18px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

html[lang^="fa"] .product-icon-badge {
    right: auto;
    left: 12px;
}

.product-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 10px;
}

.product-desc {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.65;
    flex-grow: 1;
    margin-bottom: 20px;
}

/* ─── Advantage / Feature Cards ─── */
.feature-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 28px 24px;
    transition: var(--transition);
    height: 100%;
}

.feature-box:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
    transform: translateY(-4px);
}

.feature-icon-wrap {
    width: 58px;
    height: 58px;
    border-radius: var(--radius-md);
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    margin-bottom: 20px;
    transition: var(--transition);
}

.feature-box:hover .feature-icon-wrap {
    background: var(--primary);
    color: #ffffff;
    transform: rotate(-6deg);
}

.feature-box-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 10px;
}

.feature-box-desc {
    color: var(--text-muted);
    font-size: 14px;
    margin: 0;
}

/* ─── Statistics Counter Bar ─── */
.stats-bar {
    background: linear-gradient(135deg, #182820 0%, #253d30 100%);
    color: #ffffff;
    padding: 55px 0;
    position: relative;
    border-radius: var(--radius-xl);
    margin: 60px 0;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.stats-bar::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 10% 20%, rgba(45, 85, 66, 0.25) 0%, transparent 40%),
                radial-gradient(circle at 90% 80%, rgba(217, 153, 43, 0.18) 0%, transparent 40%);
    pointer-events: none;
}

.stat-item {
    text-align: center;
    position: relative;
    z-index: 2;
}

.stat-number {
    font-size: 3rem;
    font-weight: 900;
    color: var(--accent-gold);
    line-height: 1;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 15px;
    color: #d1ded6;
    font-weight: 600;
}

/* ─── Gallery Cards (Sample Works) ─── */
.gallery-card {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    aspect-ratio: 4/3;
    box-shadow: var(--shadow-md);
    background: #dde3db;
}

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

.gallery-card:hover img {
    transform: scale(1.08);
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(24, 40, 32, 0.9) 0%, transparent 60%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 18px;
    opacity: 0;
    transition: var(--transition);
}

.gallery-card:hover .gallery-overlay {
    opacity: 1;
}

.gallery-title {
    color: #ffffff;
    font-weight: 700;
    font-size: 16px;
    margin: 0;
}

/* ─── Timeline (About Page) ─── */
.timeline {
    position: relative;
    padding: 20px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--border-color);
    left: 50%;
    transform: translateX(-50%);
}

.timeline-step {
    position: relative;
    margin-bottom: 40px;
}

.timeline-content {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    position: relative;
    transition: var(--transition);
}

.timeline-content:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.timeline-year-badge {
    display: inline-block;
    padding: 4px 14px;
    background: var(--primary);
    color: #ffffff;
    font-weight: 800;
    border-radius: var(--radius-full);
    font-size: 13px;
    margin-bottom: 8px;
}

/* ─── Specification Table (Product Detail) ─── */
.spec-table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.spec-table th,
.spec-table td {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-color);
}

.spec-table tr:last-child th,
.spec-table tr:last-child td {
    border-bottom: none;
}

.spec-table th {
    background: var(--bg-subtle);
    font-weight: 700;
    color: var(--secondary);
    width: 35%;
}

.spec-table td {
    background: #ffffff;
    color: var(--text-main);
}

/* ─── Contact Cards & Form ─── */
.contact-info-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 16px;
    transition: var(--transition);
}

.contact-info-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.contact-icon-box {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.form-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 36px;
    box-shadow: var(--shadow-lg);
}

.form-control-custom {
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    font-size: 14px;
    transition: var(--transition);
    background: #ffffff;
}

.form-control-custom:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(45, 85, 66, 0.15);
    outline: none;
}

/* ─── Footer ─── */
.main-footer {
    background: #111d17;
    color: #8fa096;
    padding-top: 70px;
    border-top: 4px solid var(--primary);
}

.footer-widget-title {
    color: #ffffff;
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 22px;
    position: relative;
    padding-bottom: 10px;
}

.footer-widget-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 32px;
    height: 2px;
    background: var(--accent-gold);
}

html[lang^="fa"] .footer-widget-title::after {
    left: auto;
    right: 0;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #8fa096;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.footer-links a:hover {
    color: #ffffff;
    transform: translateX(4px);
}

html[lang^="fa"] .footer-links a:hover {
    transform: translateX(-4px);
}

.footer-bottom {
    background: #0c1510;
    padding: 20px 0;
    margin-top: 50px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 13px;
    color: #64756b;
}

/* ─── Floating WhatsApp/Call Action ─── */
.floating-actions {
    position: fixed;
    bottom: 25px;
    left: 25px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

html[lang^="fa"] .floating-actions {
    left: auto;
    right: 25px;
}

.floating-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 24px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
    transition: var(--transition);
}

.floating-btn.whatsapp {
    background: #25d366;
}

.floating-btn.phone {
    background: var(--primary);
    color: #ffffff;
}

.floating-btn:hover {
    transform: scale(1.1);
    color: #ffffff;
}

/* ─── Responsive Media Queries ─── */
@media (max-width: 991.98px) {
    .hero-title {
        font-size: 2.15rem;
    }
    .timeline::before {
        left: 20px;
    }
    html[lang^="fa"] .timeline::before {
        left: auto;
        right: 20px;
    }
    .timeline-step {
        padding-left: 50px;
    }
    html[lang^="fa"] .timeline-step {
        padding-left: 0;
        padding-right: 50px;
    }
}

@media (max-width: 575.98px) {
    .hero-title {
        font-size: 1.85rem;
    }
    .form-card {
        padding: 22px;
    }
}
