:root {
    --font-main: "Inter", system-ui, -apple-system, sans-serif;
    --font-heading: "Merriweather", serif;
    --primary: #2e7d32;
    --primary-hover: #1b5e20;
    --accent: #ffb74d;
    --bg-body: #f8f9fa;
    --bg-card: #ffffff;
    --text-main: #212529;
    --text-muted: #555;
    --border: #e9ecef;
    --radius-sm: .5rem;
    --radius-md: 1rem;
    --radius-lg: 1.5rem;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, .12), 0 1px 2px rgba(0, 0, 0, .24);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, .1), 0 2px 4px -1px rgba(0, 0, 0, .06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, .1), 0 4px 6px -2px rgba(0, 0, 0, .05);
    --focus-ring: 0 0 0 4px rgba(46, 125, 50, .3);
    --bg-color: #ffffff;
    --text-color: #2b2d42;
    --card-bg: #f8f9fa;
    --primary: #005f73
}

[data-theme=dark] {
    --bg-body: #121212;
    --bg-card: #1e1e1e;
    --text-main: #e0e0e0;
    --text-muted: #a0a0a0;
    --border: #333;
    --shadow-md: 0 4px 6px rgba(0, 0, 0, .3);
    --bg-color: #1a1a1a;
    --text-color: #f8f9fa;
    --card-bg: #2d2d2d;
    --primary: #1f9347
}

body {
    font-family: var(--font-main), serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    text-align: justify;
    line-height: 1.6;
    margin: 0;
    transition: background-color .3s ease, color .3s ease
}

h1,
h2,
h3 {
    font-family: var(--font-heading, var(--font-main)), serif;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2
}

:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
    border-radius: 4px
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: .8rem;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all .2s ease
}

.btn.btn-primary {
    background-color: var(--primary);
    color: #fff
}

.btn.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px)
}

.btn.btn-link {
    background: transparent;
    color: var(--primary);
    padding: 0
}

.btn.btn-link:hover {
    text-decoration: underline
}

.card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    padding: 1.5rem;
    border: 1px solid var(--border);
    transition: transform .2s ease, box-shadow .2s ease
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg)
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    box-sizing: border-box
}

#app {
    display: flex;
    flex-direction: column;
    min-height: 100vh
}

img .error-image {
    border-radius: var(--radius-lg);
}

.main-header {
    background-color: #fffffff2;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: .5rem 0;
    box-shadow: var(--shadow-sm)
}

[data-theme=dark] .main-header {
    background-color: #1e1e1ef2
}

.main-header .header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 1001;
    padding: 0 1rem
}

.main-header .logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    text-decoration: none;
    letter-spacing: -.5px;
    display: flex;
    align-items: center;
    gap: .5rem;
    z-index: 1002
}

.main-header .mobile-toggle {
    display: none;
    font-size: 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-main);
    padding: .5rem;
    z-index: 1002
}

@media(max-width:768px) {
    .main-header .mobile-toggle {
        display: block
    }
}

.main-header .desktop-nav,
.main-header .desktop-actions {
    display: flex;
    align-items: center;
    gap: 1rem
}

@media(max-width:768px) {

    .main-header .desktop-nav,
    .main-header .desktop-actions {
        display: none !important
    }
}

.main-header .main-nav {
    display: flex;
    gap: 2rem
}

@media(max-width:768px) {
    .main-header .main-nav {
        display: none
    }
}

.main-header .main-nav .nav-link {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    padding: .5rem 0
}

.main-header .main-nav .nav-link:after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: width .3s ease
}

.main-header .main-nav .nav-link:hover:after,
.main-header .main-nav .nav-link.active:after {
    width: 100%
}

.main-header .header-actions {
    display: flex;
    align-items: center;
    gap: 1rem
}

.main-header .btn-icon {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-main);
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all .2s ease
}

.main-header .btn-icon:hover {
    background-color: var(--bg-body);
    border-color: var(--text-muted)
}

