@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700&family=Source+Sans+3:wght@400&display=swap");

:root {
    --header-height: 100px;
    --footer-height: 50px;
    --background-color: #ececec;
}

html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden; /* جلوگیری از اسکرول */
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-family: "Montserrat", sans-serif;
    font-size: clamp(14px, 1.5vw, 18px);
    margin: 0;
    background-color: var(--background-color);
}

body > div {
    display: flex;
    flex-direction: column;
    height: 100vh; /* کل صفحه در viewport */
}

main {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.page-header {
    min-height: var(--header-height);
    max-height: var(--header-height);
    background-color: var(--background-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-left {
    font-family: "Montserrat", sans-serif;
    font-size: clamp(16px, 1.8vw, 18px);
    font-weight: 400;
}

.nav-left .nav-link {
    color: #000000;
}

.main-image {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 1rem;
    background-color: var(--background-color);
}

.main-img {
    max-width: 100%;
    max-height: calc(
        100vh - var(--header-height) - var(--footer-height) - 120px
    ); /* فضای بیشتر برای متن و footer */
    width: auto;
    height: auto;
    object-fit: contain;
    cursor: pointer;
}

.welcome-section {
    padding: 0.5rem 0;
    flex-shrink: 0;
}

.welcome-text {
    font-family: "Source Sans 3", sans-serif;
    font-size: 24px;
    color: #333;
    margin: 0 auto;
    max-width: 800px;
    line-height: 1.4;
}

footer {
    background-color: #f8f9fa;
    min-height: var(--footer-height);
    max-height: var(--footer-height);
    padding: 10px 0;
    text-align: center;
    flex-shrink: 0;
    font-size: 14px;
}

footer p {
    margin: 0; /* حذف حاشیه‌های اضافی */
}

/* Modal custom layout */
.modal-content {
    position: relative;
    border-radius: 1rem;
    border: none;
    overflow: hidden;
}

.modal-body {
    padding: 0;
}

.modal-body .row {
    align-items: stretch;
    min-height: 400px;
}

.modal-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
}

.modal-body .col-md-6:last-child {
    background-color: #fff;
}

.modal-body .col-md-6 h2 {
    font-size: 2rem;
    font-weight: 700;
}

.modal-body .col-md-6 p {
    font-size: 1rem;
    color: #333;
}

.modal-body .col-md-6 ul {
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 1.5rem;
}

.modal-body .col-md-6 .btn-dark {
    background-color: #000;
    border: none;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
}

.btn-close {
    width: 1.5rem;
    height: 1.5rem;
    background-color: transparent;
    background-image: none !important;
    border: 1px solid #aaa;
}

@media (max-width: 768px) {
    .nav-left-start {
        display: none !important;
    }

    .main-img {
        max-width: 90%;
        max-height: calc(
            100vh - var(--header-height) - var(--footer-height) - 120px
        ); /* کاهش فضای رزرو برای نزدیک‌تر شدن متن */
    }

    .main-image {
        padding: 0.25rem; /* کاهش padding برای کم کردن فاصله */
    }

    .welcome-text {
        font-size: 16px;
        max-width: 90%;
        line-height: 1.3;
    }

    .welcome-section {
        padding: 0.25rem 0; /* کاهش padding برای کم کردن فاصله */
    }

    footer {
        font-size: 12px;
        padding: 5px 0;
    }

    .modal-dialog {
        margin: 1rem;
    }

    .modal-body .row {
        flex-direction: column;
        min-height: auto;
    }

    .modal-body .col-md-6:first-child {
        display: block;
        height: 200px;
    }

    .modal-body .col-md-6:last-child {
        padding: 1.5rem;
    }

    .modal-img {
        height: 100%;
        object-fit: cover;
    }

    .modal-body .col-md-6 h2 {
        font-size: 1.5rem;
    }

    .modal-body .col-md-6 p {
        font-size: 0.9rem;
    }
}

.modal-content {
    max-height: 90vh;
    overflow-y: auto;
}
