/* =========================================
   AquaINFRA Design System
   ========================================= */

/* Import Mona Sans */
@font-face {
    font-family: 'Mona Sans';
    src: url('https://github.com/github/mona-sans/raw/v1.0.1/fonts/woff2/Mona-Sans.woff2') format('woff2 supports variations'),
        url('https://github.com/github/mona-sans/raw/v1.0.1/fonts/woff2/Mona-Sans.woff2') format('woff2-variations'),
        url('https://github.com/github/mona-sans/raw/v1.0.1/fonts/woff2/Mona-Sans.woff2') format('woff2');
    font-weight: 200 900;
    font-stretch: 75% 125%;
}

:root {
    /* Brand Colors (Updated from official site) */
    --aqua-blue: #3564ac;
    --aqua-blue-dark: #070608;
    /* Dark navy/black for text */
    --aqua-green: #76b943;
    /* New primary action color */
    --aqua-bg-light: #eaf1fc;
    /* Light section variable */

    /* Neutrals */
    --gray-900: #070608;
    --gray-800: #343a40;
    --gray-600: #555555;
    --gray-200: #e9ecef;
    --gray-100: #f8f9fa;
    --white: #ffffff;

    /* Layout */
    --max-width: 1200px;
    --content-width: 960px;
    --header-height: 80px;
}

/* Base Reset & Typography */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    /* Mona Sans is the official font. Fallback to system-ui. */
    font-family: "Mona Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--gray-900);
    line-height: 1.6;
    background-color: var(--white);
    /* Official site is cleaner/white */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-size: 1rem;
    font-size: clamp(0.8rem, 0.75rem + 0.15vw, 0.88rem);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--aqua-blue-dark);
    line-height: 1.3;
    margin-bottom: 1rem;
    font-weight: 700;
}

h1 {
    font-size: 1.85rem;
    padding-bottom: 0.5rem;
    margin-top: 1.5rem;
    color: var(--aqua-blue);
    border-bottom: 2px solid var(--aqua-blue-light, #e1e9f6);
}

h2 {
    font-size: 1.5rem;
    margin-top: 1.75rem;
    color: var(--aqua-blue-dark);
    border-bottom: 1px solid var(--gray-200);
    padding-bottom: 0.25rem;
}

h3 {
    font-size: 1.25rem;
    margin-top: 1.5rem;
    color: var(--gray-800);
}

h4 {
    font-size: 1.1rem;
    margin-top: 1.25rem;
    color: var(--gray-800);
}

p {
    margin-bottom: 1rem;
    font-size: 1.05em;
    /* Scales with body */
    text-align: justify;
    hyphens: auto;
    -webkit-hyphens: auto;
}

ul,
ol {
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
}

li {
    margin-bottom: 0.5rem;
}

a {
    color: var(--aqua-blue);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--aqua-green);
    text-decoration: underline;
}

/* Global Responsive Images */
img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
}

/* =========================================
   Layout Structure
   ========================================= */

/* Main Wrapper */
.main-wrapper {
    flex: 1;
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 2rem 1.5rem;
    background: var(--white);
    margin-top: 2rem;
    margin-bottom: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    /* Prevent horizontal scroll */
}

@media (max-width: 640px) {
    .main-wrapper {
        padding: 1rem 0.8rem;
        margin-top: 1rem;
        margin-bottom: 1rem;
        border-radius: 0;
    }
}

/* =========================================
   Header & Navigation
   ========================================= */

.site-header {
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    padding: 0.75rem 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.header-logo,
.site-header__logo {
    height: 50px !important;
    width: auto !important;
    max-width: 250px !important;
    object-fit: contain;
    display: block;
}

.site-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--aqua-blue);
    border-left: 2px solid var(--gray-200);
    padding-left: 1.5rem;
}

/* Navigation */
.site-nav {
    display: flex;
    gap: 1.5rem;
}

.nav-link {
    font-weight: 600;
    color: var(--gray-600);
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
}

.nav-link:hover,
.nav-link.active {
    color: var(--aqua-blue);
    border-bottom-color: var(--aqua-green);
    text-decoration: none;
}