.main-header .lang-select {
    padding: .5rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background-color: var(--bg-body);
    color: var(--text-main);
    font-family: inherit;
    cursor: pointer
}

.main-header .lang-select:focus {
    outline: none;
    border-color: var(--primary)
}

.mobile-menu {
    position: fixed;
    top: 60px;
    left: 0;
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
    height: auto;
    max-height: 80vh;
    overflow-y: auto;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 10px 15px -3px #0000001a;
    display: flex;
    flex-direction: column;
    transform: translateY(-150%);
    visibility: hidden;
    transition: transform .3s cubic-bezier(.4, 0, .2, 1), visibility .3s;
    z-index: 999
}

.mobile-menu.open {
    transform: translateY(0);
    visibility: visible
}

.mobile-menu .mobile-nav-links {
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 1rem 0
}

.mobile-menu .mobile-nav-links a {
    display: block;
    width: 100%;
    text-align: center;
    padding: 1rem;
    font-size: 1.1rem;
    color: var(--text-main);
    text-decoration: none;
    font-weight: 500;
    border-left: 3px solid transparent
}

.mobile-menu .mobile-nav-links a:hover {
    background-color: var(--bg-body);
    color: var(--primary);
    border-left-color: var(--primary)
}

.mobile-menu .mobile-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem 0;
    width: 100%;
    box-sizing: border-box;
    border-top: 1px solid var(--border);
    background-color: #00000005
}

#router-outlet {
    flex: 1;
    width: 100%;
    box-sizing: border-box
}

.home-hero {
    position: relative;
    background-image: url('/public/assets/pages/home/home_hero_sympetrum.jpg');
    background-size: cover;
    background-position: center center;
    height: 60vh; /* Takes up 40% of the viewport height */
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: right;
    margin-bottom: 3rem;
    padding-right: 4rem;
    color: #ffffff; /* Text color on top of image */
    text-align: right;
}

/* Dark overlay to make text readable */
.home-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4); /* 40% opacity black overlay */
    z-index: 1;
}

.home-hero__content {
    position: relative;
    z-index: 2; /* Ensures text is above the overlay */
    padding: 0 1rem;
    max-width: 500px;
}

.home-hero__title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    color: #ffffff;
    border-bottom: none; /* Override default h1 border if needed */
}

.home-hero__subtitle {
    font-size: 1.5rem;
    font-weight: 500;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    margin: 0;
}

@media (max-width: 768px) {
    .home-hero {
        height: 50vh;
        padding-right: 1rem;
    }

    .home-hero__content {
        padding-left: 0.5rem;
    }

    .home-hero__title {
        font-size: 2rem;
    }

    .home-hero__subtitle {
        font-size: 1.2rem;
    }
}

.home-contact {
  margin-top: 1rem;
}

.home-contact__header {
  margin-bottom: 1rem;
  max-width: 900px;
}

.home-contact__title {
  margin-bottom: 1rem;
}

.home-contact__subtitle {
  margin: 0;
  color: var(--text-muted);
}

.home-contact__card {
  position: relative;
  padding: 2rem;
  overflow: hidden;
  border: 1px solid var(--border);
}

.home-contact__card > * {
  position: relative;
  margin-left: 10px;
}

.home-contact__card-header {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1.25rem;
}

.home-contact__icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--primary) 18%, transparent);
  border: 1px solid color-mix(in srgb, var(--primary) 30%, var(--border));
  font-size: 1.25rem;
  flex: 0 0 auto;
}

.home-contact__card-title {
  margin: 0 0 .25rem 0;
}

.home-contact__card-lead {
  margin: 0;
  color: var(--text-muted);
}

.home-contact__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(240px, 1fr));
  gap: 1rem 2rem;
  margin: 1.5rem 0;
}

@media (max-width: 768px) {
  .home-contact__grid {
    grid-template-columns: 1fr;
  }
}

.home-contact__item {
  padding: .75rem 1rem;
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--bg-card) 80%, var(--bg-body));
  border: 1px solid var(--border);
}

