/**
 * KGallery Homepage Styles
 * Companion to front-page.php
 * Drop this file in your child theme root alongside front-page.php
 */

/* ── Reset & Base ────────────────────────────────────────────────────────── */
.kgallery-homepage * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.kgallery-homepage {
    /* Divi override: remove any body padding Divi adds */
    padding-top: 0 !important;
}

/* Hide Divi's default header and footer on this page */
.kgallery-homepage #main-header,
.kgallery-homepage #et-main-area > .container,
.kgallery-homepage #main-footer,
.kgallery-homepage .et_pb_section:first-child,
.kgallery-homepage #et-secondary-nav,
.kgallery-homepage .et_fixed_nav,
.kgallery-homepage #main-header-bar {
    display: none !important;
}

/* ── CSS Variables ───────────────────────────────────────────────────────── */
:root {
    --tq:                      #0097A7;
    --tq-light:                #E0F7FA;
    --tq-dark:                 #006064;
    --tq-mid:                  #00BCD4;

    /* Light mode colours (will add dark mode later if needed) */
    --color-background-primary:    #ffffff;
    --color-background-secondary:  #f7f7f7;
    --color-text-primary:          #111111;
    --color-text-secondary:        #777777;
    --color-border-tertiary:       #e5e5e5;

    --border-radius-sm:  4px;
    --border-radius-md:  8px;
    --border-radius-lg:  10px;
}

/* ── Accessibility ───────────────────────────────────────────────────────── */
.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
}

/* ── NAV ─────────────────────────────────────────────────────────────────── */
.nav {
    position: absolute;
    top: 0; left: 0; right: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 40px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.45) 0%, transparent 100%);
}

.nav-logo { display: flex; align-items: center; }
.nav-logo a { text-decoration: none; display: block; }

.nav-logo-img {
    height: 36px;
    width: auto;
    display: block;
    object-fit: contain;
}

@media (max-width: 768px) {
    .nav-logo-img { height: 28px; }
}

.nav-links {
    display: flex;
    gap: 28px;
    list-style: none;
}

.nav-links a {
    font-size: 11px;
    letter-spacing: 0.12em;
    color: rgba(255,255,255,0.82);
    text-decoration: none;
    text-transform: uppercase;
    transition: color 0.2s;
}
.nav-links a:hover { color: #fff; }

.nav-hamburger { display: none; }

.nav-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.nav-right a { text-decoration: none; position: relative; }

.nav-cta {
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 7px 18px;
    border: 0.5px solid rgba(255,255,255,0.55);
    color: #fff;
    background: transparent;
    cursor: pointer;
    border-radius: 2px;
    transition: background 0.2s;
}
.nav-cta:hover { background: rgba(255,255,255,0.12); }

/* Mobile Inquire button inside drawer */
.nav-mobile-inquire {
    margin-top: 16px;
    font-size: 13px !important;
    letter-spacing: 0.15em !important;
    padding: 12px 40px !important;
    border: 0.5px solid rgba(255,255,255,0.45) !important;
    border-radius: 2px;
    color: #fff !important;
    text-transform: uppercase;
    transition: background 0.2s;
}
.nav-mobile-inquire:hover { background: rgba(255,255,255,0.1) !important; }

.nav-icon {
    color: rgba(255,255,255,0.8);
    font-size: 18px;
    cursor: pointer;
    display: block;
}

.cart-count {
    position: absolute;
    top: -6px; right: -8px;
    background: var(--tq);
    color: #fff;
    font-size: 9px;
    width: 16px; height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

/* ── HERO SLIDER ─────────────────────────────────────────────────────────── */
.hero {
    position: relative;
    height: 100vh;
    min-height: 560px;
    overflow: hidden;
    background: #1a1a1a;
}

.slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.9s ease;
}
.slide.active { opacity: 1; }

.slide-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.slide-bg-gradient {
    width: 100%;
    height: 100%;
}

.slide-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to right,
        rgba(0,0,0,0.55) 0%,
        rgba(0,0,0,0.2) 50%,
        rgba(0,0,0,0.05) 100%
    );
}

