/* ============================================================
   NatAdaptSK — Bootstrap 5 custom theme
   LIFE project · environment & climate adaptation
   Primary: #7c92d6  Secondary: #a0a0b1
   ============================================================ */

/* ── 1. Design tokens ─────────────────────────────────────── */
:root {
    /* Brand */
    --t-primary:          #003D84;
    --t-primary-dark:     #5a73c4;
    --t-primary-darker:   #3d56a8;
    --t-primary-light:    #eef1fb;
    --t-primary-mid:      #c8d2f3;

    --t-secondary:        #a0a0b1;
    --t-secondary-dark:   #78788e;
    --t-secondary-light:  #f3f3f7;

    /* Nature accents */
    --t-green:            #5da87c;   /* leaf / forest */
    --t-green-dark:       #3d845b;
    --t-green-light:      #eaf5ee;
    --t-sky:              #8bbad8;   /* clear sky / water */
    --t-earth:            #b8a98d;   /* soil / bark */
    --t-earth-light:      #f7f4ef;

    /* Surfaces */
    --t-bg:               #ffffff;   /* page background */
    --t-surface:          #ffffff;
    --t-border:           #e2e4f0;
    --t-border-light:     #eeeff8;

    /* Text */
    --t-text:             #252840;
    --t-text-muted:       #696982;

    /* Shadows */
    --t-shadow-xs:        0 1px 4px rgba(100,116,214,.08);
    --t-shadow-sm:        0 2px 10px rgba(100,116,214,.12);
    --t-shadow-md:        0 6px 28px rgba(100,116,214,.18);
    --t-shadow-hover:     0 8px 32px rgba(100,116,214,.24);

    /* Radius */
    --t-r:                8px;
    --t-r-lg:             0;
    --t-r-xl:             20px;

    /* Typography */
    --t-font:             'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', sans-serif;

    /* Override Bootstrap 5 tokens */
    --bs-primary:         #7c92d6;
    --bs-primary-rgb:     124, 146, 214;
    --bs-secondary:       #a0a0b1;
    --bs-secondary-rgb:   160, 160, 177;
    --bs-body-bg:         #f5f6fb;
    --bs-body-color:      #252840;
    --bs-body-font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    --bs-link-color:      #5a73c4;
    --bs-link-hover-color:#3d56a8;
    --bs-border-color:    #e2e4f0;
    --bs-border-radius:   8px;
}

/* ── 2. Base ───────────────────────────────────────────────── */
body {
    font-family: var(--t-font);
    background-color: var(--t-bg);
    color: var(--t-text);
    font-size: 1rem;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--t-primary-dark);
    text-decoration: none;
    transition: color .15s;
}
a:hover { color: var(--t-primary-darker); text-decoration: underline; }

h1, h2, h3, h4, h5, h6 {
    color: var(--t-text);
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -.01em;
}

hr { border-color: var(--t-border); opacity: 1; }

img { max-width: 100%; height: auto; }

/* ── 3. Navbar ─────────────────────────────────────────────── */
.navbar {
    background-color: var(--t-primary) !important;
    box-shadow: 0 2px 16px rgba(92,115,196,.25);
    padding-top: .75rem;
    padding-bottom: .75rem;
}

.navbar-brand {
    font-size: 1.3rem;
    font-weight: 700;
    color: #fff !important;
    letter-spacing: -.02em;
}

/* .navbar-brand::before {
    content: '🌿';
    margin-right: .35rem;
    font-size: 1rem;
} */

.navbar .nav-link {
    color: rgba(255,255,255,.88) !important;
    font-weight: 500;
    font-size: .9rem;
    padding: .45rem .85rem !important;
    border-radius: var(--t-r);
    transition: background .15s, color .15s;
}
.navbar .nav-link:hover,
.navbar .nav-link.active,
.navbar .nav-link:focus {
    color: #fff !important;
    background: rgba(255,255,255,.16);
}

.navbar .dropdown-menu {
    border: 1px solid var(--t-primary-mid);
    border-radius: var(--t-r);
    box-shadow: var(--t-shadow-md);
    padding: .4rem;
    background: #fff;
}
.navbar .dropdown-item {
    border-radius: 6px;
    font-size: .88rem;
    padding: .45rem .85rem;
    color: var(--t-text);
    transition: background .12s;
}
.navbar .dropdown-item:hover,
.navbar .dropdown-item:focus {
    background: var(--t-primary-light);
    color: var(--t-primary-darker);
}

