/* static/styles.css */

/* Custom styles for Talantul in Negot */
/* Note: Most styling is handled via Tailwind CSS classes in templates */

/* Fonts are loaded by <link> in base.html / info_base.html — an @import here would
   serialise the request behind this file's own download. */

:root {
    --color-primary: var(--sage, #5c6b45);
    --color-on-primary: var(--on-accent, #fffdf8);
    --color-secondary: var(--sage-strong, #4a5736);
    --color-accent: var(--accent, #9a4a12);
    --color-background: var(--bg, #f6f1e7);
    --color-surface: var(--card, #fffdf8);
    --color-surface-raised: var(--card-hover, #fff8ec);
    --color-foreground: var(--fg, #2c2416);
    --color-muted: var(--muted, #6b6256);
    --color-border: var(--border, #e2d6c0);
    --color-destructive: #DC2626;
    --color-ring: var(--ring, #5c6b45);
    --radius-ui: 0.85rem;
    --shadow-ui: var(--shadow, 0 12px 32px rgba(44, 36, 22, 0.08));
}

body {
    font-family: var(--font-ui, 'Public Sans', system-ui, -apple-system, sans-serif);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display, 'Libre Bodoni', Georgia, serif);
    letter-spacing: -0.02em;
}

/* Modern Contest App component layer */
.tn-page {
    background: var(--color-background);
}

.tn-section {
    position: relative;
    padding-block: clamp(2.75rem, 6vw, 5rem);
}

.tn-section-muted {
    background: var(--bg-soft, var(--color-surface));
    border-block: 1px solid var(--color-border);
}

.tn-container {
    width: min(100% - 2rem, 72rem);
    margin-inline: auto;
}

.tn-hero {
    min-height: clamp(34rem, 78vh, 46rem);
    display: flex;
    align-items: center;
    overflow: hidden;
}

.tn-card,
.tn-panel {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-ui);
    box-shadow: var(--shadow-ui);
}

.tn-card {
    transition: border-color 180ms ease, background 180ms ease;
}

.tn-card:hover {
    background: var(--color-surface-raised);
    border-color: var(--border-strong, var(--color-border));
}

.tn-action-card {
    display: flex;
    min-height: 100%;
    flex-direction: column;
    gap: 0.9rem;
    padding: 1.15rem;
    text-decoration: none;
}

.tn-icon {
    width: 2.75rem;
    height: 2.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-ui);
    color: var(--color-on-primary);
    background: var(--color-primary);
}

.tn-icon-accent {
    color: #0F172A;
    background: var(--color-accent);
}

.tn-chip {
    display: inline-flex;
    min-height: 2rem;
    align-items: center;
    gap: 0.45rem;
    border-radius: 999px;
    border: 1px solid var(--color-border);
    background: var(--chip-bg, rgba(92, 107, 69, 0.12));
    color: var(--chip-fg, #4a5736);
    padding: 0.35rem 0.75rem;
    font-size: 0.78rem;
    font-weight: 700;
}

.tn-button,
.tn-button-primary,
.tn-button-secondary {
    min-height: 2.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    border-radius: var(--radius-ui);
    padding: 0.75rem 1rem;
    font-weight: 800;
    transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.tn-button-primary {
    background: var(--color-primary);
    color: var(--color-on-primary);
    border: 1px solid transparent;
}

.tn-button-primary:hover {
    background: var(--color-secondary);
    color: var(--color-on-primary);
}

.tn-button-secondary {
    background: transparent;
    color: var(--color-foreground);
    border: 1px solid var(--color-border);
}

.tn-button-secondary:hover {
    background: var(--chip-bg, rgba(92, 107, 69, 0.12));
    color: var(--color-foreground);
}

.tn-button-primary.hidden,
.tn-button-secondary.hidden {
    display: none;
}

.tn-stat {
    border-radius: var(--radius-ui);
    border: 1px solid var(--color-border);
    background: var(--panel, var(--color-surface));
    padding: 1rem;
}

.tn-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 45;
    display: none;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0;
    border: 0;
    border-top: 1px solid var(--border);
    border-radius: 0;
    background: var(--nav-bg, var(--bg));
    padding: 0.2rem 0.2rem calc(0.25rem + env(safe-area-inset-bottom));
    backdrop-filter: blur(16px);
    box-shadow: none;
}

.tn-bottom-nav a {
    min-height: 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    border-radius: 0.65rem;
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 700;
}

.tn-bottom-nav a[aria-current="page"] {
    background: var(--sage-soft);
    color: var(--sage-strong);
}

.tn-bottom-nav i {
    font-size: 1rem;
}

a:focus-visible,
button:focus-visible,
select:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 3px solid var(--color-ring);
    outline-offset: 2px;
}

@media (max-width: 767px) {
    body.tn-app-shell {
        padding-bottom: calc(4.4rem + env(safe-area-inset-bottom));
    }

    .tn-bottom-nav {
        display: grid;
    }

    .tn-hero {
        min-height: auto;
        padding-block: 3rem;
    }
}

/* Scrollbar follows the theme tokens — hardcoded gray-900 left a dark ring in light mode. */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--scrollbar-track, var(--bg-soft));
}

::-webkit-scrollbar-thumb {
    background: var(--scrollbar, var(--border-strong));
    border-radius: 5px;
    border: 2px solid var(--scrollbar-track, var(--bg-soft));
}

::-webkit-scrollbar-thumb:hover {
    background: var(--border-strong);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
    animation: fadeIn 0.3s ease-out;
}

@keyframes bounce-subtle {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.animate-bounce-subtle {
    animation: bounce-subtle 2s infinite;
}

/* Utility for hiding elements while Alpine loads */
[x-cloak] { display: none !important; }

/* Custom Scrollbar for quiz results */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}
.custom-scrollbar::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.1);
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 3px;
    }
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.3);
    }
