/*
 * Onur Polat Hukuk — v1.8.1 restrained editorial system.
 * Final compatibility layer: one paper surface, one ink, one green, a small wine accent.
 */
:root {
    --v181-paper: #f4f0e8;
    --v181-white: #fff;
    --v181-ink: #1c2422;
    --v181-green: #1d513f;
    --v181-green-dark: #153f33;
    --v181-wine: #7b2434;
    --v181-line: #d4cec3;
    --v181-muted: #686c67;
    --polat-rail: 360px;
}

body.polat-theme {
    padding-left: var(--polat-rail) !important;
    color: var(--v181-ink);
    background: var(--v181-paper);
}

.polat-theme a {
    color: var(--v181-green);
}

.polat-theme a:focus-visible,
.polat-theme button:focus-visible,
.polat-theme input:focus-visible,
.polat-theme textarea:focus-visible,
.polat-theme select:focus-visible {
    outline-color: var(--v181-wine);
}

/* Larger permanent brand rail */
.polat-site-header-shell {
    width: var(--polat-rail);
    background: var(--v181-paper);
    border-right-color: var(--v181-line);
    box-shadow: 8px 0 36px rgba(28, 36, 34, 0.045);
}

.polat-site-header-v8,
.polat-site-header-v8 .polat-rail-inner {
    width: 100%;
    height: 100%;
    margin: 0 !important;
    padding: 0 !important;
}

.polat-site-header-v8 .polat-rail-inner {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    box-sizing: border-box;
    padding: 32px 22px 24px !important;
}

.polat-site-header-v8 .polat-brand-lockup,
.polat-site-header-v8 .polat-brand-lockup > a {
    display: block;
    width: 100%;
    line-height: 0;
}

.polat-site-header-v8 .polat-brand-lockup-image,
.polat-site-header-v8 .polat-brand-custom-image {
    display: block;
    width: 100% !important;
    max-width: 330px !important;
    height: auto !important;
}

.polat-site-header-v8 .polat-rail-rule {
    width: 100% !important;
    margin: 24px 0 18px !important;
    border: 0 !important;
    border-top: 1px solid var(--v181-line) !important;
}

.polat-site-header-v8 .polat-primary-navigation {
    width: 100%;
}

.polat-site-header-v8 .polat-menu-toggle,
.polat-site-header-v8 .polat-menu-close {
    display: none;
}

.polat-site-header-v8 .polat-menu-drawer,
.polat-site-header-v8 .polat-menu-drawer[aria-hidden="true"] {
    position: static;
    display: block;
    width: auto;
    height: auto;
    padding: 0;
    visibility: visible;
    opacity: 1;
    background: transparent;
    transform: none;
}

.polat-site-header-v8 .polat-menu-drawer ul {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

.polat-site-header-v8 .polat-menu-drawer li {
    margin: 0;
    border-bottom: 1px solid var(--v181-line);
}

.polat-site-header-v8 .polat-menu-drawer a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 48px;
    color: var(--v181-ink);
    font-size: 0.79rem;
    font-weight: 720;
    letter-spacing: 0.065em;
    text-transform: uppercase;
}

.polat-site-header-v8 .polat-menu-drawer a::after {
    content: "↗";
    color: var(--v181-wine);
    font-size: 0.9rem;
}

.polat-site-header-v8 .polat-menu-drawer a:hover {
    color: var(--v181-green);
}

.polat-site-header-v8 .polat-nav-contact {
    margin-top: 16px;
    border: 0 !important;
}

.polat-site-header-v8 .polat-nav-contact a {
    justify-content: center;
    min-height: 46px;
    padding: 0 16px;
    color: var(--v181-white);
    background: var(--v181-green);
}

.polat-site-header-v8 .polat-nav-contact a::after {
    margin-left: 10px;
    color: var(--v181-white);
}

