/* General Styles & Variables */
:root {
    --primary-color: #0f0f0f; /* Near Black */
    --secondary-color: #1a1a1a; /* Dark Graphite */
    --accent-color: #b8860b; /* Muted Gold */
    --light-color: #e0e0e0; /* Light Gray/Off-white */
    --white-color: #ffffff;
    --silver-color: #c0c0c0;
}

body {
    margin: 0;
    padding: 0;
    color: var(--light-color);
    background-color: var(--primary-color);
    line-height: 1.7;
    direction: rtl; /* Right-to-Left */
    overflow-x: hidden; /* Prevent horizontal scroll */
    font-family: 'Vazirmatn', sans-serif; /* Using Vazirmatn */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--silver-color);
    margin-bottom: 20px;
    line-height: 1.4;
}

h1 { font-size: 3em; }
h2 { font-size: 2.2em; }
h3 { font-size: 1.8em; }

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--white-color);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

section {
    padding: 80px 0;
    position: relative;
    overflow: hidden; /* To contain animations */
}

/* Sticky Header */
.sticky-header {
    position: sticky;
    top: 0;
    background-color: rgba(15, 15, 15, 0.95); /* Dark with slight transparency */
    z-index: 1000;
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.sticky-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sticky-header .logo img {
    height: 50px; /* Adjust logo size */
}

.sticky-header nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
}

.sticky-header nav ul li {
    margin-left: 30px; /* Spacing for RTL */
}

.sticky-header nav ul li:last-child {
    margin-left: 0;
}

.sticky-header nav ul li a {
    color: var(--light-color);
    font-weight: 400;
    font-size: 1.1em;
    transition: color 0.3s ease;
}

.sticky-header nav ul li a:hover {
    color: var(--accent-color);
}

.mobile-nav-toggle {
    display: none; /* Hidden by default on larger screens */
    font-size: 2em;
    cursor: pointer;
    color: var(--light-color);
}

/* Hero Section */
.hero-section {
    position: relative;
    height: 65vh; /* Full viewport height */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

.hero-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--secondary-color);
}

.hero-slider .slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-slider .slide.active {
    opacity: 1;
    z-index: 1;
}

.hero-slider .slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /*filter: brightness(50%); /* Darker overlay for text readability */
}

.slide-content {
    position: absolute;
    z-index: 2;
    color: var(--white-color);
    text-align: center;
    padding: 0 20px;
    animation: fadeIn 2s ease-out forwards;
}

.slide-content h1 {
    font-size: 3.5em;
    margin-bottom: 15px;
    color: var(--white-color);
}

.slide-content p {
    font-size: 1.5em;
    font-weight: 300;
    color: var(--light-color);
}

.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    z-index: 3;
    padding: 0 30px;
}

.slider-nav button {
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: var(--white-color);
    font-size: 2.5em;
    cursor: pointer;
    padding: 10px 15px;
    border-radius: 5px;
    transition: background 0.3s ease;
}

.slider-nav button:hover {
    background: var(--accent-color);
}

/* Image-Text Sections */
.image-text-section {
    display: flex;
    align-items: center;
    gap: 40px;
    background-color: var(--secondary-color);
}

.image-text-section.alternating {
    flex-direction: row-reverse; /* Alternate layout */
}

.image-text-section .image-container,
.image-text-section .text-container {
    flex: 1;
    padding: 20px;
}

.image-text-section .image-container img {
    border-radius: 8px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
}

.image-text-section .text-container h2 {
    font-size: 2.5em;
    margin-bottom: 25px;
    color: var(--silver-color);
}

.image-text-section .text-container p {
    margin-bottom: 20px;
    font-size: 1.1em;
    color: var(--light-color);
}

/* Contact Section */
.contact-section {
    background-color: var(--primary-color);
    text-align: center;
}

.contact-section h2 {
    font-size: 2.8em;
    margin-bottom: 40px;
    color: var(--silver-color);
}

