/* ============================================================
   Euro Alternatives — Main Stylesheet
   Stack: Bootstrap 5 + custom, Bunny Fonts (Inter + Plus Jakarta Sans)
   ============================================================ */

/* ── Variables ───────────────────────────────────────────── */
:root {
    --eu-blue:       #003399;
    --eu-blue-mid:   #0052cc;
    --eu-blue-light: #e8f1ff;
    --eu-blue-hover: #002580;
    --accent:        #0066cc;

    --surface:       #ffffff;
    --bg-page:       #f7f9fc;
    --bg-subtle:     #f0f4fa;
    --border:        #e2e8f0;
    --border-light:  #eef2f7;

    --text-dark:     #0f172a;
    --text-body:     #334155;
    --text-muted:    #64748b;

    --badge-eu-bg:   #dcfce7;
    --badge-eu-text: #15803d;
    --badge-efta-bg: #fef9c3;
    --badge-efta-text:#854d0e;
    --badge-uk-bg:   #fef9c3;
    --badge-uk-text: #854d0e;
    --badge-free-bg: #dcfce7;
    --badge-free-text:#15803d;
    --badge-oss-bg:  #e0f2fe;
    --badge-oss-text:#0369a1;

    --radius:        10px;
    --radius-sm:     6px;
    --shadow-card:   0 1px 4px rgba(0,0,0,.06), 0 4px 16px rgba(0,0,0,.05);
    --shadow-hover:  0 4px 12px rgba(0,0,0,.10), 0 8px 24px rgba(0,0,0,.06);

    --font-body:     'Inter', system-ui, sans-serif;
    --font-heading:  'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
}

/* ── Base ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: var(--font-body);
    font-size: 15px;
    color: var(--text-body);
    background: var(--bg-page);
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--text-dark);
    font-weight: 700;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--eu-blue-hover); }

img { max-width: 100%; }

/* ── Utility ─────────────────────────────────────────────── */
.text-primary-custom { color: var(--eu-blue) !important; }
.bg-primary-custom   { background: var(--eu-blue) !important; }

.btn-primary-custom {
    background: var(--eu-blue);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    transition: background .18s;
}
.btn-primary-custom:hover {
    background: var(--eu-blue-hover);
    color: #fff;
}

.hover-primary:hover { color: var(--eu-blue) !important; }

/* ── Navbar ──────────────────────────────────────────────── */
#main-nav {
    box-shadow: 0 1px 0 var(--border);
    padding-top: .7rem;
    padding-bottom: .7rem;
}

.brand-text {
    font-family: var(--font-heading);
    font-size: .7rem;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: .08em;
    color: var(--text-dark);
    text-transform: uppercase;
}
.brand-text strong {
    font-weight: 800;
    color: var(--eu-blue);
}

.navbar .nav-link {
    font-size: .875rem;
    font-weight: 500;
    color: var(--text-body);
    padding: .4rem .75rem;
    border-radius: var(--radius-sm);
    transition: background .15s, color .15s;
}
.navbar .nav-link:hover,
.navbar .nav-link.active {
    background: var(--eu-blue-light);
    color: var(--eu-blue);
}

.lang-switcher a {
    font-size: .8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
    transition: color .15s;
}
.lang-switcher a.active,
.lang-switcher a:hover { color: var(--eu-blue); }

/* ── Search overlay ──────────────────────────────────────── */
.search-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,.45);
    z-index: 9999;
    display: flex;
    align-items: flex-start;
    padding-top: 80px;
}
.search-overlay-inner {
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
    padding: 0 1rem;
}
.search-overlay-box {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: var(--radius);
    padding: .75rem 1rem;
    box-shadow: var(--shadow-hover);
}
.search-overlay-box input { flex: 1; }

/* ── Hero (homepage) ─────────────────────────────────────── */
.hero {
    background: linear-gradient(135deg, var(--eu-blue-light) 0%, #ddeeff 100%);
    border-bottom: 1px solid var(--border-light);
    padding: 3.5rem 0 3rem;
    text-align: center;
}
.hero h1 {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    color: var(--eu-blue);
    margin-bottom: .5rem;
}
.hero .subtitle {
    font-size: 1.05rem;
    color: var(--text-muted);
    max-width: 520px;
    margin: 0 auto 1.5rem;
}

/* ── Section headings ────────────────────────────────────── */
.section-heading {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: .5rem;
}
.section-heading::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
    margin-left: .5rem;
}

/* ── Alternative card ────────────────────────────────────── */
.alt-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    box-shadow: var(--shadow-card);
    transition: box-shadow .2s, transform .2s;
    height: 100%;
    display: flex;
    flex-direction: column;
}
.alt-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.alt-card-header {
    display: flex;
    align-items: flex-start;
    gap: .9rem;
    margin-bottom: .75rem;
}

