html { scroll-behavior: smooth; }

/* Pronounced gray gradient */
body {
    background: linear-gradient(135deg, #d9e0e8 0%, #f4f7f9 100%);
    min-height: 100vh;
}

/* The SEPA Blue Navigation Bar */
.sepa-blue-nav {
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

/* Ensure the links inside the blue bar are crisp white */
.sepa-blue-nav .uk-navbar-nav > li > a {
    font-weight: bold;
    text-transform: none;
    font-size: 16px;
    padding: 0 25px; /* Increased horizontal padding */
    min-height: 50px; /* Reduced vertical height */
}
.sepa-blue-nav .uk-navbar-nav > li:hover > a {
    background: rgba(0,0,0,0.1);
}

.hero-banner {
    background-color: #0d2a4a;
}
.uk-slideshow-items { min-height: 50vh !important; }

/* Constrain standard images and iframes */
.content-wrap iframe { max-width: 100%; border-radius: 8px; }
.content-wrap img { max-width: 100%; height: auto; border-radius: 8px; margin-bottom:15px; }
.content-wrap ul { padding-left: 20px; }
.content-wrap li { margin-bottom: 10px; }

/* Typography matching SEPA style */
.sepa-blue-text { color: #175b8a !important; }
.sepa-red-text { color: #ce1126 !important; }

/* Sidebar & Cards */
.sidebar-block {
    background: #ffffff;
    border-radius: 6px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    margin-bottom: 20px;
    overflow: hidden;
}
.sidebar-img-wrap {
    width: 100%;
    margin: 0;
}
.sidebar-img-wrap img {
    border-radius: 6px 6px 0 0;
    width: 100%;
}
.sidebar-content-wrap { padding: 20px; }
.sidebar-content-wrap h4 { margin: 0 0 10px 0; font-weight: bold; }

.social-link-icon-sidebar { margin: 0 5px; }
.social-link-icon-sidebar:hover { opacity: 0.8; }
.slide-overlay-box { background: rgba(0,0,0,0.6); padding: 40px; border-radius: 4px; }

/* News Cards Typography */
.news-card-title {
    font-size: 1.15rem;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    overflow-wrap: break-word; /* Prevent stretching */
    word-break: break-word;    /* Prevent stretching */
    margin-top: 0 !important;
    margin-bottom: 5px !important;
    font-weight: 800 !important;
}

/* Condense the padding globally inside news cards so more space is available for text */
#sepa-news-highlights .uk-card-body {
    padding: 20px !important;
}

/* Category Tags */
.sepa-tag-pill {
    display: inline-block;
    background: #175b8a; /* SEPA Blue */
    color: #ffffff !important;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: capitalize;
    padding: 4px 12px;
    border-radius: 20px;
    letter-spacing: 0.05em;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}

.hero-tag-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 25;
}

/* News Cards WYSIWYG truncation with fade effect */
.news-card-truncate {
    max-height: 120px;
    overflow: hidden;
    position: relative;
    font-size: 0.95rem;
    color: #444444 !important; /* WCAG Compliant Dark Grey */
}
.news-card-truncate * {
    color: #444444 !important;
}
.news-card-truncate::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(transparent, #ffffff);
}

.hero-wysiwyg-wrap p {
    margin-bottom: 10px;
}
.hero-wysiwyg-wrap p:last-child {
    margin-bottom: 0;
}

/* Override UIkit Text Large Baseline */
.uk-text-large {
    font-size: 1.2rem;
    line-height: 1.3;
}

/* Enforce 100% height inside the CSS Aspect Box wrapper to stop UIkit collapsing it */
.sepa-hero-aspect-box .uk-slideshow-items,
.sepa-hero-aspect-box .uk-slideshow-items > li {
    height: 100% !important;
    min-height: 100% !important;
}

/* Footer Link Styles */
.footer-inline-links a {
    color: #ffffff !important;
    font-weight: bold !important;
    text-decoration: underline !important;
}

hr {
    border: 0;
    border-top: 2px solid #bebebe;
    margin: 20px 0;
}

.sidebar-sticky-container {
    z-index: 990 !important;
}

/* --- Layer Superiority: Ensure Modals beat everything --- */
.uk-modal, 
.uk-modal-full {
    z-index: 10000 !important;
}

/* Ensure the site's nav bars are explicitly lower than the modal layer */
.sepa-blue-nav,
.uk-sticky,
.mobile-sticky-header {
    z-index: 995 !important;
}

/* --- Advanced Project Gallery Modal --- */

.project-modal-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 25px;
    background: #fff;
    border-bottom: 1px solid #e5e5e5;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.project-modal-nav .nav-logo img {
    height: 40px;
    width: auto;
}

.modal-nav-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.modal-nav-btn {
    color: #333;
    padding: 8px;
    border-radius: 50%;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-nav-btn:hover {
    background: #f0f2f5;
    color: var(--nav-bg);
}

.project-meta-sidebar {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
}

.project-meta-list dt {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    margin-bottom: 2px;
}

.project-meta-list dd {
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 15px;
    margin-left: 0;
}

.project-meta-list dd:last-child {
    margin-bottom: 0;
}

/* --- Print Support --- */
@media print {
    body {
        background: #ffffff !important;
    }

    /* Hide EVERYTHING on the main page */
    body > *:not(.uk-modal.uk-open) {
        display: none !important;
    }
    
    /* Ensure the open modal is visible and positioned for print */
    .uk-modal.uk-open {
        display: block !important;
        position: static !important;
        opacity: 1 !important;
        background: #ffffff !important;
    }

    .uk-modal-dialog {
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
        box-shadow: none !important;
        border: none !important;
    }

    /* Hide the navigation controls during print */
    .project-modal-nav {
        border-bottom: 2px solid #333;
    }
    
    .modal-nav-controls,
    .uk-modal-close-default,
    .uk-slidenav,
    .uk-slideshow-nav {
        display: none !important;
    }

    /* Ensure colors print correctly */
    .sepa-blue-text { color: #175b8a !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .project-meta-sidebar { 
        background: #f8fafc !important; 
        border: 1px solid #e2e8f0 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    /* Enforce 2-Column layout since print dpi is large enough */
    .print-project-grid {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        background: #ffffff !important;
    }
    .print-project-main {
        width: 66% !important;
        flex: 0 0 66% !important;
        padding-right: 30px !important;
        box-sizing: border-box !important;
    }
    .print-project-meta {
        width: 34% !important;
        flex: 0 0 34% !important;
        box-sizing: border-box !important;
    }

    /* Print Heading Scaling (Further Reduced) */
    .full-project-modal .uk-h1 {
        font-size: 1.8rem !important;
        margin-bottom: 20px !important;
    }
    
    .full-project-modal .uk-text-large,
    .full-project-modal .uk-text-large p,
    .full-project-modal .uk-text-large li {
        font-size: 1rem !important;
        line-height: 1.4 !important;
    }

    /* Prevent Image Orphans */
    .project-hero-wrap {
        page-break-after: avoid !important;
        margin-bottom: 30px !important;
    }
}
