/* ==========================================================================
   ALAKIR GALLERY — Clean Gallery Section (v5)
   Replaces the old #gallery-section / .cards-wrapper completely.
   No GSAP, no pin, no overlays. Just a clean, professional editorial grid.
   ========================================================================== */

/* ---------- Override old broken styles for #gallery-section ---------- */
#gallery-section.ak-gallery {
    /* Reset everything from old custom-styles + post-34.css */
    margin-top: 100vh !important;       /* Keep this so logo splash stays full screen */
    min-height: auto !important;
    max-height: none !important;
    width: 100% !important;
    max-width: none !important;
    padding: 0 !important;
    height: auto !important;
    position: relative !important;
    z-index: 100 !important;
    display: block !important;
    overflow: visible !important;
    background: transparent !important;
}

/* Hide any leftover Elementor pin-spacer if it tries to render */
#gallery-section .pin-spacer,
#gallery-section .cards-wrapper {
    display: none !important;
}

/* ---------- Gallery Section Container ---------- */
.ak-gallery {
    --g-ink: #1a1a1a;
    --g-ink-soft: #4a4540;
    --g-mute: #8c857c;
    --g-line: rgba(26, 26, 26, 0.18);
    --g-accent: #c89274;
    --g-accent-deep: #8a4f2e;
    --g-paper: #fdfcf9;
    --g-display: "Roboto Slab", Georgia, serif;
    --g-sans: "Roboto", system-ui, sans-serif;
    --g-ease: cubic-bezier(0.65, 0.01, 0.05, 1);
    
    position: relative;
    direction: ltr;
    padding: 120px 40px 100px;
}

.ak-gallery__inner {
    max-width: 1320px;
    margin: 0 auto;
    position: relative;
}

/* ---------- Header (Eyebrow + Title + Lede) ---------- */
.ak-gallery__head {
    text-align: center;
    margin-bottom: 100px;
    position: relative;
    z-index: 2;
}

.ak-gallery__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 28px;
    direction: ltr;
}

.ak-gallery__eyebrow-line {
    width: 40px;
    height: 1px;
    background: var(--g-ink);
    opacity: 0.45;
}

.ak-gallery__eyebrow-text {
    font-family: var(--g-sans);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.42em;
    color: var(--g-ink);
    text-transform: uppercase;
}

.ak-gallery__title {
    font-family: var(--g-display);
    font-weight: 900;
    font-size: clamp(80px, 14vw, 220px);
    line-height: 0.85;
    letter-spacing: -0.04em;
    color: var(--g-ink);
    margin: 0;
    /* Subtle inked feel - no blur, no fancy filters */
}

.ak-gallery__lede {
    direction: rtl;
    margin: 28px auto 0;
    max-width: 480px;
    font-family: var(--g-display);
    font-size: 17px;
    line-height: 1.6;
    color: var(--g-ink-soft);
    font-weight: 400;
}

/* ---------- Gallery Grid ---------- */
.ak-gallery__grid {
    display: grid;
    grid-template-columns: 46fr 32fr 22fr;
    gap: 0 52px;
    align-items: start;
    margin-bottom: 80px;
}

/* Asymmetric hierarchy — size and vertical position, no rotation */
.ak-art--1 { margin-top: 80px; }
.ak-art--2 { margin-top: 0; }
.ak-art--3 { margin-top: 140px; }

/* ---------- Single Artwork ---------- */
.ak-art {
    margin: 0;
    transition: transform 0.6s var(--g-ease);
}

.ak-art__frame {
    position: relative;
    background: var(--g-paper);
    padding: 22px 22px 60px 22px;
    box-shadow:
        /* fine inner edge */
        0 0 0 1px rgba(0, 0, 0, 0.06),
        /* close shadow */
        0 4px 12px -2px rgba(0, 0, 0, 0.18),
        /* deeper cast */
        0 24px 40px -16px rgba(0, 0, 0, 0.32);
    transition: 
        box-shadow 0.5s var(--g-ease),
        transform 0.5s var(--g-ease);
    will-change: transform;
}

.ak-art__frame img {
    width: 100%;
    height: auto;
    display: block;
}

/* Tape detail on each frame */
.ak-art__tape {
    position: absolute;
    top: -9px;
    left: 50%;
    transform: translateX(-50%) rotate(-2deg);
    width: 76px;
    height: 18px;
    background: rgba(247, 244, 238, 0.88);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
    z-index: 3;
    pointer-events: none;
}

.ak-art--2 .ak-art__tape {
    transform: translateX(-50%) rotate(3deg);
    width: 90px;
    background: rgba(200, 146, 116, 0.55);
}

.ak-art--3 .ak-art__tape {
    transform: translateX(-50%) rotate(-4deg);
    width: 64px;
}