.polat-site-header-v8 .polat-rail-meta {
    margin-top: auto !important;
    padding-top: 18px;
    color: var(--v181-muted);
    font-size: 0.7rem;
    line-height: 1.55;
}

.polat-site-header-v8 .polat-rail-meta > p {
    margin: 0 0 6px;
    color: var(--v181-wine);
    font-size: 0.65rem;
    font-weight: 760;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

/* Bespoke nameplate + local Ankara video */
.polat-v181-hero {
    display: grid !important;
    grid-template-columns: minmax(350px, 38%) 1fr;
    width: 100%;
    min-height: 430px;
    margin: 0 !important;
    padding: 0 !important;
    background: var(--v181-green-dark);
}

.polat-v181-hero-brand {
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-sizing: border-box;
    min-width: 0;
    margin: 0 !important;
    padding: 34px clamp(30px, 4vw, 62px) 28px !important;
    color: var(--v181-paper);
    background: var(--v181-green-dark);
    overflow: hidden;
}

.polat-v181-hero-brand::before,
.polat-v181-hero-brand::after {
    content: none !important;
    display: none !important;
}

.polat-v181-hero-nameplate {
    display: block;
    width: 100%;
    max-width: 520px;
    height: auto;
    margin: 0;
}

.polat-v181-hero-place {
    margin: 8px 0 0 !important;
    padding-top: 14px;
    color: rgba(244, 240, 232, 0.72);
    border-top: 1px solid rgba(244, 240, 232, 0.24);
    font-size: 0.69rem;
    font-weight: 650;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.polat-v181-hero-media,
.polat-v181-hero-media .polat-hero-video,
.polat-v181-hero-media .polat-hero-video-stage {
    position: relative;
    min-width: 0;
    min-height: 430px;
    height: 430px;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden;
}

.polat-v181-hero-media video,
.polat-v181-hero-media .polat-hero-video-element {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.polat-v181-hero-media .polat-hero-video::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(90deg, rgba(21, 63, 51, 0.2), transparent 30%);
}

.polat-v181-hero-media .polat-video-note,
.polat-v181-hero-media .polat-hero-video-note,
.polat-v181-hero-media .polat-video-controls {
    display: none !important;
}

/* Publications take the former practice-area position */
.polat-v181-publications {
    margin: 0 !important;
    padding: 42px clamp(26px, 4.2vw, 66px) 46px !important;
    color: var(--v181-ink);
    background: var(--v181-paper);
    border-bottom: 1px solid var(--v181-line);
}

.polat-v181-section-head {
    align-items: flex-end !important;
    margin: 0 auto 24px !important;
    padding: 0 0 14px;
    border-bottom: 1px solid var(--v181-line);
}

.polat-v181-section-head h2,
.polat-v181-section-head p {
    margin: 0 !important;
}

.polat-v181-section-head h2 {
    font-size: clamp(2.4rem, 4.5vw, 4.2rem) !important;
}

.polat-v181-query,
.polat-v181-post-grid {
    margin-top: 0 !important;
}

.polat-v181-post-grid {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 16px !important;
}

.polat-v181-post-card {
    box-sizing: border-box;
    min-width: 0;
    margin: 0 !important;
    padding: 0 0 16px !important;
    background: var(--v181-white);
    border: 1px solid var(--v181-line);
}

.polat-v181-post-card .wp-block-post-featured-image {
    margin: 0 0 14px !important;
    overflow: hidden;
}

.polat-v181-post-card .wp-block-post-featured-image img {
    width: 100%;
    transition: transform 240ms ease;
}

.polat-v181-post-card:hover .wp-block-post-featured-image img {
    transform: scale(1.025);
}

.polat-v181-post-card .wp-block-post-date,
.polat-v181-post-card .wp-block-post-title {
    margin: 0 16px !important;
}

.polat-v181-post-card .wp-block-post-date {
    color: var(--v181-muted);
    font-size: 0.68rem !important;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.polat-v181-post-card .wp-block-post-title {
    margin-top: 8px !important;
    font-family: "Source Serif 4", Georgia, serif;
    font-size: 1.06rem !important;
    line-height: 1.22;
}

.polat-v181-post-card .wp-block-post-title a {
    color: var(--v181-ink);
}

/* Short profile strip, no floating cards */
.polat-v181-profile-strip {
    margin: 0 !important;
    padding: 0 !important;
    background: var(--v181-white);
    border-bottom: 1px solid var(--v181-line);
}

.polat-v181-profile-grid {
    display: grid !important;
    grid-template-columns: minmax(300px, 42%) 1fr;
    gap: 0 !important;
    max-width: none !important;
    margin: 0 !important;
}

.polat-v181-profile-image {
    height: 300px;
    margin: 0 !important;
    overflow: hidden;
}

.polat-v181-profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.polat-v181-profile-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-sizing: border-box;
    margin: 0 !important;
    padding: 34px clamp(30px, 5vw, 78px) !important;
}

.polat-v181-profile-copy h2,
.polat-v181-profile-copy p {
    max-width: 680px;
}

.polat-v181-profile-copy h2 {
    margin: 0 0 14px !important;
}

.polat-v181-profile-copy p {
    margin: 0 0 13px !important;
}

/* Office/map band is intentionally low and horizontal */
.polat-v181-contact-compact {
    margin: 0 !important;
    padding: 24px clamp(26px, 4.2vw, 66px) !important;
    color: var(--v181-paper);
    background: var(--v181-green-dark);
}

.polat-v181-contact-grid {
    display: grid !important;
    grid-template-columns: minmax(300px, 40%) 1fr;
    gap: clamp(24px, 4vw, 56px) !important;
    align-items: center;
    margin: 0 auto !important;
}

.polat-v181-contact-copy {
    margin: 0 !important;
    padding: 0 !important;
}

.polat-v181-contact-copy .polat-kicker {
    margin: 0 0 6px !important;
    color: rgba(244, 240, 232, 0.7);
}

.polat-v181-contact-copy h2 {
    margin: 0 0 7px !important;
    color: var(--v181-paper) !important;
    font-size: clamp(1.75rem, 3vw, 2.5rem) !important;
}

.polat-v181-contact-copy > p:not(.polat-kicker):not(.polat-v181-contact-links) {
    max-width: 520px;
    margin: 0 0 12px !important;
    color: rgba(244, 240, 232, 0.82);
    font-size: 0.84rem;
    line-height: 1.55;
}

.polat-v181-contact-links {
    display: flex;
    flex-wrap: wrap;
    gap: 7px 18px;
    margin: 0 !important;
}

.polat-v181-contact-links a {
    color: var(--v181-paper);
    border-bottom: 1px solid rgba(244, 240, 232, 0.42);
    font-size: 0.76rem;
}

.polat-v181-contact-compact .polat-map {
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
}

.polat-v181-contact-compact .polat-map-head {
    display: none !important;
}

.polat-v181-contact-compact .polat-map-frame,
.polat-v181-contact-compact .polat-map-frame iframe {
    width: 100%;
    min-height: 210px !important;
    height: 210px !important;
    border: 0 !important;
}

.polat-v181-contact-compact .polat-map-frame {
    box-shadow: none !important;
}

/* Page-wide color restraint */
.polat-theme .polat-page-header,
.polat-theme .polat-archive-header,
.polat-theme .polat-single-header {
    color: var(--v181-ink) !important;
    background: var(--v181-paper) !important;
    border-color: var(--v181-line) !important;
}

.polat-theme .polat-kicker,
.polat-theme .polat-card-no {
    color: var(--v181-wine);
}

.polat-theme .wp-element-button,
.polat-theme .polat-submit,
.polat-theme button[type="submit"] {
    color: var(--v181-white) !important;
    background: var(--v181-green) !important;
}

.polat-theme .polat-practice-card,
.polat-theme .polat-faq-item,
.polat-theme .polat-post-card,
.polat-theme .polat-contact-card-wide,
.polat-theme .polat-contact-form-wide {
    color: var(--v181-ink) !important;
    background: var(--v181-white) !important;
    border-color: var(--v181-line) !important;
}

.polat-theme .polat-v180-other-areas,
.polat-theme .polat-faq-contact {
    color: var(--v181-paper) !important;
    background: var(--v181-green-dark) !important;
}

/* Compact footer with a brand that no longer disappears */
.polat-site-footer-v7 {
    margin: 0 !important;
    padding: 34px clamp(26px, 4.2vw, 66px) 18px !important;
    color: var(--v181-ink) !important;
    background: var(--v181-paper) !important;
    border-top: 1px solid var(--v181-line);
}

.polat-footer-brand-row-v7 {
    display: grid !important;
    grid-template-columns: minmax(360px, 48%) 1fr;
    gap: clamp(28px, 5vw, 70px) !important;
    align-items: center;
    margin: 0 auto 28px !important;
}

.polat-site-footer-v7 .polat-footer-brand,
.polat-site-footer-v7 .polat-footer-brand .polat-brand-lockup {
    width: 100%;
    margin: 0 !important;
}

.polat-site-footer-v7 .polat-brand-lockup-image,
.polat-site-footer-v7 .polat-brand-custom-image {
    display: block;
    width: 100% !important;
    max-width: 470px !important;
    height: auto !important;
}

.polat-footer-social-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.polat-footer-social-grid a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 48px;
    box-sizing: border-box;
    padding: 0 15px;
    color: var(--v181-ink) !important;
    background: transparent;
    border: 1px solid var(--v181-line);
    font-size: 0.72rem;
    font-weight: 680;
    letter-spacing: 0.04em;
}

.polat-footer-social-grid a:hover {
    color: var(--v181-white) !important;
    background: var(--v181-green);
    border-color: var(--v181-green);
}

.polat-footer-social-grid strong {
    font-size: 0.92rem;
}

.polat-footer-info-row-v7 {
    display: grid !important;
    grid-template-columns: minmax(260px, 1.35fr) 0.8fr 0.8fr;
    gap: 28px !important;
    margin: 0 auto !important;
    padding: 22px 0 18px;
    border-top: 1px solid var(--v181-line);
}

.polat-footer-info-row-v7 .polat-footer-label {
    margin: 0 0 7px !important;
    color: var(--v181-wine);
    font-size: 0.65rem;
    font-weight: 760;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.polat-footer-info-row-v7 .polat-footer-contact {
    display: grid;
    grid-template-columns: 1.45fr 0.8fr 1fr;
    gap: 12px;
    color: var(--v181-muted);
    font-size: 0.69rem;
    line-height: 1.55;
}

.polat-footer-info-row-v7 .polat-footer-contact address,
.polat-footer-info-row-v7 .polat-footer-contact a {
    margin: 0;
    color: inherit;
    font-style: normal;
}

.polat-footer-info-row-v7 .polat-footer-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px 13px;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none;
}

.polat-footer-info-row-v7 .polat-footer-nav li {
    margin: 0;
}

.polat-footer-info-row-v7 .polat-footer-nav a {
    color: var(--v181-ink) !important;
    font-size: 0.7rem;
}

.polat-site-footer-v7 .polat-footer-bottom {
    margin: 0 auto !important;
    padding: 13px 0 0;
    color: var(--v181-muted);
    border-top: 1px solid var(--v181-line);
    font-size: 0.66rem;
}

.polat-site-footer-v7 .polat-footer-bottom p {
    margin: 0 !important;
}

@media (max-width: 1180px) {
    :root {
        --polat-rail: 320px;
    }

    .polat-v181-hero {
        grid-template-columns: minmax(320px, 42%) 1fr;
    }

    .polat-v181-post-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 1100px) {
    body.polat-theme {
        padding: 104px 0 0 !important;
    }

    .polat-site-header-shell,
    .admin-bar .polat-site-header-shell {
        position: fixed;
        inset: 0 0 auto 0;
        width: 100%;
        height: 104px;
        background: var(--v181-paper);
        border-right: 0;
        border-bottom: 1px solid var(--v181-line);
        box-shadow: 0 10px 28px rgba(28, 36, 34, 0.06);
    }

    .admin-bar .polat-site-header-shell {
        top: 32px;
    }

    .polat-site-header-v8 .polat-rail-inner {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 7px 18px !important;
    }

    .polat-site-header-v8 .polat-brand-lockup {
        width: 285px;
        max-width: calc(100% - 66px);
    }

    .polat-site-header-v8 .polat-brand-lockup-image,
    .polat-site-header-v8 .polat-brand-custom-image {
        width: 285px !important;
        max-width: 100% !important;
        max-height: 90px;
    }

    .polat-site-header-v8 .polat-rail-rule,
    .polat-site-header-v8 .polat-rail-meta {
        display: none !important;
    }

    .polat-site-header-v8 .polat-primary-navigation {
        display: flex;
        justify-content: flex-end;
        width: auto;
    }

    .polat-site-header-v8 .polat-menu-toggle {
        display: inline-flex;
        position: relative;
        z-index: 1002;
        align-items: center;
        justify-content: center;
        width: 50px;
        height: 50px;
        padding: 0;
        color: var(--v181-ink);
        background: transparent;
        border: 1px solid var(--v181-line);
    }

    .polat-site-header-v8 .polat-menu-drawer,
    .polat-site-header-v8 .polat-menu-drawer[aria-hidden="true"] {
        position: fixed;
        z-index: 1001;
        inset: 0 0 0 auto;
        display: block;
        width: min(88vw, 390px);
        height: 100vh;
        box-sizing: border-box;
        padding: 112px 28px 34px;
        visibility: hidden;
        opacity: 0;
        background: var(--v181-paper);
        box-shadow: -22px 0 54px rgba(28, 36, 34, 0.16);
        transform: translateX(100%);
        transition: transform 220ms ease, opacity 220ms ease, visibility 220ms ease;
        overflow-y: auto;
    }

    .polat-site-header-v8 .polat-menu-drawer.is-open,
    .polat-site-header-v8 .polat-menu-drawer[aria-hidden="false"] {
        visibility: visible;
        opacity: 1;
        transform: translateX(0);
    }

    .polat-site-header-v8 .polat-menu-close {
        display: inline-flex;
        position: absolute;
        top: 26px;
        right: 28px;
        align-items: center;
        justify-content: center;
        width: 48px;
        height: 48px;
        padding: 0;
        color: var(--v181-ink);
        background: transparent;
        border: 1px solid var(--v181-line);
        font-size: 1.4rem;
    }

    .polat-site-header-v8 .polat-menu-drawer a {
        min-height: 57px;
        font-size: 0.84rem;
    }

    .polat-v181-hero {
        grid-template-columns: minmax(330px, 40%) 1fr;
    }

    .polat-footer-brand-row-v7 {
        grid-template-columns: 1fr;
    }

    .polat-site-footer-v7 .polat-brand-lockup-image,
    .polat-site-footer-v7 .polat-brand-custom-image {
        max-width: 520px !important;
    }
}

@media (max-width: 782px) {
    body.polat-theme {
        padding-top: 91px !important;
    }

    .polat-site-header-shell,
    .admin-bar .polat-site-header-shell {
        top: 0;
        height: 91px;
    }

    .admin-bar .polat-site-header-shell {
        top: 46px;
    }

    .polat-site-header-v8 .polat-rail-inner {
        padding: 6px 13px !important;
    }

    .polat-site-header-v8 .polat-brand-lockup {
        width: 230px;
    }

    .polat-site-header-v8 .polat-brand-lockup-image,
    .polat-site-header-v8 .polat-brand-custom-image {
        width: 230px !important;
        max-height: 78px;
    }

    .polat-site-header-v8 .polat-menu-toggle {
        width: 46px;
        height: 46px;
    }

    .polat-v181-hero {
        display: flex !important;
        flex-direction: column;
        min-height: 0;
    }

    .polat-v181-hero-brand {
        min-height: 315px;
        padding: 26px 24px 20px !important;
    }

    .polat-v181-hero-nameplate {
        max-width: 410px;
    }

    .polat-v181-hero-media,
    .polat-v181-hero-media .polat-hero-video,
    .polat-v181-hero-media .polat-hero-video-stage {
        min-height: 250px;
        height: 250px;
    }

    .polat-v181-publications {
        padding: 34px 20px 38px !important;
    }

    .polat-v181-post-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 12px !important;
    }

    .polat-v181-profile-grid,
    .polat-v181-contact-grid {
        grid-template-columns: 1fr;
    }

    .polat-v181-profile-image {
        height: 250px;
    }

    .polat-v181-profile-copy {
        padding: 28px 22px !important;
    }

    .polat-v181-contact-compact {
        padding: 24px 20px !important;
    }

    .polat-v181-contact-grid {
        gap: 20px !important;
    }

    .polat-v181-contact-compact .polat-map-frame,
    .polat-v181-contact-compact .polat-map-frame iframe {
        min-height: 190px !important;
        height: 190px !important;
    }

    .polat-site-footer-v7 {
        padding: 30px 20px 16px !important;
    }

    .polat-footer-brand-row-v7 {
        gap: 22px !important;
        margin-bottom: 22px !important;
    }

    .polat-site-footer-v7 .polat-brand-lockup-image,
    .polat-site-footer-v7 .polat-brand-custom-image {
        max-width: 440px !important;
    }

    .polat-footer-info-row-v7 {
        grid-template-columns: 1fr 1fr;
        gap: 20px !important;
    }

    .polat-footer-contact-v7 {
        grid-column: 1 / -1;
    }

    .polat-footer-info-row-v7 .polat-footer-contact {
        grid-template-columns: 1fr 1fr;
    }

    .polat-footer-info-row-v7 .polat-footer-contact address {
        grid-column: 1 / -1;
    }
}

