/* ==================== HEADER — BRON Argentina ==================== */

:root {
    --h-height:   70px;
    --h-height-m: 60px;
    --h-bg:            rgba(14, 14, 14, 0.97);
    --h-shadow:        0 2px 24px rgba(0, 0, 0, 0.55);
    --h-red:           #feb422;
    --h-red-hover:     #d4940c;
    --h-red-alpha:     rgba(254, 180, 34, 0.1);
    --h-white:         #EDEAE4;
    --h-muted:         rgba(237, 234, 228, 0.45);
    --h-cta-text:      #0D0D0D;
    --h-border-color:  var(--h-red);
    --h-dropdown-bg:   #181818;
    --h-dropdown-border: rgba(255, 255, 255, 0.06);
    --h-dropdown-item-border: rgba(255, 255, 255, 0.04);
    --h-dropdown-text: rgba(237, 234, 228, 0.55);
}

/* ---- Grandes Obras — mismo header oscuro, acentos bordo ---- */
body.go-page {
    --h-red:          #660b0b;
    --h-red-hover:    #4d0808;
    --h-red-alpha:    rgba(102, 11, 11, 0.1);
    --h-border-color: #3a3a3a;
}

body { padding-top: var(--h-height); }
body.page-hero { padding-top: 0; }

@media (max-width: 960px) {
    body { padding-top: var(--h-height-m); }
    body.page-hero { padding-top: 0; }
}

/* ===================== DESKTOP BAR ===================== */

.h-bar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--h-height);
    display: flex;
    align-items: center;
    z-index: 1000;
    background: transparent;
    border-bottom: 2px solid transparent;
    transition: background 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

.h-bar.h-scrolled,
body:not(.page-hero) .h-bar {
    background: var(--h-bg);
    border-bottom-color: var(--h-border-color);
    box-shadow: var(--h-shadow);
}

.h-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 32px;
    gap: 16px;
}

.h-logo { flex-shrink: 0; }
.h-logo img {
    height: 50px;
    width: auto;
    display: block;
}

/* ---- Nav links ---- */
.h-nav {
    display: flex;
    align-items: stretch;
    height: var(--h-height);
    flex: 1;
    justify-content: flex-end;
}

.h-nav > a,
.h-dropdown > a {
    display: flex;
    align-items: center;
    color: var(--h-white);
    text-decoration: none;
    font-family: 'Outfit', sans-serif;
    font-size: 0.72rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0 13px;
    position: relative;
    white-space: nowrap;
    transition: color 0.2s;
}

.h-nav > a::after,
.h-dropdown > a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 13px;
    right: 13px;
    height: 2px;
    background: var(--h-red);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s ease;
}

.h-nav > a:hover::after,
.h-dropdown:hover > a::after {
    transform: scaleX(1);
}

/* Contact CTA in nav */
.h-nav > a.h-contact {
    background: var(--h-red);
    color: var(--h-cta-text);
    padding: 0 18px;
    margin-left: 8px;
    align-self: center;
    height: 36px;
    font-weight: 600;
}
.h-nav > a.h-contact::after { display: none; }
.h-nav > a.h-contact:hover { background: var(--h-red-hover); color: var(--h-cta-text); }

/* Admin / login button */
.h-nav > a.h-admin {
    color: var(--h-white);
    border: 1px solid var(--h-red);
    padding: 0 16px;
    margin-left: 8px;
    align-self: center;
    height: 36px;
    gap: 8px;
    font-weight: 600;
}
.h-nav > a.h-admin i { font-size: 0.85rem; }
.h-nav > a.h-admin::after { display: none; }
.h-nav > a.h-admin:hover { background: var(--h-red); color: var(--h-cta-text); }

/* ---- Grandes Obras dropdown ---- */
.h-dropdown {
    position: relative;
    display: flex;
    align-items: stretch;
}

.h-dropdown-panel {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--h-dropdown-bg);
    border: 1px solid var(--h-dropdown-border);
    border-top: 2px solid var(--h-red);
    min-width: 230px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
    z-index: 200;
}
.h-dropdown:hover .h-dropdown-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.h-dropdown-panel a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 18px;
    color: var(--h-dropdown-text);
    font-family: 'Outfit', sans-serif;
    font-size: 0.8rem;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0.01em;
    border-bottom: 1px solid var(--h-dropdown-item-border);
    transition: color 0.15s, background 0.15s;
    text-decoration: none;
    white-space: nowrap;
}
.h-dropdown-panel a::after { display: none !important; }
.h-dropdown-panel a:last-child { border-bottom: none; }
.h-dropdown-panel a:hover { color: var(--h-white); background: var(--h-red-alpha); }
.h-dropdown-panel a i { width: 16px; color: var(--h-red); opacity: 0.7; font-size: 0.85rem; }