/* Mobile Header */
@media (max-width: 640px) {
    .header-inner {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .header-brand {
        flex-direction: column;
        /* Stack logos and title */
        gap: 0.75rem;
    }

    .site-title {
        border-left: none;
        padding-left: 0;
    }

    .site-nav {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 1rem;
    }
}

/* =========================================
   Components
   ========================================= */

/* Callout Box */
.callout {
    padding: 1.5rem;
    background-color: var(--gray-100);
    border-left: 4px solid var(--aqua-green);
    border-radius: 0 4px 4px 0;
    margin: 2rem 0;
}

.callout strong {
    display: block;
    margin-bottom: 0.4rem;
    color: var(--aqua-blue-dark);
    font-size: 1rem;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.78rem;
    font-weight: 600;
    background: var(--aqua-green-light);
    color: var(--aqua-blue-dark);
    margin-right: 0.4rem;
}

/* Tables */
.table-wrapper {
    max-width: 100%;
    overflow-x: auto;
    margin: 2rem 0;
    border-radius: 6px;
    border: 1px solid var(--gray-200);
}

table {
    width: 100%;
    border-collapse: collapse;
    /* Remove min-width to allow container to handle overflow */
}

th,
td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
}

th {
    background-color: var(--aqua-bg-light, #eaf1fc);
    color: var(--aqua-blue);
    font-weight: 600;
}

tr:hover {
    background-color: #fafafa;
}

/* Images */
img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    font-weight: 600;
    text-align: center;
    border-radius: 5px;
    transition: all 0.2s ease;
    cursor: pointer;
    border: 2px solid transparent;
    font-size: 0.95rem;
    /* Brand Blue Gradient Button */
    background: linear-gradient(135deg, var(--aqua-blue) 0%, #2a5291 100%);
    color: var(--white);
    box-shadow: none;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: none;
    color: var(--white);
    text-decoration: none;
    opacity: 0.9;
    background: linear-gradient(135deg, #2a5291 0%, var(--aqua-blue) 100%);
}

.btn--outline {
    background: transparent;
    color: var(--aqua-blue);
    border-color: var(--aqua-blue);
    box-shadow: none;
}

.btn--outline:hover {
    background: var(--aqua-blue);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(53, 100, 172, 0.2);
}

.btn-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 3rem;
    gap: 1rem;
    flex-wrap: wrap;
    width: 100%;
}

@media (max-width: 600px) {
    .btn-group {
        flex-direction: row;
        gap: 0.5rem;
        flex-wrap: nowrap;
        /* Strictly prevent wrapping */
    }

    .btn-group .btn {
        width: auto;
        flex: 1;
        padding: 0.6rem 0.2rem;
        /* Tight padding */
        font-size: 0.8rem;
        /* Smaller font */
        display: flex;
        align-items: center;
        justify-content: center;
        line-height: 1.1;
        white-space: normal;
        /* Allow text to wrap inside button */
        height: auto;
        /* Allow button to grow in height */
        min-height: 44px;
        /* Minimum touch target */
    }
}

/* Grid for pages with TOC */
.page-with-toc {
    display: grid;
    grid-template-columns: 1fr 240px;
    /* Main content | TOC Sidebar */
    gap: 3rem;
}

.toc-container {
    position: sticky;
    top: 2rem;
    height: fit-content;
    padding: 1.5rem;
    background: var(--gray-100);
    border-radius: 6px;
    border: 1px solid var(--gray-200);
}

.toc-title {
    font-size: 1rem;
    text-transform: uppercase;
    color: var(--gray-600);
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--aqua-green);
    padding-bottom: 0.5rem;
}

.toc-list {
    list-style: none;
    padding: 0;
}

.toc-list li {
    margin-bottom: 0.75rem;
}

.toc-list a {
    color: var(--gray-600);
    font-size: 0.95rem;
}

.toc-list a:hover {
    color: var(--aqua-blue);
}

@media (max-width: 1024px) {
    .page-with-toc {
        grid-template-columns: 1fr;
        /* Stack on smaller screens */
    }

    .toc-container {
        position: static;
        margin-bottom: 2.5rem;
        background: var(--aqua-green-light);
        /* Highlight TOC on mobile */
    }
}

/* =========================================
   Footer
   ========================================= */

.site-footer {
    background: var(--aqua-blue-dark);
    color: var(--white);
    padding: 3rem 1.5rem;
    margin-top: auto;
}

.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-logos {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}



.site-footer__eu-flag {
    height: 35px !important;
    width: auto !important;
    display: block;
}

