/*
==============================================================================
LUVEX THEME - UV News Styling (Final Layout Correction)
==============================================================================
Description: Styles for the UV News archive and single post pages.
Dependencies: _variables.css (for color variables)
Last Update: 2025-08-24
==============================================================================
*/

/* --- 1.0 News Archive: Hero & Filter --- */

/*
==============================================================================
FINALES HERO LAYOUT: KORRIGIERTE STRUKTUR
==============================================================================
*/

.luvex-hero--split-compact {
    min-height: auto;
    padding: calc(80px + 5rem) 1.5rem 4rem 1.5rem;
    display: flex;
    align-items: center;
    position: relative; /* Wichtig für die Positionierung des Canvas */
    overflow: hidden; /* Verhindert, dass die Animation überläuft */
}

/* NEU: Styling für das Canvas-Element */
.luvex-hero--split-compact #hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1; /* Liegt im Hintergrund */
}

.luvex-hero--split-compact .luvex-hero__container {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    text-align: left;
    gap: 2rem;
    max-width: 1250px;
    margin: 0 auto;
    width: 100%;
    position: relative; /* Stellt sicher, dass der Inhalt über dem Canvas liegt */
    z-index: 2;
}

.luvex-hero--split-compact .luvex-hero__content {
    flex-grow: 1;
}

/*
 * Spezifische Regeln für die Textelemente im News-Hero.
*/
.luvex-hero--split-compact .luvex-hero__title {
    text-align: left;
    margin: 0 0 1rem 0;
    font-size: clamp(2.2rem, 4vw, 3rem);
}

.luvex-hero--split-compact .luvex-hero__description {
    text-align: left;
}


.luvex-hero--split-compact .luvex-hero__cta-container {
    flex-shrink: 0;
    margin-top: 0;
    gap: 1rem;
    transform: translateY(2.5rem); 
}

@media (max-width: 768px) {
    .luvex-hero--split-compact {
        padding: calc(80px + 3rem) 1.5rem 3rem 1.5rem;
    }

    .luvex-hero--split-compact .luvex-hero__container {
        flex-direction: column;
        align-items: flex-start;
        gap: 2.5rem;
    }

    .luvex-hero--split-compact .luvex-hero__cta-container {
        flex-direction: row;
        width: 100%;
        transform: none;
    }
}


/*
==============================================================================
FILTER & GRID CONTAINER ALIGNMENT
==============================================================================
*/

.news-filter-section {
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    position: sticky;
    top: 80px;
    z-index: 30;
    border-bottom: 1px solid #e5e7eb;
    padding: 0 1.5rem;
}

body.admin-bar .news-filter-section {
    top: 112px;
}

.news-filter-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    padding: 1.25rem 0;
    max-width: 1250px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .news-filter-container {
        flex-direction: column;
        align-items: flex-start;
    }
}

.news-filter-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.news-filter-btn {
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    background-color: #f3f4f6;
    color: #374151;
}

.news-filter-btn:hover {
    background-color: #e5e7eb;
}

.news-filter-btn.active {
    background-color: var(--luvex-dark-blue);
    color: white;
    box-shadow: 0 4px 14px 0 rgba(109, 213, 237, 0.3);
}

.news-search-form {
    position: relative;
    width: auto;
    flex-shrink: 0;
}

.news-search-input {
    width: 100%;
    min-width: 280px;
    padding: 0.5rem 1rem 0.5rem 2.5rem;
    border: 1px solid #d1d5db;
    border-radius: 9999px;
    transition: all 0.3s ease;
}

.news-search-input:focus {
    outline: none;
    border-color: transparent;
    box-shadow: 0 0 0 2px var(--luvex-accent-blue);
}

.news-search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
}


/* --- 2.0 News Grid & Cards --- */

.news-grid-section {
    padding: 4rem 1.5rem;
}

.news-grid-container {
    max-width: 1250px;
    margin: 0 auto;
}

.news-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .news-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Featured & Standard Card Base */
.news-card {
    background-color: white;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

/* Featured Card Specifics */
.featured-article-wrapper {
    margin-bottom: 4rem;
}

.featured-article {
    display: flex;
    flex-direction: column;
}

@media (min-width: 768px) {
    .featured-article {
        flex-direction: row;
    }
}

.featured-article .news-card__image-container {
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .featured-article .news-card__image-container {
        width: 50%;
    }
}
@media (min-width: 1024px) {
    .featured-article .news-card__image-container {
        width: 60%;
    }
}

.featured-article .news-card__image {
    width: 100%;
    height: 16rem; /* 256px */
    object-fit: cover;
}

@media (min-width: 768px) {
    .featured-article .news-card__image {
        height: 100%;
    }
}

.featured-article .news-card__content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.featured-article .news-card__featured-tag {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--luvex-accent-blue);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.featured-article .news-card__title {
    font-size: 1.875rem;
    line-height: 2.25rem;
    font-weight: 700;
    color: var(--luvex-dark-blue);
    margin-top: 0.5rem;
    margin-bottom: 1rem;
}

.featured-article .news-card__excerpt {
    color: #475569;
    margin-bottom: 1.5rem;
}

.featured-article .news-card__read-more {
    display: inline-flex;
    align-items: center;
    font-weight: 600;
    color: var(--luvex-accent-blue);
    text-decoration: none;
}

/* Standard Card Specifics */
.standard-article .news-card__image-container {
    position: relative;
}

.standard-article .news-card__image {
    width: 100%;
    height: 12rem; /* 192px */
    object-fit: cover;
}

.standard-article .news-card__category-tag {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background-color: var(--luvex-cyan);
    color: var(--luvex-dark-blue);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
}

.standard-article .news-card__content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.standard-article .news-card__title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--luvex-dark-blue);
    margin-bottom: 0.5rem;
    flex-grow: 1;
}