.home-contact__item-label {
  font-size: .85rem;
  color: var(--text-muted);
  margin-bottom: .25rem;
}

.home-contact__item-value {
  font-weight: 600;
}

.home-contact__item-value a {
  color: var(--primary);
  text-decoration: none;
}

.home-contact__item-value a:hover {
  text-decoration: underline;
}

.home-contact__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  align-items: center;
  margin-top: .5rem;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 5rem;
    width: 100%;
    padding-bottom: 2rem;
}

@media(max-width:768px) {
    .news-grid {
        grid-template-columns: 1fr;
        gap: 5rem
    }
}

.news-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden
}

.news-card .card-img {
    height: 200px;
    overflow: hidden
}

.news-card .card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s ease
}

.news-card:hover .card-img img {
    transform: scale(1.05)
}

.news-card .card-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1
}

.news-card .card-date {
    font-size: .85rem;
    color: var(--text-muted);
    margin-bottom: .5rem;
    display: block
}

.news-card .card-title {
    font-size: 1.25rem;
    margin: 0 0 1rem;
    line-height: 1.4
}

.news-card .card-title a {
    color: inherit;
    text-align: left;
    text-decoration: none;
    transition: color .2s ease
}

.news-card .card-title a:hover {
    color: var(--primary)
}

.news-card .card-summary {
    color: var(--text-muted);
    font-size: .95rem;
    text-align: left;
    margin-bottom: 1rem;
    flex: 1;
    line-height: 1.6
}

.news-card .card-footer {
    margin-top: auto
}

.empty-state,
.loading-state,
.error-state {
    grid-column: 1/-1
}

.news-detail-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem
}

.news-detail-page .back-link {
    display: inline-block;
    margin-bottom: 1rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 700
}

.news-detail-page h1 {
    font-size: 2.5rem;
    margin-bottom: .5rem;
    line-height: 1.2
}

.news-detail-page .article-meta {
    color: #666;
    margin-bottom: 2rem;
    font-size: .9rem
}

.news-detail-page .article-cover {
    margin: 0 -1rem 2rem;
    text-align: center;
    background-color: var(--card-bg);
    border-radius: 8px
}

.news-detail-page .article-cover img {
    width: 100%;
    height: auto;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
    display: block
}

.news-detail-page .article-body {
    line-height: 1.8;
    font-size: 1.1rem
}

.news-detail-page .article-body p {
    margin-bottom: 1.5rem
}

.news-detail-page .article-body img {
    max-width: 100%;
    height: auto;
    border-radius: 4px
}

.doc-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem
}

.doc-table th,
.doc-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #eee
}

.doc-table th {
    background: var(--bg-color);
    color: var(--text-color);
    font-weight: 600
}

.doc-table .doc-desc {
    font-size: .85rem;
    color: #666;
    margin: .25rem 0 0
}

.doc-table .badge {
    padding: .25rem .5rem;
    border-radius: 4px;
    font-size: .8rem;
    text-transform: uppercase;
    background: var(--card-bg)
}

.doc-table .badge.report {
    background: #262223;
    color: #DDC6B6;
}

.doc-table .badge.regulation {
    background: #EEC0B3;
    color: #822B00;
}

.doc-table .badge.scientific {
    background: #822B00;
    color: #E2B144;
}

.doc-table .badge.form {
    background: #234E70;
    color: #FBF8BE;
}

.doc-table .badge.educational {
    background: #FEE57B;
    color: #285E2C;
}

.doc-table .badge.other {
    background: #f8d7da;
    color: #721c24;
}

.doc-table .btn-download {
    display: inline-block;
    padding: .5rem 1rem;
    background: var(--primary);
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: .9rem
}

.doc-table .btn-download:hover {
    opacity: .9
}