.footer-text {
    text-align: right;
    font-size: 0.9rem;
    opacity: 0.8;
}

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

    .footer-text {
        text-align: center;
    }
}

/* =========================================
   Handbook Framework Additions
   ========================================= */

/* Grid Layout */
.handbook-grid {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 3rem;
    align-items: start;
}

/* Sidebar Styles */
.page-sidebar {
    background: var(--gray-100);
    padding: 0.8rem;
    border-radius: 6px;
    border: 1px solid var(--gray-200);
    position: sticky;
    top: 2rem;
    height: fit-content;
    max-height: calc(100vh - 4rem);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--gray-200) transparent;
}

.sidebar__section {
    margin-bottom: 1.2rem;
}

.sidebar__section:last-child {
    margin-bottom: 0;
}

.sidebar__heading {
    font-size: 0.95rem;
    color: var(--gray-900);
    letter-spacing: 0.03em;
    margin-bottom: 0.5rem;
    border-bottom: 1.5px solid var(--aqua-blue);
    padding-bottom: 0.2rem;
    margin-top: 0;
    font-weight: 600;
}

.sidebar__text {
    font-size: 0.78rem;
    color: var(--gray-600);
    margin-bottom: 0.3rem;
    line-height: 1.25;
}

.sidebar__list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar__list li {
    margin-bottom: 0.4rem;
}

.sidebar__link {
    display: block;
    color: var(--gray-800);
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.2s ease;
    font-weight: 400;
    line-height: 1.3;
}

.sidebar__link:hover {
    color: var(--aqua-blue);
    transform: translateX(4px);
    text-decoration: none;
}

.sidebar__region {
    margin-bottom: 0.1rem;
}

.sidebar__region-title {
    display: block;
    font-weight: 400;
    color: rgb(7, 6, 8);
    margin-bottom: 0;
    font-size: 0.9rem;
}

/* Content Area */
.handbook-content {
    min-width: 0;
    max-width: 800px;
}

/* Responsive */
@media (max-width: 960px) {
    .handbook-grid {
        display: flex;
        flex-direction: column;
        gap: 2rem;
    }

    .page-sidebar {
        position: static;
        width: 100%;
        order: 2;
        /* Sidebar below content on mobile */
        max-height: none;
        padding: 1rem;
    }
}

/* Common Responsive Utilities */
.video-container {
    position: relative;
    padding-bottom: 56.25%;
    /* 16:9 ratio */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    margin: 2rem 0;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    border-radius: 8px;
}



@media (max-width: 640px) {
    .sequence-navigation {
        flex-direction: column;
        gap: 1rem;
    }

    .btn-seq {
        width: 100%;
        text-align: center;
    }

    h1 {
        font-size: 1.15rem !important;
    }

    h2 {
        font-size: 1rem !important;
    }

    h3 {
        font-size: 0.9rem !important;
    }

    p {
        font-size: 0.88rem !important;
        line-height: 1.4;
    }

    .alert-box {
        padding: 1rem;
        font-size: 0.85rem;
    }
}

/* =========================================
   Header Centering
   ========================================= */

.site-header__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex !important;
    justify-content: space-between !important;
    /* Space between brand and nav */
    align-items: center !important;
    position: relative;
    padding-top: 0.75rem !important;
    padding-bottom: 0.75rem !important;
}

.site-header__brand {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 1.5rem !important;
    width: auto !important;
    justify-content: flex-start !important;
    /* Left align */
}

.site-header__title {
    font-size: 1.5rem !important;
    border-left: 2px solid #e9ecef !important;
    /* Restore separator */
    padding-left: 1.5rem !important;
    text-align: left !important;
    color: #3564ac;
}

.site-header__title-container {
    flex: 1;
    text-align: left;
    /* Ensure title text aligns left against the separator */
}

/* Push logo to the left absolute to keep title centered in the whole header */
/* Remove absolute positioning to allow stacking */
/* Remove absolute positioning to keep valid flow */
.site-header__brand a[href*="aquainfra.eu"] {
    position: static !important;
    margin-bottom: 0;
    display: flex;
    /* Ensure link wraps image tightly */
}


/* =========================================
   AquaINFRA Style Footer (Dark Theme)
   ========================================= */

.site-footer {
    background-color: #000 !important;
    color: #fff !important;
    padding: 1.5rem 0 !important;
    /* Reduced from 3rem */
    border-top: none !important;
}