.standard-article .news-card__excerpt {
    color: #475569;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    line-height: 1.5;
}

.standard-article .news-card__meta {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: #64748b;
}

/* Common Card Elements */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    -webkit-line-clamp: 2;
    line-clamp: 2;
}
.line-clamp-3 {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    -webkit-line-clamp: 3;
    line-clamp: 3;
}
.news-card__read-more .fa-arrow-right {
    margin-left: 0.5rem;
    transition: transform 0.3s ease;
}
.news-card__read-more:hover .fa-arrow-right {
    transform: translateX(4px);
}


/* --- 3.0 Pagination --- */
.news-pagination {
    margin-top: 4rem;
    display: flex;
    justify-content: center;
}

.news-pagination .nav-links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.news-pagination .page-numbers {
    display: inline-block;
    padding: 0.5rem 1rem;
    border: 1px solid #d1d5db;
    background-color: white;
    color: #374151;
    border-radius: 0.5rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.news-pagination .page-numbers:hover {
    background-color: #f3f4f6;
}

.news-pagination .page-numbers.current {
    background-color: var(--luvex-dark-blue);
    border-color: var(--luvex-dark-blue);
    color: white;
}

.news-pagination .page-numbers.dots {
    border: none;
    background: none;
}


/*
==============================================================================
4.0 SINGLE UV NEWS POST
==============================================================================
*/

.single-uv_news-container {
    padding: 3rem 1.5rem;
    max-width: 800px;
    margin: 0 auto;
}

/* --- 4.1 Single Post Header --- */
.single-news-header {
    margin-bottom: 2rem;
    text-align: center;
}

.single-news-header .category-link {
    display: inline-block;
    background-color: var(--luvex-cyan);
    color: var(--luvex-dark-blue);
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    margin-bottom: 1rem;
}

.single-news-header .entry-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--luvex-dark-blue);
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.single-news-header .entry-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
    font-size: 0.875rem;
    color: #475569;
}

.single-news-header .meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* --- 4.2 Featured Image --- */
.single-news-featured-image {
    margin-bottom: 3rem;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

.single-news-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* --- 4.3 Entry Content --- */
.entry-content {
    font-size: 1.125rem;
    line-height: 1.75;
    color: var(--luvex-text-dark);
}

.entry-content > *:first-child {
    margin-top: 0;
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
    color: var(--luvex-dark-blue);
    font-weight: 700;
    margin-top: 2.5em;
    margin-bottom: 1em;
    line-height: 1.3;
}

.entry-content h2 { font-size: 1.875rem; }
.entry-content h3 { font-size: 1.5rem; }
.entry-content h4 { font-size: 1.25rem; }

.entry-content p,
.entry-content ul,
.entry-content ol {
    margin-bottom: 1.5em;
}

.entry-content a {
    color: var(--luvex-accent-blue);
    text-decoration: underline;
    font-weight: 500;
}

.entry-content a:hover {
    color: var(--luvex-cyan);
}

.entry-content ul,
.entry-content ol {
    padding-left: 1.5em;
}

.entry-content blockquote {
    padding-left: 1.5rem;
    border-left: 4px solid var(--luvex-cyan);
    margin: 2rem 0;
    font-style: italic;
    color: #475569;
}

/* --- 4.4 Post Footer --- */
.single-news-footer {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid #e5e7eb;
}

.news-tags-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.news-tags-section .tags-title {
    font-weight: 600;
    color: var(--luvex-dark-blue);
    margin: 0;
}

.news-tags-section .tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.news-tags-section .tag-link {
    display: inline-block;
    background-color: #f3f4f6;
    color: #475569;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.news-tags-section .tag-link:hover {
    background-color: var(--luvex-cyan);
    color: var(--luvex-dark-blue);
}

/* --- 4.5 Post Navigation --- */
.post-navigation {
    margin-top: 3rem;
    padding-top: 3rem;
    border-top: 1px solid #e5e7eb;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .post-navigation {
        grid-template-columns: 1fr 1fr;
    }
}

.post-navigation .nav-previous,
.post-navigation .nav-next {
    display: block;
    text-decoration: none;
}

.post-navigation .nav-next {
    text-align: left;
}
@media (min-width: 768px) {
    .post-navigation .nav-next {
        text-align: right;
    }
}


.post-navigation .nav-label {
    font-size: 0.875rem;
    color: #64748b;
    display: block;
    margin-bottom: 0.5rem;
}

.post-navigation .nav-title {
    font-weight: 600;
    color: var(--luvex-dark-blue);
    transition: color 0.3s ease;
}

.post-navigation a:hover .nav-title {
    color: var(--luvex-accent-blue);
}
