/* Public pages styled to match dashboard/recruitment look */

:root {
    --pp-bg: #0f172a;
    --pp-bg-alt: #111c34;
    --pp-surface: rgba(255, 255, 255, 0.03);
    --pp-surface-strong: rgba(255, 255, 255, 0.06);
    --pp-border: rgba(255, 255, 255, 0.08);
    --pp-text: #f1f5f9;
    --pp-muted: #94a3b8;
    --pp-primary: #ffaa00;
    --pp-secondary: #55ffff;
    --pp-success: #22c55e;
    --pp-danger: #ef4444;
}

body.panel-public {
    font-family: 'Roboto', 'Segoe UI', Arial, sans-serif;
    background:
        radial-gradient(circle at 20% 20%, rgba(255, 170, 0, 0.08), transparent 35%),
        radial-gradient(circle at 80% 0%, rgba(85, 255, 255, 0.06), transparent 30%),
        var(--pp-bg);
    color: var(--pp-text);
}

.page-preloader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: radial-gradient(circle at 50% 30%, rgba(85, 255, 255, 0.1), rgba(15, 23, 42, 0.98));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 14px;
    transition: opacity 0.35s ease;
}

.preloader-brand {
    font-family: 'Press Start 2P', monospace;
    letter-spacing: 1px;
    font-size: clamp(0.9rem, 2.5vw, 1.2rem);
    color: #e2e8f0;
    text-shadow: 0 0 16px rgba(255, 170, 0, 0.35);
}

.preloader-cube-stack {
    display: flex;
    align-items: center;
    gap: 10px;
    perspective: 800px;
}

.page-preloader.hidden {
    opacity: 0;
    pointer-events: none;
}

.preloader-cube {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    animation: cubeFloat 1.25s ease-in-out infinite;
    box-shadow: inset 0 -8px 0 rgba(0, 0, 0, 0.2), 0 8px 20px rgba(0, 0, 0, 0.35);
}

