/* ==========================================================================
   sections.css
   Home page sections, in page order: hero, why choose us, services gallery,
   projects, video + counters, working process, reviews, contact block, news.
   Some blocks (why choose us text, contact cards) are reused on inner pages.
   ========================================================================== */

/* ---------- Hero ---------- */
/* Full-width slides. Each slide carries its own photo plus a dark wash so the white text
   stays readable; Swiper cross-fades whole slides (photo and text together). */
.oc-hero {
    position: relative;
    overflow: hidden;
    background: var(--oc-dark);  /* shows while the first photo loads */
}

.oc-hero__slide {
    position: relative;
    isolation: isolate;          /* keeps the photo and wash (negative z-index) inside the slide */
    display: flex;
    align-items: center;
    height: auto;                /* every slide matches the tallest one */
    min-height: 784px;
    padding: 220px 0 120px;
}

.oc-hero__bg {
    position: absolute;
    inset: 0;
    z-index: -2;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Darker on the left where the text sits, lighter on the right so the photo still shows. */
.oc-hero__slide::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(90deg, rgba(0, 6, 15, 0.85) 0%, rgba(0, 6, 15, 0.55) 55%, rgba(0, 6, 15, 0.25) 100%);
}

.oc-hero__slide > .oc-container {
    width: 100%;
}

.oc-hero__content {
    max-width: 680px;
    transition: opacity 0.6s ease;
}

/* The photos cross-fade, but the outgoing headline is hidden fast so two headlines
   never sit on top of each other. */
.oc-hero__slide:not(.swiper-slide-active) .oc-hero__content {
    opacity: 0;
    transition-duration: 0.3s;
}

.oc-hero .oc-label {
    background: rgba(255, 255, 255, 0.12);
    color: var(--oc-white);
}

.oc-hero__title {
    margin-top: 24px;
    color: var(--oc-white);
    font-size: var(--oc-fs-h1);
    font-weight: 600;
    line-height: 1.125;
    letter-spacing: -0.01em;
}

.oc-hero__text {
    max-width: 545px;
    margin-top: 44px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.65;
}

/* Vertical dots at the left edge of the screen.
   Swiper sets its own pagination position, so this selector is one level more specific. */
.oc-hero .oc-hero__dots {
    position: absolute;
    top: 50%;
    bottom: auto;     /* Swiper's own CSS sets a bottom value that would stretch the column */
    left: 28px;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: auto;
    transform: translateY(-50%);
}

.oc-hero__dots .swiper-pagination-bullet {
    width: 12px;
    height: 12px;
    margin: 0 !important;
    background: rgba(255, 255, 255, 0.5);
    opacity: 1;
}

.oc-hero__dots .swiper-pagination-bullet-active {
    width: 24px;
    height: 24px;
    background: var(--oc-blue);
    border: 6px solid var(--oc-white);
    box-sizing: border-box;
}

@media (max-width: 1399px) {
    .oc-hero__slide { min-height: 680px; padding-top: 190px; }
}

/* Tablet and phone: even wash, dots become a row along the bottom of the photo */
@media (max-width: 991px) {
    .oc-hero__slide {
        min-height: 0;
        padding: 160px 0 96px;
    }

    .oc-hero__slide::before { background: rgba(0, 6, 15, 0.7); }

    .oc-hero .oc-hero__dots {
        top: auto;
        bottom: 32px;
        left: 50%;
        flex-direction: row;
        transform: translateX(-50%);
    }
}

@media (max-width: 575px) {
    .oc-hero__text { margin-top: 24px; }
}

/* ---------- Why choose us (photo grid + text) ---------- */
.oc-commit__grid {
    display: grid;
    grid-template-columns: minmax(0, 636px) minmax(0, 1fr);
    gap: 54px;
    align-items: center;
}