.contact-info {
    display: inline-block;
    text-align: right; /* Align text to the right for RTL */
    margin-bottom: 40px;
}

.contact-info p {
    font-size: 1.2em;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.contact-info p .icon {
    font-size: 1.5em;
    color: var(--accent-color);
}

.map-container {
    margin-top: 30px;
    background-color: var(--secondary-color);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.map-container p {
    font-size: 1.3em;
    margin-bottom: 20px;
    color: var(--silver-color);
}

/* Footer */
.site-footer {
    background-color: var(--secondary-color);
    padding: 30px 0;
    text-align: center;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.5);
}

.site-footer .footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.site-footer p {
    margin: 0;
    font-size: 0.95em;
    color: var(--silver-color);
}

.site-footer .social-links {
    display: flex;
    gap: 15px;
}

.site-footer .social-links a {
    color: var(--light-color);
    font-size: 1.4em;
    transition: color 0.3s ease;
}

.site-footer .social-links a:hover {
    color: var(--accent-color);
}

/* Portfolio Page Styles */
.portfolio-section {
    background-color: var(--primary-color);
}

.portfolio-section h2 {
    text-align: center;
    font-size: 2.8em;
    margin-bottom: 50px;
    color: var(--silver-color);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.portfolio-card {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    cursor: pointer;
}

.portfolio-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7);
}

.portfolio-card img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.portfolio-card:hover img {
    transform: scale(1.1);
}

.card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: var(--white-color);
    padding: 20px;
    text-align: center;
    transition: background 0.3s ease;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.portfolio-card:hover .card-overlay {
    opacity: 1;
    visibility: visible;
}

.card-overlay h3 {
    font-size: 1.5em;
    margin-bottom: 5px;
    color: var(--white-color);
}

.card-overlay p {
    font-size: 1em;
    color: var(--light-color);
}

.video-section {
    background-color: var(--secondary-color);
}

.video-section h2 {
    text-align: center;
    font-size: 2.8em;
    margin-bottom: 50px;
    color: var(--silver-color);
}

.video-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    justify-items: center;
}

.video-item {
    background-color: var(--primary-color);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    text-align: center;
    transition: transform 0.3s ease;
}

.video-item:hover {
    transform: translateY(-5px);
}

.video-item iframe {
    width: 100%;
    height: 250px; /* Adjusted height for better card fit */
    border: none;
    border-radius: 8px;
    margin-bottom: 15px;
}

.video-item h3 {
    font-size: 1.3em;
    color: var(--silver-color);
    margin-bottom: 0;
}

/* Responsive Design */
@media (max-width: 992px) {
    h1 { font-size: 2.8em; }
    h2 { font-size: 2em; }
    .hero-slider .slide-content h1 { font-size: 2.8em; }
    .hero-slider .slide-content p { font-size: 1.3em; }

    .image-text-section {
        flex-direction: column;
    }
    .image-text-section.alternating {
        flex-direction: column;
    }
    .image-text-section .text-container,
    .image-text-section .image-container {
        width: 100%;
        text-align: center;
    }
    .image-text-section .image-container {
        margin-top: 30px;
    }
}

@media (max-width: 768px) {
    .sticky-header nav {
        display: none; /* Hide main nav on small screens */
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--primary-color);
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.7);
        padding: 20px;
        text-align: center;
    }

    .sticky-header nav ul {
        flex-direction: column;
        align-items: center;
    }

    .sticky-header nav ul li {
        margin-left: 0;
        margin-bottom: 15px;
    }

    .mobile-nav-toggle {
        display: block; /* Show hamburger icon */
    }

    .hero-section {
        height: 70vh;
    }
    .hero-slider .slide-content h1 { font-size: 2em; }
    .hero-slider .slide-content p { font-size: 1.1em; }

    .contact-info {
        text-align: center;
        display: block;
    }
    .contact-info p {
        justify-content: center;
    }

    .portfolio-grid, .video-gallery {
        grid-template-columns: 1fr;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}