/* Основни стилове за адаптивния дизайн на Hamali777.com. */

:root {
    --blue: #159bd3;
    --blue-dark: #0879ae;
    --blue-soft: #eaf8fe;
    --yellow: #ffd23f;
    --yellow-dark: #e7b900;
    --ink: #172a3a;
    --text: #4d6270;
    --muted: #718592;
    --white: #ffffff;
    --surface: #f4f9fc;
    --line: #dceaf1;
    --shadow: 0 18px 50px rgba(23, 42, 58, 0.12);
    --radius: 22px;
    --container: 1180px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background: var(--white);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 17px;
    line-height: 1.65;
    overflow-x: hidden;
}

body.menu-open,
body.lightbox-open {
    overflow: hidden;
}

img {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

button {
    font: inherit;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1,
h2,
h3 {
    color: var(--ink);
    line-height: 1.12;
}

h1 {
    font-size: clamp(2.4rem, 5vw, 4.9rem);
    letter-spacing: -0.045em;
}

h2 {
    margin-bottom: 18px;
    font-size: clamp(2rem, 3.5vw, 3.25rem);
    letter-spacing: -0.035em;
}

h3 {
    font-size: 1.35rem;
}

.container {
    width: min(calc(100% - 40px), var(--container));
    margin-inline: auto;
}

.section {
    padding: 96px 0;
}

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 9999;
    padding: 10px 16px;
    color: var(--ink);
    background: var(--yellow);
    transform: translateY(-150%);
}

.skip-link:focus {
    transform: translateY(0);
}

.topbar {
    color: var(--white);
    background: var(--ink);
    font-size: 0.86rem;
    font-weight: 700;
}

.topbar-inner,
.topbar-phones {
    display: flex;
    align-items: center;
}

.topbar-inner {
    min-height: 42px;
    justify-content: space-between;
    gap: 24px;
}

.topbar-phones {
    gap: 18px;
}

.topbar-phones a {
    color: var(--yellow);
}

.site-header {
    position: relative;
    z-index: 100;
    background: var(--white);
    box-shadow: 0 2px 18px rgba(23, 42, 58, 0.08);
}

.header-inner {
    display: flex;
    min-height: 96px;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.brand img {
    width: 280px;
    height: auto;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

.main-nav > a {
    position: relative;
    padding: 13px 15px;
    color: var(--ink);
    font-size: 0.95rem;
    font-weight: 800;
}

.main-nav > a:not(.nav-call)::after {
    position: absolute;
    right: 15px;
    bottom: 7px;
    left: 15px;
    height: 3px;
    border-radius: 99px;
    background: var(--yellow);
    content: '';
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.2s ease;
}

.main-nav > a:hover::after,
.main-nav > a.active::after {
    transform: scaleX(1);
}

.main-nav .nav-call {
    margin-left: 8px;
    padding-inline: 22px;
    color: var(--white);
    border-radius: 99px;
    background: var(--blue);
}

.main-nav .nav-call:hover {
    background: var(--blue-dark);
}

.menu-toggle {
    display: none;
    width: 50px;
    height: 46px;
    padding: 11px;
    border: 0;
    border-radius: 10px;
    background: var(--blue);
    cursor: pointer;
}

.menu-toggle > span:not(.screen-reader-text) {
    display: block;
    height: 3px;
    margin: 4px 0;
    border-radius: 5px;
    background: var(--white);
}

.hero {
    position: relative;
    display: grid;
    min-height: 680px;
    align-items: center;
    overflow: hidden;
}

.hero-image,
.hero-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.hero-image {
    object-fit: cover;
    object-position: center 48%;
}

.hero-overlay {
    background: linear-gradient(90deg, rgba(10, 35, 51, 0.94) 0%, rgba(10, 35, 51, 0.77) 45%, rgba(10, 35, 51, 0.18) 78%, rgba(10, 35, 51, 0.08) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    padding-block: 100px;
}

.hero h1 {
    max-width: 870px;
    margin: 18px 0 24px;
    color: var(--white);
}

.hero p {
    max-width: 700px;
    margin-bottom: 34px;
    color: #eaf4f8;
    font-size: 1.2rem;
}

.eyebrow {
    display: inline-block;
    color: var(--yellow);
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.eyebrow.blue {
    color: var(--blue-dark);
}

.eyebrow.dark {
    color: var(--ink);
}

.hero-actions,
.final-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.button {
    display: inline-flex;
    min-height: 52px;
    align-items: center;
    justify-content: center;
    padding: 13px 24px;
    border: 2px solid transparent;
    border-radius: 12px;
    font-weight: 900;
    line-height: 1.2;
    transition: transform 0.2s ease, background 0.2s ease;
}

.button:hover {
    transform: translateY(-2px);
}

.button-yellow {
    color: var(--ink);
    background: var(--yellow);
}

.button-yellow:hover {
    background: #ffe071;
}

.button-light {
    color: var(--white);
    border-color: rgba(255, 255, 255, 0.65);
    background: rgba(255, 255, 255, 0.1);
}

.button-blue {
    color: var(--white);
    background: var(--blue);
}

.button-dark {
    color: var(--white);
    background: var(--ink);
}

.button-outline-dark {
    color: var(--ink);
    border-color: var(--ink);
}

.trust-strip {
    background: var(--yellow);
}

.trust-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}

.trust-grid > div {
    padding: 24px 22px;
    border-right: 1px solid rgba(23, 42, 58, 0.17);
}

.trust-grid > div:last-child {
    border-right: 0;
}

.trust-grid strong,
.trust-grid span {
    display: block;
}

.trust-grid strong {
    color: var(--ink);
    font-size: 1.05rem;
}

.trust-grid span {
    color: #4f4a2f;
    font-size: 0.85rem;
}

.section-heading {
    max-width: 760px;
    margin-bottom: 48px;
}

.section-heading.center {
    margin-inline: auto;
    text-align: center;
}

.section-heading p {
    font-size: 1.05rem;
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.service-card {
    position: relative;
    padding: 38px 34px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: 0 12px 35px rgba(23, 42, 58, 0.07);
    overflow: hidden;
}

.service-card.featured {
    border-color: transparent;
    background: var(--blue-soft);
}

.service-number {
    position: absolute;
    top: -10px;
    right: 22px;
    color: rgba(21, 155, 211, 0.12);
    font-size: 5rem;
    font-weight: 900;
    line-height: 1;
}

.service-card h3 {
    position: relative;
    margin: 24px 0 16px;
}

.check-list,
.large-list {
    padding: 0;
    margin: 24px 0 0;
    list-style: none;
}

.check-list li,
.large-list li {
    position: relative;
    padding: 9px 0 9px 30px;
    border-bottom: 1px solid var(--line);
}

.check-list li:last-child,
.large-list li:last-child {
    border-bottom: 0;
}

.check-list li::before,
.large-list li::before {
    position: absolute;
    top: 11px;
    left: 0;
    display: grid;
    width: 20px;
    height: 20px;
    place-items: center;
    color: var(--ink);
    border-radius: 50%;
    background: var(--yellow);
    content: '✓';
    font-size: 0.72rem;
    font-weight: 900;
}

.split-section {
    background: var(--surface);
}

.split-grid,
.about-grid,
.contact-grid {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    align-items: center;
    gap: 70px;
}

.image-stack {
    position: relative;
    min-height: 530px;
}

.image-stack img {
    position: absolute;
    width: 78%;
    height: 390px;
    border-radius: var(--radius);
    object-fit: cover;
    box-shadow: var(--shadow);
}

.image-stack img:first-child {
    top: 0;
    left: 0;
}

.image-stack img:last-child {
    right: 0;
    bottom: 0;
    width: 56%;
    height: 270px;
    border: 8px solid var(--white);
}

.split-copy p {
    font-size: 1.05rem;
}

.text-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
    color: var(--blue-dark);
    font-weight: 900;
}

.text-link span {
    color: var(--yellow-dark);
    font-size: 1.4rem;
}

.process-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.process-item {
    position: relative;
    padding: 30px 24px;
    border-top: 5px solid var(--blue);
    border-radius: 0 0 16px 16px;
    background: var(--surface);
}

.process-item > span {
    display: grid;
    width: 42px;
    height: 42px;
    margin-bottom: 20px;
    place-items: center;
    color: var(--ink);
    border-radius: 50%;
    background: var(--yellow);
    font-weight: 900;
}

.process-item p {
    margin-bottom: 0;
    font-size: 0.94rem;
}

.gallery-preview {
    padding-top: 70px;
    background: var(--ink);
}

.gallery-preview h2,
.gallery-preview p {
    color: var(--white);
}

.inline-heading {
    display: flex;
    max-width: none;
    align-items: end;
    justify-content: space-between;
    gap: 30px;
}

.preview-grid {
    display: grid;
    grid-template-columns: 1.3fr 0.85fr 0.85fr;
    gap: 18px;
}

.preview-grid img {
    width: 100%;
    height: 330px;
    border-radius: 16px;
    object-fit: cover;
}

.page-hero {
    position: relative;
    color: var(--white);
    background: var(--blue);
    overflow: hidden;
}

.page-hero::after {
    position: absolute;
    right: -90px;
    bottom: -120px;
    width: 360px;
    height: 360px;
    border: 60px solid rgba(255, 210, 63, 0.35);
    border-radius: 50%;
    content: '';
}

.page-hero-inner {
    position: relative;
    z-index: 2;
    padding-block: 76px;
}

.page-hero h1 {
    margin: 12px 0 10px;
    color: var(--white);
}

.page-hero p {
    max-width: 720px;
    margin-bottom: 0;
    color: #e9f8fe;
    font-size: 1.08rem;
}

.rounded-image {
    width: 100%;
    min-height: 420px;
    border-radius: var(--radius);
    object-fit: cover;
    box-shadow: var(--shadow);
}

.values-section {
    padding-block: 72px;
    background: var(--surface);
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.values-grid article {
    padding: 28px;
    border-radius: 16px;
    background: var(--white);
}

.values-grid article > span {
    color: var(--blue);
    font-size: 1.6rem;
    font-weight: 900;
}

.values-grid article p {
    margin-bottom: 0;
    font-size: 0.93rem;
}

.content-card {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 60px;
    padding: 54px;
    border-radius: var(--radius);
    background: var(--blue-soft);
}

.content-card .large-list {
    margin-top: 0;
}

.gallery-section {
    background: var(--surface);
}

.masonry-gallery {
    column-count: 3;
    column-gap: 20px;
}

.gallery-item {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    margin: 0 0 20px;
    border: 0;
    border-radius: 16px;
    background: var(--ink);
    box-shadow: 0 10px 28px rgba(23, 42, 58, 0.12);
    cursor: zoom-in;
    break-inside: avoid;
    overflow: hidden;
}

.gallery-item:nth-child(4n + 1) img {
    aspect-ratio: 4 / 3;
}

.gallery-item:nth-child(4n + 2) img {
    aspect-ratio: 4 / 3.55;
}

.gallery-item:nth-child(4n + 3) img {
    aspect-ratio: 4 / 2.75;
}

.gallery-item:nth-child(4n + 4) img {
    aspect-ratio: 4 / 3.25;
}

.gallery-item img {
    width: 100%;
    object-fit: cover;
    transition: transform 0.35s ease, opacity 0.35s ease;
}

.gallery-item span {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    padding: 38px 18px 15px;
    color: var(--white);
    background: linear-gradient(transparent, rgba(10, 35, 51, 0.88));
    font-size: 0.93rem;
    font-weight: 800;
    text-align: left;
    opacity: 0;
    transform: translateY(8px);
    transition: 0.25s ease;
}

.gallery-item:hover img,
.gallery-item:focus-visible img {
    opacity: 0.82;
    transform: scale(1.035);
}

.gallery-item:hover span,
.gallery-item:focus-visible span {
    opacity: 1;
    transform: translateY(0);
}

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    padding: 70px 90px 40px;
    place-items: center;
    background: rgba(5, 19, 28, 0.96);
}

.lightbox.is-open {
    display: grid;
}

.lightbox figure {
    max-width: min(1100px, 84vw);
    max-height: 86vh;
    margin: 0;
    text-align: center;
}

.lightbox figure img {
    width: auto;
    max-width: 100%;
    max-height: 76vh;
    margin: auto;
    border-radius: 10px;
    object-fit: contain;
}

.lightbox figcaption {
    padding-top: 14px;
    color: var(--white);
    font-size: 0.92rem;
}

.lightbox-close,
.lightbox-arrow {
    position: absolute;
    display: grid;
    place-items: center;
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.36);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.09);
    cursor: pointer;
}

.lightbox-close:hover,
.lightbox-arrow:hover {
    color: var(--ink);
    background: var(--yellow);
}

.lightbox-close {
    top: 20px;
    right: 24px;
    width: 50px;
    height: 50px;
    font-size: 2rem;
}

.lightbox-arrow {
    top: 50%;
    width: 56px;
    height: 56px;
    font-size: 3rem;
    line-height: 1;
    transform: translateY(-50%);
}

.lightbox-prev {
    left: 24px;
}

.lightbox-next {
    right: 24px;
}

.contact-grid {
    align-items: stretch;
}

.phone-cards {
    display: grid;
    gap: 16px;
    margin-top: 32px;
}

.phone-card {
    display: block;
    padding: 24px 26px;
    border: 2px solid var(--line);
    border-radius: 16px;
    background: var(--white);
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.phone-card:hover {
    border-color: var(--blue);
    transform: translateX(5px);
}

.phone-card span,
.phone-card small {
    display: block;
}

.phone-card span {
    color: var(--blue-dark);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.phone-card strong {
    display: block;
    margin: 4px 0;
    color: var(--ink);
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    line-height: 1.2;
}

.phone-card small {
    color: var(--muted);
}

.contact-aside {
    padding: 42px;
    border-radius: var(--radius);
    background: var(--ink);
}

.contact-aside h3,
.contact-aside li {
    color: var(--white);
}

.contact-aside .check-list li {
    border-color: rgba(255, 255, 255, 0.14);
}

.notice {
    padding: 16px;
    margin: 30px 0 0;
    color: var(--ink);
    border-radius: 10px;
    background: var(--yellow);
    font-size: 0.9rem;
    font-weight: 700;
}

.final-cta {
    width: 100%;
    padding: 62px 0;
    background: var(--yellow);
}

.final-cta-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.final-cta h2 {
    max-width: 720px;
    margin: 8px 0 10px;
}

.final-cta p {
    margin-bottom: 0;
    color: #554f34;
}

.final-actions {
    min-width: 260px;
    flex-direction: column;
}

.site-footer {
    padding: 65px 0 22px;
    color: #bfd0d9;
    background: #0d202d;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 70px;
    padding-bottom: 46px;
}

.footer-grid > div {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
}

.footer-brand {
    color: var(--white);
    font-size: 1.8rem;
    font-weight: 900;
}

.footer-grid h3 {
    margin-bottom: 10px;
    color: var(--white);
    font-size: 1rem;
}

.footer-grid p {
    max-width: 410px;
}

.footer-grid a:hover {
    color: var(--yellow);
}

.copyright {
    display: flex;
    padding-top: 20px;
    justify-content: space-between;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 0.8rem;
}

.floating-calls {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.floating-calls > a {
    display: grid;
    width: 43px;
    height: 43px;
    place-items: center;
    color: var(--ink);
    border: 3px solid var(--white);
    border-radius: 50%;
    background: var(--yellow);
    box-shadow: 0 8px 25px rgba(23, 42, 58, 0.25);
    font-weight: 900;
}

.floating-calls .primary-call {
    width: 62px;
    height: 62px;
    background: var(--blue);
    animation: call-pulse 2s infinite;
}

.primary-call svg {
    width: 29px;
    fill: var(--white);
}

@keyframes call-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(21, 155, 211, 0.45), 0 8px 25px rgba(23, 42, 58, 0.25); }
    50% { box-shadow: 0 0 0 12px rgba(21, 155, 211, 0), 0 8px 25px rgba(23, 42, 58, 0.25); }
}

@media (max-width: 980px) {
    .section {
        padding: 78px 0;
    }

    .header-inner {
        min-height: 82px;
    }

    .brand img {
        width: 235px;
    }

    .menu-toggle {
        display: block;
    }

    .main-nav {
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        display: none;
        padding: 18px 20px 26px;
        align-items: stretch;
        flex-direction: column;
        background: var(--ink);
        box-shadow: var(--shadow);
    }

    .main-nav.is-open {
        display: flex;
    }

    .main-nav > a {
        padding: 15px 10px;
        color: var(--white);
        border-bottom: 1px solid rgba(255, 255, 255, 0.12);
        font-size: 1.12rem;
        text-align: center;
    }

    .main-nav .nav-call {
        margin: 12px 0 0;
        color: var(--ink);
        border: 0;
        background: var(--yellow);
    }

    .hero {
        min-height: 610px;
    }

    .service-grid,
    .values-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .service-card:last-child {
        grid-column: 1 / -1;
    }

    .split-grid,
    .about-grid,
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .process-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .preview-grid {
        grid-template-columns: 1fr 1fr;
    }

    .preview-grid img:first-child {
        grid-column: 1 / -1;
    }

    .masonry-gallery {
        column-count: 2;
    }

    .content-card {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .final-cta-inner {
        align-items: flex-start;
        flex-direction: column;
    }

    .final-actions {
        width: 100%;
        min-width: 0;
        flex-direction: row;
    }

    .final-actions .button {
        flex: 1;
    }
}

@media (max-width: 680px) {
    body {
        font-size: 16px;
    }

    .container {
        width: min(calc(100% - 28px), var(--container));
    }

    .section {
        padding: 62px 0;
    }

    .topbar-inner {
        padding: 8px 0;
        align-items: flex-start;
        flex-direction: column;
        gap: 2px;
    }

    .topbar-inner > span {
        display: none;
    }

    .topbar-phones {
        width: 100%;
        justify-content: space-around;
        gap: 10px;
    }

    .header-inner {
        min-height: 74px;
    }

    .brand img {
        width: 205px;
    }

    .hero {
        min-height: 650px;
    }

    .hero-overlay {
        background: linear-gradient(180deg, rgba(10, 35, 51, 0.58) 0%, rgba(10, 35, 51, 0.94) 68%, rgba(10, 35, 51, 0.98) 100%);
    }

    .hero-content {
        padding-block: 86px;
        align-self: end;
    }

    .hero h1 {
        font-size: clamp(2.35rem, 12vw, 3.5rem);
    }

    .hero p {
        font-size: 1.04rem;
    }

    .hero-actions,
    .final-actions {
        flex-direction: column;
    }

    .button {
        width: 100%;
    }

    .trust-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .trust-grid > div {
        border-right: 1px solid rgba(23, 42, 58, 0.17);
        border-bottom: 1px solid rgba(23, 42, 58, 0.17);
    }

    .service-grid,
    .values-grid,
    .process-grid,
    .preview-grid {
        grid-template-columns: 1fr;
    }

    .service-card:last-child,
    .preview-grid img:first-child {
        grid-column: auto;
    }

    .service-card {
        padding: 32px 25px;
    }

    .image-stack {
        min-height: 400px;
    }

    .image-stack img {
        width: 88%;
        height: 310px;
    }

    .image-stack img:last-child {
        width: 59%;
        height: 210px;
    }

    .inline-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .preview-grid img {
        height: 245px;
    }

    .page-hero-inner {
        padding-block: 58px;
    }

    .rounded-image {
        min-height: 300px;
    }

    .content-card,
    .contact-aside {
        padding: 30px 22px;
    }

    .masonry-gallery {
        column-count: 1;
    }

    .gallery-item span {
        opacity: 1;
        transform: none;
    }

    .lightbox {
        padding: 80px 16px 80px;
    }

    .lightbox figure {
        max-width: 100%;
    }

    .lightbox-arrow {
        top: auto;
        bottom: 16px;
        transform: none;
    }

    .lightbox-prev {
        left: calc(50% - 70px);
    }

    .lightbox-next {
        right: calc(50% - 70px);
    }

    .phone-card {
        padding: 22px 20px;
    }

    .final-cta {
        padding: 52px 0;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 34px;
    }

    .copyright {
        flex-direction: column;
        gap: 5px;
    }

    .floating-calls {
        right: 12px;
        bottom: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