/* ---------- Caption (clean, beneath each piece) ---------- */
.ak-art__caption {
    margin-top: 28px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    direction: ltr;
    text-align: left;
    padding-left: 4px;
    border-left: 2px solid var(--g-accent);
    padding-left: 14px;
}

.ak-art__num {
    font-family: var(--g-sans);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.32em;
    color: var(--g-accent-deep);
    text-transform: uppercase;
}

.ak-art__title {
    font-family: var(--g-display);
    font-size: 19px;
    font-weight: 700;
    color: var(--g-ink);
    line-height: 1.2;
}

.ak-art__meta {
    font-family: var(--g-sans);
    font-size: 13px;
    color: var(--g-mute);
    letter-spacing: 0.04em;
}

/* ---------- Hover (desktop only) ---------- */
@media (hover: hover) and (pointer: fine) {
    .ak-art:hover {
        transform: translateY(-8px);
    }
    
    .ak-art:hover .ak-art__frame {
        box-shadow:
            0 0 0 1px rgba(0, 0, 0, 0.08),
            0 8px 18px -4px rgba(0, 0, 0, 0.22),
            0 36px 60px -20px rgba(0, 0, 0, 0.4);
    }
}

/* ---------- Footer (signature row) ---------- */
.ak-gallery__foot {
    display: flex;
    align-items: center;
    gap: 24px;
    padding-top: 32px;
    border-top: 1px solid var(--g-line);
    direction: ltr;
    font-family: var(--g-sans);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.32em;
    color: var(--g-ink-soft);
    text-transform: uppercase;
}

.ak-gallery__foot-line {
    flex: 1;
    height: 1px;
    background: var(--g-line);
}

/* ============================================
   RESPONSIVE
   ============================================ */

/* Tablet */
@media (max-width: 1024px) {
    .ak-gallery {
        padding: 100px 32px 80px;
    }
    
    .ak-gallery__head {
        margin-bottom: 70px;
    }
    
    .ak-gallery__grid {
        grid-template-columns: 57fr 43fr;
        gap: 0 36px;
    }

    /* Art 1: left column anchor, reset desktop push-down */
    .ak-art--1 { margin-top: 0; }

    /* Art 2: right column top, slightly inset and pushed down */
    .ak-art--2 {
        grid-column: 2;
        grid-row: 1;
        margin-top: 56px;
        max-width: 88%;
    }

    /* Art 3: right column below Art 2, narrower and inset to the end */
    .ak-art--3 {
        grid-column: 2;
        grid-row: 2;
        max-width: 75%;
        margin-top: 36px;
        margin-inline-start: auto;
    }
    
    .ak-art__frame {
        padding: 18px 18px 48px 18px;
    }
}

/* Mobile */
@media (max-width: 767px) {
    .ak-gallery {
        padding: 80px 20px 60px;
    }
    
    .ak-gallery__head {
        margin-bottom: 50px;
    }
    
    .ak-gallery__eyebrow {
        gap: 12px;
        margin-bottom: 20px;
    }
    
    .ak-gallery__eyebrow-line {
        width: 24px;
    }
    
    .ak-gallery__eyebrow-text {
        font-size: 9px;
        letter-spacing: 0.28em;
    }
    
    .ak-gallery__title {
        font-size: clamp(56px, 18vw, 100px);
    }
    
    .ak-gallery__lede {
        font-size: 15px;
        margin-top: 20px;
    }
    
    .ak-gallery__grid {
        grid-template-columns: 1fr;
        gap: 0;
        max-width: 380px;
        margin: 0 auto 60px;
    }

    /* Single column — size variation preserves hierarchy on mobile */
    .ak-art--1 { margin-top: 0;   max-width: 100%; grid-column: auto; grid-row: auto; }
    .ak-art--2 { margin-top: 44px; max-width: 80%;  margin-inline-start: auto;  grid-column: auto; grid-row: auto; }
    .ak-art--3 { margin-top: 40px; max-width: 66%;  margin-inline-start: 0;     grid-column: auto; grid-row: auto; }
    
    .ak-art__frame {
        padding: 14px 14px 40px 14px;
    }
    
    .ak-art__tape {
        width: 56px;
        height: 14px;
        top: -7px;
    }
    
    .ak-art--2 .ak-art__tape {
        width: 70px;
    }
    
    .ak-art--3 .ak-art__tape {
        width: 48px;
    }
    
    .ak-art__caption {
        margin-top: 20px;
    }
    
    .ak-art__title {
        font-size: 17px;
    }
    
    .ak-gallery__foot {
        gap: 16px;
        padding-top: 24px;
        font-size: 9px;
        letter-spacing: 0.24em;
    }
}

/* ---------- CTA Button — paste-up sticker style ---------- */

.ak-gallery__cta-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin: 56px 0 80px;
}

