/* =========================================
   HOMEPAGE SERVICES + GALLERY PREVIEWS
========================================= */

.home-services,
.home-gallery {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.home-services-wrap,
.home-gallery-wrap {
    position: relative;
    z-index: 2;
    width: min(1250px, calc(100% - 40px));
    margin: 0 auto;
}

.home-section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 28px;
    margin-bottom: 42px;
}

.home-section-copy {
    max-width: 640px;
}

.home-section-tag {
    display: inline-block;
    margin-bottom: 12px;
    color: #c59b45;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 2px;
}

.home-section-copy h2 {
    margin: 0 0 12px;
    color: #082c4c;
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.15;
    font-weight: 800;
}

.home-section-copy h2 span {
    color: #c59b45;
}

.home-section-copy p {
    margin: 0;
    color: #687684;
    font-size: 15px;
    line-height: 1.8;
}

.home-section-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    min-height: 48px;
    padding: 0 22px;
    border: 1px solid #082c4c;
    border-radius: 8px;
    color: #082c4c;
    background: transparent;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.home-section-link i {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.home-section-link:hover {
    background: #082c4c;
    color: #ffffff;
}

.home-section-link:hover i {
    transform: translateX(4px);
}


/* =========================================
   SERVICES
========================================= */

.home-services {
    padding: 90px 0 80px;
    background: #ffffff;
}

.home-services::before {
    content: "";
    position: absolute;
    width: 380px;
    height: 380px;
    top: -160px;
    right: -140px;
    border-radius: 50%;
    background: rgba(197, 155, 69, 0.08);
    pointer-events: none;
}

.home-svc-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.home-svc-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 230px;
    padding: 28px 26px 24px;
    border: 1px solid #e7eaf0;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 10px 28px rgba(8, 44, 76, 0.05);
    text-decoration: none;
    overflow: hidden;
    opacity: 0;
    transform: translateY(28px);
    transition:
        opacity 0.55s ease,
        transform 0.55s ease,
        box-shadow 0.3s ease,
        border-color 0.3s ease;
}

.home-svc-card.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.home-svc-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 4px;
    background: linear-gradient(90deg, #f4c542, #c59b45);
    transition: width 0.35s ease;
}

.home-svc-card:hover,
.home-svc-card:focus-visible {
    transform: translateY(-8px);
    border-color: #e4d2a3;
    box-shadow: 0 22px 44px rgba(8, 44, 76, 0.12);
}

.home-svc-card:hover::before,
.home-svc-card:focus-visible::before {
    width: 100%;
}

.home-svc-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
}

.home-svc-icon {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: linear-gradient(160deg, #fff6df, #f3e6c0);
    color: #b48a35;
    font-size: 22px;
    transition: all 0.3s ease;
}

.home-svc-card:hover .home-svc-icon,
.home-svc-card:focus-visible .home-svc-icon {
    background: linear-gradient(160deg, #f4c542, #c59b45);
    color: #082c4c;
    transform: rotate(-6deg) scale(1.05);
}

.home-svc-num {
    color: #c5ced8;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 1px;
}

.home-svc-card h3 {
    margin: 0 0 10px;
    color: #082c4c;
    font-size: 20px;
    line-height: 1.3;
    font-weight: 800;
}

.home-svc-card p {
    margin: 0 0 20px;
    color: #687684;
    font-size: 14px;
    line-height: 1.7;
}

.home-svc-more {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #082c4c;
    font-size: 13px;
    font-weight: 700;
}

.home-svc-more i {
    font-size: 11px;
    transition: transform 0.3s ease;
}

.home-svc-card:hover .home-svc-more,
.home-svc-card:focus-visible .home-svc-more {
    color: #b48a35;
}

.home-svc-card:hover .home-svc-more i,
.home-svc-card:focus-visible .home-svc-more i {
    transform: translateX(5px);
}

.home-svc-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-top: 36px;
    padding: 28px 34px;
    border-radius: 20px;
    background:
        linear-gradient(120deg, rgba(8, 44, 76, 0.92), rgba(8, 44, 76, 0.78)),
        url("../upload/one.png") center / cover no-repeat;
    color: #ffffff;
}

.home-svc-cta span {
    display: block;
    margin-bottom: 6px;
    color: #f4c542;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 2px;
}

.home-svc-cta h3 {
    margin: 0;
    color: #ffffff;
    font-size: 24px;
    line-height: 1.3;
    font-weight: 800;
}

.home-svc-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    min-height: 48px;
    padding: 0 22px;
    border-radius: 9px;
    background: #f4c542;
    color: #082c4c;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
    transition: all 0.3s ease;
}

.home-svc-cta-btn:hover {
    background: #ffffff;
    transform: translateY(-2px);
}


/* =========================================
   GALLERY
========================================= */