@media (max-width: 520px) {
    .polat-site-header-v8 .polat-brand-lockup {
        width: 205px;
    }

    .polat-site-header-v8 .polat-brand-lockup-image,
    .polat-site-header-v8 .polat-brand-custom-image {
        width: 205px !important;
    }

    .polat-v181-hero-brand {
        min-height: 285px;
    }

    .polat-v181-post-grid {
        grid-template-columns: 1fr !important;
    }

    .polat-v181-post-card {
        display: grid;
        grid-template-columns: 42% 1fr;
        grid-template-rows: auto 1fr;
        padding: 0 !important;
    }

    .polat-v181-post-card .wp-block-post-featured-image {
        grid-row: 1 / 3;
        height: 100%;
        margin: 0 !important;
    }

    .polat-v181-post-card .wp-block-post-featured-image img {
        height: 100%;
        object-fit: cover;
    }

    .polat-v181-post-card .wp-block-post-date {
        align-self: end;
        margin: 12px 12px 0 !important;
    }

    .polat-v181-post-card .wp-block-post-title {
        margin: 6px 12px 12px !important;
    }

    .polat-footer-social-grid,
    .polat-footer-info-row-v7 {
        grid-template-columns: 1fr;
    }

    .polat-footer-contact-v7 {
        grid-column: auto;
    }

    .polat-footer-info-row-v7 .polat-footer-contact {
        grid-template-columns: 1fr;
    }

    .polat-footer-info-row-v7 .polat-footer-contact address {
        grid-column: auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    .polat-v181-post-card .wp-block-post-featured-image img,
    .polat-site-header-v8 .polat-menu-drawer {
        transition: none;
    }
}
