/* polish.css - visual refinements layered on top of style.css (Balkan Airsports Federation) */

:root {
    --baf-ink: #0f172a;
    --baf-accent: #4f46e5;
    --baf-accent-2: #7c3aed;
    --baf-sky: #0ea5e9;
    --baf-radius: 16px;
    --baf-ring: 0 0 0 3px rgba(79, 70, 229, 0.25);
}

body {
    background:
        radial-gradient(1200px 500px at 85% -10%, rgba(124, 58, 237, 0.07), transparent 60%),
        radial-gradient(900px 400px at -10% 10%, rgba(14, 165, 233, 0.07), transparent 60%),
        #f8fafc;
}

/* ---------- Navigation ---------- */
nav[aria-label="Main navigation"] {
    background: rgba(255, 255, 255, 0.88) !important;
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    backdrop-filter: saturate(180%) blur(14px);
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.06), 0 8px 24px -12px rgba(15, 23, 42, 0.18) !important;
    border-bottom: 3px solid transparent;
    border-image: linear-gradient(90deg, var(--baf-sky), var(--baf-accent), var(--baf-accent-2)) 1;
}

nav[aria-label="Main navigation"] .nav-link {
    border-radius: 999px;
    font-weight: 600;
    letter-spacing: 0.01em;
    transition: background-color .25s ease, color .25s ease, transform .25s ease;
}

nav[aria-label="Main navigation"] .nav-link:hover {
    background: rgba(79, 70, 229, 0.08);
    transform: translateY(-1px);
}

nav[aria-label="Main navigation"] .nav-link.active {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.12), rgba(124, 58, 237, 0.12));
    color: var(--baf-accent) !important;
}

#mobile-menu {
    border-radius: 0 0 var(--baf-radius) var(--baf-radius);
}

/* ---------- Hero ---------- */
.hero-section {
    isolation: isolate;
}

.hero-section::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        linear-gradient(180deg, rgba(15, 23, 42, 0.35) 0%, rgba(15, 23, 42, 0.05) 40%, rgba(15, 23, 42, 0.55) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-title {
    text-shadow: 0 4px 30px rgba(0, 0, 0, 0.45);
}

.hero-subtitle {
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.4);
}

.hero-stats > * {
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-radius: 14px;
    transition: transform .3s ease, background-color .3s ease;
}

.hero-stats > *:hover {
    transform: translateY(-4px);
}

/* ---------- Section headings ---------- */
.section-title {
    letter-spacing: -0.02em;
    font-weight: 800;
}

.section-divider {
    height: 4px;
    width: 72px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--baf-sky), var(--baf-accent), var(--baf-accent-2));
}

/* ---------- Cards ---------- */
.card-modern,
.news-card,
.event-card,
.sport-card {
    border-radius: var(--baf-radius);
}

.card-modern {
    transition: transform .35s cubic-bezier(.2, .7, .2, 1), box-shadow .35s ease;
}

.card-modern:hover {
    transform: translateY(-6px);
    box-shadow: 0 22px 40px -18px rgba(79, 70, 229, 0.35), 0 8px 16px -8px rgba(15, 23, 42, 0.15);
}

.news-card .news-image-wrapper { border-radius: var(--baf-radius) var(--baf-radius) 0 0; }
.news-card .news-content { border-radius: 0 0 var(--baf-radius) var(--baf-radius); }
.news-card .news-title { line-height: 1.3; }

/* ---------- Buttons & links ---------- */
.btn-primary,
a.btn-primary {
    border-radius: 999px;
    background-image: linear-gradient(135deg, var(--baf-accent), var(--baf-accent-2));
    box-shadow: 0 10px 20px -10px rgba(79, 70, 229, 0.6);
    transition: transform .25s ease, box-shadow .25s ease, filter .25s ease;
}

.btn-primary:hover,
a.btn-primary:hover {
    transform: translateY(-2px);
    filter: brightness(1.06);
    box-shadow: 0 16px 28px -12px rgba(79, 70, 229, 0.7);
}

