/* =============================================
   CityGrip Custom Header CSS
   All classes prefixed with cg- to avoid conflicts
   ============================================= */

/* Hide theme's default header */
#masthead, .site-header, .ast-header, #astra-header, 
.main-navigation, .site-branding, header.site-header,
.generate-navigation, #site-navigation { 
    display: none !important; 
}

/* Variables */
:root {
    --cg-navy: #0a0e1a;
    --cg-gold: #f5a623;
    --cg-gold-dark: #d4891c;
    --cg-white: #ffffff;
    --cg-off-white: #faf8f5;
    --cg-text-dark: #1a1a1a;
    --cg-text-mid: #4a4a4a;
    --cg-text-light: #6b7280;
}

/* ===== TOPBAR ===== */
.cg-topbar {
    background: linear-gradient(90deg, var(--cg-navy) 0%, #0f1629 50%, var(--cg-navy) 100%);
    color: rgba(255,255,255,.8);
    font-family: 'DM Sans', system-ui, sans-serif;
    font-size: .78rem;
    padding: 8px 0;
    letter-spacing: .3px;
    border-bottom: 1px solid rgba(245,166,35,.08);
}
.cg-container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px;
}
.cg-topbar .cg-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.cg-topbar-l {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}
.cg-topbar-l a {
    color: rgba(255,255,255,.8);
    text-decoration: none;
}
.cg-topbar-l a:hover {
    color: var(--cg-gold);
}
.cg-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: #10b981;
    border-radius: 50%;
    animation: cgDot 2s infinite;
}
@keyframes cgDot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: .5; transform: scale(1.4); }
}
.cg-topbar-r {
    display: flex;
    gap: 14px;
    align-items: center;
}
.cg-topbar-r a {
    color: rgba(255,255,255,.8);
    text-decoration: none;
}
.cg-topbar-r a:hover {
    color: var(--cg-gold);
}

/* ===== HEADER ===== */
.cg-header {
    background: #0a0e1a;
    border-bottom: 1px solid rgba(245,166,35,.08);
    position: sticky;
    top: 0;
    z-index: 900;
    font-family: 'DM Sans', system-ui, sans-serif;
}
.cg-header .cg-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
}

/* Logo */
.cg-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    flex-shrink: 0;
}
.cg-logo-placeholder {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: var(--cg-navy);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--cg-gold);
    font-weight: 800;
    font-size: 1rem;
}
.cg-logo-img {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    object-fit: contain;
}
.cg-brand {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.15rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
}
.cg-sub {
    font-size: .6rem;
    color: rgba(255,255,255,.5);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 600;
}

/* Desktop Nav - HIDDEN by default (mobile-first) */
.cg-nav {
    display: none;
    align-items: center;
    gap: 22px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.cg-nav a {
    font-size: .85rem;
    font-weight: 600;
    color: rgba(255,255,255,.75);
    text-decoration: none;
}
.cg-nav a:hover {
    color: var(--cg-gold);
}

/* Dropdown */
.cg-dropdown {
    position: relative;
}
.cg-dd-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: -12px;
    background: #fff;
    border: 1px solid rgba(0,0,0,.06);
    border-radius: 12px;
    padding: 8px 0;
    min-width: 240px;
    box-shadow: 0 8px 30px rgba(0,0,0,.1);
    z-index: 100;
}
.cg-dropdown:hover .cg-dd-menu {
    display: block;
}
.cg-dd-menu a {
    display: block;
    padding: 8px 18px;
    font-size: .82rem;
    color: var(--cg-text-dark);
}
.cg-dd-menu a:hover {
    background: var(--cg-off-white);
}

/* CTA buttons - HIDDEN by default (mobile-first) */
.cg-cta {
    display: none;
    align-items: center;
    gap: 8px;
}
.cg-btn-call {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--cg-gold);
    color: var(--cg-navy);
    padding: 9px 18px;
    border-radius: 50px;
    font-weight: 700;
    font-size: .85rem;
    text-decoration: none;
    white-space: nowrap;
    font-family: 'DM Sans', system-ui, sans-serif;
}
.cg-btn-call:hover {
    background: var(--cg-gold-dark);
    color: var(--cg-navy);
}
.cg-btn-wa {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: #25D366;
    border-radius: 50%;
    color: #fff;
    font-size: 1rem;
    text-decoration: none;
}