.site-footer__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    /* Reduced from 2.5rem */
    text-align: left;
    align-items: flex-start !important;
}

.site-footer__brand {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.site-footer__aquainfra-logo {
    height: 40px !important;
    /* Scaled down for better fit */
    width: auto !important;
}

.site-footer__nav {
    display: flex;
    gap: 0.75rem;
    /* Reduced from 1.5rem */
    flex-wrap: wrap;
}

.site-footer__nav a {
    color: #fff !important;
    font-weight: 700;
    text-decoration: none;
    font-size: 1rem;
}

.site-footer__nav a:hover {
    text-decoration: underline;
}

.site-footer__partners {
    margin: 0.5rem 0;
    /* Reduced from 1rem */
}

.site-footer__logo {
    height: 45px !important;
    /* Explicit height to prevent collapse */
    width: auto !important;
    /* Original colors restored (no filter) */
    opacity: 0.9;
    transition: opacity 0.2s;
}

.site-footer__logo:hover {
    opacity: 1;
}

@media (max-width: 768px) {
    .site-footer__logo {
        max-height: 40px !important;
        max-width: 200px !important;
    }
}

.site-footer__funding-block {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 1000px;
}

.site-footer__eu-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.site-footer__eu-flag {
    height: 40px !important;
    width: auto !important;
}

.site-footer__funding-text strong {
    font-size: 1.1rem;
}

.site-footer__disclaimer {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #ccc !important;
    margin: 0;
}

.site-footer__bottom {
    border-top: 1px solid #333;
    padding-top: 1.5rem;
    width: 100%;
    font-size: 0.9rem;
    color: #888 !important;
}

/* =========================================
   Responsive Improvements (Appended)
   ========================================= */

/* Very Wide Screens (>1600px) */
@media (min-width: 1600px) {
    :root {
        --max-width: 1400px;
    }

    body {
        font-size: 1.15rem;
        /* Fallback */
        font-size: clamp(1.15rem, 1rem + 0.5vw, 1.3rem);
        /* Step up for large monitors */
    }

    .main-wrapper,
    .site-header__inner,
    .footer-inner {
        max-width: var(--max-width);
        /* Gently increase max-width but keep contained */
    }

    .handbook-grid {
        gap: 4rem;
        /* More breathing room */
    }
}

/* Tablet / Laptop Tweaks (768px - 1024px) */
@media (max-width: 1024px) {
    .handbook-grid {
        gap: 2rem;
    }
}

/* Small Phones (<400px) */
@media (max-width: 400px) {
    .site-header__inner {
        padding: 0.5rem 1rem !important;
    }

    .site-header__logo {
        max-width: 180px !important;
        /* Smaller logo */
    }

    .site-title {
        font-size: 1.1rem !important;
    }

    .main-wrapper {
        padding: 1.5rem 1rem;
    }

    h1 {
        font-size: 1.75rem;
    }
}

/* Responsive Tables */
/* Ensure tables don't overflow */
.handbook-content table {
    display: table;
    /* Reverting to table so it respects width: 100% properly */
    width: 100%;
    /* Overflow handling should be on the wrapper, not the table itself if we want full width table behavior */
}

/* Responsive Images */
.handbook-content img {
    max-width: 100%;
    height: auto;
}

/* Footer Stacking Tweaks */
@media (max-width: 640px) {
    .site-footer__inner {
        gap: 2rem;
        text-align: center;
    }

    .site-footer__brand,
    .site-footer__nav,
    .footer-logos,
    .site-footer__eu-info {
        align-items: center !important;
        justify-content: center !important;
        width: 100%;
    }

    .site-footer__nav {
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
        gap: 1rem;
    }

    .site-footer__funding-text {
        text-align: center;
    }
}

/* =========================================
   Mobile Content Fixes (Video/Tables)
   ========================================= */

/* Responsive Video Wrapper */
.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    border-radius: 8px;
    margin-bottom: 3rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Improved Table Wrapper */
.table-wrapper table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    /* Enforce consistent column widths if width is specified, or at least respect 100% */
}

/* Ensure data cells don't overflow awkwardly */
.table-wrapper td,
.table-wrapper th {
    word-wrap: break-word;
    vertical-align: top;
}

