/**
 * Contact Sokna page.
 *
 * Mirrors homepage/about rhythm: dark compact hero, warm cream canvas,
 * white cards, orange accents and tight section spacing.
 *
 * @package Sokna
 */

.site-main--contact-sokna {
    --contact-orange: #ff5b14;
    --contact-orange-2: #ff7a2f;
    --contact-black: #101010;
    --contact-muted: #625951;
    --contact-sand: #f8f5f1;
    --contact-cream: #fffaf3;
    --contact-line: rgba(22, 16, 12, 0.1);
    --contact-section-y: clamp(2rem, 4vw, 3.15rem);
    background:
        radial-gradient(circle at 12% 0%, rgba(255, 91, 20, 0.08), transparent 30%),
        linear-gradient(180deg, var(--contact-sand) 0%, #f6f2ed 100%);
    color: var(--contact-black);
    font-family: 'Poppins', 'Inter', system-ui, sans-serif;
    overflow: hidden;
}

.site-main--contact-sokna[dir="rtl"] {
    font-family: 'Noto Kufi Arabic', var(--font-arabic), 'Cairo', system-ui, sans-serif;
}

.site-main--contact-sokna h1,
.site-main--contact-sokna p {
    margin: 0;
}

.contact-container {
    width: 100%;
    max-width: 1536px;
    margin-inline: auto;
    padding-inline: 2.5rem;
    box-sizing: border-box;
}

.contact-hero {
    position: relative;
    min-height: clamp(520px, 68vh, 650px);
    display: flex;
    align-items: center;
    overflow: hidden;
    background: #070707;
}

.contact-hero__bg,
.contact-hero__bg-img,
.contact-hero__bg-fallback,
.contact-hero__overlay {
    position: absolute;
    inset: 0;
}

.contact-hero__bg {
    z-index: 0;
    overflow: hidden;
}

.contact-hero__bg-img,
.contact-hero__bg-fallback {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background-size: cover;
    background-position: center;
    transform: scale(1.03);
    animation: contactHeroZoom 18s ease-in-out infinite alternate;
}

.contact-hero__overlay {
    z-index: 1;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.86) 0%, rgba(0, 0, 0, 0.58) 48%, rgba(0, 0, 0, 0.24) 100%),
        linear-gradient(180deg, rgba(0, 0, 0, 0.42) 0%, rgba(0, 0, 0, 0.22) 46%, rgba(0, 0, 0, 0.78) 100%);
}

.site-main--contact-sokna[dir="rtl"] .contact-hero__overlay {
    background:
        linear-gradient(270deg, rgba(0, 0, 0, 0.86) 0%, rgba(0, 0, 0, 0.58) 48%, rgba(0, 0, 0, 0.24) 100%),
        linear-gradient(180deg, rgba(0, 0, 0, 0.42) 0%, rgba(0, 0, 0, 0.22) 46%, rgba(0, 0, 0, 0.78) 100%);
}

.contact-hero::before {
    content: '';
    position: absolute;
    inset: 1px;
    z-index: 2;
    border: 1px solid rgba(255, 255, 255, 0.06);
    pointer-events: none;
}

.contact-hero__grid {
    position: relative;
    z-index: 3;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
    gap: clamp(1.4rem, 4vw, 4.25rem);
    align-items: center;
    padding-block: clamp(6.2rem, 11vw, 8.5rem) clamp(2.2rem, 5vw, 3.6rem);
}

.contact-hero__copy {
    max-width: 760px;
}

.contact-kicker {
    position: relative;
    display: inline-block;
    margin-block-end: 14px;
    padding-block-end: 10px;
    color: var(--contact-orange);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    line-height: 1.2;
    text-transform: uppercase;
}

.site-main--contact-sokna[dir="rtl"] .contact-kicker {
    letter-spacing: 0;
}

.contact-kicker::after {
    content: '';
    position: absolute;
    inset-inline-start: 0;
    bottom: 0;
    width: 42px;
    height: 3px;
    border-radius: 999px;
    background: var(--contact-orange);
}

.contact-hero h1 {
    max-width: 760px;
    color: #ffffff;
    font-size: clamp(2.05rem, 4.35vw, 4rem);
    font-weight: 900;
    letter-spacing: -0.05em;
    line-height: 1.02;
    text-wrap: balance;
}

.site-main--contact-sokna[dir="rtl"] .contact-hero h1 {
    letter-spacing: -0.03em;
    line-height: 1.18;
}

.contact-hero__copy > p:last-child {
    max-width: 640px;
    margin-block-start: 20px;
    color: rgba(255, 255, 255, 0.9);
    font-size: clamp(0.96rem, 1.25vw, 1.1rem);
    line-height: 1.72;
}

