/*
Theme Name: markimarta2026
Author: Aleksei
Description: Eco-friendly tech blog theme.
Version: 1.1
*/

@import url("header.css");
@import url("footer.css");

:root {
    --primary-green: #1A4D3A;
    --accent-orange: #FF8A00;
    --bg-cream: #f8f8f4; /* Light eco-tint background */
    --text-dark: #2C3327;
    --white: #ffffff;
}

body {
    background-color: var(--bg-cream);
    color: var(--text-dark);
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    line-height: 1.4;
}

h1, h2, h3, h4 {
    font-weight: 500;
    line-height: 1.2;
}

.section-title, .green {
    /* display: inline-block; */
    width: fit-content;
    padding: 0px 20px 0px 0px;
    border-bottom: 3px solid #388e3c;
    text-transform: uppercase;
}

a, a:link, a:visited {
    color: #21613E;
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}



/* --- Main Layout Grid --- */
.site-main {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    display: grid;
/* 1. Mobile First: Single column (100% width) */
    grid-template-columns: 1fr;
    gap: 10px;
}


.recent-posts {
    width: 100%;
}
.recent-posts-container {
    max-width: 1200px;
}

/* --- Post Cards (Matching the design) --- */
/* Creating the Grid */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); /* Prevents huge single images */
    gap: 30px;
}

/* Constraining the Image */
.post-card .post-thumbnail img {
    width: 100%;
    height: 200px;    /* Fixed height for uniformity */
    object-fit: cover; /* Crops image to fit without stretching */
    border-radius: 8px;
    display: block;
}

.post-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.post-card:hover {
    transform: translateY(-5px);
}

.post-thumbnail {
    padding: 10px;
}
.post-thumbnail img {
    width: 100%;
    height: 200px;
        border-radius: 8px;
    object-fit: cover;
    display: block;
}

.post-content {
    padding: 14px;
    position: relative; /* This is the anchor */
    padding-bottom: 24px; /* Add space at the bottom so categories don't overlap text */
    height: 100%;
}

h3.entry-title {
    line-height: 1.3em;
}
.entry-title a {
    color: var(--primary-green);
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 500;
}

.entry-title a:hover {
    color: var(--accent-orange);
}

.entry-meta {
    text-align: right;
}
.posted-on {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 10px;
    text-align: right;
}

/* --- Code Blocks (Technical style) --- */
code, pre {
    font-family: 'Consolas', 'Monaco', monospace;
    background: #eef2eb;
    padding: 2px 5px;
    border-radius: 4px;
}

/* --- Sidebar --- */
.widget {
    background: var(--white);
    padding: 10px;
    margin-bottom: 30px;
    border-radius: 8px;
}

.widget-title {
    font-size: 1.1rem;
    color: var(--primary-green);
    border-bottom: 2px solid var(--accent-orange);
    padding-bottom: 10px;
    margin-bottom: 15px;
}



/* Block for featured posts */
.featured-articles-container {
    width: 100%;
}
/* 1. Set the main grid columns */
.featured-grid {
    display: grid;
    /* This locks the first column to 300px and lets the sidebar take the rest */
    grid-template-columns: 350px 1fr; 
    gap: 3px;
    align-items: start;
}

/* 2. Main Hero Block */
.featured-hero {
    max-width: 340px;
    width: 100%;
    background: #fff;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    overflow: hidden;
}

.featured-hero img {
    width: 100%;
    height: auto; /* Changed to auto to maintain logo ratio at 300px */
    min-height: 250px; 
    object-fit: contain;
    background-color: #f8f9fa;
    padding: 20px;
    box-sizing: border-box;
    display: block;
}

/* 3. Tight Sidebar Grid */
.featured-sidebar-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 4px; /* Tight gap as requested */
}

/* 4. Ensure smaller items stay uniform */
.featured-item-small {
    background: #fff;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    overflow: hidden;
}