.navbar .form-control {
    background: rgba(255,255,255,.18);
    border: 1px solid rgba(255,255,255,.3);
    border-radius: 20px;
    color: #fff;
    font-size: .85rem;
    padding: .3rem 1rem;
    transition: background .15s, border-color .15s;
}
.navbar .form-control::placeholder { color: rgba(255,255,255,.6); }
.navbar .form-control:focus {
    background: rgba(255,255,255,.26);
    border-color: rgba(255,255,255,.65);
    color: #fff;
    box-shadow: none;
}
.navbar .btn-outline-light {
    border-radius: 20px;
    font-size: .82rem;
    padding: .3rem .9rem;
}

.navbar-toggler {
    border-color: rgba(255,255,255,.4);
}
.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255,255,255,.9%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* ── 4. Page container & main ──────────────────────────────── */
main.flex-shrink-0 {
    min-height: 60vh;
}

.container {
    max-width: 1200px;
}

/* ── 5. Page headings ──────────────────────────────────────── */
h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--t-text);
    /* position: relative; */
    padding-bottom: .65rem;
    margin-bottom: 1.5rem;
}
/* h1::after {
    content: '';
    display: block;
    position: absolute;
    bottom: 0;
    left: 0;
    width: 48px;
    height: 3px;
    background: linear-gradient(90deg, var(--t-primary) 0%, var(--t-green) 100%);
    border-radius: 2px;
} */

h2 { font-size: 1.5rem; color: var(--t-text); }
h3 { font-size: 1.2rem; color: var(--t-text); }

/* ── 6. Cards ──────────────────────────────────────────────── */
.card {
    border: 1px solid var(--t-border);
    border-radius: var(--t-r-lg);
    box-shadow: var(--t-shadow-xs);
    background: var(--t-surface);
    transition: transform .22s ease, box-shadow .22s ease;
    height: 100%;
}
.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--t-shadow-hover);
}

.card-img-top {
    border-radius: var(--t-r-lg) var(--t-r-lg) 0 0;
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--t-text);
    line-height: 1.3;
}
.card-title a { color: var(--t-text); }
.card-title a:hover { color: var(--t-primary-dark); text-decoration: none; }

.card-text { color: var(--t-text-muted); line-height: 1.6; }

/* card: thin top accent for content cards */
.card.shadow-sm::before {
    content: '';
    display: block;
    height: 3px;
    background: var(--t-primary);
    border-radius: var(--t-r-lg) var(--t-r-lg) 0 0;
}

/* ── 7. Buttons ────────────────────────────────────────────── */
.btn-primary {
    background: var(--t-primary);
    border-color: var(--t-primary);
    color: #fff;
    font-weight: 500;
    border-radius: var(--t-r);
    padding: .5rem 1.4rem;
    transition: background .15s, border-color .15s, box-shadow .15s;
}
.btn-primary:hover, .btn-primary:focus {
    background: var(--t-primary-dark);
    border-color: var(--t-primary-dark);
    box-shadow: 0 4px 14px rgba(92,115,196,.35);
}
.btn-primary:active { background: var(--t-primary-darker); }

.btn-secondary {
    background: var(--t-secondary);
    border-color: var(--t-secondary);
    color: #fff;
    border-radius: var(--t-r);
}
.btn-secondary:hover {
    background: var(--t-secondary-dark);
    border-color: var(--t-secondary-dark);
}

.btn-outline-primary {
    color: var(--t-primary-dark);
    border-color: var(--t-primary);
    border-radius: var(--t-r);
    font-weight: 500;
}
.btn-outline-primary:hover {
    background: var(--t-primary);
    border-color: var(--t-primary);
    color: #fff;
}

.btn-success {
    background: var(--t-green);
    border-color: var(--t-green);
    border-radius: var(--t-r);
}
.btn-success:hover { background: var(--t-green-dark); border-color: var(--t-green-dark); }

.btn-sm { font-size: .82rem; padding: .3rem .85rem; border-radius: 6px; }
.btn-lg { border-radius: 10px; padding: .7rem 2rem; }