.contact-hero__panel {
    position: relative;
    display: grid;
    gap: 16px;
    width: min(100%, 450px);
    justify-self: end;
    padding: clamp(1.1rem, 2.3vw, 1.6rem);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    background: rgba(20, 20, 20, 0.58);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    box-shadow: 0 20px 54px rgba(0, 0, 0, 0.28);
}

.site-main--contact-sokna[dir="rtl"] .contact-hero__panel {
    justify-self: start;
}

.contact-hero__panel::before {
    content: '';
    position: absolute;
    inset: 12% 10%;
    z-index: -1;
    border-radius: 32px;
    background: rgba(255, 91, 20, 0.22);
    filter: blur(36px);
}

.contact-hero__panel-head,
.contact-info-list a,
.contact-route {
    display: flex;
    align-items: center;
    gap: 12px;
}

.contact-hero__panel-head {
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.08);
}

.contact-hero__panel-head .material-symbols-outlined,
.contact-info-list .material-symbols-outlined {
    display: grid;
    place-items: center;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: var(--contact-orange);
    color: #ffffff;
    font-size: 24px;
}

.contact-hero__panel-head p {
    color: #ffffff;
    font-weight: 900;
}

.contact-hero__panel-head small {
    display: block;
    margin-block-start: 3px;
    color: rgba(255, 255, 255, 0.72);
    line-height: 1.5;
}

.contact-panel__company {
    color: #ffffff;
    font-size: 1.04rem;
    font-weight: 900;
}

.contact-info-list {
    display: grid;
    gap: 10px;
}

.contact-info-list a {
    min-width: 0;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.72);
    text-decoration: none;
    transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.contact-info-list a:hover,
.contact-info-list a:focus-visible {
    transform: translateY(-3px);
    border-color: rgba(255, 91, 20, 0.46);
    background: rgba(255, 255, 255, 0.12);
    outline: none;
}

.contact-info-list strong {
    display: block;
    color: #ffffff;
    font-size: 0.95rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.contact-main {
    padding-block: var(--contact-section-y) clamp(1.3rem, 3vw, 2rem);
}

.contact-map-section {
    padding-block: 0 var(--contact-section-y);
}

.contact-main__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(290px, 0.75fr);
    gap: clamp(1rem, 2.4vw, 1.5rem);
    align-items: start;
}

.contact-card,
.contact-map-card {
    border: 1px solid rgba(255, 255, 255, 0.88);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.7) inset,
        0 14px 44px rgba(32, 22, 14, 0.07);
}

.contact-card {
    padding: clamp(1.15rem, 2.6vw, 1.9rem);
}

.contact-card--form {
    position: relative;
    overflow: hidden;
}

.contact-card--form::after {
    content: '';
    position: absolute;
    inset-inline-end: -48px;
    inset-block-start: -48px;
    width: 138px;
    height: 138px;
    border-radius: 50%;
    background: rgba(255, 91, 20, 0.09);
    pointer-events: none;
}

.contact-alert {
    position: relative;
    z-index: 1;
    margin-block-end: 14px;
    padding: 12px 14px;
    border-radius: 14px;
    font-weight: 800;
}

.contact-alert--success {
    border: 1px solid rgba(33, 132, 72, 0.24);
    background: rgba(33, 132, 72, 0.11);
    color: #145c31;
}

.contact-alert--error {
    border: 1px solid rgba(176, 43, 43, 0.22);
    background: rgba(176, 43, 43, 0.09);
    color: #8a1f1f;
}

.contact-form {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 14px;
}

.contact-form__row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.contact-form label {
    display: grid;
    gap: 7px;
}

