/*
 * Main Stylesheet
 * AZ Přijímačky
 */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    background-color: #F9F7F7;
}

a {
    color: #3F72AF;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #112D4E;
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
    display: block; /* Prevents extra space below images */
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-top: 0; /* Added */
    margin-bottom: 1rem;
    color: #112D4E;
}

h1 {
    font-size: 2.2rem;
}

h2 {
    font-size: 1.8rem;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-top: 0; /* Added */
    margin-bottom: 1.2rem;
}

ul, ol {
    margin-top: 0; /* Added */
    margin-bottom: 1.2rem;
    padding-left: 1.5rem;
}

/* Blockquote */
blockquote {
    position: relative;
    margin: 1.8rem 0;
    padding: 1.25rem 1.5rem 1.25rem 2.2rem;
    background: #F0F4F8;
    border-left: 5px solid #3F72AF;
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: #112D4E;
    font-size: 1.05rem;
    line-height: 1.7;
    box-shadow: 0 2px 8px rgba(17, 45, 78, 0.04);
}

blockquote::before {
    content: "“";
    position: absolute;
    top: -6px;
    left: 8px;
    font-size: 3.2rem;
    font-family: Georgia, serif;
    color: rgba(63, 114, 175, 0.25);
    line-height: 1;
    pointer-events: none;
}

blockquote p {
    margin-bottom: 0.5rem;
}

blockquote p:last-child {
    margin-bottom: 0;
}

blockquote cite,
blockquote footer {
    display: block;
    font-style: normal;
    font-size: 0.9rem;
    font-weight: 600;
    color: #3F72AF;
    margin-top: 0.75rem;
}

blockquote cite::before,
blockquote footer::before {
    content: "— ";
}

.mobile-menu-button {
    display: none; /* Úplně skryté ve výchozím stavu */
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.site-content {
    padding: 40px 0;
}

/* MODIFIED: Site Main Flex Layout */
.site-main {
    display: flex;
    flex-wrap: wrap; /* Allows sidebar to wrap below */
    margin: 0 -15px; /* Creates gutter space */
    align-items: flex-start; /* Align items top */
}

/* NEW: Main Content Column (Home Post + Regular Posts) */
.main-content-column {
    flex: 1; /* Takes up available space */
    min-width: 0; /* Prevents overflow issues in flex items */
    padding: 0 15px; /* Matches sidebar padding for gutter */
    /* Children stack vertically by default (div is block) */
}

/* Styles for the special home post area */
.home-content-area {
    margin-bottom: 30px; /* Space below the home content */
    background-color: #fff; /* Optional: background */
    padding: 25px; /* Optional: padding */
    border-radius: 5px; /* Optional: rounded corners */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05); /* Optional: subtle shadow */
}

.home-content-area .post-content {
    padding: 0; /* Remove default padding if .home-content-area has it */
}
.home-content-area .post-content p:last-child {
    margin-bottom: 0; /* Remove margin from last paragraph inside */
}
/* You might need specific styles for elements inside .home-content-area .post-content */
.home-content-area .post-content h1,
.home-content-area .post-content h2,
.home-content-area .post-content h3 {
    margin-top: 1.5em; /* Add space above headings within the content */
}
.home-content-area .post-content h1:first-child,
.home-content-area .post-content h2:first-child,
.home-content-area .post-content h3:first-child {
    margin-top: 0; /* No space above the very first heading */
}


/* NEW: Style for the separator heading */
.section-title-latest {
    font-size: 1.6rem; /* Adjust size as needed */
    color: #112D4E;
    margin-top: 20px; /* Space above the heading (if home post existed) */
    margin-bottom: 25px; /* Space below the heading */
    padding-bottom: 10px; /* Space below text */
    border-bottom: 2px solid #3F72AF; /* Underline effect */
    display: inline-block; /* Keep underline tight */
}

/* Ensure posts-list takes full width within its column */
.posts-list {
   /* No flex property needed here */
   width: 100%; /* Takes full width of its parent column */
}


/* Sidebar Styles */
.side-bar { /* Changed class name */
    width: 300px; /* Fixed width for sidebar */
    padding: 0 15px; /* Matches column padding for gutter */
    flex-shrink: 0; /* Prevent sidebar from shrinking */
}

/* Styles for stacked sidebar (if used elsewhere) */
.sidebar-stacked {
    width: 300px;  /* Or your desired width */
    padding: 0 15px;
    flex-shrink: 0; /* Prevent shrinking */
}

