/* ---------------------------------------------------
   NEWS BEREICH - SWITZERLAN DESIGN
--------------------------------------------------- */

/* 1. Container - Responsive Grid für bis zu 8 Posts */
ul.wp-block-latest-posts {
    list-style: none !important;
    display: grid;
    /* Erstellt Spalten ab 350px Breite, passt sich dem Bildschirm an */
    /*grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); */
    gap: 20px;
    margin: 0 auto 3rem 0;
    max-width: 1000px;
}

/* 2. Einzelner Post (Die Karte) - Layout mit Grid */
ul.wp-block-latest-posts li {
    display: grid;
    grid-template-columns: 220px 1fr; /* 120px für das Bild, Rest für den Text */
    grid-template-rows: auto auto auto 1fr;
    gap: 5px 15px; /* Abstand zwischen Textzeilen und Spalten */
    background-color: rgba(255, 255, 255, 0.05); /* Leichtes Grau/Transparent */
    padding: 15px;
    
    /* Die abgeschrägten Ecken (Polygon Form) - Oben Rechts & Unten Links */
    clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 20px 100%, 0 calc(100% - 20px));
    
    
    transition: transform 0.3s ease, background-color 0.3s ease;
}

/* Hover-Effekt für die gesamte Karte */
ul.wp-block-latest-posts li:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-3px); /* Leichter Schwebe-Effekt */
}

/* 3. Bild Formatierung */
.wp-block-latest-posts__featured-image {
    grid-column: 1 / 2;
    grid-row: 1 / span 4; /* Bild erstreckt sich über alle Textzeilen */
    margin: 0 !important;
    float: none !important; /* Hebt das WordPress alignleft auf */
}

.wp-block-latest-posts__featured-image img {
    width: 100%;
    height: 170px;
    object-fit: cover;
    /* Bild bekommt ebenfalls leicht abgeschrägte Ecken passend zur Karte */
    clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
}

/* 4. Typografie & Farben */
.wp-block-latest-posts__post-title {
    grid-column: 2 / 3;
    color: #ffffff !important;
    font-size: 1.3rem;
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none !important;
    line-height: 1.2;
    margin-bottom: 5px;
    transition: color 0.2s ease;
}

.wp-block-latest-posts__post-title:hover {
    color: #cc0000 !important; /* SwitzerLAN Rot */
}

.wp-block-latest-posts__post-author,
.wp-block-latest-posts__post-date {
    grid-column: 2 / 3;
    font-size: 0.75rem;
    color: #888888;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0;
}

/* Positioniert Autor und Datum visuell ansprechender */
.wp-block-latest-posts__post-author {
    grid-row: 2;
}

.wp-block-latest-posts__post-date {
    grid-row: 3;
    color: #cc0000; /* Hebt das Datum farblich leicht hervor */
}

.wp-block-latest-posts__post-excerpt {
    grid-column: 2 / 3;
    grid-row: 4;
    color: #cccccc;
    line-height: 1.4;
    margin-top: 5px;
    /* Kürzt den Text nach 3 Zeilen ab, falls er zu lang wird (optional) */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.wp-block-latest-posts__read-more {
    color: #d21e1a;
}






/* ---------------------------------------------------
   SINGLE POST LAYOUT - SWITZERLAN DESIGN
--------------------------------------------------- */

/* 1. Haupt-Container begrenzen und zentrieren */
.single-post #primary {
    max-width: 70%;
    margin: 15rem auto 20vh auto;
    padding: 0 20px;
    color: #cccccc; /* Helle Grundschriftfarbe für Lesbarkeit */
}

/* 2. Header Bereich (Titel & Meta-Daten) */
.single-post .entry-header {
    text-align: center;
    margin-bottom: 30px;
}

.single-post .entry-title {
    color: #ffffff;
    font-size: 3rem;
    text-transform: uppercase;
    font-weight: 800;
    margin-bottom: 10px;
    letter-spacing: 2px;
}

.single-post .entry-meta {
    font-size: 0.85rem;
    color: #888888;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.single-post .entry-meta a {
    color: #cc0000; /* Roter Akzent für Links in den Meta-Daten */
    text-decoration: none;
    transition: color 0.3s ease;
}

.single-post .entry-meta a:hover {
    color: #ff3333;
}

/* 3. Beitragsbild (Featured Image) */
.single-post .post-thumbnail {
    margin-bottom: 40px;
    text-align: center;
}

.single-post .post-thumbnail img {
    width: 100%;
    height: auto;
    max-height: 600px; /* Verhindert, dass das Bild auf Desktop zu riesig wird */
    object-fit: cover;
    /* Grosse, markante abgeschrägte Ecken passend zur LAN */
    clip-path: polygon(0 0, calc(100% - 40px) 0, 100% 40px, 100% 100%, 40px 100%, 0 calc(100% - 40px));
    border-bottom: 4px solid #cc0000; /* Starker roter Akzent am unteren Rand */
}

