@import 'slider.css';

/* CSS Variables matching Logo */
:root {
    /* Logo Colors: Deep Red/Brown (#9F2C15), Golden Beige (#F0C484) */
    --color-primary: #9F2C15;
    /* Replaces previous generic red/blue */
    --color-primary-dark: #7a2210;
    --color-secondary: #F0C484;
    /* Gold/Beige */
    --color-secondary-light: #fdf5e6;
    /* Lighter beige for backgrounds */
    --color-accent: #D44E28;
    /* Brighter orange-red */

    --color-text-main: #333333;
    --color-text-light: #666666;
    --color-bg-light: #f9f9f9;
    --color-white: #ffffff;
    --color-border: #e1e1e1;

    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Vazirmatn', sans-serif;
    margin: 0;
    padding: 0;
    direction: rtl;
    background-color: var(--color-bg-light);
    color: var(--color-text-main);
    line-height: 1.6;
}

/* Header & Nav */
.site-header {
    background: var(--color-white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 4px solid var(--color-secondary);
    /* Accent line */
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 90px;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--color-primary);
    font-weight: 900;
    font-size: 1.5rem;
}

.logo img {
    height: 70px !important;
    width: auto;
}

.logo div {
    display: flex;
    flex-direction: column;
    margin-right: 12px;
}

.logo span {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text-light);
}

.logo div span:first-child {
    color: var(--color-primary);
}

.main-nav {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: var(--color-text-main);
    font-weight: 500;
    transition: color 0.3s;
    font-size: 1rem;
}

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

/* Language Switcher */
.lang-switcher {
    display: flex;
    gap: 0.5rem;
    margin-right: 1.5rem;
    border-right: 1px solid #ddd;
    padding-right: 1.5rem;
}

.lang-switcher a {
    text-decoration: none;
    color: #999;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s;
}

.lang-switcher a:hover,
.lang-switcher a.active {
    color: var(--color-primary);
}

/* Hero Section */
.hero-section {
    position: relative;
    height: 600px;
    display: flex;
    align-items: center;
    color: white;
    overflow: hidden;
}

.hero-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.hero-slide.active {
    opacity: 1;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.3) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--color-secondary);
    /* Gold title */
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--color-primary);
    color: white;
}

.btn-primary:hover {
    background: var(--color-primary-dark);
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--color-secondary);
    color: var(--color-secondary);
    margin-right: 1rem;
}

.btn-secondary:hover {
    background: var(--color-secondary);
    color: #333;
}

/* General Layout */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

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

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s;
    border-top: 4px solid var(--color-secondary);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.feature-card i {
    font-size: 2.5rem;
    color: var(--color-primary);
    margin-bottom: 1.5rem;
}

/* Customers Grid & Cards */
.customers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.customer-card {
    padding: 0;
    border-top: none;
    border: none;
    box-shadow: none;
    background: transparent;
}

.customer-logo-wrap {
    width: 100%;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.customer-logo-wrap img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.customer-name {
    font-size: 0.98rem;
    font-weight: 600;
    color: var(--color-text-main);
}

/* Section Titles */
.section-title {
    text-align: center;
    font-size: 2rem;
    color: var(--color-primary);
    margin-bottom: 3rem;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--color-secondary);
    margin: 1rem auto 0;
}

/* Products Gallery */
.gallery-tab {
    display: none;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.gallery-tab.active {
    display: grid;
}

.gallery-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 1;
    /* Square images */
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px;
    text-align: center;
    transform: translateY(100%);
    transition: transform 0.3s;
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

.tab-btn {
    background: #fff;
    border: 1px solid var(--color-border);
    color: var(--color-text-main);
    padding: 10px 25px;
    cursor: pointer;
    border-radius: 30px;
    transition: all 0.3s;
    font-family: inherit;
    font-weight: 500;
}

.tab-btn:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.tab-btn.active {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

/* Footer */
.site-footer {
    background: #2a2a2a;
    color: white;
    padding: 4rem 0 1rem;
    margin-top: auto;
    border-top: 5px solid var(--color-secondary);
}

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

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

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: #bbb;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--color-secondary);
}

/* Mobile */
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--color-text-main);
}

/* LTR override for English/German */
html[dir="ltr"] .lang-switcher {
    border-right: none;
    border-left: 1px solid #ddd;
    margin-right: 0;
    margin-left: 1.5rem;
    padding-right: 0;
    padding-left: 1.5rem;
}

