/**
 * Projects Section Block Styles
 *
 * @package Realar Child
 */

/* Projects Section */
.projects-section {
    position: relative;
    width: 100%;
    min-height: 1109px;
    background-color: #655442;
    overflow: visible;
}

/* Dark Background Variant */
.projects-section--dark {
    background-color: #2B2B2B;
}

.projects-section__container {
    max-width: 1920px;
    margin: 0 auto;
    padding: 105px 0 120px 161px;
}

/* Header */
.projects-section__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 50px;
    padding-right: 161px;
}

.projects-section__header-left {
    max-width: 726px;
}

.projects-section__title {
    color: #CFC7B2;
    font-size: 48px;
    font-family: var(--second-family);
    font-weight: bold;
    margin-bottom: 9px;
    line-height: 1.3;
}

.projects-section__description p {
    color: #FFFFFF;
    font-size: 18px;
    font-family: var(--font-family);
    line-height: 1.8;
}

.projects-section__description p {
    margin: 0;
}

.projects-section__header-right {
    display: flex;
    align-items: flex-end;
}

/* Button */
.projects-section__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 21px 33px;
    background-color: transparent;
    border: 1px solid #FFFFFF;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.projects-section__btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.projects-section__btn-text {
    color: #FFFFFF;
    font-size: 16px;
    font-family: var(--font-family);
    white-space: nowrap;
}

.projects-section__btn-icon {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.projects-section__btn-icon svg {
    width: 100%;
    height: 100%;
}

/* Slider */
.projects-section__slider {
    position: relative;
}

.projects-section__slider-track {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    cursor: grab;
}

.projects-section__slider-track::-webkit-scrollbar {
    display: none;
}

.projects-section__slider-track:active {
    cursor: grabbing;
}

/* Slide */
.projects-section__slide {
    flex: 0 0 624px;
    display: flex;
    flex-direction: column;
}

.projects-section__slide-image {
    width: 100%;
    height: 540px;
    border-radius: 32px;
    overflow: hidden;
    margin-bottom: 22px;
}

.projects-section__slide-img {
    width: 100%;
    height: 100%!important;
    object-fit: cover;
    display: block;
}

.projects-section__slide-content {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.projects-section__slide-title {
    color: #FFFFFF;
    font-size: 32px;
    font-family: var(--second-family);
    font-weight: normal;
    line-height: 1.3;
    margin: 0;
}

.projects-section__slide-description p {
    color: #FFFFFF;
    font-size: 16px;
    font-family: var(--font-family);
    line-height: 1.75;
}

.projects-section__slide-description p {
    margin: 0;
}

/* Navigation */
.projects-section__nav {
    display: flex;
    gap: 16px;
    margin-top: 40px;
    padding-right: 161px;
}

.projects-section__nav-btn {
    width: 48px;
    height: 48px;
    padding: 0;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.projects-section__nav-btn:hover {
    transform: scale(1.1);
}

.projects-section__nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.projects-section__nav-btn svg {
    width: 48px;
    height: 48px;
    display: block;
}

/* Responsive */
@media (max-width: 1600px) {
    .projects-section__container {
        padding: 80px 0 100px 80px;
    }

    .projects-section__header {
        padding-right: 80px;
    }

    .projects-section__nav {
        padding-right: 80px;
    }

    .projects-section__title {
        font-size: 40px;
    }

    .projects-section__slide {
        flex: 0 0 500px;
    }

    .projects-section__slide-image {
        height: 450px;
    }

    .projects-section__slide-title {
        font-size: 28px;
    }
}

@media (max-width: 1200px) {
    .projects-section {
        min-height: auto;
    }

    .projects-section__container {
        padding: 60px 0 80px 40px;
    }

    .projects-section__header {
        flex-direction: column;
        align-items: flex-start;
        gap: 30px;
        padding-right: 40px;
    }

    .projects-section__nav {
        padding-right: 40px;
    }

    .projects-section__header-left {
        max-width: 100%;
    }

    .projects-section__title {
        font-size: 36px;
    }

    .projects-section__slide {
        flex: 0 0 400px;
    }

    .projects-section__slide-image {
        height: 380px;
        border-radius: 24px;
    }

    .projects-section__slide-title {
        font-size: 24px;
    }
}

@media (max-width: 768px) {
    .projects-section__container {
        padding: 50px 0 60px 20px;
    }

    .projects-section__header {
        margin-bottom: 30px;
        padding-right: 20px;
    }

    .projects-section__nav {
        padding-right: 20px;
    }

    .projects-section__title {
        font-size: 32px;
    }

    .projects-section__description {
        font-size: 16px;
    }

    .projects-section__slide {
        flex: 0 0 320px;
    }

    .projects-section__slide-image {
        height: 300px;
        border-radius: 20px;
    }

    .projects-section__slide-title {
        font-size: 22px;
    }

    .projects-section__slide-description {
        font-size: 15px;
    }

    .projects-section__nav {
        margin-top: 30px;
    }

    .projects-section__btn {
        width: 100%;
    }
}

/* @media (max-width: 480px) {
    .projects-section__container {
        padding: 40px 0 50px 15px;
    }

    .projects-section__header {
        padding-right: 15px;
    }

    .projects-section__nav {
        padding-right: 15px;
    }

    .projects-section__title {
        font-size: 28px;
    }

    .projects-section__slide {
        flex: 0 0 280px;
    }

    .projects-section__slide-image {
        height: 250px;
        border-radius: 16px;
    }

    .projects-section__slide-title {
        font-size: 20px;
    }
} */

/* Mobile: max-width 550px */
@media (max-width: 550px) {

    .projects-section {
        width: 100%;
        margin: 0 auto;
        min-height: auto;
    }

    .projects-section__container {
        width: 100%;
        margin: 0 auto;
        padding: 48px 24px 40px;
        display: flex;
        flex-direction: column;
    }

    /* Order: header at top, then slider/cards below */
    .projects-section__header {
        order: 1;
        flex-direction: column;
        align-items: center;
        text-align: center;
        margin-bottom: 0;
        padding-right: 0;
        padding-top: 0;
        padding-bottom: 39px;
    }

    .projects-section__header-left {
        max-width: 100%;
    }

    .projects-section__header-right {
        display: none;
    }

    .projects-section__title {
        font-size: 34px;
        font-family: var(--second-family);
        font-weight: bold;
        color: rgba(207, 199, 178, 1);
        text-align: center;
        margin-bottom: 8px;
    }

    .projects-section__description p {
        color: rgba(255, 255, 255, 1);
        font-size: 16px;
        font-family: var(--font-family);
        text-align: center;
    }

    /* Slider: horizontal scroll, order 2 */
    .projects-section__slider {
        order: 2;
        width: 100%;
        overflow: hidden;
    }

    .projects-section__slider-track {
        display: flex;
        flex-direction: row;
        justify-content: center;
        flex-wrap: nowrap;
        gap: 0;
        overflow: visible;
        padding: 0;
    }

    .projects-section__nav {
        display: none !important;
    }

    /* One image only - first slide */
    .projects-section__slide {
        display: none;
        flex: none;
        width: 100%;
        max-width: 360px;
        flex-direction: column;
        align-items: center;
    }

    .projects-section__slide:first-child {
        display: flex;
    }

    .projects-section__slide-content {
        display: none;
    }

    .projects-section__slide-image {
        width: 100%;
        max-width: 360px;
        height: auto;
        aspect-ratio: 360 / 311;
        border-radius: 32px;
        margin-bottom: 0;
        flex-shrink: 0;
        overflow: hidden;
    }

    .projects-section__slide-img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
}