/* Hamburger - VISIBLE by default (mobile-first) */
.cg-hamburger {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}
.cg-ham-lines {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 22px;
}
.cg-ham-lines span {
    display: block;
    height: 2px;
    background: #fff;
    border-radius: 1px;
    transition: all .3s;
}

/* Desktop breakpoint - show nav/CTA, hide hamburger */
@media (min-width: 769px) {
    .cg-nav { display: flex; }
    .cg-cta { display: flex; }
    .cg-hamburger { display: none; }
}

/* Hide topbar on very small screens */
@media (max-width: 480px) {
    .cg-topbar { display: none; }
}

/* ===== MOBILE SIDEBAR ===== */
.cg-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.4);
    z-index: 950;
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s, visibility .3s;
}
.cg-overlay.open {
    opacity: 1;
    visibility: visible;
}
.cg-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 75%;
    max-width: 320px;
    height: 100%;
    background: #fff;
    z-index: 960;
    transform: translateX(100%);
    transition: transform .3s ease;
    overflow-y: auto;
    font-family: 'DM Sans', system-ui, sans-serif;
}
.cg-sidebar.open {
    transform: translateX(0);
}
.cg-sidebar-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    border-bottom: 1px solid #eee;
}
.cg-close {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 28px;
    font-weight: 300;
    color: var(--cg-navy);
    background: none;
    border: none;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

/* Mobile nav links */
.cg-mob-nav > a {
    display: block;
    padding: 15px 24px;
    font-size: 1rem;
    font-weight: 500;
    color: var(--cg-text-dark);
    border-bottom: 1px solid #f0f0f0;
    text-decoration: none;
}
.cg-mob-nav > a:hover {
    background: var(--cg-off-white);
    color: var(--cg-gold-dark);
}
.cg-mob-sub {
    background: #faf8f5;
}
.cg-mob-sub a {
    display: block;
    padding: 11px 24px 11px 40px;
    font-size: .88rem;
    font-weight: 500;
    color: var(--cg-text-mid);
    border-bottom: 1px solid #f5f5f5;
    text-decoration: none;
}
.cg-mob-sub a:hover {
    color: var(--cg-gold-dark);
    background: #f0ece5;
}

/* Mobile action buttons */
.cg-mob-actions {
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    border-top: 1px solid #eee;
}
.cg-mob-actions a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px;
    border-radius: 12px;
    font-weight: 700;
    font-size: .93rem;
    text-align: center;
    text-decoration: none;
}
.cg-mob-call {
    background: var(--cg-gold);
    color: var(--cg-navy);
}
.cg-mob-wa {
    background: #25D366;
    color: #fff;
}


/* Hide page title on homepage */
body.home .entry-title,
body.home .page-title,
body.home .entry-header,
body.page-template-default.home .entry-title,
.home .ast-archive-description,
.home .page-header,
body.home h1.entry-title,
body.home header.entry-header {
    display: none !important;
}

/* Make a Claim button */
.cg-btn-claim {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #ef4444;
    color: #fff;
    padding: 9px 18px;
    border-radius: 50px;
    font-weight: 700;
    font-size: .85rem;
    text-decoration: none;
    white-space: nowrap;
    font-family: 'DM Sans', system-ui, sans-serif;
    transition: all .2s;
    animation: claimPulse 3s infinite;
}
.cg-btn-claim:hover {
    background: #dc2626;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239,68,68,.3);
}
@keyframes claimPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,.3); }
    50% { box-shadow: 0 0 0 6px rgba(239,68,68,0); }
}

/* Remove theme content wrapper padding/gap on homepage */
body.home .site-content,
body.home .ast-container,
body.home .container,
body.home #primary,
body.home #content,
body.home .content-area,
body.home .site-main,
body.home .entry-content,
body.home .page-content,
body.home .post-content,
body.home article,
body.home .ast-article-single,
body.home .generate-columns-container {
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
}
body.home .site-content .ast-container,
body.home #page > .site-content {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}
