/* ============================================================
   HAHeader – Frontend Styles  (v1.1)
   All selectors prefixed .hah-  — zero theme conflicts
   ============================================================ */

/* ── Reset ────────────────────────────────────────────────── */
.hah-header-wrap *,
.hah-header-wrap *::before,
.hah-header-wrap *::after { box-sizing: border-box; margin: 0; padding: 0; }

.hah-announcement-bar *,
.hah-announcement-bar *::before,
.hah-announcement-bar *::after { box-sizing: border-box; }

/* ── Announcement Bar ─────────────────────────────────────── */
.hah-announcement-bar {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    text-align: center;
    line-height: 1.5;
    font-weight: var(--hah-ann-font-weight, 400);
    /* border-bottom ile header nav'dan görsel ayrım */
    border-bottom: 1px solid rgba(255,255,255,.15);
}
.hah-announcement-text {
    flex: 1;
    text-align: center;
    padding-right: 40px; /* space for close btn */
}
.hah-announcement-link {
    display: inline;
    margin-left: 8px;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: opacity .2s;
}
.hah-announcement-link:hover { opacity: .75; }

.hah-announcement-close {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent !important;
    border: none;
    cursor: pointer;
    font-size: 15px;
    line-height: 1;
    padding: 4px 6px;
    opacity: .8;
    outline: none;
    box-shadow: none;
    -webkit-tap-highlight-color: transparent;
}
.hah-announcement-close:hover,
.hah-announcement-close:focus,
.hah-announcement-close:active {
    background: transparent !important;
    outline: none !important;
    box-shadow: none !important;
    opacity: 1;
}
.hah-announcement-bar.hah-ann-hidden { display: none !important; }

@media (max-width: 768px) {
    .hah-announcement-text {
        text-align: center;
        padding-right: 32px;
        padding-left: 32px;
    }
}