.slide-gradient-bottom {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 40%;
    background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, transparent 100%);
}

.slide-content {
    position: absolute;
    bottom: 80px;
    left: 40px;
    max-width: 520px;
    z-index: 2;
}

.slide-tag {
    display: inline-block;
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--tq-mid);
    margin-bottom: 12px;
}

.slide-artist {
    font-size: 28px;
    font-weight: 500;
    color: #fff;
    margin-bottom: 10px;
    letter-spacing: 0.02em;
}

.slide-desc {
    font-size: 14px;
    color: rgba(255,255,255,0.72);
    line-height: 1.75;
    margin-bottom: 22px;
    max-width: 420px;
}

.slide-actions {
    display: flex;
    gap: 14px;
    align-items: center;
}

/* Buttons */
.btn-white {
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 10px 24px;
    background: #fff;
    color: #111;
    border: none;
    cursor: pointer;
    border-radius: 2px;
    text-decoration: none;
    display: inline-block;
    transition: background 0.2s;
}
.btn-white:hover { background: var(--tq-light); color: #111; }

.btn-ghost-white {
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 10px 24px;
    background: transparent;
    color: #fff;
    border: 0.5px solid rgba(255,255,255,0.45);
    cursor: pointer;
    border-radius: 2px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    transition: background 0.2s;
}
.btn-ghost-white:hover { background: rgba(255,255,255,0.1); color: #fff; }

/* Slide counter + dots */
.slide-counter {
    position: absolute;
    bottom: 88px;
    right: 40px;
    z-index: 2;
    text-align: right;
}

.counter-nums {
    font-size: 11px;
    color: rgba(255,255,255,0.5);
    letter-spacing: 0.1em;
    margin-bottom: 12px;
}
.counter-nums span { color: #fff; font-size: 13px; }

.dots {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-end;
}

.dot {
    width: 20px;
    height: 1.5px;
    background: rgba(255,255,255,0.3);
    cursor: pointer;
    transition: all 0.3s;
    border-radius: 1px;
}
.dot.active {
    width: 36px;
    background: var(--tq-mid);
}

/* Arrows */
.arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    background: rgba(255,255,255,0.1);
    border: 0.5px solid rgba(255,255,255,0.25);
    color: #fff;
    width: 40px; height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 50%;
    font-size: 18px;
    transition: background 0.2s;
}
.arrow:hover { background: rgba(255,255,255,0.2); }
.arrow-left  { left: 20px; }
.arrow-right { right: 20px; }

/* Now Showing badge */
.now-showing {
    position: absolute;
    top: 90px;
    right: 40px;
    z-index: 5;
    background: rgba(0,0,0,0.45);
    border: 0.5px solid rgba(255,255,255,0.15);
    border-left: 2px solid var(--tq);
    padding: 12px 16px;
    backdrop-filter: blur(8px);
    border-radius: 2px;
    min-width: 190px;
    display: block;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}
.now-showing:hover {
    border-color: rgba(255,255,255,0.35);
    background: rgba(0,0,0,0.6);
}
.now-showing:hover .now-showing-title { color: var(--tq-mid); }

.now-showing-label {
    font-size: 9px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--tq-mid);
    margin-bottom: 6px;
}

.now-showing-title {
    font-size: 13px;
    font-weight: 500;
    color: #fff;
    margin-bottom: 3px;
    transition: color 0.2s;
}

.now-showing-sub {
    font-size: 11px;
    color: rgba(255,255,255,0.5);
}

/* ── SECTIONS (shared) ───────────────────────────────────────────────────── */
.section { padding: 56px 40px; }

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 32px;
}

.section-title {
    font-size: 20px;
    font-weight: 500;
    color: var(--color-text-primary);
    letter-spacing: 0.02em;
}