.featured-item-small img {
    width: 100%;
    height: 120px; /* Slightly shorter height to match the tighter layout */
    object-fit: contain;
    background-color: #f8f9fa;
    padding: 10px 5px;
    box-sizing: border-box;
}

/* 5. Text Styling to prevent overflow */
.featured-overlay h3, .featured-overlay div {
    margin: 0;
    padding: 5px 10px;
    font-size: 1.1rem;
    color: #333;
}
.featured-overlay div a, .featured-overlay div a:visited {
    color: #333;
}
.featured-overlay div {
    font-size: 1rem;
}

.featured-overlay-small {
    margin: 0;
    padding: 5px 10px;

}
.featured-overlay-small h4 {
    padding: 0px; margin: 3px 0px;
    font-size: 1rem;
    color: #333;
    line-height: 1.2;
}
/* 1. Add transition to the base blocks */
.featured-hero, 
.featured-item-small {
    background: #fff;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    overflow: hidden;
    
    /* Smooth out the hover effect */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

/* 2. Define the Hover State */
.featured-hero:hover, 
.featured-item-small:hover {
    /* Lifts the card slightly */
    transform: translateY(-4px); 
    /* deepens the shadow for a "lifted" look */
    box-shadow: 0 8px 15px rgba(0,0,0,0.1); 
}

/* 3. Optional: Subtle zoom for the image inside on hover */
.featured-hero:hover img, 
.featured-item-small:hover img {
    filter: brightness(0.95); /* Slightly dims the gray background */
    transition: filter 0.3s ease;
}

.entry-content {
    padding: 10px;
}


/* Popular posts styles start */
ul.wp-block-latest-posts, ul.wpp-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

ul.wp-block-latest-posts li, ul.wpp-list li {
    position: relative;
    padding-left: 22px;
    margin-bottom: 10px;
    line-height: 1.35;
}

ul.wp-block-latest-posts li::before, ul.wpp-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 9px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: linear-gradient(135deg, #35a846, #2b7cff);
    box-shadow: 0 0 6px rgba(53, 168, 70, 0.35);
}

ul.wpp-list li a {
    font-weight: 500;
    color: #222;
    text-decoration: none;
    transition: all 0.2s ease;
}

ul.wpp-list li a:hover {
    color: #35a846;
    padding-left: 3px;
}
/* Popular posts styles end */


.entry-footer {
    position: relative;
}

/* Container spacing */
.post-categories {
    margin-bottom: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px; /* Space between tags */
}

/* The individual Category Links */
/* Position the category block */
.post-categories {
    position: absolute;
    bottom: 5px; /* Distance from bottom edge */
    left: 10px;  /* Distance from right edge */
    display: flex;
    gap: 5px;
}

/* Category Link Styling */
.post-categories a {
    background-color: var(--primary-green);
    color: #ffffff !important;
    padding: 3px 10px;
    font-size: 11px;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 2px;
    font-weight: bold;
    transition: 0.3s;
}

.post-categories a:hover {
    background-color: #333333;
}

.post-cat-top  {
    padding: 3px 10px;
    
    font-size: 11px;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 2px;
    font-weight: bold;
    transition: 0.3s;
}
.post-cat-top a {
    background-color: var(--primary-green);
    color: #ffffff !important;
        padding: 3px 10px;

}

.read-more-link {
    text-decoration: none;
    color: var(--primary-green) !important;
    font-weight: 700;
    margin-left: 5px;
    letter-spacing: 0.1px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.read-more-link span {
    display: inline-block;
    transition: transform 0.3s ease;
}

/* When hovering over the link, the arrow slides right */
.read-more-link:hover {
    color: #555; /* Slight fade */
}

.read-more-link:hover span {
    transform: translateX(5px);
}



/* --- Pagination Styling --- */
.pagination-wrapper, .post-navigation {
    margin: 50px 0;
    padding-top: 30px;
    border-top: 1px solid #e0e0dc; /* Subtle separator */
}

.navigation.posts-navigation .nav-links, .post-navigation .nav-links {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.post-navigation a, .navigation.posts-navigation a {
    display: inline-block;
    padding: 12px 25px;
    background-color: var(--white);
    color: var(--primary-green);
    border: 2px solid var(--primary-green);
    border-radius: 50px; /* Pill shape */
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.post-navigation a:hover, .navigation.posts-navigation a:hover {
    background-color: var(--primary-green);
    color: var(--white);
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(26, 77, 58, 0.2);
}
.navigation.post-navigation a {
    font-weight: 500;
    text-transform: none;
    
}

/* Specific styling for the arrows */
.navigation.posts-navigation a span {
    display: inline-block;
    transition: transform 0.3s ease;
}

.nav-previous a:hover span {
    transform: translateX(-5px);
}

.nav-next a:hover span {
    transform: translateX(5px);
}



.card-navigation {
    display: flex;
    gap: 10px;
    justify-content: center;
    padding: 10px 5px;
    background-color: #f8faf9; /* Light background to match */
}

.nav-card {
    flex: 1;
    max-width: 250px;
    background: #F0F0ED;
    border-radius: 10px;
    padding: 10px 5px;
    text-decoration: none;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}
.nav-card:nth-child(2) {
    background: #F8F7F5;
}
.nav-card:nth-child(3) {
    background: #F8F7F5;
}

/* Hover effect for interactivity */
.nav-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.card-icon img {
    min-width: 160px; /* Adjust based on your icon size */
    height: auto;
    margin-bottom: 20px;
}

.card-label {
    font-family: 'Montserrat', sans-serif; /* Or your theme's bold font */
    font-weight: 700;
    font-size: 1.1rem;
    color: #1a1a1a;
    letter-spacing: 1px;
    text-transform: uppercase;
}




/* 2. Desktop: Split columns */
@media (min-width: 768px) {
    .site-main {
        /* Main content takes remaining space | Sidebar is 200-250px */
        grid-template-columns: 1fr minmax(250px, 300px);
    }
}


/* Responsive: Stack them on mobile */  
@media (max-width: 768px) {
    .featured-grid {
        grid-template-columns: 1fr;
    }

    .card-navigation {
        flex-direction: column;
        align-items: center;
    }
    .nav-card {
        width: 100%;
    }
    .posts-grid {
        /* grid-template-columns: repeat(2, 1fr); */
        grid-template-columns: 1fr;
        gap: 15px; /* Optional: reduce gap for smaller screens */
    }
    
}

/* --- Responsive --- */
@media (max-width: 900px) {
    .site-main {
        grid-template-columns: 1fr;
    }
}




/* Mobile Adjustments */
@media (max-width: 480px) {
    .navigation.posts-navigation .nav-links {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .navigation.posts-navigation a {
        width: 100%;
        text-align: center;
    }

}

.single-post-article {
    padding: 10px;
    border: #CCC 1px solid;
    border-radius: 5px;
    background: white;
}

#sidebar ul {
    display: block;
    list-style-type: none;
    margin-block-start: 0em;
    margin-block-end: 1em;
    padding-inline-start: 0px;
    unicode-bidi: isolate;
}

.breadcrumbs {
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: #666;
}
.breadcrumbs a {
    text-decoration: none;
    color: #0073aa; /* Change to your theme link color */
}
.breadcrumbs a:hover {
    text-decoration: underline;
}


/* Container für das gesamte Formular */
#respond {
    background-color: #f9fdfb; /* Ganz leichtes Mint-Weiß */
    color: #333;
    padding: 20px 40px;
    border-radius: 8px;
    border-top: 4px solid #051a14; /* Dunkler Akzent oben */
    margin-top: 20px;
}

#reply-title {
    color: #051a14;
}

/* Die Input-Felder brauchen einen helleren Rand, damit man sie sieht */
.comment-form input, .comment-form textarea {
    background-color: #08211a !important;
    border: 1px solid #2a4d42 !important;
    border-radius: 6px !important;
}

.comment-notes {
    color: #a0a0a0;
    font-size: 14px;
    margin-bottom: 20px;
}

/* Styling der Labels */
.comment-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #08211a;
}

/* Styling der Input-Felder und Textarea */
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    background-color: #ffffff !important;
    border: 1px solid #ddd !important;
    color: #333 !important;
    border-radius: 4px;
    padding: 10px;
    
    font-size: 16px;
    margin-bottom: 20px;
    box-sizing: border-box; /* Verhindert, dass Felder über den Rand ragen */
    transition: border-color 0.3s ease;
}