.alt-card-logo {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    object-fit: contain;
    background: var(--bg-subtle);
    border: 1px solid var(--border-light);
    flex-shrink: 0;
    padding: 4px;
}
.alt-card-logo-placeholder {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background: var(--eu-blue-light);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--eu-blue);
    font-size: 1.3rem;
}

.alt-card-meta { flex: 1; min-width: 0; }

.alt-card-name {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: .2rem;
}

.alt-card-country {
    font-size: .8rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: .3rem;
    flex-wrap: wrap;
    margin-bottom: .4rem;
}

.alt-card-website {
    margin-left: auto;
    flex-shrink: 0;
}
.alt-card-website .btn {
    font-size: .8rem;
    border-color: var(--border);
    color: var(--text-body);
    white-space: nowrap;
}
.alt-card-website .btn:hover {
    border-color: var(--eu-blue);
    color: var(--eu-blue);
}

.alt-card-desc {
    font-size: .875rem;
    color: var(--text-body);
    line-height: 1.55;
    flex: 1;
    margin-bottom: .75rem;
}
.alt-card-desc.collapsed {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.alt-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: auto;
    padding-top: .75rem;
    border-top: 1px solid var(--border-light);
}

.alt-card-socials a {
    color: var(--text-muted);
    font-size: .9rem;
    transition: color .15s;
}
.alt-card-socials a:hover { color: var(--eu-blue); }

/* ── Badges ──────────────────────────────────────────────── */
.badge {
    font-size: .7rem;
    font-weight: 600;
    padding: .25em .55em;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: .2em;
}
.badge-eu       { background: var(--badge-eu-bg);   color: var(--badge-eu-text); }
.badge-efta     { background: var(--badge-efta-bg); color: var(--badge-efta-text); }
.badge-uk       { background: var(--badge-uk-bg);   color: var(--badge-uk-text); }
.badge-free     { background: var(--badge-free-bg); color: var(--badge-free-text); }
.badge-oss      { background: var(--badge-oss-bg);  color: var(--badge-oss-text); }
.badge-hosted   { background: var(--eu-blue-light); color: var(--eu-blue); }

/* ── Service header (alternative-to page) ────────────────── */
.service-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 2rem 0 2rem;
}
.service-header-inner {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
}
.service-logo {
    width: 72px;
    height: 72px;
    object-fit: contain;
    border-radius: 14px;
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    padding: 6px;
    flex-shrink: 0;
}
.service-logo-placeholder {
    width: 72px;
    height: 72px;
    border-radius: 14px;
    background: var(--eu-blue-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    flex-shrink: 0;
}
.service-header h1 {
    font-size: clamp(1.3rem, 3vw, 2rem);
    margin-bottom: .4rem;
}
.service-header .intro-text {
    font-size: .9rem;
    color: var(--text-muted);
    max-width: 660px;
}

/* ── Category cards (homepage / category page) ───────────── */
.cat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem .75rem .9rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: .55rem;
    text-decoration: none;
    color: var(--text-dark);
    transition: box-shadow .18s, border-color .18s, transform .18s;
    box-shadow: var(--shadow-card);
}
.cat-card:hover {
    box-shadow: var(--shadow-hover);
    border-color: var(--eu-blue);
    color: var(--eu-blue);
    transform: translateY(-2px);
}
.cat-card:hover .cat-card-icon {
    background: var(--eu-blue);
    color: #fff;
}
.cat-card-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: var(--eu-blue-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--eu-blue);
    font-size: 1.05rem;
    transition: background .18s, color .18s;
}
.cat-card-name { font-weight: 600; font-size: .8rem; line-height: 1.3; }

/* ── Sponsor banner ──────────────────────────────────────── */
.sponsor-banner {
    background: #fafbff;
    border-bottom: 1px solid var(--border);
    padding: .55rem 0;
    font-size: .82rem;
}
.sponsor-banner .label {
    color: var(--text-muted);
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .05em;
}

/* ── Submit form ─────────────────────────────────────────── */
.form-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow-card);
}

/* ── Admin ───────────────────────────────────────────────── */
.admin-bar {
    background: var(--eu-blue);
    color: #fff;
    padding: .5rem 0;
    font-size: .8rem;
}

/* ── Footer ──────────────────────────────────────────────── */
.site-footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
}
.site-footer .columns-2 {
    column-count: 2;
    column-gap: 1rem;
}

/* ── Responsive adjustments ──────────────────────────────── */
@media (max-width: 576px) {
    .alt-card-header { flex-wrap: wrap; }
    .alt-card-website { margin-left: 0; }
    .service-header-inner { flex-direction: column; }
    .hero { padding: 2rem 0; }
}