.home-gallery {
    padding: 90px 0;
    background: #07192d;
}

.home-gallery::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 12% 20%, rgba(244, 197, 66, 0.12), transparent 28%),
        radial-gradient(circle at 90% 80%, rgba(22, 141, 226, 0.12), transparent 26%);
    pointer-events: none;
}

.home-gallery .home-section-copy h2,
.home-gallery .home-section-copy p {
    color: #ffffff;
}

.home-gallery .home-section-copy p {
    color: rgba(255, 255, 255, 0.72);
}

.home-gallery .home-section-link {
    border-color: rgba(255, 255, 255, 0.35);
    color: #ffffff;
}

.home-gallery .home-section-link:hover {
    background: #f4c542;
    border-color: #f4c542;
    color: #082c4c;
}

.home-gal-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-rows: 168px;
    gap: 14px;
}

.home-gal-item {
    position: relative;
    display: block;
    min-width: 0;
    overflow: hidden;
    border-radius: 18px;
    background: #12304d;
    text-decoration: none;
    opacity: 0;
    transform: translateY(24px);
    transition:
        opacity 0.55s ease,
        transform 0.55s ease;
}

.home-gal-item.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.home-gal-item:nth-child(1) {
    grid-column: span 2;
    grid-row: span 2;
}

.home-gal-item:nth-child(2) {
    grid-column: span 2;
}

.home-gal-item img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s ease;
}

.home-gal-item:hover img,
.home-gal-item:focus-visible img {
    transform: scale(1.08);
}

.home-gal-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    padding: 18px;
    background: linear-gradient(to top, rgba(4, 16, 30, 0.86), rgba(4, 16, 30, 0.08) 58%);
}

.home-gal-overlay > div span {
    display: block;
    margin-bottom: 4px;
    color: #f4c542;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.4px;
    text-transform: uppercase;
}

.home-gal-overlay h3 {
    margin: 0;
    color: #ffffff;
    font-size: 18px;
    line-height: 1.3;
    font-weight: 700;
}

.home-gal-open {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 50%;
    background: #ffffff;
    color: #082c4c;
    line-height: 0;
    transition: all 0.3s ease;
}

.home-gal-open i {
    display: block;
    margin: 0;
    color: inherit;
    font-size: 13px;
    line-height: 1;
}

.home-gal-item:hover .home-gal-open,
.home-gal-item:focus-visible .home-gal-open {
    background: #f4c542;
    transform: scale(1.06);
}

.home-gal-cta {
    margin-top: 34px;
    text-align: center;
}

.home-gal-cta p {
    margin: 0 0 16px;
    color: rgba(255, 255, 255, 0.76);
    font-size: 16px;
}

.home-gal-cta a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 50px;
    padding: 0 26px;
    border-radius: 50px;
    background: #f4c542;
    color: #082c4c;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
    transition: all 0.3s ease;
}

.home-gal-cta a:hover {
    background: #ffffff;
    transform: translateY(-3px);
}

.home-gal-cta a i {
    transition: transform 0.3s ease;
}

.home-gal-cta a:hover i {
    transform: translateX(5px);
}


/* =========================================
   RESPONSIVE
========================================= */

@media (max-width: 1100px) {
    .home-svc-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .home-gal-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-auto-rows: 180px;
    }

    .home-gal-item:nth-child(1),
    .home-gal-item:nth-child(2) {
        grid-column: span 1;
        grid-row: span 1;
    }

    .home-gal-item:nth-child(1) {
        grid-column: span 2;
        grid-row: span 2;
    }
}

@media (max-width: 700px) {
    .home-services,
    .home-gallery {
        padding: 70px 0 64px;
    }

    .home-services-wrap,
    .home-gallery-wrap {
        width: min(1250px, calc(100% - 24px));
    }

    .home-section-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 18px;
        margin-bottom: 28px;
    }

    .home-svc-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .home-svc-card {
        min-height: 0;
        padding: 24px 22px;
    }

    .home-svc-cta {
        flex-direction: column;
        align-items: flex-start;
        padding: 24px 22px;
    }

    .home-svc-cta h3 {
        font-size: 22px;
    }

    .home-svc-cta-btn {
        width: 100%;
        justify-content: center;
    }

    .home-gal-grid {
        grid-auto-rows: 190px;
        gap: 12px;
    }

    .home-gal-item:nth-child(1) {
        grid-column: span 2;
        grid-row: span 1;
        min-height: 220px;
    }

    .home-gal-overlay h3 {
        font-size: 16px;
    }
}

@media (max-width: 420px) {
    .home-gal-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: 200px;
    }

    .home-gal-item:nth-child(1),
    .home-gal-item:nth-child(2) {
        grid-column: span 1;
        grid-row: span 1;
    }
}
