/* Base Reset and Layout */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Montserrat', sans-serif;
}

html {
    scrollbar-width: none;
}

body {
    overflow: auto;
    min-height: 100vh;
    background: url('../images/background-images/home-background-main.jpg') no-repeat center center fixed;
    background-size: cover;
    -ms-overflow-style: none;
}

body::-webkit-scrollbar {
    display: none;
}

/* Header */
header {
    background: rgba(24, 24, 24, 0.4);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    min-height: 80px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 50px;
    transition: transform 0.3s ease-in-out;
    transform: translateY(0);
}

.logo {
    color: white;
    font-size: 24px;
    font-weight: bold;
    margin-top: 9px;
}/* 🎨 استایل منو در حالت دسکتاپ */
/* منوی دسکتاپ */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
}

/* منوی اصلی */
nav ul {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
    gap: 20px;
}

nav ul li {
    margin-left: 20px;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-size: 16px;
}

nav ul li a:hover {
    color: #FFC107;
}

/* دکمه همبرگر - فقط توی موبایل دیده میشه */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
}

/* ریسپانسیو برای موبایل */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    nav#main-nav {
        display: none;
        width: 100%;
    }

    nav#main-nav.active {
        display: block;
    }

    nav ul {
        flex-direction: column;
        align-items: center;
        background-color: rgba(24, 24, 24, 0.4);
        backdrop-filter: blur(3px);
        -webkit-backdrop-filter: blur(3px);
        padding: 10px 0;
        margin-right: 0px;
    }

    nav ul li {
        margin: 10px 0;
    }

    nav ul li a {
        font-size: 18px;
    }
}


.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
}


@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    nav#main-nav {
        display: none;
        width: 100%;
    }

    nav#main-nav.active {
        display: block;
    }

    nav ul {
        flex-direction: column;
        align-items: center;
        background-color: rgba(24, 24, 24, 0.4);
        backdrop-filter: blur(3px);
        -webkit-backdrop-filter: blur(3px);
        padding: 10px 0;
        margin-right: 0px;
    }

    nav ul li {
        margin: 10px 0;
    }

    nav ul li a {
        font-size: 18px;
    }
}


/* Hero */
.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding-left: 50px;
    padding-bottom: 30px;
    color: white;
    background: transparent;
}

.hero h1 {
    font-size: 60px;
    margin-bottom: 20px;
}

.hero p {
    font-size: 20px;
    max-width: 600px;
    max-height: calc(100vh - 80px - 60px - 30px);
    overflow: hidden;
}

/* Sections */
section {
    padding: 27px;
    background: #fff;
    margin: 20px 0;
}

section h2 {
    font-size: 36px;
    margin-bottom: 20px;
}

/* Optimized Partners Section */
.partners {
    text-align: left;
    padding: 15px 0;
    background: rgba(24, 24, 24, 0.4);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    position: relative;
    z-index: 1;
    width: 100%;
}

.partners h2 {
    font: 1.8rem 'Montserrat', sans-serif;
    margin-bottom: 9px;
    color: #e0e0e0;
    margin-left: 45px;
}

.partners-grid {
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
    padding: 0 20px;
    width: 100%;
}

.partners-grid a {
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.2s ease;
    flex: 1;
    min-width: 0;
    padding: 0 10px;
}

.partners-grid img {
    width: 100%;
    height: auto;
    max-height: 93px;
    opacity: 0.8;
    transition: all 0.3s ease;
    object-fit: contain;
}

/* Specific style for third logo only */
.partners-grid a:nth-child(3) img {
    max-height: 60px;
}

.partners-grid a:hover img {
    transform: scale(1.15);
    opacity: 1;
}

/* Portfolio */
.portfolio-intro {
    margin: 40px auto;
    padding: 50px;
    background: rgba(24, 24, 24, 0.4);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    color: white;
    position: relative;
    z-index: 1;
    border-radius: 3px;
}

#portfolio h2 {
    font-size: 36px;
    margin-bottom: 20px;
    color: #ffffff;
}

.portfolio-grid {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.portfolio-grid .image-container {
    width: 32%;
    border-radius: 9px;
    background-color:rgba(24, 24, 24, 0.4);
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(24, 24, 24, 0.4);
    cursor: pointer;
    position: relative;
    transition: transform 0.3s ease;
}

.portfolio-grid img {
    width: 100%;
    height: 639px;
    object-fit: cover;
    display: block;
}

/* Caption Logic */
.portfolio-grid .caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(24, 24, 24, 0.4);
    color: white;
    padding: 10px 15px;
    text-align: center;
    font-size: 1rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 400;
    opacity: 0;
    transform: translateY(100%);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

.image-container:first-child .caption {
    background-color: rgba(24, 24, 24, 0.4);
}

.image-container.active .caption {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Contact Section */
#contact {
    background: rgba(24, 24, 24, 0.4);
    background-image: url('../images/background-images/contact-background.jpg');
    background-size: 36px;
    color: #ffffff;
    padding: 20px;
    position: relative;
    text-align: left;
    font-size: 24px;
    height: 117px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 18px;
    width: 100%;
    margin-left: 0%;
}

#contact h2 {
    font-weight: 700;
    font-size: 36px;
    margin-bottom: 15px;
}

#contact .social-icons {
    position: absolute;
    bottom: 10px;
    left: 20px;
    display: flex;
    gap: 15px;
}

#contact .social-icons img {
    width: 30px;
    margin-right: 0;
    transition: transform 0.2s ease;
}

#contact .social-icons img:hover {
    transform: scale(1.1);
}

.whatsapp-icon,
.instagram-icon,
.pinterest-icon,
.linkedin-icon,
.behance-icon {
    width: 24px;
    height: 24px;
    vertical-align: middle;
    margin-left: 5px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .portfolio-grid {
        flex-direction: column;
    }

    .portfolio-grid .image-container {
        width: 100%;
    }

    .portfolio-grid img {
        width: 100%;
        height: auto;
    }

    .portfolio-grid .caption {
        font-size: 0.9rem;
    }

    #visual-tour {
        height: auto;
        padding: 15px;
    }

    .image-links img {
        width: 100%;
        max-width: 100%;
        height: auto;
    }

    .image-wrapper img {
        width: 100%;
        height: auto;
    }

    #contact {
        padding: 15px;
        height: auto;
    }

    #contact h2 {
        font-size: 28px;
    }

    #contact .social-icons {
        gap: 10px;
        bottom: 5px;
    }

    #contact .social-icons img {
        width: 25px;
    }

    .partners-grid {
        gap: 5px;
        padding: 0 10px;
    }
    .partners-grid img {
        max-height: 20px;
    }
    /* Adjust third logo for mobile */
    .partners-grid a:nth-child(3) img {
        max-height: 120px;
    }
}