/* ============================================
   PIRANOT V4 - HEADER STYLES
   Based on UOL-like design
   ============================================ */

:root {
    --pira-blue: #0b3b8f;
    --pira-blue2: #0a2f73;
    --pira-accent: #ffd200;
    --pira-text: #111;
    --pira-muted: #666;
    --pira-border: #e8e8e8;
    --pira-bg: #f6f7f9;
    --pira-radius: 14px;
}

/* ============================================
   WRAPPER
   ============================================ */

.pira-wrap {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 14px;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial;
}

/* ============================================
   TOP SECTION
   ============================================ */

.pira-top {
    background: var(--pira-blue);
    color: #fff;
}

.pira-topbar {
    display: flex;
    gap: 20px;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    flex-wrap: wrap;
}

.pira-brand {
    display: flex;
    gap: 12px;
    align-items: center;
    text-decoration: none;
    color: #fff;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.pira-brand .logo {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 18px;
}

.pira-brand .name {
    font-weight: 800;
    letter-spacing: 0.2px;
    font-size: 16px;
}

.pira-brand img {
    max-width: 220px;
    height: auto;
    min-width: 140px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.pira-tools {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

/* ============================================
   SEARCH BAR (GLASS MORPHISM)
   ============================================ */

.pira-search-bar {
    flex: 1;
    max-width: 350px;
    min-width: 200px;
}

.pira-search-wrapper {
    display: flex;
    gap: 0;
    align-items: center;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 999px;
    padding: 10px 14px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.pira-search-wrapper:focus-within {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.35);
    box-shadow: 0 8px 24px rgba(11, 59, 143, 0.15);
}

.pira-search-input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    padding: 0;
    margin: 0;
    font-family: inherit;
}

.pira-search-input::placeholder {
    color: rgba(255, 255, 255, 0.8);
}

.pira-search-btn {
    background: none;
    border: none;
    outline: none;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.9);
    padding: 6px 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.pira-search-btn:hover {
    color: var(--pira-accent);
    transform: scale(1.1);
}

.pira-pill {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 10px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
    transition: all 0.25s ease;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.pira-pill:hover {
    background: var(--pira-accent);
    border-color: var(--pira-accent);
    color: var(--pira-blue);
    text-decoration: none;
    transform: translateY(-2px);
}

/* ============================================
   NAVIGATION
   ============================================ */

.pira-nav {
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    background: linear-gradient(0deg, var(--pira-blue2), var(--pira-blue));
}

.pira-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 2px;
    flex-wrap: wrap;
    align-items: center;
}

.pira-nav li {
    margin: 0;
}

.pira-nav a {
    display: inline-block;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    padding: 14px 16px;
    opacity: 0.9;
    transition: all 0.25s ease;
    border-radius: 4px;
    position: relative;
}

.pira-nav a:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.08);
    text-decoration: none;
}

.pira-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 14px;
    right: 14px;
    height: 2px;
    background: var(--pira-accent);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.pira-nav a:hover::after {
    opacity: 1;
}

.pira-search {
    margin-left: auto;
    display: flex;
    gap: 8px;
    align-items: center;
    flex-shrink: 0;
}

.pira-search form {
    display: flex;
    gap: 6px;
    align-items: center;
    width: auto;
}

.pira-search input {
    width: 100%;
    max-width: 280px;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    outline: none;
    font-size: 13px;
    transition: all 0.2s ease;
    font-weight: 500;
}

.pira-search input::placeholder {
    color: #fff;
    opacity: 0.7;
}

.pira-search input:focus {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.3);
}