/* ── 8. Badges ─────────────────────────────────────────────── */
.badge {
    font-weight: 500;
    letter-spacing: .03em;
    border-radius: 5px;
}
.bg-primary { background-color: var(--t-primary) !important; }
.bg-secondary { background-color: var(--t-secondary) !important; }
.bg-success { background-color: var(--t-green) !important; }

/* life/nature tag style */
.badge-nature {
    background: var(--t-green-light);
    color: var(--t-green-dark);
    border: 1px solid rgba(93,168,124,.25);
    font-size: .72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    padding: 3px 10px;
    border-radius: 20px;
    display: inline-block;
}

/* ── 9. Accordion ──────────────────────────────────────────── */
.accordion-item {
    border: 1px solid var(--t-border);
    border-radius: var(--t-r) !important;
    margin-bottom: .5rem;
    overflow: hidden;
    background: var(--t-surface);
}
.accordion-button {
    font-weight: 600;
    color: var(--t-text);
    background: var(--t-surface);
    font-size: .95rem;
    border-radius: var(--t-r) !important;
}
.accordion-button:not(.collapsed) {
    color: var(--t-primary-dark);
    background: var(--t-primary-light);
    box-shadow: none;
}
.accordion-button:not(.collapsed)::after {
    filter: hue-rotate(180deg);
}
.accordion-button:focus { box-shadow: 0 0 0 3px rgba(124,146,214,.25); }
.accordion-body { color: var(--t-text-muted); line-height: 1.75; }

/* ── 10. List groups (sidebar nav) ────────────────────────── */
.nav.flex-column .nav-link {
    color: var(--t-text-muted);
    font-size: .9rem;
    padding: .45rem .75rem;
    border-radius: 6px;
    transition: background .12s, color .12s;
}
.nav.flex-column .nav-link:hover {
    background: var(--t-primary-light);
    color: var(--t-primary-dark);
    text-decoration: none;
}
.nav.flex-column .nav-link.active {
    background: var(--t-primary-light);
    color: var(--t-primary-darker);
    font-weight: 600;
}

/* ── 11. Pagination ────────────────────────────────────────── */
.pagination { gap: .2rem; }
.page-link {
    border-radius: 6px !important;
    border-color: var(--t-border);
    color: var(--t-primary-dark);
    font-size: .88rem;
    min-width: 36px;
    text-align: center;
    transition: background .12s, border-color .12s;
}
.page-link:hover {
    background: var(--t-primary-light);
    border-color: var(--t-primary-mid);
    color: var(--t-primary-darker);
}
.page-item.active .page-link {
    background: var(--t-primary);
    border-color: var(--t-primary);
    color: #fff;
    box-shadow: 0 2px 8px rgba(124,146,214,.35);
}
.page-item.disabled .page-link { color: var(--t-secondary); }

/* ── 12. Forms ─────────────────────────────────────────────── */
.form-control, .form-select {
    border-color: var(--t-border);
    border-radius: var(--t-r);
    color: var(--t-text);
    font-size: .92rem;
    padding: .55rem .85rem;
    background-color: #fff;
    transition: border-color .15s, box-shadow .15s;
}
.form-control:focus, .form-select:focus {
    border-color: var(--t-primary);
    box-shadow: 0 0 0 3px rgba(124,146,214,.2);
    color: var(--t-text);
}
.form-label {
    font-weight: 500;
    font-size: .88rem;
    color: var(--t-text);
    margin-bottom: .3rem;
}
.form-text { color: var(--t-text-muted); font-size: .82rem; }

/* ── 13. Article & event detail ────────────────────────────── */
article h1 { font-size: 1.85rem; }
article .lead {
    color: var(--t-text-muted);
    font-size: 1.08rem;
    line-height: 1.75;
    border-left: 3px solid var(--t-primary);
    padding-left: 1rem;
    margin-bottom: 1.5rem;
}

article img {
    border-radius: var(--t-r-lg);
}

/* ── 14. Documents list ────────────────────────────────────── */
.list-group-item {
    border-color: var(--t-border);
    color: var(--t-text);
    transition: background .12s;
}
.list-group-item-action:hover {
    background: var(--t-primary-light);
    color: var(--t-text);
}
.list-group-flush .list-group-item { border-radius: 0; }