a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
    outline: none;
    box-shadow: var(--baf-ring);
}

/* ---------- Forms ---------- */
input[type="text"], input[type="email"], input[type="tel"], input[type="search"],
textarea, select {
    border-radius: 12px;
    transition: border-color .2s ease, box-shadow .2s ease;
}

/* ---------- Footer ---------- */
footer {
    background: linear-gradient(180deg, #111827 0%, #0b1020 100%) !important;
    border-top: 3px solid transparent;
    border-image: linear-gradient(90deg, var(--baf-sky), var(--baf-accent), var(--baf-accent-2)) 1;
}

footer a { transition: color .2s ease, transform .2s ease; }

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
}

@media (max-width: 640px) {
    .card-modern:hover { transform: none; }
}

/* ---------- News article page ---------- */
#reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    width: 0;
    z-index: 100;
    background: linear-gradient(90deg, var(--baf-sky), var(--baf-accent), var(--baf-accent-2));
    box-shadow: 0 0 12px rgba(79, 70, 229, 0.5);
    transition: width .1s linear;
}

.news-header { text-align: center; padding-top: .5rem; }

.news-header .news-title {
    letter-spacing: -0.025em;
    line-height: 1.12;
    background: linear-gradient(135deg, #0f172a 0%, #312e81 60%, #4f46e5 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    max-width: 22ch;
    margin-left: auto;
    margin-right: auto;
    text-wrap: balance;
}

.news-header .news-excerpt-lead {
    max-width: 46rem;
    margin-left: auto;
    margin-right: auto;
    color: #475569;
}

.news-header > .flex { justify-content: center; row-gap: .5rem; }
.news-header > .flex.flex-wrap.items-center.text-sm > div {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    padding: .3rem .8rem;
    margin: 0 .25rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}
.news-header > .flex.flex-wrap.items-center.text-sm { gap: .25rem; }
.news-header > .flex.flex-wrap.items-center.text-sm > * + * { margin-left: 0; }
.news-header .border-t.border-b { justify-content: space-between; text-align: left; }

.news-cover {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 30px 60px -28px rgba(30, 27, 75, .55), 0 10px 20px -12px rgba(15, 23, 42, .25);
}
.news-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0) 55%, rgba(15, 23, 42, .28) 100%);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .15);
    border-radius: inherit;
}
.news-cover-img { display: block; transition: transform 1.2s cubic-bezier(.2, .7, .2, 1); }
.news-cover:hover .news-cover-img { transform: scale(1.03); }

.news-article { max-width: 44rem; margin-left: auto; margin-right: auto; }

.news-body { font-size: 1.125rem; line-height: 1.85; color: #334155; }

.news-body .news-p { margin: 0 0 1.5rem; }

.news-body .news-dateline {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    margin: 0 0 1.75rem;
    padding: .35rem .9rem;
    border-radius: 999px;
    background: rgba(79, 70, 229, .08);
    color: var(--baf-accent);
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.news-body .news-h2 {
    position: relative;
    margin: 3rem 0 1.1rem;
    padding-left: 1.1rem;
    font-size: 1.6rem;
    line-height: 1.25;
    font-weight: 800;
    letter-spacing: -0.015em;
    color: #0f172a;
}
.news-body .news-h2::before {
    content: "";
    position: absolute;
    left: 0;
    top: .15em;
    bottom: .15em;
    width: 5px;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--baf-sky), var(--baf-accent-2));
}

/* The first real paragraph reads as a lead-in */
.news-body .news-lead { font-size: 1.25rem; color: #1e293b; }

/* Closing line of the story gets a highlighted treatment */
.news-body .news-outro {
    margin-top: 2.5rem;
    padding: 1.1rem 1.4rem;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(14, 165, 233, .08), rgba(124, 58, 237, .1));
    border: 1px solid rgba(79, 70, 229, .15);
    color: #312e81;
    font-weight: 700;
    text-align: center;
}