/* Bottom Bar (used on single.php) */
.bottom-bar {
    width: 100%; /* Take full width below the main content */
    flex-basis: 100%; /* Ensure it takes full width in flex context */
    padding: 20px 15px 0 15px; /* Add padding, esp. top */
    margin-top: 30px; /* Add space above */
    border-top: 1px solid #DBE2EF; /* Optional separator */
    display: flex;
    flex-direction: row;
    justify-content: space-between; /* Space out widgets */
    gap: 20px; /* Gap between widgets */
}

.bottom-bar .widget {
    flex: 1; /* Allow widgets to share space */
    margin-bottom: 0; /* Remove default bottom margin */
}


/* Widget Styles */
.widget {
    background-color: #DBE2EF;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 30px; /* Default margin for sidebar widgets */
}

.widget-title {
    font-size: 1.2rem;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #3F72AF;
    color: #112D4E; /* Ensure title color */
}

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

.widget li {
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #F9F7F7; /* Lighter separator */
}

.widget li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.widget a {
    color: #3F72AF;
    text-decoration: none;
}

.widget a:hover {
    color: #112D4E; /* Darker hover */
}

.widget a.active { /* Style for active link, if applicable */
    color: #112D4E;
    font-weight: 600;
}


/* Header */
.site-header {
    background-color: #112D4E;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 15px 0; /* Slightly reduced padding */
}

/* Flex container for branding and nav */
.site-header .container {
    display: flex;
    flex-wrap: wrap;
    align-items: center; /* Align items vertically */
    justify-content: space-between; /* Space out branding/nav */
}


.site-branding {
    margin-bottom: 0; /* Remove bottom margin */
    flex-shrink: 0; /* Prevent shrinking */
}

.site-title {
    font-size: 1.8rem; /* Adjusted size */
    margin-bottom: 0; /* Remove bottom margin */
    display: flex; /* Align logo and text */
    align-items: center;
}

.site-title a {
    color: #F9F7F7;
    text-decoration: none;
    display: flex; /* Align items inside link */
    align-items: center;
}
.site-title img {
     width: 32px; /* Slightly smaller logo */
     height: 32px;
     margin-right: 10px;
}


.site-title a:hover {
    color: #F9A826; /* Keep hover color */
}

/* Navigation */
.main-navigation {
    margin-bottom: 0; /* Remove bottom margin */
    margin-left: auto; /* Push nav to the right */
}

.menu-toggle {
    display: none; /* Hide toggle on desktop */
}

.menu {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
    align-items: center; /* Align menu items vertically */
}


/* Menu Separator Styles */
.menu li {
    position: relative;
    margin-left: 20px; /* Use left margin for spacing */
    margin-bottom: 0; /* No bottom margin for horizontal layout */
}
.menu li:first-child {
    margin-left: 0; /* No left margin on first item */
}

/* Removed ::after separator for cleaner look */
/*
.menu li:not(:last-child)::after { ... }
*/

/* Hover effect for menu items */
.menu a {
    position: relative;
    display: block;
    padding: 8px 0; /* Vertical padding */
    font-weight: 500;
    color: #DBE2EF;
    text-decoration: none;
}

.menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #F9A826;
    transition: width 0.3s ease;
}

.menu a:hover::after {
    width: 100%;
}

.menu a:hover {
    color: #F9A826;
    text-decoration: none;
}


/* Admin Bar */
.admin-bar {
    background-color: #DBE2EF;
    padding: 8px 15px; /* Adjusted padding */
    margin-top: 15px; /* Space above admin bar */
    border-radius: 4px;
    width: 100%; /* Make admin bar take full width */
    order: 3; /* Ensure it appears below branding/nav when wrapped */
    flex-basis: 100%; /* Force full width */
}

.admin-bar ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
    justify-content: center; /* Center items */
}

.admin-bar li {
    margin: 5px 10px; /* Spacing around items */
}

.admin-bar a {
    display: block;
    padding: 5px 10px;
    background-color: #3F72AF;
    color: #fff;
    border-radius: 3px;
    font-size: 0.9rem;
    text-decoration: none;
    white-space: nowrap; /* Prevent wrapping */
}

.admin-bar a:hover {
    background-color: #112D4E;
}

/* Posts List Items */
.post-item {
    margin-bottom: 30px; /* Reduced margin */
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08); /* Slightly adjusted shadow */
    overflow: hidden;
    display: flex; /* Use flex for image/content layout */
    flex-direction: row; /* Default horizontal layout */
}

.post-thumbnail {
    flex: 0 0 200px; /* Fixed width for thumbnail */
    margin-bottom: 0; /* Remove margin */
    overflow: hidden; /* Ensure image stays within bounds */
}