.oc-commit__photos {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.oc-commit__col {
    display: grid;
    gap: 30px;
    align-content: start;
}

.oc-commit__img {
    width: 100%;
    border-radius: var(--oc-radius);
    object-fit: cover;
}

.oc-commit__img--tall { height: 330px; }
.oc-commit__img--short { height: 220px; }
.oc-commit__img--top { height: 186px; }
.oc-commit__img--bottom { height: 364px; }

.oc-commit__title {
    margin-top: 20px;
    font-size: var(--oc-fs-h2);
}

.oc-commit__text > p {
    margin-top: 24px;
    max-width: 540px;
}

.oc-commit__text .oc-check-list {
    margin-top: 36px;
}

.oc-quote {
    margin: 36px 0 32px;
    padding: 24px 20px;
    border-left: 4px solid var(--oc-blue);
    background: var(--oc-light);
    border-radius: 0 4px 4px 0;
}

.oc-quote p {
    line-height: 1.65;
}

@media (max-width: 1199px) {
    .oc-commit__grid { grid-template-columns: 1fr 1fr; gap: 40px; }
}

@media (max-width: 991px) {
    .oc-commit__grid { grid-template-columns: 1fr; }
}

@media (max-width: 575px) {
    .oc-commit__photos { gap: 12px; }

    .oc-commit__col { gap: 12px; }

    .oc-commit__img--tall { height: 220px; }
    .oc-commit__img--short { height: 150px; }
    .oc-commit__img--top { height: 130px; }
    .oc-commit__img--bottom { height: 240px; }
}

/* ---------- Services gallery (panels widen on hover) ---------- */
.oc-gallery__row {
    display: flex;
    gap: 20px;
    height: 370px;
    padding-inline: 18px;
}

.oc-gallery__panel {
    position: relative;
    flex: 1;
    overflow: hidden;
    border-radius: var(--oc-radius);
    background: var(--oc-blue);
    cursor: pointer;
    transition: flex 0.6s ease;
}

.oc-gallery__panel.is-active {
    flex: 2;
}

.oc-gallery__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.5s ease;
}

.oc-gallery__panel.is-active .oc-gallery__img {
    opacity: 0;
}

.oc-gallery__content {
    position: absolute;
    inset: 0;
    padding: 48px 32px 32px;
    color: var(--oc-white);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
    pointer-events: none;
}

.oc-gallery__panel.is-active .oc-gallery__content {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.25s;
}

.oc-gallery__icon {
    display: grid;
    place-items: center;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
}

.oc-gallery__title {
    margin-top: 32px;
    color: var(--oc-white);
    font-size: 1.25rem;
}

.oc-gallery__text {
    margin-top: 16px;
    min-width: 320px;
    max-width: 340px;
    line-height: 1.5;
}

/* Phones: panels stack, the open one grows taller */
@media (max-width: 767px) {
    .oc-gallery__row {
        flex-direction: column;
        height: auto;
        padding: 0;
        gap: 12px;
    }

    .oc-gallery__panel {
        flex: none;
        height: 90px;
        transition: height 0.6s ease;
    }

    .oc-gallery__panel.is-active {
        flex: none;
        height: 330px;
    }

    .oc-gallery__content { padding: 28px 24px; }

    .oc-gallery__text { min-width: 0; }
}

/* ---------- Projects mosaic ---------- */
.oc-projects__grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 30px 24px;
}

.oc-project {
    position: relative;
    overflow: hidden;
    border-radius: var(--oc-radius);
    height: 370px;
}

.oc-project--1 { grid-column: span 3; }
.oc-project--2 { grid-column: span 4; }
.oc-project--3 { grid-column: span 5; }
.oc-project--4,
.oc-project--5 { grid-column: span 6; height: 470px; }

.oc-project img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.oc-project__caption {
    position: absolute;
    inset: auto 0 0;
    display: grid;
    gap: 4px;
    padding: 60px 24px 24px;
    background: linear-gradient(to top, rgba(0, 6, 15, 0.85), transparent);
    color: var(--oc-white);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
}

.oc-project__tag {
    color: #cfdaec;
    font-size: 0.9rem;
}

.oc-project__title {
    font-size: 1.25rem;
    font-weight: 600;
}

.oc-project:hover img { transform: scale(1.05); }

.oc-project:hover .oc-project__caption {
    opacity: 1;
    transform: translateY(0);
}