/* Make first column slightly smaller if needed, or let them auto-distribute but keep table 100% */
.table-wrapper th:first-child,
.table-wrapper td:first-child {
    width: 30%;
    /* Approximate width for 'Focus Area' */
}

/* Small Screen Content Spacing */
@media (max-width: 480px) {
    .handbook-content {
        padding: 1rem 0.75rem !important;
    }

    body {
        font-size: 0.95rem;
        /* Slightly smaller on very narrow screens */
        overflow-x: hidden;
        /* Prevent horizontal scroll on the entire page */
    }

    .handbook-content p,
    .handbook-content li {
        line-height: 1.6;
    }

    .handbook-content ul,
    .handbook-content ol {
        padding-left: 1.25rem;
        /* Slightly tighter on mobile but still inside */
    }

    .main-wrapper {
        padding: 1.5rem 0.75rem !important;
        margin-left: 0.5rem;
        margin-right: 0.5rem;
        width: auto;
    }
}

/* =========================================
   Training Cards Redesign
   ========================================= */

.training-grid {
    display: grid;
    /* Enforce 3 columns always as requested */
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.training-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    text-align: center;
    aspect-ratio: 1;
    /* Square card */
    background: linear-gradient(135deg, var(--aqua-blue), var(--aqua-blue-dark));
    color: var(--white);
    padding: 1.5rem;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

/* Card Content Layout */
.training-card .card-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    flex-grow: 1;
    width: 100%;
    position: relative;
    /* For absolute positioning of transitions if needed */
    padding-bottom: 3rem;
    /* Space for the button */
}

/* Default State: Title Visible, Desc Hidden */
.training-card h3 {
    color: var(--white);
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    /* Fluid font size */
    font-weight: 700;
    margin: 0;
    line-height: 1.3;
    opacity: 1;
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform: translateY(0);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    padding: 0 1.5rem;
}

/* Description Hidden by Default */
.training-card p {
    color: rgba(255, 255, 255, 0.95);
    font-size: 1rem;
    line-height: 1.5;
    opacity: 0;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -40%);
    /* Start slightly lower */
    width: 100%;
    padding: 0 1.5rem;
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
    /* Let clicks pass through */
}

/* Hover State: Hide Title, Show Desc */
.training-card:hover h3 {
    opacity: 0;
    transform: translate(-50%, -60%);
    /* Move up */
}

.training-card:hover p {
    opacity: 1;
    transform: translate(-50%, -50%);
    /* Center it */
}

/* Button (Badge) Styling - "Clean and Organized" */
.training-card .badge {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    background: transparent;
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.5);
    padding: 0.5rem 1.25rem;
    border-radius: 30px;
    /* Pill shape */
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.training-card:hover .badge {
    background: var(--white);
    color: var(--aqua-blue-dark);
    border-color: var(--white);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .training-grid {
        grid-template-columns: repeat(3, 1fr);
        /* Keep 3 as requested */
    }

    /* Tablet/Intermediate - Reduce size and weight */
    .training-card h3 {
        font-size: 1.25rem;
        font-weight: 600;
        /* Semi-bold */
    }
}

/* Specific adjustment for narrower tablet portrait/small desktop */
@media (max-width: 900px) {
    .training-card h3 {
        font-size: 1.15rem;
        font-weight: 500;
        /* Medium weight, no longer bold */
    }
}

/* Removed 768px breakpoint to keep 3 columns on tablet as requested */
/* Mobile Breakpoint */
@media (max-width: 600px) {
    .training-grid {
        grid-template-columns: repeat(2, 1fr);
        /* Force 2 columns on mobile */
        gap: 0.75rem;
    }

    .training-card {
        padding: 0.75rem;
        /* Reduce padding to prevent overlap */
        min-height: 180px;
        /* Slightly shorter */
        aspect-ratio: auto;
    }

    .training-card h3 {
        font-size: 1rem;
        /* Smaller title */
        font-weight: 500;
        /* Not bold */
        padding: 0 0.25rem;
        width: 100%;
    }

    .training-card p {
        font-size: 0.8rem;
        padding: 0 0.25rem;
        width: 100%;
    }

    .training-card .badge {
        bottom: 0.75rem;
        /* Tighter button placement */
        padding: 0.35rem 0.75rem;
        font-size: 0.75rem;
    }
}

/* Cleaned up duplicate 480px block */