/* 4. Content Bereich (Der eigentliche Text) */
.single-post .entry-content {
    background-color: rgba(255, 255, 255, 0.03); /* Sehr dezenter Hintergrund */
    padding: 40px;
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 50px;
    /* Leicht abgeschrägte Ecken für die Content-Box */
    clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 20px 100%, 0 calc(100% - 20px));
    border-left: 3px solid #cc0000;
}

.single-post .entry-content p {
    margin-bottom: 20px;
    max-width: 100%;
}

/* 5. Kommentar-Bereich Styling */
.single-post .comments-area {
    background-color: rgba(0, 0, 0, 0.2);
    padding: 40px;
    margin-top: 50px;
    border-top: 2px solid #333333;
    /* Auch hier die Gamer-Ästhetik aufgreifen */
    clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 20px 100%, 0 calc(100% - 20px));
}

.single-post .comments-title, 
.single-post .comment-reply-title {
    color: #ffffff;
    font-size: 1.8rem;
    text-transform: uppercase;
    margin-bottom: 30px;
}

/* Einzelner Kommentar */
.single-post .comment-list {
    list-style: none;
    padding: 0;
}

.single-post .comment-body {
    background-color: rgba(255, 255, 255, 0.05);
    padding: 20px;
    margin-bottom: 20px;
    border-left: 2px solid #cc0000;
    clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
}

.single-post .comment-author .fn {
    color: #ffffff;
    font-weight: bold;
    font-size: 1.1rem;
}

.single-post .comment-metadata a {
    color: #777;
    font-size: 0.8rem;
}

.single-post .comment-content p {
    color: #cccccc;
    margin-top: 10px;
}

/* 6. Kommentar-Formular */
.single-post .comment-form textarea {
    width: 100%;
    box-sizing: border-box;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid #444;
    color: #ffffff;
    padding: 15px;
    margin-bottom: 20px;
    font-family: inherit;
    /* Abgeschrägte Ecken für das Eingabefeld */
    clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
}

.single-post .comment-form textarea:focus {
    outline: none;
    border-color: #cc0000;
    background-color: rgba(255, 255, 255, 0.08);
}

.single-post .form-submit .submit {
    background-color: #cc0000;
    color: #ffffff;
    border: none;
    padding: 12px 25px;
    font-size: 1rem;
    text-transform: uppercase;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
}

.single-post .form-submit .submit:hover {
    background-color: #ff1a1a;
    transform: translateY(-2px);
}

/* ---------------------------------------------------
   MOBILE OPTIMIERUNG (Smartphones & kleine Tablets)
--------------------------------------------------- */

@media (max-width: 768px) {

    /* --- 1. NEWS VORSCHAU (STARTSEITE) --- */
    
    /* Haupt-Grid auf 1 Spalte zwingen, falls der Viewport sehr schmal ist */
    ul.wp-block-latest-posts {
        grid-template-columns: 1fr;
        padding: 0 15px !important; /* Etwas Abstand zum Bildschirmrand */
    }

    /* Einzelner Post: Bild oben, Text unten */
    ul.wp-block-latest-posts li {
        grid-template-columns: 1fr; /* Nur noch 1 Spalte für alles */
        grid-template-rows: auto auto auto auto 1fr; /* 5 Reihen untereinander */
        padding: 20px 15px;
    }

    /* Bild nach ganz oben setzen und volle Breite geben */
    .wp-block-latest-posts__featured-image {
        grid-column: 1;
        grid-row: 1;
        margin-bottom: 15px !important; 
    }

    .wp-block-latest-posts__featured-image img {
        width: 100%;
        height: auto; 
    }

    /* Text-Elemente in die Reihen darunter einsortieren */
    .wp-block-latest-posts__post-title {
        grid-column: 1;
        grid-row: 2;
    }

    .wp-block-latest-posts__post-author {
        grid-column: 1;
        grid-row: 3;
    }

    .wp-block-latest-posts__post-date {
        grid-column: 1;
        grid-row: 4;
        margin-bottom: 10px;
    }

    .wp-block-latest-posts__post-excerpt {
        grid-column: 1;
        grid-row: 5;
    }


    /* --- 2. SINGLE POST SEITE (EINZELANSICHT) --- */
    
    /* Hauptcontainer die volle Breite geben und Riesen-Abstand oben verkleinern */
    .single-post #primary {
        max-width: 100%;
        margin-top: 12rem; /* Vorher 15rem - das wäre zu viel Scrollen auf Mobile */
        padding: 0 15px;
    }

    /* Titel etwas verkleinern, damit er auf kleine Displays passt */
    .single-post .entry-title {
        font-size: 2rem;
    }

    /* Innenabstand der Content-Box reduzieren */
    .single-post .entry-content {
        padding: 25px 20px;
    }

    /* Kommentarbereich-Abstände für Mobile optimieren */
    .single-post .comments-area {
        padding: 25px 20px;
    }
    
    .single-post .comments-title, 
    .single-post .comment-reply-title {
        font-size: 1.4rem;
    }
}