/* Touch screens can't hover, so captions always show there */
@media (hover: none) {
    .oc-project__caption { opacity: 1; transform: none; }
}

@media (max-width: 991px) {
    .oc-project--1, .oc-project--2 { grid-column: span 6; }
    .oc-project--3 { grid-column: span 12; }
    .oc-project, .oc-project--4, .oc-project--5 { height: 320px; }
}

@media (max-width: 575px) {
    .oc-projects__grid { gap: 16px; }

    .oc-project--1, .oc-project--2, .oc-project--3, .oc-project--4, .oc-project--5 {
        grid-column: span 12;
        height: 260px;
    }
}

/* ---------- Video + counters (sits across the white/dark edge) ---------- */
.oc-video {
    background: linear-gradient(to bottom, var(--oc-white) 50%, var(--oc-dark) 50%);
}

.oc-video__box {
    position: relative;
    overflow: hidden;
    height: 580px;
    border-radius: var(--oc-radius);
}

.oc-video__cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.oc-video__box::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 6, 15, 0.45);
    pointer-events: none;
}

.oc-video__play {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--oc-white);
    color: var(--oc-blue);
    font-size: 1.2rem;
    transform: translate(-50%, -50%);
}

/* Soft pulsing ring around the play button */
.oc-video__play::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    animation: oc-pulse 1.8s ease-out infinite;
    z-index: -1;
}

@keyframes oc-pulse {
    from { transform: scale(1); opacity: 1; }
    to { transform: scale(1.8); opacity: 0; }
}

.oc-video__note {
    padding: 30px;
    text-align: center;
    font-size: 1.25rem;
    color: var(--oc-dark);
}

.oc-counters {
    position: absolute;
    right: 0;
    bottom: 0;
    z-index: 2;
    display: flex;
    padding: 24px 36px;
    background: var(--oc-blue);
    border-radius: var(--oc-radius) 0 var(--oc-radius) 0;
}

.oc-counters__item {
    padding-inline: 20px;
}

.oc-counters__item:first-child { padding-left: 0; }
.oc-counters__item:last-child { padding-right: 0; }

.oc-counters__item + .oc-counters__item {
    border-left: 1px solid rgba(255, 255, 255, 0.6);
}

.oc-counters__num {
    color: var(--oc-white);
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
}

.oc-counters__label {
    margin-top: 4px;
    color: var(--oc-white);
    font-size: 1.125rem;
}

@media (max-width: 767px) {
    .oc-video__box { height: auto; overflow: visible; background: var(--oc-blue); }

    .oc-video__cover { height: 280px; border-radius: var(--oc-radius) var(--oc-radius) 0 0; }

    .oc-video__box::after { height: 280px; border-radius: var(--oc-radius) var(--oc-radius) 0 0; }

    .oc-video__play { top: 140px; }

    .oc-counters {
        position: static;
        justify-content: space-between;
        padding: 20px;
        border-radius: 0 0 var(--oc-radius) var(--oc-radius);
    }

    .oc-counters__item { padding-inline: 10px; }

    .oc-counters__num { font-size: 1.6rem; }

    .oc-counters__label { font-size: 0.95rem; }
}

/* ---------- Working process (dark section) ---------- */
.oc-process {
    padding: 100px 0;
    background: var(--oc-dark);
}

.oc-process__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
}

.oc-step {
    padding: 24px 20px 26px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--oc-radius);
    transition: border-color var(--oc-ease), background var(--oc-ease);
}

.oc-step:hover {
    border-color: var(--oc-blue);
    background: rgba(14, 71, 161, 0.15);
}

.oc-step__icon {
    display: grid;
    place-items: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.22);
}

.oc-step__title {
    margin-top: 30px;
    color: var(--oc-white);
    font-size: var(--oc-fs-h3);
}

.oc-step__text {
    margin-top: 18px;
    color: #c9ccd1;
    line-height: 1.65;
}

@media (max-width: 1199px) {
    .oc-process__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 575px) {
    .oc-process__grid { grid-template-columns: 1fr; }
}

/* ---------- Reviews ---------- */
.oc-reviews__slider {
    padding-inline: 15px;
}