.pira-search button {
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid #ffd200;
    background: #ffd200;
    color: var(--pira-blue);
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.pira-search button:hover {
    background: var(--pira-accent);
}

/* ============================================
   TRENDING TICKER
   ============================================ */

.pira-trending {
    background: linear-gradient(135deg, #05204a 0%, #072d6a 100%);
    color: #fff;
    border-top: 2px solid rgba(255, 210, 0, 0.2);
}

.pira-trending-row {
    display: flex;
    gap: 16px;
    align-items: center;
    padding: 14px 0;
    flex-wrap: wrap;
}

.pira-tag {
    background: var(--pira-accent);
    color: #111;
    font-weight: 900;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 12px;
    letter-spacing: 0.6px;
    flex-shrink: 0;
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(255, 210, 0, 0.15);
}

.pira-ticker {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    flex: 1;
}

.pira-ticker a {
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    opacity: 0.95;
    transition: opacity 0.2s ease;
    display: none;
    line-height: 1.4;
}

.pira-ticker a:first-child {
    display: inline;
}

.pira-ticker a:hover {
    opacity: 1;
    text-decoration: underline;
}

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

@media (max-width: 1024px) {
    .pira-topbar {
        gap: 12px;
    }

    .pira-brand img {
        max-width: 180px;
        min-width: 120px;
    }

    .pira-search-bar {
        max-width: 280px;
    }

    .pira-pill {
        padding: 9px 13px;
        font-size: 11px;
    }
}

@media (max-width: 768px) {
    .pira-topbar {
        gap: 10px;
        padding: 10px 0;
    }

    .pira-brand img {
        max-width: 150px;
        min-width: 100px;
    }

    .pira-search-bar {
        max-width: 200px;
        min-width: 160px;
        flex: 1;
    }

    .pira-search-wrapper {
        padding: 8px 12px;
    }

    .pira-search-input {
        font-size: 12px;
    }

    .pira-tools {
        gap: 8px;
    }

    .pira-pill {
        padding: 8px 12px;
        font-size: 11px;
    }

    .pira-nav a {
        font-size: 12px;
        padding: 12px 12px;
    }

    .pira-tag {
        padding: 6px 10px;
        font-size: 11px;
    }

    .pira-ticker a {
        font-size: 12px;
    }
}

@media (max-width: 520px) {
    .pira-topbar {
        gap: 8px;
        padding: 8px 0;
        flex-wrap: wrap;
    }

    .pira-brand {
        order: 1;
        flex-shrink: 0;
    }

    .pira-brand img {
        max-width: 120px;
        min-width: 90px;
    }

    .pira-search-bar {
        order: 2;
        max-width: 100%;
        min-width: 100%;
        flex: 1;
    }

    .pira-search-wrapper {
        padding: 8px 12px;
    }

    .pira-search-input {
        font-size: 12px;
    }

    .pira-tools {
        order: 3;
        width: 100%;
        gap: 6px;
        margin-top: 8px;
    }

    .pira-pill {
        flex: 1;
        text-align: center;
        padding: 8px 10px;
        font-size: 10px;
    }

    .pira-nav ul {
        gap: 6px;
    }

    .pira-nav a {
        font-size: 11px;
        padding: 10px 10px;
    }

    .pira-trending-row {
        gap: 10px;
        padding: 10px 0;
    }

    .pira-tag {
        padding: 6px 10px;
        font-size: 10px;
    }

    .pira-ticker a {
        font-size: 11px;
    }
}

    .pira-search input {
        padding: 6px 10px;
        font-size: 12px;
    }

    .pira-search button {
        padding: 6px 10px;
        font-size: 12px;
    }

    .pira-tag {
        padding: 4px 8px;
        font-size: 10px;
    }

    .pira-ticker {
        gap: 12px;
    }

    .pira-ticker a {
        font-size: 12px;
    }

    .pira-trending-row {
        padding: 8px 0;
    }
}

/* ============================================
   DEFAULT MENU FALLBACK
   ============================================ */

.pira-nav .menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.pira-nav .menu li {
    margin: 0;
}

.pira-nav .menu a {
    display: inline-block;
    color: #fff;
    text-decoration: none;
    font-weight: 650;
    font-size: 14px;
    padding: 12px 2px;
    opacity: 0.95;
    transition: all 0.2s ease;
}

.pira-nav .menu a:hover {
    opacity: 1;
    text-decoration: underline;
}