/* ── 15. Search results ────────────────────────────────────── */
.list-group-item-action.d-flex {
    border-radius: var(--t-r) !important;
    margin-bottom: .4rem;
    border: 1px solid var(--t-border);
}
.list-group-item-action.d-flex:hover { background: var(--t-primary-light); }

/* ── 16. Footer ────────────────────────────────────────────── */
footer.footer {
    background: var(--t-text) !important;
    color: rgba(255,255,255,.75);
    font-size: .87rem;
    border-top: 3px solid var(--t-primary);
}
footer.footer a {
    color: rgba(255,255,255,.75);
    transition: color .12s;
}
footer.footer a:hover { color: #fff; text-decoration: none; }
footer.footer .text-white-50 { color: rgba(255,255,255,.5) !important; }

/* LIFE EU badge */
footer.footer::before {
    content: '';
    display: block;
    height: 3px;
    background: linear-gradient(90deg, var(--t-primary) 0%, var(--t-green) 50%, var(--t-sky) 100%);
    margin-bottom: 1.5rem;
    border-radius: 2px;
    opacity: .4;
}

/* ── 17. Section band ──────────────────────────────────────── */
.section-band {
    background: var(--t-primary-light);
    border-radius: var(--t-r-xl);
    padding: 2rem 1.5rem;
    margin-bottom: 2rem;
}
.section-band-green {
    background: var(--t-green-light);
    border-left: 4px solid var(--t-green);
    border-radius: 0 var(--t-r-lg) var(--t-r-lg) 0;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
}
.section-band-earth {
    background: var(--t-earth-light);
    border-radius: var(--t-r-xl);
    padding: 2rem 1.5rem;
}

/* ── 18. Hero featured card ────────────────────────────────── */
.card.overflow-hidden > .row.g-0 > [class*="col"] img {
    border-radius: 0;
}
.card.overflow-hidden {
    border-radius: var(--t-r-lg);
}

/* ── 19. py-4 container (list pages) ──────────────────────── */
.container.py-4 {
    padding-top: 2rem !important;
    padding-bottom: 3rem !important;
}

/* ── 20. Alerts & notifications ────────────────────────────── */
.alert-primary {
    background: var(--t-primary-light);
    border-color: var(--t-primary-mid);
    color: var(--t-primary-darker);
}
.alert-success {
    background: var(--t-green-light);
    border-color: rgba(93,168,124,.35);
    color: var(--t-green-dark);
}

/* ── 21. Nature / LIFE highlights ─────────────────────────── */

/* "leaf" separator — used above article card grids */
.leaf-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 2rem 0 1.5rem;
    color: var(--t-text-muted);
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .1em;
    font-weight: 600;
}
.leaf-divider::before,
.leaf-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--t-border), transparent);
}

/* Sidebar: soft background panel */
aside {
    background: var(--t-secondary-light);
    border-radius: var(--t-r-lg);
    padding: 1.25rem 1.25rem 1.5rem;
}
aside h2 {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--t-secondary-dark);
    margin-bottom: 1rem;
    font-weight: 600;
}

/* Date/meta labels */
time, .small.text-muted {
    color: var(--t-secondary-dark);
}

/* mini card image in sidebar */
.d-flex img.rounded {
    border: 2px solid var(--t-border-light);
}

/* ── 22. Utility classes ───────────────────────────────────── */
.text-primary   { color: var(--t-primary) !important; }
.text-nature    { color: var(--t-green) !important; }
.text-sky       { color: var(--t-sky) !important; }
.bg-primary-soft{ background: var(--t-primary-light) !important; }
.bg-nature-soft { background: var(--t-green-light) !important; }
.border-primary { border-color: var(--t-primary) !important; }
.border-nature  { border-color: var(--t-green) !important; }

/* ── 23. Responsive ────────────────────────────────────────── */
@media (max-width: 767px) {
    h1 { font-size: 1.55rem; }
    h1::after { width: 36px; }
    article .lead { font-size: .97rem; }
    aside { border-radius: var(--t-r); }
    .navbar-brand::before { content: none; }
}

@media (min-width: 992px) {
    .card:hover { transform: translateY(-5px); }
}