.contact-form span {
    color: var(--contact-black);
    font-size: 0.74rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.site-main--contact-sokna[dir="rtl"] .contact-form span {
    letter-spacing: 0;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    border: 1px solid rgba(16, 16, 16, 0.14);
    border-radius: 14px;
    background: #fffdf9;
    color: var(--contact-black);
    font: inherit;
    box-sizing: border-box;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.contact-form textarea {
    min-height: 132px;
    resize: vertical;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--contact-orange);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(255, 91, 20, 0.12);
}

.contact-hp {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

.contact-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 50px;
    padding-inline: 18px;
    border: 0;
    border-radius: 14px;
    background: var(--contact-orange);
    color: #ffffff;
    font: inherit;
    font-weight: 900;
    line-height: 1.2;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 16px 34px rgba(255, 91, 20, 0.28);
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.contact-submit:hover,
.contact-submit:focus-visible {
    background: var(--contact-orange-2);
    transform: translateY(-2px);
    outline: none;
    box-shadow: 0 20px 42px rgba(255, 91, 20, 0.34);
}

.contact-routes {
    display: grid;
    gap: 10px;
}

.contact-route,
.contact-address {
    padding: 13px;
    border: 1px solid rgba(255, 91, 20, 0.14);
    border-radius: 16px;
    background: var(--contact-cream);
    color: var(--contact-muted);
}

.contact-route {
    min-width: 0;
}

.contact-route > .material-symbols-outlined {
    display: grid;
    place-items: center;
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: rgba(255, 91, 20, 0.12);
    color: var(--contact-orange);
    font-size: 20px;
}

.contact-route div {
    min-width: 0;
}

.contact-route span:not(.material-symbols-outlined),
.contact-address span {
    display: block;
    color: var(--contact-muted);
    font-size: 0.8rem;
    font-weight: 800;
    line-height: 1.45;
}

.contact-route strong {
    display: block;
    color: var(--contact-black);
    font-size: 0.92rem;
    overflow-wrap: anywhere;
}

.contact-address {
    display: grid;
    gap: 5px;
    margin-block-start: 12px;
}

.contact-address p {
    color: var(--contact-black);
    line-height: 1.62;
}

.contact-map-card {
    display: grid;
    grid-template-columns: minmax(260px, 0.38fr) minmax(0, 0.62fr);
    gap: clamp(1rem, 2.4vw, 1.5rem);
    padding: clamp(1rem, 2vw, 1.35rem);
    overflow: hidden;
}

.contact-map-card__copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(0.6rem, 1.8vw, 1.2rem);
}

.contact-map-card__copy p:not(.contact-kicker) {
    color: var(--contact-muted);
    line-height: 1.68;
}

.contact-map-card__copy a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-height: 46px;
    margin-block-start: 18px;
    padding-inline: 18px;
    border-radius: 14px;
    background: var(--contact-black);
    color: #ffffff;
    font-weight: 900;
    text-decoration: none;
    transition: transform 0.2s ease, background 0.2s ease;
}

.contact-map-card__copy a:hover,
.contact-map-card__copy a:focus-visible {
    background: var(--contact-orange);
    transform: translateY(-2px);
    outline: none;
}

.contact-map-frame {
    min-height: clamp(300px, 34vw, 410px);
    overflow: hidden;
    border-radius: 18px;
    background: var(--contact-cream);
}

.contact-map-frame iframe {
    display: block;
    width: 100%;
    height: 100%;
    min-height: clamp(300px, 34vw, 410px);
}

@media (min-width: 700px) {
    .contact-container {
        padding-inline: 3rem;
    }
}

@media (min-width: 1024px) {
    .contact-container {
        padding-inline: 10rem;
    }
}

@media (min-width: 1280px) {
    .contact-container {
        padding-inline: 12rem;
    }
}

@media (max-width: 1120px) {
    .contact-main__grid,
    .contact-map-card {
        grid-template-columns: 1fr;
    }

    .contact-card--routes {
        display: grid;
        grid-template-columns: minmax(0, 0.95fr) minmax(260px, 0.55fr);
        gap: 14px;
    }

    .contact-card--routes > .contact-kicker {
        grid-column: 1 / -1;
    }

    .contact-address {
        margin-block-start: 0;
    }
}

@media (max-width: 900px) {
    .contact-hero {
        min-height: auto;
    }

    .contact-hero__grid {
        grid-template-columns: 1fr;
        padding-block: 6rem 2rem;
    }

    .contact-hero__panel,
    .site-main--contact-sokna[dir="rtl"] .contact-hero__panel {
        justify-self: stretch;
        width: 100%;
    }
}

@media (max-width: 680px) {
    .contact-container {
        padding-inline: 1rem;
    }

    .contact-hero__grid {
        padding-block: 5.5rem 1.5rem;
        gap: 1.2rem;
    }

    .contact-main {
        padding-block: 1.35rem 1rem;
    }

    .contact-map-section {
        padding-block-end: 1.5rem;
    }

    .contact-form__row,
    .contact-card--routes {
        grid-template-columns: 1fr;
    }

    .contact-card,
    .contact-map-card,
    .contact-hero__panel {
        border-radius: 20px;
    }

    .contact-info-list a,
    .contact-hero__panel-head {
        align-items: flex-start;
    }

    .contact-map-card__copy a {
        width: 100%;
    }
}

@media (max-width: 420px) {
    .contact-hero h1 {
        font-size: clamp(1.9rem, 12vw, 2.5rem);
    }

    .contact-hero__panel,
    .contact-card,
    .contact-map-card {
        padding: 1rem;
    }
}

@keyframes contactHeroZoom {
    from { transform: scale(1.03); }
    to { transform: scale(1.09); }
}

@media (prefers-reduced-motion: reduce) {
    .contact-hero__bg-img,
    .contact-hero__bg-fallback {
        animation: none;
    }

    .contact-submit,
    .contact-map-card__copy a,
    .contact-info-list a,
    .contact-form input,
    .contact-form select,
    .contact-form textarea {
        transition: none;
    }

    .contact-submit:hover,
    .contact-submit:focus-visible,
    .contact-map-card__copy a:hover,
    .contact-map-card__copy a:focus-visible,
    .contact-info-list a:hover,
    .contact-info-list a:focus-visible {
        transform: none;
    }
}