/* Wrapper carries the spray-paint halo so it can bleed outside the button
   without conflicting with overflow:hidden on the button itself */
.ak-gallery__cta-wrap {
    position: relative;
    display: inline-block;
}

.ak-gallery__cta-wrap::before {
    content: '';
    position: absolute;
    inset: -52px;
    background:
        radial-gradient(ellipse 55% 70% at 6%  50%, rgba(200, 146, 116, 0.32) 0%, transparent 68%),
        radial-gradient(ellipse 44% 58% at 94% 55%, rgba(46,  114, 143, 0.20) 0%, transparent 68%),
        radial-gradient(circle               at 50% 115%, rgba(200, 146, 116, 0.14) 0%, transparent 58%);
    opacity: 0;
    transition: opacity 0.80s ease;
    pointer-events: none;
    z-index: -1;
}

.ak-gallery__cta-wrap:hover::before { opacity: 1; }

.ak-gallery__cta {
    display: inline-flex;
    align-items: center;
    gap: 18px;
    padding: 20px 42px;
    border: 2px solid var(--g-ink);
    background: var(--g-paper);
    text-decoration: none;
    direction: ltr;
    position: relative;
    overflow: hidden;

    /* Terracotta offset shadow — the paste-up / sticker depth */
    box-shadow: 7px 7px 0 var(--g-accent);

    /* Editorial tilt: straightens with a bounce on hover */
    transform: rotate(-1.5deg);
    transition:
        transform   0.65s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow  0.50s cubic-bezier(0.65, 0.01, 0.05, 1);
}

/* Ink fill — wipes up from the bottom on hover */
.ak-gallery__cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--g-ink);
    transform: translateY(104%);
    transition: transform 0.52s cubic-bezier(0.65, 0.01, 0.05, 1);
    z-index: 0;
}

.ak-gallery__cta-wrap:hover .ak-gallery__cta {
    transform: rotate(0deg) translate(5px, 5px);
    box-shadow: 2px 2px 0 var(--g-accent);
}

.ak-gallery__cta-wrap:hover .ak-gallery__cta::before { transform: translateY(0); }

/* All inner spans sit above the fill layer */
.ak-gallery__cta-num,
.ak-gallery__cta-sep,
.ak-gallery__cta-label,
.ak-gallery__cta-arrow {
    position: relative;
    z-index: 1;
}

/* N° in the decorative display font — street art accent */
.ak-gallery__cta-num {
    font-family: var(--ak-display);
    font-size: 18px;
    color: var(--g-accent-deep);
    line-height: 1;
    transition: color 0.32s ease;
    white-space: nowrap;
}

/* Thin vertical rule between N° and label text */
.ak-gallery__cta-sep {
    width: 1px;
    height: 16px;
    background: var(--g-ink);
    opacity: 0.22;
    flex-shrink: 0;
    transition: background 0.32s ease, opacity 0.32s ease;
}

.ak-gallery__cta-label {
    font-family: var(--g-display);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.38em;
    text-transform: uppercase;
    color: var(--g-ink);
    line-height: 1;
    transition: color 0.32s ease;
    white-space: nowrap;
}

.ak-gallery__cta-arrow {
    font-size: 18px;
    color: var(--g-ink);
    line-height: 1;
    transition:
        color     0.32s ease,
        transform 0.55s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* On hover: all labels invert against the ink fill */
.ak-gallery__cta-wrap:hover .ak-gallery__cta-num   { color: rgba(253, 252, 249, 0.65); }
.ak-gallery__cta-wrap:hover .ak-gallery__cta-sep   { background: var(--g-paper); opacity: 0.30; }
.ak-gallery__cta-wrap:hover .ak-gallery__cta-label { color: var(--g-paper); }
.ak-gallery__cta-wrap:hover .ak-gallery__cta-arrow {
    color: var(--g-paper);
    transform: translate(4px, -4px);
}

/* Hebrew subtitle beneath the button */
.ak-gallery__cta-hint {
    font-family: var(--g-sans);
    font-size: 12px;
    letter-spacing: 0.18em;
    color: var(--g-mute);
    direction: rtl;
    margin: 0;
}

/* Responsive */
@media (max-width: 1024px) {
    .ak-gallery__cta-row { margin: 44px 0 60px; }
}

@media (max-width: 767px) {
    .ak-gallery__cta-row { margin: 36px 0 50px; }

    .ak-gallery__cta {
        padding: 16px 26px;
        gap: 12px;
        transform: rotate(-1deg);
    }

    .ak-gallery__cta-num   { font-size: 15px; }
    .ak-gallery__cta-label { font-size: 11px; letter-spacing: 0.26em; }
    .ak-gallery__cta-arrow { font-size: 15px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .ak-art,
    .ak-art__frame {
        transition: none !important;
    }
}