/* Prev / next */
.news-pager { max-width: 56rem; margin-left: auto; margin-right: auto; }
.news-pager a.group {
    padding: 1rem 1.2rem;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: #fff;
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.news-pager a.group:hover {
    transform: translateY(-3px);
    border-color: rgba(79, 70, 229, .35);
    box-shadow: 0 16px 28px -16px rgba(79, 70, 229, .4);
}

/* Related */
.news-related-card {
    border-radius: 16px !important;
    transition: transform .3s ease, box-shadow .3s ease !important;
}
.news-related-card:hover { transform: translateY(-5px); box-shadow: 0 20px 36px -18px rgba(79, 70, 229, .4) !important; }
.news-related-card img { transition: transform .5s ease; }
.news-related-card:hover img { transform: scale(1.05); }
.news-related-card { overflow: hidden; }

@media (max-width: 640px) {
    .news-body { font-size: 1.05rem; line-height: 1.8; }
    .news-body .news-h2 { font-size: 1.35rem; margin-top: 2.25rem; }
    .news-header .border-t.border-b { gap: .75rem; }
}

/* ---------- News: lists, quotes, gallery, empty cover ---------- */
.news-body .news-list-intro { margin-bottom: .75rem; font-weight: 600; color: #0f172a; }

.news-body .news-list {
    list-style: none;
    margin: 0 0 1.75rem;
    padding: 0;
    display: grid;
    gap: .6rem;
}
.news-body .news-list li {
    position: relative;
    padding: .8rem 1rem .8rem 3rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
    line-height: 1.6;
}
.news-body .news-list li::before {
    content: "";
    position: absolute;
    left: 1rem;
    top: 1.1rem;
    width: 1.1rem;
    height: 1.1rem;
    border-radius: 50%;
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 70% no-repeat,
        linear-gradient(135deg, var(--baf-sky), var(--baf-accent-2));
}

.news-body .news-quote {
    position: relative;
    margin: 2rem 0;
    padding: 1.6rem 1.6rem 1.4rem 3.6rem;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(79, 70, 229, .07), rgba(14, 165, 233, .08));
    border-left: 5px solid var(--baf-accent);
    color: #1e293b;
    font-size: 1.15rem;
    font-style: italic;
    line-height: 1.7;
}
.news-body .news-quote::before {
    content: "\201C";
    position: absolute;
    left: 1rem;
    top: .35rem;
    font-family: Georgia, serif;
    font-size: 4rem;
    line-height: 1;
    font-style: normal;
    color: var(--baf-accent);
    opacity: .35;
}

.news-gallery {
    margin: 2.5rem 0 !important;
    padding: 1.5rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    box-shadow: 0 10px 30px -20px rgba(15, 23, 42, .3);
}
.news-gallery h3 { font-weight: 800; letter-spacing: -0.01em; }
.news-gallery .gallery-item {
    overflow: hidden;
    border-radius: 14px;
    position: relative;
}
.news-gallery .gallery-item img {
    border-radius: 0 !important;
    box-shadow: none !important;
    transition: transform .6s cubic-bezier(.2, .7, .2, 1), filter .3s ease;
}
.news-gallery .gallery-item:hover img { transform: scale(1.08); filter: brightness(1.05); }
.news-gallery .gallery-item::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .08);
}