.cube-grass {
    background: linear-gradient(180deg, #4f9c44 0 30%, #8b5a2b 30% 100%);
}

.cube-diamond {
    background: linear-gradient(135deg, #25d6ff, #3b82f6);
    animation-delay: 0.14s;
}

.cube-obsidian {
    background: linear-gradient(135deg, #433862, #1a1427);
    animation-delay: 0.28s;
}

.preloader-text {
    color: var(--pp-muted);
    font-size: 0.9rem;
}

.preloader-progress {
    width: min(360px, 70vw);
    height: 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(15, 23, 42, 0.8);
    overflow: hidden;
}

.preloader-progress span {
    display: block;
    height: 100%;
    width: 35%;
    background: linear-gradient(90deg, #ffbe33, #55ffff);
    border-radius: inherit;
    animation: loaderSweep 1.2s ease-in-out infinite;
}

@keyframes spinCube {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes cubeFloat {
    0%, 100% { transform: translateY(0) rotateX(0deg); }
    50% { transform: translateY(-6px) rotateX(12deg); }
}

@keyframes loaderSweep {
    0% { transform: translateX(-140%); }
    100% { transform: translateX(360%); }
}

.site-shell-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    background: rgba(15, 23, 42, 0.9);
    border-bottom: 1px solid var(--pp-border);
}

.site-shell-nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.site-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--pp-text);
    font-weight: 700;
}

.site-brand-name {
    font-family: 'Press Start 2P', monospace;
    font-size: 0.85rem;
    background: linear-gradient(90deg, var(--pp-primary), var(--pp-secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.site-menu {
    display: flex;
    list-style: none;
    gap: 6px;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}

.site-link {
    color: var(--pp-muted);
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.site-link:hover,
.site-link.active {
    color: var(--pp-primary);
    background: rgba(255, 170, 0, 0.12);
}

.site-auth {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pp-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    border: 1px solid var(--pp-border);
    padding: 10px 14px;
    border-radius: 10px;
    color: var(--pp-text);
    background: var(--pp-surface);
    transition: all 0.2s ease;
    font-weight: 600;
}

.pp-btn:hover {
    transform: translateY(-1px);
}

.pp-btn-primary {
    background: linear-gradient(135deg, #ffbe33, #ff9f1a);
    color: #0f172a;
    border-color: rgba(255, 170, 0, 0.5);
}

.pp-btn-outline:hover {
    border-color: var(--pp-secondary);
    color: var(--pp-secondary);
}

.site-shell-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 28px 20px 60px;
}

.public-hero {
    background: linear-gradient(135deg, rgba(255, 170, 0, 0.12), rgba(85, 255, 255, 0.1));
    border: 1px solid rgba(255, 170, 0, 0.25);
    border-radius: 16px;
    padding: 34px;
    margin-bottom: 26px;
    animation: fadeUp 0.55s ease both;
}

.public-hero h1 {
    margin: 0 0 8px;
    color: var(--pp-text);
    font-size: clamp(1.5rem, 4vw, 2.3rem);
}

.public-hero p {
    margin: 0;
    color: var(--pp-muted);
    font-size: 1.05rem;
}

.public-hero-actions {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.public-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.panel-card {
    background: var(--pp-surface);
    border: 1px solid var(--pp-border);
    border-radius: 14px;
    padding: 20px;
    animation: fadeUp 0.5s ease both;
}

.public-grid .panel-card:nth-child(1) { animation-delay: 0.05s; }
.public-grid .panel-card:nth-child(2) { animation-delay: 0.1s; }
.public-grid .panel-card:nth-child(3) { animation-delay: 0.15s; }
.public-grid .panel-card:nth-child(4) { animation-delay: 0.2s; }

.reveal-item {
    opacity: 0;
    transform: translateY(18px) scale(0.99);
    transition: opacity 0.45s ease, transform 0.45s ease;
    transition-delay: var(--reveal-delay, 0ms);
}

.reveal-item.revealed {
    opacity: 1;
    transform: translateY(0) scale(1);
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.panel-card h3 {
    margin: 0 0 10px;
    font-size: 1.05rem;
    color: var(--pp-text);
}

.panel-card p {
    margin: 0;
    color: var(--pp-muted);
}

.panel-card ul {
    margin: 12px 0 0;
    padding-left: 18px;
    color: var(--pp-muted);
}

.section-title-public {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 28px 0 16px;
    font-size: 1.2rem;
}

.info-list {
    display: grid;
    gap: 10px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--pp-border);
    border-radius: 10px;
    padding: 12px 14px;
}

.info-item strong {
    color: var(--pp-text);
}

.info-item span {
    color: var(--pp-muted);
}

.price {
    color: var(--pp-primary);
    font-weight: 700;
    font-size: 1.1rem;
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
}

.badge-open {
    background: rgba(34, 197, 94, 0.15);
    color: #86efac;
}

.badge-closed {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
}

.kpi-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
}

.kpi {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--pp-border);
    border-radius: 10px;
    padding: 14px;
    text-align: center;
}

.kpi .value {
    font-size: 1.2rem;
    color: var(--pp-secondary);
    font-weight: 700;
}

.kpi .label {
    font-size: 0.8rem;
    color: var(--pp-muted);
}

.site-shell-footer {
    margin-top: 30px;
    border-top: 1px solid var(--pp-border);
    background: rgba(15, 23, 42, 0.6);
}

.site-shell-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 28px 20px;
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 20px;
}

.site-shell-footer h4 {
    margin: 0 0 12px;
    color: var(--pp-text);
}

.site-shell-footer p,
.site-shell-footer a {
    margin: 0;
    color: var(--pp-muted);
    text-decoration: none;
    font-size: 0.92rem;
}

.site-shell-footer a:hover {
    color: var(--pp-primary);
}

.footer-links-public {
    display: grid;
    gap: 8px;
}

.site-shell-footer-bottom {
    border-top: 1px solid var(--pp-border);
    text-align: center;
    padding: 14px 20px;
    color: var(--pp-muted);
    font-size: 0.85rem;
}

/* === Mobile Hamburger Toggle Button === */
.site-nav-toggle {
    display: none;
    background: none;
    border: 1px solid var(--pp-border);
    color: var(--pp-text);
    font-size: 1.1rem;
    padding: 7px 11px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
    flex-shrink: 0;
    line-height: 1;
}

.site-nav-toggle:hover {
    border-color: var(--pp-primary);
    color: var(--pp-primary);
    background: rgba(255, 170, 0, 0.08);
}

/* Tablet layout — keep horizontal but wrap */
@media (max-width: 920px) {
    .site-shell-nav-inner {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
    }

    .site-menu {
        justify-content: center;
        flex-wrap: wrap;
    }

    .site-auth {
        justify-content: center;
    }

    .site-shell-footer-inner {
        grid-template-columns: 1fr;
    }

    .public-hero {
        padding: 24px;
    }
}

/* Mobile — hamburger menu (≤ 640px) */
@media (max-width: 640px) {
    .site-shell-nav {
        position: sticky;
        top: 0;
    }

    .site-shell-nav-inner {
        flex-direction: row;
        align-items: center;
        flex-wrap: wrap;
        padding: 10px 14px;
        gap: 0;
    }

    .site-nav-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        margin-left: auto;
    }

    /* Collapse menu & auth by default */
    .site-menu {
        display: none;
        width: 100%;
        flex-direction: column;
        margin: 8px 0 0;
        padding: 4px 0 8px;
        border-top: 1px solid var(--pp-border);
        gap: 0;
    }

    .site-menu.open {
        display: flex;
    }

    .site-link {
        padding: 11px 4px;
        font-size: 0.92rem;
        border-radius: 6px;
    }

    .site-auth {
        display: none;
        width: 100%;
        flex-direction: column;
        margin: 0;
        padding: 8px 0 10px;
        gap: 8px;
        border-top: 1px solid var(--pp-border);
    }

    .site-auth.open {
        display: flex;
    }

    .pp-btn {
        justify-content: center;
        text-align: center;
    }

    /* Hero section */
    .public-hero {
        padding: 18px;
        border-radius: 10px;
        margin-bottom: 18px;
    }

    .public-hero h1 {
        font-size: 1.25rem;
    }

    .public-hero p {
        font-size: 0.95rem;
    }

    .public-hero-actions {
        flex-direction: column;
    }

    /* Main content area */
    .site-shell-main {
        padding: 14px 12px 40px;
    }

    /* KPI grid — 2 columns on phone */
    .kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .kpi .value {
        font-size: 1.1rem;
    }

    /* Section titles */
    .section-title-public {
        font-size: 1.05rem;
        margin: 20px 0 12px;
    }

    /* Cards */
    .panel-card {
        padding: 16px;
    }

    /* Info items */
    .info-item {
        flex-direction: column;
        gap: 4px;
    }

    /* Footer */
    .site-shell-footer-inner {
        padding: 20px 14px;
    }
}

/* =====================================================
   GLOBAL UI REFRESH (PUBLIC)
   ===================================================== */
body.panel-public {
    background:
        radial-gradient(circle at 10% 12%, rgba(255, 170, 0, 0.11), transparent 30%),
        radial-gradient(circle at 92% 0%, rgba(85, 255, 255, 0.1), transparent 24%),
        #0b1220;
}

.site-shell-nav {
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 10px 28px rgba(2, 6, 23, 0.35);
}

.public-hero,
.panel-card,
.kpi,
.info-item {
    box-shadow: 0 14px 34px rgba(2, 6, 23, 0.44);
}

.panel-card:hover,
.kpi:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 170, 0, 0.38);
}

.pp-btn {
    border-radius: 12px;
}

.pp-btn-primary {
    box-shadow: 0 8px 20px rgba(255, 170, 0, 0.35);
}

.pp-btn-primary:hover {
    box-shadow: 0 12px 24px rgba(255, 170, 0, 0.45);
}