/* ── Wrapper ──────────────────────────────────────────────── */
.hah-header-wrap {
    position: relative;
    width: 100%;
    background: var(--hah-bg, #fff);
    font-family: var(--hah-font, inherit);
    color: var(--hah-text, #222);
    z-index: 9999;
    transition: box-shadow .3s ease, background .3s ease;
}
.hah-layout-full-edge .hah-inner {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* ── Placeholder ──────────────────────────────────────────── */
.hah-placeholder { display: none; }

/* ── Sticky ───────────────────────────────────────────────── */
.hah-sticky { position: fixed; top: 0; left: 0; right: 0; }
.hah-sticky.hah-scrolled {
    background: var(--hah-sticky-bg, #fff) !important;
    box-shadow: var(--hah-sticky-shadow, 0 2px 12px rgba(0,0,0,.1));
}

/* ── Inner ────────────────────────────────────────────────── */
.hah-inner {
    display: flex;
    align-items: center;
    padding-top:    var(--hah-pt, 16px);
    padding-bottom: var(--hah-pb, 16px);
    padding-left:   var(--hah-pl, 24px);
    padding-right:  var(--hah-pr, 24px);
    width: 100%;
    gap: 24px;
}

/* Alignment */
.hah-align-center .hah-nav { flex: 1; display: flex; justify-content: center; }
.hah-align-right  .hah-nav { flex: 1; display: flex; justify-content: flex-end; }
.hah-align-left   .hah-nav { flex: 1; display: flex; justify-content: flex-start; }
.hah-cta-group { margin-left: auto; }
.hah-align-right .hah-nav ~ .hah-cta-group { margin-left: 0; }

/* ── Logo ─────────────────────────────────────────────────── */
.hah-logo { flex-shrink: 0; }
.hah-logo__link {
    text-decoration: none;
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}
.hah-logo__text {
    font-size: var(--hah-logo-size, 24px);
    font-weight: var(--hah-logo-weight, 700);
    color: var(--hah-logo-color, #111);
    line-height: 1.1;
}
.hah-logo__slogan {
    font-size: var(--hah-slogan-size, 12px);
    color: var(--hah-slogan-color, #888);
    font-weight: var(--hah-slogan-weight, 400);
}
.hah-logo__img { display: block; height: auto; max-height: 56px; }

/* ── Nav ──────────────────────────────────────────────────── */
.hah-nav__list {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 4px;
}
.hah-nav__link {
    display: inline-block;
    padding: 6px 12px;
    font-size: var(--hah-nav-size, 15px);
    font-weight: var(--hah-nav-weight, 500);
    color: var(--hah-nav-color, #333);
    text-decoration: none;
    border-radius: 4px;
    transition: color .2s ease, background .2s ease;
}
.hah-nav__link:hover  { color: var(--hah-nav-hover, #0066cc); }
.hah-nav__link.hah-active { color: var(--hah-nav-active, #0066cc); }

/* ── CTA Group ────────────────────────────────────────────── */
.hah-cta-group { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

/* ── Buttons ──────────────────────────────────────────────── */
.hah-btn {
    display: inline-block;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    line-height: 1;
    text-align: center;
    font-size:   var(--hah-cta-font-size, 15px);
    font-weight: var(--hah-cta-font-weight, 600);
    min-width:   var(--hah-cta-min-width, 0);
    padding: var(--hah-cta-pad-v, 9px) var(--hah-cta-pad-h, 20px);
    transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.hah-btn--1 {
    background:    var(--hah-cta1-bg, transparent);
    color:         var(--hah-cta1-color, #0066cc);
    border:        var(--hah-cta1-bw, 1px) solid var(--hah-cta1-border, #0066cc);
    border-radius: var(--hah-cta1-br, 6px);
}
.hah-btn--1:hover {
    background:   var(--hah-cta1-hover-bg, #0066cc);
    color:        var(--hah-cta1-hover-col, #fff);
    border-color: var(--hah-cta1-hover-bdr, #0066cc);
}
.hah-btn--2 {
    background:    var(--hah-cta2-bg, #0066cc);
    color:         var(--hah-cta2-color, #fff);
    border:        var(--hah-cta2-bw, 1px) solid var(--hah-cta2-border, #0066cc);
    border-radius: var(--hah-cta2-br, 6px);
}
.hah-btn--2:hover {
    background:   var(--hah-cta2-hover-bg, #004ea8);
    color:        var(--hah-cta2-hover-col, #fff);
    border-color: var(--hah-cta2-hover-bdr, #004ea8);
}

/* ── Hamburger ────────────────────────────────────────────── */
.hah-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: var(--hah-ham-gap, 5px);
    background: transparent !important;
    border: none;
    cursor: pointer;
    padding: 6px;
    margin-left: auto;
    flex-shrink: 0;
    outline: none;
    box-shadow: none;
    -webkit-tap-highlight-color: transparent;
}
.hah-hamburger:hover,
.hah-hamburger:focus,
.hah-hamburger:active,
.hah-hamburger:focus-visible {
    background: transparent !important;
    outline: none !important;
    box-shadow: none !important;
}
.hah-ham-line {
    display: block;
    width:  var(--hah-ham-size, 24px);
    height: var(--hah-ham-lh, 2px);
    background: var(--hah-ham-color, #222);
    border-radius: 2px;
    transition: transform .3s ease, opacity .3s ease;
}
/* Hamburger → X animasyonu */
.hah-hamburger[aria-expanded="true"] .hah-ham-line:nth-child(1) {
    transform: translateY(calc(var(--hah-ham-gap, 5px) + var(--hah-ham-lh, 2px))) rotate(45deg);
}
.hah-hamburger[aria-expanded="true"] .hah-ham-line:nth-child(2) { opacity: 0; }
.hah-hamburger[aria-expanded="true"] .hah-ham-line:nth-child(3) {
    transform: translateY(calc(-1 * (var(--hah-ham-gap, 5px) + var(--hah-ham-lh, 2px)))) rotate(-45deg);
}

/* ── Drawer ───────────────────────────────────────────────── */
.hah-drawer {
    display: none;
    background: var(--hah-drawer-bg, #fff);
    width: 100%;
    padding: var(--hah-drawer-pad-v, 8px) 0;
    border-top: var(--hah-drawer-bdr-w, 1px) solid var(--hah-drawer-bdr-color, rgba(0,0,0,.08));
    animation: hahDrawerIn .22s ease;
}
.hah-drawer.hah-open { display: block; }

@keyframes hahDrawerIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.hah-drawer__list {
    list-style: none;
    padding: 0 var(--hah-drawer-pad-h, 16px);
    display: flex;
    flex-direction: column;
    gap: var(--hah-drawer-item-gap, 2px);
}
.hah-drawer__link {
    display: block;
    padding: var(--hah-drawer-lnk-pv, 10px) var(--hah-drawer-lnk-ph, 12px);
    font-size:   var(--hah-drawer-lnk-size, 15px);
    font-weight: var(--hah-drawer-lnk-wt, 500);
    color:       var(--hah-drawer-lnk-color, #333);
    text-decoration: none;
    border-radius: var(--hah-drawer-lnk-br, 4px);
    transition: color .2s ease, background .2s ease;
}
.hah-drawer__link:hover {
    color:      var(--hah-drawer-lnk-hover-col, #0066cc);
    background: var(--hah-drawer-lnk-hover-bg, rgba(0,102,204,.07));
}
.hah-drawer__link.hah-active { color: var(--hah-drawer-lnk-active, #0066cc); }

.hah-drawer__cta {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px 16px 12px;
    border-top: var(--hah-drawer-bdr-w, 1px) solid var(--hah-drawer-bdr-color, rgba(0,0,0,.08));
    margin-top: 8px;
}
.hah-drawer__cta .hah-btn {
    display: block;
    width: 100%;
    text-align: center;
    box-sizing: border-box;
    padding-top: 14px;
    padding-bottom: 14px;
    font-size: 16px;
    border-radius: var(--hah-cta1-br, 6px);
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 768px) {
    .hah-nav,
    .hah-cta-group { display: none !important; }
    .hah-hamburger { display: flex; }
}