.news-cover--empty {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 12rem;
    background:
        radial-gradient(600px 200px at 80% 0%, rgba(124, 58, 237, .35), transparent 70%),
        radial-gradient(500px 200px at 10% 100%, rgba(14, 165, 233, .35), transparent 70%),
        linear-gradient(135deg, #1e1b4b, #312e81 55%, #4338ca);
}
.news-cover--empty .news-cover-logo { height: 7rem; width: auto; object-fit: contain; filter: drop-shadow(0 6px 18px rgba(0, 0, 0, .35)); }

/* ---------- News index ---------- */
.news-index-title {
    letter-spacing: -0.025em;
    background: linear-gradient(135deg, #0f172a 0%, #312e81 60%, #4f46e5 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.news-list-card, .news-feature-card {
    border-radius: 20px !important;
    transition: transform .35s cubic-bezier(.2, .7, .2, 1), box-shadow .35s ease !important;
}
.news-list-card:hover, .news-feature-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 40px -20px rgba(79, 70, 229, .4) !important;
}
.news-list-card img, .news-feature-card img { transition: transform .6s ease; }
.news-list-card:hover img, .news-feature-card:hover img { transform: scale(1.05); }
.news-list-card > div:first-child, .news-feature-card .relative { overflow: hidden; }
.news-list-card .bg-gray-200 {
    background: linear-gradient(135deg, #e0e7ff, #ede9fe) !important;
}
.news-feature-card { border-width: 1px; }

/* ---------- Mobile refinements ---------- */
@media (max-width: 767px) {
    /* Logo was shifted off-screen by -ml-8 and was too tall for the bar */
    nav[aria-label="Main navigation"] .-ml-8 { margin-left: 0 !important; margin-right: .25rem !important; }
    nav[aria-label="Main navigation"] .h-24 { height: 4.75rem; }
    nav[aria-label="Main navigation"] a[aria-label*="Home"] img { height: 3.6rem; }

    /* Mobile menu: bigger tap targets, card-like panel */
    #mobile-menu { padding: .5rem .75rem .9rem; box-shadow: 0 18px 30px -18px rgba(15, 23, 42, .35); }
    #mobile-menu .nav-link { display: block; padding: .8rem 1rem !important; border-radius: 12px; font-size: 1.05rem; }
    #mobile-menu .nav-link.active { background: linear-gradient(135deg, rgba(79, 70, 229, .12), rgba(124, 58, 237, .12)); color: var(--baf-accent) !important; }
    #mobile-menu-button { padding: .75rem; }

    /* Breadcrumb: never wider than the screen (long titles are truncated) */
    nav[aria-label="Breadcrumb"] ol { flex-wrap: nowrap; min-width: 0; }
    nav[aria-label="Breadcrumb"] ol > li { flex-shrink: 0; }
    nav[aria-label="Breadcrumb"] ol > li:last-child {
        flex: 1 1 0;
        min-width: 0;
        max-width: none;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    /* Article page */
    .news-header .news-title { font-size: 2rem; line-height: 1.15; max-width: none; }
    .news-header .news-excerpt-lead { font-size: 1.05rem; }
    .news-header > .flex.flex-wrap.items-center.text-sm > div { font-size: .8rem; padding: .25rem .65rem; margin: 0; }
    .news-cover { border-radius: 18px; }
    .news-cover-img { height: 15rem !important; }
    .news-article { overflow-wrap: anywhere; }
    .news-body .news-quote { padding: 1.2rem 1.1rem 1.1rem 2.8rem; font-size: 1.05rem; }
    .news-body .news-quote::before { left: .7rem; font-size: 3rem; }
    .news-body .news-list li { padding-left: 2.7rem; }
    .news-gallery { padding: 1rem; }
    .news-gallery .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
    .news-gallery .gallery-item img { height: 7.5rem; }

    /* Prev / next stack vertically */
    .news-pager > div { flex-direction: column; gap: .75rem; }
    .news-pager > div > div { text-align: left !important; }
    .news-pager a.group { max-width: none !important; margin-left: 0 !important; }
    .news-pager .justify-end { justify-content: flex-start; }

    /* News index */
    .news-index-title { font-size: 2.1rem; }

    /* Section rhythm + footer */
    .section-spacing { margin-bottom: 3.5rem !important; }
    footer { text-align: left; }
    footer a { display: inline-block; padding: .2rem 0; }

    /* Final safety net against sideways scrolling */
    html, body { overflow-x: clip; }
}

/* main is a flex item with auto margins: size it from the viewport, not from its widest child */
body > main { width: 100%; min-width: 0; }
nav[aria-label="Breadcrumb"] { min-width: 0; }
nav[aria-label="Breadcrumb"] ol { overflow: hidden; }