@media(max-width:768px) {
    .doc-table {
        display: block;
        width: 100%;
        box-sizing: border-box
    }

    .doc-table thead {
        display: none
    }

    .doc-table tbody {
        display: block;
        width: 100%;
        box-sizing: border-box
    }

    .doc-table tr {
        display: block;
        width: 100%;
        box-sizing: border-box;
        margin-bottom: 1.5rem;
        border: 1px solid var(--border);
        border-radius: var(--radius-md);
        background: var(--bg-card);
        box-shadow: var(--shadow-sm)
    }

    .doc-table td {
        display: flex;
        width: 100%;
        box-sizing: border-box;
        text-align: center;
        padding: 1rem;
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        justify-content: space-between;
        align-items: center;
    }

    .doc-table td:last-child {
        border-bottom: none
    }

    .doc-table td:before {
        content: attr(data-label);
        float: left;
        font-weight: 600;
        color: var(--text-muted);
        text-transform: uppercase;
        font-size: .85rem
    }

    .doc-table .doc-desc {
        text-align: center;
        margin-top: .5rem
    }
}

.main-footer {
    background-color: var(--card-bg);
    border-top: 1px solid rgba(0, 0, 0, .1);
    padding: 1.5rem 0;
    margin-top: 4rem
}

.main-footer .footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem
}

@media(max-width:600px) {
    .main-footer .footer-content {
        flex-direction: column;
        text-align: center
    }
}

.main-footer p {
    margin: 0;
    font-size: .9rem;
    color: var(--text-muted);
}

.main-footer .footer-dev {
    color: var(--text-muted);
    font-size: .8rem
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 1.25rem;
  align-items: center;
  justify-content: center; /* looks good when footer stacks on mobile */
}

.footer-link {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  font-size: .9rem;
  position: relative;
  padding: .25rem 0;
  transition: color .2s ease;
}

/* underline animation similar to header nav */
.footer-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 0%;
  background-color: var(--primary);
  transition: width .25s ease;
}

.footer-link:hover,
.footer-link:focus-visible {
  color: var(--text-main);
}

.footer-link:hover::after,
.footer-link:focus-visible::after {
  width: 100%;
}

/* Cookie Banner Styles */
.cookie-banner {
  position: fixed;
  bottom: 2rem;
  width: min(600px, 90%);
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 2000;
  padding: 1rem 1.5rem;
  animation: slideUp 0.3s ease-out;
}

.cookie-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.cookie-text {
  margin: 0;
  padding-bottom: 1rem;
  font-size: 0.9rem;
  color: var(--text-main);
}

.cookie-actions {
    display: flex;
    justify-content: space-evenly;
}

@keyframes slideUp {
  from { transform: translate(0%, 100%); opacity: 0; }
  to   { transform: translate(0%, 0); opacity: 1; }
}

@media (max-width: 600px) {
  .cookie-content {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }

  .cookie-banner {
    bottom: 0;
    left: 0;
    transform: none;
    width: 90%;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
  }
}

/* Pagination Container */
.pagination-container {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 3rem;
    padding-top: 2rem;
}

/* Pagination Wrapper */
.pagination {
    display: flex;
    align-items: center;
    gap: 1.5rem; /* More space between elements */
    padding: 0.5rem 1rem;
}

/* The Page Counter Middle Text */
.pagination .page-info {
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-color);
    letter-spacing: 0.5px;
}

/* SHARED BUTTON STYLES */
.pagination .btn,
.pagination .btn-disabled {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.5rem;
    border-radius: 50px; /* Pill shape */
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid; /* Solid border for structure */
}

/* ACTIVE BUTTONS (Next/Prev) */
.pagination .btn {
    border-color: var(--primary);
    color: var(--primary);
    background-color: transparent;
}

.pagination .btn:hover {
    background-color: var(--primary);
    color: #ffffff; /* White text on hover */
    transform: translateY(-2px); /* Slight lift */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); /* Soft shadow */
}

.pagination .btn:active {
    transform: translateY(0);
}

/* DISABLED STATE */
.pagination .btn-disabled {
    border-color: var(--border);
    color: var(--text-muted);
    background-color: rgba(0, 0, 0, 0.02);
    cursor: not-allowed;
    opacity: 0.6;
    pointer-events: none; /* Prevents clicking */
}