.oc-reviews__slider .swiper-slide {
    height: auto;
}

.oc-review {
    height: 100%;
    padding: 24px;
    background: var(--oc-light);
    border-radius: var(--oc-radius);
}

.oc-review__rating {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px;
    background: var(--oc-white);
    color: var(--oc-dark);
    font-size: 0.9rem;
}

.oc-review__stars {
    display: inline-flex;
    gap: 5px;
    color: var(--oc-blue);
    font-size: 1rem;
}

.oc-review__quote {
    margin-top: 24px;
    font-size: 1.125rem;
    line-height: 1.4;
}

.oc-review__text {
    margin-top: 20px;
    line-height: 1.65;
}

.oc-review__author {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 24px;
}

.oc-review__author img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
}

.oc-review__name {
    color: var(--oc-dark);
    font-size: 1.25rem;
    font-weight: 500;
}

.oc-review__role {
    margin-top: 4px;
    color: var(--oc-dark);
}

/* ---------- Contact block (home) + shared form card and info cards ---------- */
.oc-home-contact__grid {
    display: grid;
    grid-template-columns: minmax(0, 636px) minmax(0, 1fr);
    gap: 74px;
    align-items: center;
}

.oc-form-card {
    padding: 32px;
    background: var(--oc-white);
}

.oc-form-card__title {
    font-size: 1.5rem;
    font-weight: 500;
}

.oc-form-card__intro {
    margin: 16px 0 24px;
    color: var(--oc-dark);
    line-height: 1.65;
}

.oc-form__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px 24px;
    margin-bottom: 32px;
}

.oc-form__field--full {
    grid-column: 1 / -1;
}

.oc-check {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: -8px 0 24px;
    cursor: pointer;
}

.oc-check input {
    width: 18px;
    height: 18px;
    accent-color: var(--oc-blue);
}

.oc-info-list {
    display: grid;
    gap: 20px;
}

.oc-info-card {
    display: flex;
    align-items: center;
    gap: 30px;
    padding: 24px;
    background: var(--oc-white);
    border-radius: 4px;
    box-shadow: var(--oc-shadow);
}

.oc-info-card__icon {
    flex: none;
    display: grid;
    place-items: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--oc-blue-soft);
    color: var(--oc-blue);
    font-size: 1.4rem;
}

.oc-info-card__title {
    margin-bottom: 14px;
    font-size: 1.5rem;
    font-weight: 500;
}

.oc-info-card p {
    line-height: 1.65;
    overflow-wrap: anywhere;
}

@media (max-width: 1199px) {
    .oc-home-contact__grid { gap: 40px; }
}

@media (max-width: 991px) {
    .oc-home-contact__grid { grid-template-columns: 1fr; }
}

@media (max-width: 575px) {
    .oc-form-card { padding: 24px 18px; }

    .oc-form__grid { grid-template-columns: 1fr; }

    .oc-info-card { gap: 18px; padding: 20px; }

    .oc-info-card__title { font-size: 1.25rem; }
}

/* ---------- News cards ---------- */
.oc-news__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.oc-post {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: var(--oc-radius);
    background: var(--oc-light);
}

.oc-post__media {
    position: relative;
}

.oc-post__media img {
    width: 100%;
    height: 292px;
    object-fit: cover;
}

.oc-post__date {
    position: absolute;
    right: 14px;
    bottom: 0;
    padding: 4px 12px;
    background: var(--oc-dark);
    color: var(--oc-white);
    border-radius: 4px 4px 0 0;
}

.oc-post__body {
    padding: 24px 24px 16px;
}

.oc-post__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    color: var(--oc-dark);
}

.oc-post__meta i {
    margin-right: 6px;
}

.oc-post__title {
    margin-top: 18px;
    font-size: var(--oc-fs-h3);
    font-weight: 500;
    line-height: 1.5;
}

.oc-post__text {
    margin-top: 16px;
}

.oc-post .oc-link-arrow {
    margin-top: 8px;
}

@media (max-width: 1199px) {
    .oc-news__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
    .oc-news__grid { grid-template-columns: 1fr; }

    .oc-post__media img { height: 240px; }
}
