/* ==========================================================================
   Monks Logistics — WordPress / Elementor integration
   The ANAZ component styles (base.css, header.css, footer.css) are copied
   unchanged from html/css/. This file only adapts them to WordPress markup.
   It loads before header.css/footer.css, so rules overriding a component
   property use a doubled class selector to win.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Header location
   In WordPress the header sits inside wrapper elements (Elementor container /
   widget), so the sticky behaviour moves to the outermost location wrapper,
   whose containing block is <body>.
   -------------------------------------------------------------------------- */
.ml-location--header {
    position: sticky;
    top: var(--wp-admin--admin-bar--height, 0px);
    z-index: 100;
}

/* WordPress' admin bar stops being fixed at 600px and below */
@media (max-width: 600px) {
    .ml-location--header {
        top: 0;
    }
}

/* Logged-in admin bar sits above the drawer; start the drawer below it */
.admin-bar .nav-drawer {
    top: var(--wp-admin--admin-bar--height, 0px);
}

@media (max-width: 600px) {
    .admin-bar .nav-drawer {
        top: 0;
    }
}

/* Elementor resets `.elementor a { box-shadow: none }` (0,1,1), which would
   remove the ANAZ button shadows. Restore them, keeping keyboard focus rings. */
.elementor .site-header__cta {
    box-shadow: var(--anaz-shadow-soft);
}

.elementor .site-header__cta:hover {
    box-shadow: 0 14px 30px rgba(11, 45, 73, 0.22);
}

.elementor .nav-drawer__cta {
    box-shadow: var(--anaz-shadow-orange);
}

.elementor .site-header__cta:focus-visible {
    box-shadow: var(--anaz-focus);
}

.elementor .nav-drawer__cta:focus-visible {
    box-shadow: 0 0 0 2px var(--anaz-navy), 0 0 0 4px var(--anaz-orange-light);
}

/* Mobile logo swap uses <picture>; keep it a block like the <img> it wraps */
.ml-logo-picture {
    display: block;
}

/* Uploaded logos keep their proportions but never outgrow the header bar
   (the default ANAZ logo never reaches this limit at any breakpoint). */
.site-header__logo {
    max-height: calc(var(--anaz-header-h) - 16px);
    object-fit: contain;
    object-position: left center;
}

/* CTA icon on the left (Elementor "Icon Position: Before") */
.site-header__cta.site-header__cta--icon-before,
.nav-drawer__cta.nav-drawer__cta--icon-before {
    flex-direction: row-reverse;
    padding: 0 24px 0 7px;
}

@media (max-width: 767px) {
    .site-header__cta.site-header__cta--icon-before {
        padding: 0 18px 0 7px;
    }
}

.site-header__cta--icon-before:hover .site-header__cta-icon,
.nav-drawer__cta--icon-before:hover .nav-drawer__cta-icon {
    transform: translateX(-4px);
}

/* Custom icons from Elementor's icon library */
.site-header__cta-icon i,
.nav-drawer__cta-icon i,
.nav-drawer__social i,
.site-footer__social-link i {
    font-size: 18px;
    line-height: 1;
}

.site-header__cta-icon svg:not([width]),
.nav-drawer__cta-icon svg:not([width]),
.nav-drawer__social svg:not([width]),
.site-footer__social-link svg:not([width]) {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* --------------------------------------------------------------------------
   Elementor editor helpers
   -------------------------------------------------------------------------- */

/* "Show drawer in editor": render the drawer in the page flow, not fixed */
.nav-drawer.nav-drawer--preview {
    position: relative;
    inset: auto;
    z-index: auto;
}

.nav-drawer--preview .nav-drawer__overlay {
    display: none;
}

.nav-drawer--preview .nav-drawer__panel {
    position: relative;
    margin-left: auto;
    min-height: 640px;
}

.ml-editor-notice {
    margin: 0;
    padding: 10px 14px;
    border: 1px dashed currentColor;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.4;
    opacity: 0.8;
}

/* --------------------------------------------------------------------------
   Classic (non-Elementor) content templates
   -------------------------------------------------------------------------- */
.ml-container {
    width: 100%;
    max-width: calc(var(--anaz-container) + 2 * var(--anaz-gutter));
    margin: 0 auto;
    padding: 0 var(--anaz-gutter);
}

.ml-content {
    padding-top: clamp(40px, 6vw, 88px);
    padding-bottom: clamp(48px, 7vw, 104px);
}

.ml-page-title {
    margin: 0 0 24px;
    color: var(--anaz-navy);
    font-size: clamp(30px, 4vw, 48px);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.01em;
}

.ml-entry {
    max-width: 820px;
    font-size: 17px;
    line-height: 1.7;
}

.ml-entry a {
    color: var(--anaz-orange-dark);
}

.ml-entry img {
    height: auto;
}

.ml-entry__media {
    margin-bottom: 32px;
}

.ml-entry__media img {
    width: 100%;
    height: auto;
    border-radius: 18px;
}

.ml-post-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
    gap: 32px;
}

.ml-post-card__media img {
    width: 100%;
    height: auto;
    border-radius: 16px;
}

.ml-post-card__title {
    margin: 16px 0 6px;
    font-size: 22px;
    line-height: 1.3;
}

.ml-post-card__title a {
    color: var(--anaz-navy);
    text-decoration: none;
}

.ml-post-card__title a:hover {
    color: var(--anaz-orange-dark);
}

.ml-post-card__meta {
    margin: 0 0 12px;
    color: var(--anaz-muted);
    font-size: 14px;
}

.ml-button {
    display: inline-flex;
    align-items: center;
    min-height: 48px;
    padding: 0 24px;
    border-radius: var(--anaz-radius-button);
    background: var(--anaz-navy);
    color: var(--anaz-white);
    font-weight: 700;
    text-decoration: none;
}

.ml-button:hover {
    background: var(--anaz-navy-dark);
}

.ml-content a:focus-visible,
.ml-button:focus-visible {
    outline: none;
    box-shadow: var(--anaz-focus);
}

/* WordPress core alignment / caption classes */
.alignleft {
    float: left;
    margin: 0 24px 16px 0;
}

.alignright {
    float: right;
    margin: 0 0 16px 24px;
}

.aligncenter {
    margin-left: auto;
    margin-right: auto;
}

.wp-caption-text {
    color: var(--anaz-muted);
    font-size: 14px;
}

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