.section-link {
    font-size: 11px;
    color: var(--tq);
    text-decoration: none;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: opacity 0.2s;
}
.section-link:hover { opacity: 0.75; }

/* ── ARTISTS STRIP ───────────────────────────────────────────────────────── */
.artists-strip {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
}

.artist-mini {
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    display: block;
}
.artist-mini:hover .artist-mini-img { border-color: var(--tq); }

.artist-mini-img {
    width: 72px; height: 72px;
    border-radius: 50%;
    background: var(--tq-light);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    border: 1.5px solid transparent;
    font-size: 16px;
    font-weight: 500;
    color: var(--tq-dark);
    letter-spacing: 0.04em;
    transition: border-color 0.15s;
    overflow: hidden;
}

.artist-mini-name {
    font-size: 12px;
    color: var(--color-text-primary);
    font-weight: 500;
    margin-bottom: 2px;
}

.artist-mini-tag {
    font-size: 10px;
    color: var(--tq);
    letter-spacing: 0.05em;
}

/* ── EXHIBITIONS ─────────────────────────────────────────────────────────── */
.exhibits-bg {
    background: var(--color-background-secondary);
    border-top: 0.5px solid var(--color-border-tertiary);
    border-bottom: 0.5px solid var(--color-border-tertiary);
}

.exhibits-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.exhibit-card {
    background: var(--color-background-primary);
    border: 0.5px solid var(--color-border-tertiary);
    border-radius: var(--border-radius-lg);
    padding: 22px 24px;
    display: flex;
    gap: 18px;
    cursor: pointer;
    text-decoration: none;
    transition: border-color 0.2s;
}
.exhibit-card:hover { border-color: var(--tq); }

.ex-date { text-align: center; min-width: 44px; }
.ex-day   { font-size: 26px; font-weight: 500; color: var(--tq); line-height: 1; }
.ex-month { font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--color-text-secondary); margin-top: 3px; }

.ex-info  { flex: 1; }

.ex-badge {
    display: inline-block;
    font-size: 10px;
    padding: 2px 10px;
    border-radius: 20px;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}
.badge-live { background: #E8F5E9; color: #1B5E20; }
.badge-past { background: var(--color-background-secondary); color: var(--color-text-secondary); }

.ex-title   { font-size: 16px; font-weight: 500; color: var(--color-text-primary); margin-bottom: 4px; }
.ex-artists { font-size: 14px; color: var(--color-text-secondary); }

/* ── ARTWORKS GRID ───────────────────────────────────────────────────────── */
.artworks-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.artwork-card {
    border: 0.5px solid var(--color-border-tertiary);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.2s;
}
.artwork-card:hover { border-color: var(--tq); }

.artwork-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: var(--color-background-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.artwork-img i { font-size: 40px; color: var(--color-text-secondary); opacity: 0.25; }

.artwork-info    { padding: 14px 16px; }
.artwork-medium  { font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--tq); margin-bottom: 5px; }
.artwork-title   { font-size: 14px; font-weight: 500; color: var(--color-text-primary); margin-bottom: 3px; }
.artwork-artist  { font-size: 12px; color: var(--color-text-secondary); margin-bottom: 12px; }
.artwork-footer  { display: flex; justify-content: space-between; align-items: center; }
.artwork-price   { font-size: 14px; font-weight: 500; color: var(--color-text-primary); }

/* WooCommerce price override to match design */
.artwork-price .woocommerce-Price-amount {
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text-primary);
    display: inline-flex !important;
    align-items: center !important;
    gap: 3px;
    line-height: 1;
}
.artwork-price .woocommerce-Price-currencySymbol {
    display: inline-flex;
    align-items: center;
    line-height: 1;
}