.post-thumbnail img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Crop image nicely */
    transition: transform 0.3s ease;
}
.post-thumbnail a:hover img {
    transform: scale(1.05); /* Subtle zoom on hover */
}


.post-content-container { /* Renamed class */
    flex: 1; /* Content takes remaining space */
    padding: 20px;
    display: flex;
    flex-direction: column; /* Stack content vertically */
}

.post-header {
    /* No specific styles needed unless desired */
}

.post-title {
    font-size: 1.4rem; /* Adjusted size */
    margin-bottom: 8px;
    padding-left: 14px;
    padding-top: 14px;
}

.post-title a {
    color: #112D4E;
    text-decoration: none;
}

.post-title a:hover {
    color: #3F72AF;
}

.post-meta {
    font-size: 0.85rem; /* Slightly smaller */
    color: #666;
    margin-bottom: 12px;
    padding-left: 14px;
}

.post-date, .post-category {
    display: inline-block;
    margin-right: 15px; /* Increased spacing */
}
.post-category a {
    color: #666;
    text-decoration: underline;
}
.post-category a:hover {
    color: #3F72AF;
}


.post-excerpt {
    margin-bottom: 15px;
    flex-grow: 1; /* Allow excerpt to take available vertical space */
    padding: 14px;
}
.post-excerpt p:last-child {
    margin-bottom: 0; /* Remove margin from last paragraph */
}


.post-read-more {
    margin-top: auto; /* Push read more to the bottom */
    align-self: flex-start; /* Align button left */
}



/* Styly pro seskupené kategorie v postranním panelu */
.category-group-wrapper {
    margin-bottom: 20px; /* Odsazení mezi skupinami */
    padding: 15px;
    border-radius: 5px;
    background-color: #f0f0f0; /* Výchozí barva pozadí, pokud není specifikována */
}

.mat-group-wrapper {
    background-color: #e6f7ff; /* Například světle modrá pro matematiku */
    /* border: 1px solid #91d5ff; */ /* Volitelný rámeček */
}

.cj-group-wrapper {
    background-color: #fff0e6; /* Například světle oranžová pro český jazyk */
    /* border: 1px solid #ffc069; */ /* Volitelný rámeček */
}

.other-group-wrapper {
    /* Můžete nechat výchozí .category-group-wrapper styl,
       nebo nastavit specifické pozadí pro "ostatní" kategorie,
       případně je nechat bez speciálního pozadí (odstraněním paddingu a background-color zde)
       Pokud chcete, aby vypadaly jako původní seznam, můžete tyto kategorie
       vypsat mimo .category-group-wrapper a použít původní <ul> strukturu.
       Aktuální PHP kód je také obaluje do .category-group-wrapper.
    */
    background-color: #f9f9f9; /* Lehce odlišné pozadí pro ostatní */
}


.category-group-title {
    font-size: 1.1rem; /* Velikost písma nadpisu skupiny */
    color: #112D4E;   /* Barva písma z vašeho style.css */
    margin-top: 0;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid #3F72AF; /* Linka pod nadpisem skupiny */
}

.category-group-list {
    list-style: none;
    padding-left: 0;
    margin-bottom: 0; /* Odebrat spodní margin z ul, pokud je wrapper má */
}

.category-group-list li {
    padding: 5px 0; /* Menší odsazení pro položky v seskupených seznamech */
    border-bottom: 1px dashed #ddd; /* Jemnější oddělovač */
}

.category-group-list li:last-child {
    border-bottom: none;
}

.category-group-list li a {
    /* Zde můžete upravit styl odkazů v seskupených kategoriích, pokud je potřeba */
    color: #3F72AF; /* Barva odkazu z vašeho style.css */
}

.category-group-list li a:hover {
    color: #112D4E; /* Barva odkazu při najetí myší */
}