.comment-form textarea {
    height: 80px;
}
/* Fokus-Zustand (wenn man reinklickt) */
.comment-form input:focus,
.comment-form textarea:focus {
    border-color: #388e3c; /* Akzentgrün aus deinem Footer */
    box-shadow: 0 0 0 3px rgba(56, 142, 60, 0.1);
}

/* Checkbox Bereich */
.comment-form-cookies-consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: #a0a0a0;
    font-size: 14px;
}

.comment-form-cookies-consent input {
    margin-top: 4px;
}

/* Der "Post Comment" Button */
.form-submit .submit {
    background-color: #388e3c;
    color: #ffffff;
    border: none;
    padding: 12px 30px;
    font-size: 16px;
    font-weight: bold;
    text-transform: uppercase;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.form-submit .submit:hover {
    background-color: #2e7d32;
}

/* Spezielle Anpassung für die Textarea (Kommentarfeld) */
.comment-form textarea {
    min-height: 150px;
    resize: vertical;
}




/* Container und Überschrift */
.widget_nav_menu {
    background: #ffffff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.widgettitle {
    font-size: 20px;
    color: #051a14;
    border-bottom: 3px solid #388e3c;
    display: inline-block;
    margin-bottom: 20px;
    padding-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Wir selektieren alle DIVs, deren Klasse mit "menu-" beginnt und "-container" endet */
div[class*="menu-primary"][class*="-container"] ul {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Hauptmenü-Punkte */
div[class*="menu-primary"][class*="-container"] > ul > li {
    margin-bottom: 8px;
}

div[class*="menu-primary"][class*="-container"] li a {
    text-decoration: none;
    color: #444;
    font-weight: 600;
    font-size: 15px;
    display: block;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

/* Hover-Effekt */
div[class*="menu-primary"][class*="-container"] li a:hover {
    background-color: #f1f8f1;
    color: #388e3c;
    padding-left: 18px;
}

/* Sub-Menüs */
div[class*="menu-primary"][class*="-container"] ul.sub-menu {
    margin-left: 15px !important;
    margin-top: 5px;
    border-left: 2px solid #eee;
    padding-left: 10px !important;
}

div[class*="menu-primary"][class*="-container"] ul.sub-menu li a {
    font-weight: 400;
    font-size: 14px;
    color: #666;
    padding: 5px 10px;
}

/* Aktiver Menüpunkt (Highlight) */
div[class*="menu-primary"][class*="-container"] li.current-menu-item > a {
    color: #388e3c;
    background-color: #f1f8f1;
    border-left: 4px solid #388e3c;
    padding-left: 15px;
}
/* Entfernt den Pfeil bei Menüpunkten mit Untermenüs */
div[class*="menu-primary"] .menu-item-has-children > a::after {
    display: none !important;
    content: none !important;
}

/* Manchmal nutzen Themes auch :before */
div[class*="menu-primary"] .menu-item-has-children > a::before {
    display: none !important;
    content: none !important;
}

.posts-grid-popularposts ul.wpp-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 36px;
    
    padding: 0;
    margin: 0;
    list-style: none;
}

.posts-grid-popularposts  ul.wpp-list li, .posts-grid-popularposts  ul.wpp-list  li:before {
    margin: 0;
    list-style-type: none;
    background: none;
}


@media (max-width: 900px) {
     
    .posts-grid-popularposts  ul.wpp-list {
        grid-template-columns: 1fr;
    }
}