/* AED SVG symbol alignment fix — overrides Divi global translateY(8px) */
.kgallery-homepage .artwork-price .custom-dirham-symbol,
.kgallery-homepage .custom-dirham-symbol {
    width: 13px !important;
    height: 13px !important;
    display: inline-block !important;
    vertical-align: middle !important;
    transform: translateY(0) !important;
    margin: 0 !important;
    position: relative;
    top: 0 !important;
}

/* ── MOBILE HAMBURGER MENU ───────────────────────────────────────────────── */
.nav-hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 4px;
}
.nav-hamburger span {
    display: block;
    width: 22px;
    height: 1.5px;
    background: #fff;
    transition: all 0.3s;
    transform-origin: center;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Mobile nav drawer */
.nav-mobile {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.96);
    z-index: 200;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 28px;
}
.nav-mobile.open { display: flex; }

.nav-mobile a {
    font-size: 20px;
    letter-spacing: 0.15em;
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    text-transform: uppercase;
    transition: color 0.2s;
}
.nav-mobile a:hover { color: var(--tq-mid); }

.nav-mobile-close {
    position: absolute;
    top: 24px;
    right: 24px;
    background: none;
    border: none;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
}

.inquire-btn {
    font-size: 11px;
    padding: 5px 13px;
    border: 0.5px solid var(--tq);
    color: var(--tq);
    background: transparent;
    border-radius: var(--border-radius-md);
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s;
    display: inline-block;
}
.inquire-btn:hover { background: var(--tq-light); color: var(--tq-dark); }

/* ── FOOTER ──────────────────────────────────────────────────────────────── */
.footer {
    background: #0099a5;
    padding: 44px 40px 28px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 36px;
    margin-bottom: 36px;
}

.footer-brand   { font-size: 16px; font-weight: 600; letter-spacing: 0.2em; color: #fff; margin-bottom: 6px; }
.footer-tagline { font-family: Georgia, serif; font-style: italic; font-size: 12px; color: rgba(255,255,255,0.4); margin-bottom: 12px; }
.footer-desc    { font-size: 13px; color: rgba(255,255,255,0.45); line-height: 1.7; }
.footer-heading { font-size: 10px; text-transform: uppercase; letter-spacing: 0.15em; color: rgba(255,255,255,0.35); margin-bottom: 14px; }

.footer-links { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.footer-links a { font-size: 13px; color: rgba(255,255,255,0.55); text-decoration: none; transition: color 0.2s; }
.footer-links a:hover { color: #80DEEA; }

.footer-bottom {
    border-top: 0.5px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: rgba(255,255,255,0.25);
}

.footer-wa {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    color: rgba(255,255,255,0.55);
    margin-top: 16px;
    text-decoration: none;
    border: 0.5px solid rgba(255,255,255,0.15);
    padding: 6px 14px;
    border-radius: 20px;
    transition: color 0.2s, border-color 0.2s;
}
.footer-wa:hover { color: #80DEEA; border-color: #80DEEA; }

/* ── RESPONSIVE ──────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .artists-strip           { grid-template-columns: repeat(3, 1fr); }
    .footer-grid             { grid-template-columns: 1fr 1fr; }
    .artworks-grid           { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .nav { padding: 16px 20px; }
    .nav-links { display: none !important; }
    .nav-hamburger { display: flex !important; }
    .nav-cta-desktop { display: none !important; visibility: hidden !important; }
    .section { padding: 40px 20px; }
    .hero .slide-content { left: 20px; bottom: 60px; }
    .now-showing { display: none; }
    .artists-strip { grid-template-columns: repeat(3, 1fr); }
    .exhibits-grid { grid-template-columns: 1fr; }
    .artworks-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: 24px; }
    .footer { padding: 36px 20px 24px; }
    .slide-artist { font-size: 22px; }
    .slide-desc { display: none; }
}

@media (max-width: 480px) {
    .artists-strip { grid-template-columns: repeat(2, 1fr); }
    .slide-actions { flex-direction: column; align-items: flex-start; }
}