/* ---- WhatsApp Button ---- */
.h-wa {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    background: #22c55e;
    color: #fff;
    text-decoration: none;
    padding: 0 18px;
    height: 40px;
    align-self: center;
    font-family: 'Outfit', sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border-radius: 0;
    transition: background 0.2s;
    white-space: nowrap;
}
.h-wa:hover { background: #16a34a; color: #fff; }
.h-wa i { font-size: 1rem; }

/* ===================== MOBILE HEADER ===================== */

.h-mobile {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--h-height-m);
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 1000;
    background: transparent;
    border-bottom: 2px solid transparent;
    transition: background 0.35s ease, border-color 0.35s ease;
}
.h-mobile.h-scrolled,
body:not(.page-hero) .h-mobile {
    background: var(--h-bg);
    border-bottom-color: var(--h-border-color);
    box-shadow: var(--h-shadow);
}
.h-mobile-logo img { height: 38px; width: auto; display: block; }
.h-mobile-right { display: flex; align-items: center; gap: 12px; }

.h-mobile-wa {
    width: 36px; height: 36px;
    background: #22c55e;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.1rem;
    text-decoration: none;
    flex-shrink: 0;
}

/* Hamburger */
.h-burger {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 1001;
}
.h-burger span {
    display: block;
    width: 24px;
    height: 1.5px;
    background: var(--h-white);
    transition: transform 0.3s ease, opacity 0.2s ease;
}
.h-burger.open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.h-burger.open span:nth-child(2) { opacity: 0; }
.h-burger.open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ---- Slide-in panel from right ---- */
.h-panel {
    position: fixed;
    top: 0; right: -100%; bottom: 0;
    width: min(82vw, 340px);
    background: #0e0e0e;
    border-left: 3px solid var(--h-red);
    z-index: 999;
    transition: right 0.38s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    padding-top: var(--h-height-m);
    overflow-y: auto;
}
.h-panel.open { right: 0; }

.h-panel-nav {
    list-style: none;
    padding: 12px 0 0;
    margin: 0;
}
.h-panel-nav li > a {
    display: block;
    padding: 16px 28px;
    color: var(--h-white);
    text-decoration: none;
    font-family: 'Outfit', sans-serif;
    font-size: 0.82rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: color 0.15s, background 0.15s, padding-left 0.2s;
}
.h-panel-nav li > a:hover {
    color: var(--h-red);
    background: rgba(200, 41, 31, 0.06);
    padding-left: 34px;
}

.h-panel-sub {
    list-style: none;
    padding: 0;
    margin: 0;
    background: rgba(255, 255, 255, 0.02);
}
.h-panel-sub li > a {
    display: block;
    padding: 11px 28px 11px 38px;
    color: var(--h-muted);
    text-decoration: none;
    font-family: 'Outfit', sans-serif;
    font-size: 0.76rem;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0.03em;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    transition: color 0.15s;
}
.h-panel-sub li > a:hover { color: var(--h-red); }

.h-panel-footer {
    margin-top: auto;
    padding: 20px 24px 28px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.h-panel-wa {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #22c55e;
    color: #fff;
    text-decoration: none;
    padding: 13px 20px;
    font-family: 'Outfit', sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    margin-bottom: 14px;
    transition: background 0.2s;
}
.h-panel-wa:hover { background: #16a34a; color: #fff; }
.h-panel-wa i { font-size: 1.05rem; }

.h-panel-admin {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--h-white);
    border: 1px solid var(--h-red);
    text-decoration: none;
    padding: 12px 20px;
    font-family: 'Outfit', sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: background 0.15s, color 0.15s;
}
.h-panel-admin i { font-size: 0.95rem; }
.h-panel-admin:hover { background: var(--h-red); color: var(--h-cta-text); }

/* Overlay */
.h-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}
.h-overlay.open { opacity: 1; visibility: visible; }

/* ---- Responsive ---- */
@media (max-width: 960px) {
    .h-bar { display: none; }
    .h-mobile { display: flex; }
}
@media (min-width: 961px) {
    .h-panel, .h-overlay { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
    .h-bar, .h-mobile, .h-panel, .h-overlay,
    .h-nav > a::after, .h-dropdown > a::after { transition: none; }
}