html[dir="ltr"] .logo div {
    margin-right: 0;
    margin-left: 12px;
}

html[dir="ltr"] .feature-card {
    text-align: left;
    /* Or keep center */
}

@media (max-width: 768px) {
    .main-nav {
        display: none;
        /* Add JS toggle later */
        position: absolute;
        top: 80px;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 2rem;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
    }

    .main-nav.active {
        display: flex;
    }

    .mobile-toggle {
        display: block;
    }
}

/* Lightbox Modal */
.lightbox {
    display: none;
    position: fixed;
    z-index: 2000;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    /* Prevent body scroll if needed, but mainly for modal */
    background-color: rgba(0, 0, 0, 0.9);
}

.lightbox-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 900px;
    max-height: 80vh;
    object-fit: contain;
    animation-name: zoom;
    animation-duration: 0.3s;
}

@keyframes zoom {
    from {
        transform: scale(0)
    }

    to {
        transform: scale(1)
    }
}

.lightbox .close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 2001;
}

.lightbox .close:hover,
.lightbox .close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

.prev,
.next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -50px;
    color: white;
    font-weight: bold;
    font-size: 30px;
    transition: 0.6s ease;
    border-radius: 0 3px 3px 0;
    user-select: none;
    -webkit-user-select: none;
    z-index: 2001;
    direction: ltr;
    /* Prevent mirroring of arrows in RTL */
}

.next {
    right: 0;
    border-radius: 3px 0 0 3px;
}

.prev {
    left: 0;
    border-radius: 0 3px 3px 0;
}

.prev:hover,
.next:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

/* ---------- Home: order-tracking box ---------- */
.home-box {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 1.75rem;
    box-shadow: var(--shadow-sm);
}

.home-box-single {
    max-width: 520px;
    margin: 0 auto;
}

.home-box h2 {
    margin: 0 0 1.25rem;
    font-size: 1.25rem;
    color: var(--color-primary);
    border-bottom: 3px solid var(--color-secondary);
    padding-bottom: 0.5rem;
    display: inline-block;
}

.tracking-form {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tracking-form input[type="text"] {
    flex: 1;
    min-width: 0;
    padding: 0.7rem;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    font-family: inherit;
}

/* ---------- Organization chart & board ---------- */
.org-chart-wrap {
    overflow-x: auto;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 1rem;
    box-shadow: var(--shadow-sm);
}

.org-chart-wrap img {
    display: block;
    min-width: 700px;
    width: 100%;
    height: auto;
}

.board-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.board-card {
    display: flex;
    gap: 1rem;
    align-items: center;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
}

.board-card img {
    width: 100px;
    height: 138px;
    object-fit: cover;
    border-radius: 8px;
    flex: 0 0 100px;
}

.board-card strong {
    display: block;
    color: var(--color-primary);
    font-size: 1.05rem;
    margin-bottom: 0.35rem;
}

.board-card span {
    color: var(--color-text-light);
    font-size: 0.92rem;
}

/* ---------- Equipment list (services) ---------- */
.equipment-list {
    list-style: none;
    counter-reset: eq;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 0.75rem;
}

.equipment-list li {
    counter-increment: eq;
    position: relative;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 0.9rem 3.25rem 0.9rem 1rem;
    box-shadow: var(--shadow-sm);
    font-size: 0.95rem;
}

.equipment-list li::before {
    content: counter(eq);
    position: absolute;
    right: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    line-height: 28px;
    text-align: center;
    border-radius: 50%;
    background: var(--color-secondary);
    color: var(--color-primary-dark);
    font-weight: 700;
    font-size: 0.85rem;
}

/* ---------- Certificates ---------- */
.cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

.cert-grid figure {
    margin: 0;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.cert-grid img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
}

.cert-grid figcaption {
    margin-top: 0.75rem;
    font-size: 0.9rem;
    color: var(--color-text-light);
}

/* ---------- Contact departments ---------- */
.dept-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--color-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.dept-table th,
.dept-table td {
    padding: 0.75rem 1rem;
    text-align: right;
    border-bottom: 1px solid var(--color-border);
    font-size: 0.95rem;
}

.dept-table th {
    background: var(--color-secondary-light);
    color: var(--color-primary);
    font-weight: 700;
}

.dept-table tr:last-child td {
    border-bottom: none;
}

.dept-table td a {
    color: var(--color-accent);
    text-decoration: none;
    direction: ltr;
    display: inline-block;
}

.dept-table td a:hover {
    text-decoration: underline;
}