.read-more-link {
    display: inline-block;
    padding: 6px 16px; /* Adjusted padding */
    background-color: #3F72AF;
    color: #fff;
    border-radius: 3px;
    font-size: 0.9rem;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.read-more-link:hover {
    background-color: #112D4E; /* Darker hover */
    color: #fff;
    text-decoration: none;
}

/* Admin actions within post item */
.post-admin-actions {
    padding: 10px 20px;
    background-color: #f4f7f6; /* Lighter background */
    border-top: 1px solid #e8e8e8; /* Light separator */
    text-align: right;
    margin-top: auto; /* Push to bottom if needed, though handled by container flex */
}


/* Single Post & Page Styles */
.single-post,
.page {
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
    padding: 30px;
    margin-bottom: 40px;
    /* Ensure it's within the main content column */
    flex-basis: 100%; /* Take full width if placed directly in site-main */
}

.single-post .post-header,
.page .page-header { /* Added page header class */
     margin-bottom: 25px;
     padding-bottom: 15px;
     border-bottom: 1px solid #eee;
}


.single-post .post-title,
.page .page-title { /* Added page title class */
    font-size: 2rem;
    margin-bottom: 10px; /* Reduce margin below title */
}

.single-post .post-meta {
    margin-bottom: 0; /* Remove margin below meta */
}

.single-post .post-thumbnail {
    margin-bottom: 25px; /* Space after image */
    border-radius: 5px; /* Rounded corners for image */
    overflow: hidden;
}

.single-post .post-content,
.page .page-content { /* Added page content class */
    padding: 0; /* Remove default padding */
    margin-top: 0; /* Remove top margin */
}

.single-post .post-content h1,
.single-post .post-content h2,
.single-post .post-content h3,
.page .page-content h1,
.page .page-content h2,
.page .page-content h3 {
    margin-top: 1.8em; /* Space above headings */
    margin-bottom: 0.8em; /* Space below headings */
}
.single-post .post-content h1:first-child,
.single-post .post-content h2:first-child,
.single-post .post-content h3:first-child,
.page .page-content h1:first-child,
.page .page-content h2:first-child,
.page .page-content h3:first-child {
    margin-top: 0; /* No top margin for first heading */
}


.single-post .post-content p,
.single-post .post-content ul,
.single-post .post-content ol,
.page .page-content p,
.page .page-content ul,
.page .page-content ol {
    margin-bottom: 1.5em; /* Space between paragraphs/lists */
}
.single-post .post-content ul,
.single-post .post-content ol,
.page .page-content ul,
.page .page-content ol {
    padding-left: 1.8em; /* Indentation for lists */
}
.single-post .post-content img,
.page .page-content img {
    margin-top: 1em;
    margin-bottom: 1em;
    border-radius: 4px; /* Slight rounding for content images */
    box-shadow: 0 1px 3px rgba(0,0,0,0.1); /* Subtle shadow */
}


/* Zarovnání obrázků doprava s obtékáním */
.alignright {
  float: right;
  margin-left: 15px; /* Odsazení od textu vlevo */
  margin-bottom: 10px; /* Odsazení pod obrázkem */
}

/* Můžete přidat i třídu pro zarovnání doleva */
.alignleft {
  float: left;
  margin-right: 15px; /* Odsazení od textu vpravo */
  margin-bottom: 10px;
}

/* Volitelné: Clearfix pro rodičovský element, pokud obsahuje jen plovoucí prvky */
/* Zabraňuje "zhroucení" výšky rodičovského elementu */
.clearfix::after {
  content: "";
  display: table;
  clear: both;
}

/* Specific Styles from original category.php example */
.full-width-container {
    flex: 1;
    min-width: 0;
    padding: 0 15px;
    width: 100%;
}

.full-width-container .archive-header {
    margin-bottom: 30px;
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 20px;
}

.full-width-container .archive-title {
    font-size: 1.8rem;
    margin-bottom: 0;
}

.highlight {
    background-color: #f0f4f8;
    padding: 15px;
    border-radius: 5px;
    margin: 20px 0;
}
.stat {
    font-weight: bold;
    color: #2c5282;
}
.negative {
    color: #c53030;
}
.positive {
    color: #2f855a;
}
.quote {
    font-style: italic;
    border-left: 3px solid #718096;
    padding-left: 15px;
    margin: 15px 0;
}


/* Archive Header (Used on category pages) */
.archive-header {
    margin-bottom: 30px;
    padding: 20px;
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}

.archive-title {
    font-size: 1.8rem;
    margin-bottom: 0;
}


/* Footer */
.site-footer {
    background-color: #112D4E;
    color: #DBE2EF;
    padding: 40px 0 20px;
    margin-top: 40px; /* Add space above footer */
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px 30px; /* Gutters */
    justify-content: space-between; /* Space out columns */
}

.footer-info,
.footer-menu,
.footer-categories {
    padding: 0 15px; /* Gutter padding */
    margin-bottom: 30px; /* Space below each column */
}

.footer-info {
    flex-basis: 100%; /* Full width on small screens */
    max-width: 100%;
}

.footer-menu,
.footer-categories {
    flex-basis: 100%; /* Full width on small screens */
    max-width: 100%;
}

/* Footer Columns for larger screens */
@media (min-width: 768px) {
    .footer-info {
        flex-basis: 45%; /* Approx half */
        max-width: 45%;
    }
    .footer-menu,
    .footer-categories {
        flex-basis: 25%; /* Approx quarter */
        max-width: 25%;
    }
}


.site-footer h3, /* Footer Widget Titles */
.site-footer h4 {
    color: #F9F7F7;
    font-size: 1.1rem; /* Consistent size */
    margin-bottom: 15px;
    font-weight: 600;
}


.site-footer ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-footer li {
    margin-bottom: 10px;
}

.site-footer a {
    color: #DBE2EF;
    text-decoration: none;
}

.site-footer a:hover {
    color: #F9A826;
    text-decoration: underline;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    margin-top: 20px; /* Space above bottom text */
    border-top: 1px solid #3F72AF;
    font-size: 0.9rem;
    color: #a0aec0; /* Lighter text color */
}


/* Pagination */
.pagination {
    margin: 40px 0 20px 0; /* Adjust margins */
    padding: 0;
    text-align: center; /* Center align the container */
    list-style-type: none; /* Remove default list style */
}

.pagination li {
    display: inline-block; /* Align items inline */
    margin: 0 4px; /* Space between items */
    list-style-type: none; /* Ensure no list markers */
}

.pagination a,
.pagination span {
    display: inline-block;
    padding: 8px 14px; /* Adjust padding */
    border: 1px solid #DBE2EF;
    background-color: #fff;
    color: #3F72AF;
    border-radius: 4px; /* Slightly more rounded */
    text-decoration: none;
    font-size: 0.9rem;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.pagination a:hover {
    background-color: #e2e8f0; /* Light background on hover */
    border-color: #cad5e8;
    color: #112D4E;
    text-decoration: none;
}

.pagination .active span, /* Use active class */
.pagination span.current { /* Keep current class compatibility */
    background-color: #3F72AF;
    color: #fff;
    border-color: #3F72AF;
    cursor: default;
}

.pagination .disabled span { /* For disabled prev/next */
    background-color: #f8fafc;
    color: #a0aec0;
    border-color: #e2e8f0;
    cursor: default;
}


.pagination .ellipsis span { /* For ... */
    border: none;
    background: none;
    padding: 8px 5px; /* Adjust padding */
    color: #718096;
}

.pagination .prev,
.pagination .next {
    /* Specific styles for prev/next if needed */
}


/* Edit Link */
.edit-link {
    display: inline-block;
    padding: 4px 10px; /* Adjust padding */
    background-color: #667eea; /* Indigo color */
    color: #fff;
    border-radius: 3px;
    font-size: 0.8rem;
    text-decoration: none;
    transition: background-color 0.3s ease;
    margin-left: 10px; /* Add space if next to other links */
}

.edit-link:hover {
    background-color: #5a67d8; /* Darker indigo */
    text-decoration: none;
    color: #fff;
}


/* No Posts Message */
.no-posts {
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    padding: 40px; /* More padding */
    text-align: center;
    color: #718096; /* Softer text color */
    margin-top: 20px; /* Space if it appears alone */
}
.no-posts p {
    margin-bottom: 0;
}



/* Post Navigation Styles */
.post-navigation {
    margin: 3rem 0;
    padding: 2rem 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.nav-boxes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin: 0;
}

.nav-box {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    min-height: 200px;
    background-color: #f8f9fa;
}

.nav-box:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.nav-link {
    display: block;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

.nav-image {
    position: relative;
    width: 100%;
    height: 200px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #e9ecef;
}

.nav-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.4));
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
    text-align: center;
}

.nav-title {
    color: #ffffff;
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8), 
                 1px 1px 2px rgba(0, 0, 0, 0.9);
    word-wrap: break-word;
    hyphens: auto;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.nav-label {
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    opacity: 0.9;
}

/* Single box styling when only one post exists */
.nav-boxes:has(.nav-box:only-child) {
    grid-template-columns: 1fr;
    max-width: 500px;
    margin: 0 auto;
}

/* Mobile responsive */
@media (max-width: 767.98px) {
    .nav-boxes {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .nav-box {
        min-height: 150px;
    }
    
    .nav-image {
        height: 150px;
    }
    
    .nav-title {
        font-size: 1.1rem;
    }
    
    .nav-label {
        font-size: 0.8rem;
    }
    
    .nav-overlay {
        padding: 1rem;
    }
}

@media (max-width: 575.98px) {
    .post-navigation {
        margin: 2rem 0;
        padding: 1.5rem 0;
    }
    
    .nav-box {
        min-height: 120px;
    }
    
    .nav-image {
        height: 120px;
    }
    
    .nav-title {
        font-size: 1rem;
        -webkit-line-clamp: 2;
    }
    
    .nav-label {
        font-size: 0.75rem;
    }
}