/*
Theme Name: Food-Ing.ch Theme
Theme URI: https://food-ing.ch
Author: Matthias Hummler (Joker IT)
Author URI: https://food-ing.ch
Description: Professionelles WordPress-Theme für Food-Ing.ch GmbH. Vollständig anpassbar über WordPress Customizer, Menüs und Widgets.
Version: 1.5.9
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: food-ing
Tags: custom-logo, custom-menu, featured-images, theme-options, footer-widgets

Food-Ing.ch Theme - Vollständig anpassbar
*/

/* ==========================================================================
   CSS Variables
   ========================================================================== */

:root {
    --fi-green: #73A322;
    --fi-green-light: #8ab93d;
    --fi-green-dark: #5c8a1a;
    --fi-blue: #005A90;
    --fi-blue-light: #0070b0;
    --fi-blue-dark: #004570;
    --fi-white: #ffffff;
    --fi-dark: #333333;
    --fi-gray: #666666;
    --fi-gray-light: #f5f5f5;
    --fi-gray-lighter: #eeeeee;
    --fi-border: #e0e0e0;
    --fi-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --fi-shadow-lg: 0 5px 20px rgba(0, 0, 0, 0.15);
    --fi-font: 'Open Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ==========================================================================
   Reset & Base
   ========================================================================== */

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--fi-font);
    font-size: 1rem;
    line-height: 1.7;
    color: var(--fi-dark);
    background-color: var(--fi-white);
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

/* Buttons */
.btn,
.button,
button[type="submit"],
input[type="submit"],
.wp-block-button__link {
    display: inline-block;
    padding: 12px 28px;
    background-color: var(--fi-green);
    color: #ffffff !important;
    border: 2px solid var(--fi-green);
    border-radius: 4px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn:hover,
.button:hover,
button[type="submit"]:hover,
input[type="submit"]:hover,
.wp-block-button__link:hover {
    background-color: var(--fi-green-dark);
    border-color: var(--fi-green-dark);
    color: #ffffff !important;
}

/* Outline Button Variante */
.btn-outline,
.wp-block-button.is-style-outline .wp-block-button__link {
    background-color: transparent;
    color: var(--fi-green) !important;
}

.btn-outline:hover,
.wp-block-button.is-style-outline .wp-block-button__link:hover {
    background-color: var(--fi-green);
    color: #ffffff !important;
}

img {
    max-width: 100%;
    height: auto;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 15px 0;
}

p { margin: 0 0 15px 0; }
ul, ol { list-style: none; }

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: var(--fi-white);
    box-shadow: var(--fi-shadow);
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Logo */
.site-logo a {
    display: flex;
    align-items: center;
}

.site-logo img,
.custom-logo {
    height: 70px;
    width: auto;
}

.site-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
}

.site-title a {
    color: var(--fi-green);
}

.site-title a:hover {
    color: var(--fi-green-dark);
}

.site-description {
    font-size: 12px;
    color: var(--fi-gray);
    margin: 0;
}

/* Navigation */
.main-navigation {
    display: flex;
    align-items: center;
}

.nav-menu,
.main-navigation ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-menu > li,
.main-navigation > div > ul > li {
    position: relative;
}

.nav-menu > li > a,
.main-navigation > div > ul > li > a {
    display: block;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 600;
    color: var(--fi-dark);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-menu > li > a:hover,
.nav-menu > li.current-menu-item > a,
.nav-menu > li.current_page_item > a,
.nav-menu > li.current-menu-ancestor > a,
.main-navigation > div > ul > li > a:hover,
.main-navigation > div > ul > li.current-menu-item > a {
    color: var(--fi-green);
}

/* Dropdown */
.nav-menu .sub-menu,
.main-navigation ul ul {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: var(--fi-white);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    list-style: none;
    margin: 0;
    padding: 15px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    border-top: 3px solid var(--fi-green);
    display: flex;
    flex-direction: column;
}

.nav-menu > li:hover > .sub-menu,
.main-navigation > div > ul > li:hover > ul {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-menu .sub-menu li,
.main-navigation ul ul li {
    border-bottom: none;
    margin: 0;
    padding: 0;
}

.nav-menu .sub-menu li:last-child,
.main-navigation ul ul li:last-child {
    border-bottom: none;
}

.nav-menu .sub-menu a,
.main-navigation ul ul a {
    display: block;
    padding: 10px 25px;
    font-size: 15px;
    font-weight: 600;
    color: var(--fi-green);
    text-transform: none;
    letter-spacing: 0;
    transition: color 0.3s ease;
}

.nav-menu .sub-menu a:hover,
.main-navigation ul ul a:hover {
    background-color: transparent;
    color: var(--fi-dark);
}

/* Aktiver Dropdown-Link */
.nav-menu .sub-menu .current-menu-item > a,
.main-navigation ul ul .current-menu-item > a {
    color: var(--fi-green);
}

/* Mobile Menu */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--fi-dark);
    transition: all 0.3s ease;
}

/* ==========================================================================
   Homepage - Service Boxes (Full Width)
   ========================================================================== */

.home-content {
    margin-top: 100px;
    min-height: calc(100vh - 100px);
    display: flex;
    padding: 0;
}

.services-container {
    width: 100%;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0;
}

.service-box {
    flex: 1;
    min-width: 50%;
    min-height: calc(100vh - 100px);
    padding: 60px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.service-box .service-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 40px;
}

.service-box .service-logo img {
    height: 220px;
    width: auto;
    transition: transform 0.3s ease;
    display: block;
    margin: 0 auto;
}

.service-box .service-logo svg {
    height: 220px;
    width: auto;
}

.service-box:hover .service-logo img {
    transform: scale(1.05);
}

.service-box h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 20px;
    text-align: center;
    width: 100%;
}

.service-box h2 a {
    transition: color 0.3s ease;
}

.service-box .description {
    font-size: 15px;
    line-height: 1.8;
    text-align: center;
    width: 100%;
    max-width: 500px;
}

.service-box .description a {
    transition: color 0.3s ease;
}

/* ==========================================================================
   News Grid (Shortcode)
   ========================================================================== */

.news-grid {
    display: grid;
    grid-template-columns: repeat(var(--news-columns, 3), 1fr);
    gap: 30px;
    margin: 30px 0;
}

.news-card {
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.12);
    transform: translateY(-3px);
}

.news-image {
    position: relative;
    overflow: hidden;
    padding-top: 100%; /* Quadratisch */
}

.news-image a {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.news-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.news-card:hover .news-image img {
    transform: scale(1.05);
}

.news-category {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--fi-green);
    color: #ffffff;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
}

.news-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.news-title {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 15px;
    color: var(--fi-dark);
}

.news-title a {
    color: inherit;
    text-decoration: none;
}

.news-title a:hover {
    color: var(--fi-green);
}

.news-date {
    font-size: 13px;
    color: var(--fi-gray);
    margin-bottom: 10px;
}

.news-excerpt {
    font-size: 15px;
    line-height: 1.6;
    color: var(--fi-gray);
    margin-bottom: 20px;
    flex-grow: 1;
}

.news-link {
    margin-top: auto;
}

.news-button,
.news-button:link,
.news-button:visited {
    display: inline-block;
    background: var(--fi-blue) !important;
    color: #ffffff !important;
    padding: 12px 25px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.3s ease;
}

.news-button:hover {
    background: #004570 !important;
    color: #ffffff !important;
}

/* Responsive News Grid */
@media (max-width: 1200px) {
    .with-nav .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 900px) {
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .with-nav .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 700px) {
    .with-nav .news-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .news-grid {
        grid-template-columns: 1fr;
    }
}

/* News Grid kleinere Bilder bei engem Platz */
.with-nav .news-image {
    padding-top: 75%; /* 4:3 statt 1:1 bei Nav */
}

@media (min-width: 1201px) {
    .with-nav .news-image {
        padding-top: 100%; /* Quadratisch bei genug Platz */
    }
}

/* ==========================================================================
   Content Navigation (Portfolio)
   ========================================================================== */

.portfolio-content-wrapper {
    display: block;
}

.portfolio-content-wrapper.with-nav,
.page-content-wrapper.with-nav {
    display: flex;
    gap: 40px;
}

.portfolio-single.nav-left .portfolio-content-wrapper,
article.nav-left .page-content-wrapper {
    flex-direction: row;
}

.portfolio-single.nav-right .portfolio-content-wrapper,
article.nav-right .page-content-wrapper {
    flex-direction: row-reverse;
}

.content-nav-sidebar {
    flex: 0 0 250px;
    min-width: 250px;
}

.portfolio-content-wrapper.with-nav .entry-content,
.page-content-wrapper.with-nav .entry-content {
    flex: 1;
    min-width: 0;
}

.content-nav {
    position: sticky;
    top: 120px;
    background: var(--fi-gray-light);
    padding: 20px;
    border-radius: 8px;
}

.content-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.content-nav-item {
    margin-bottom: 8px;
}

.content-nav-item:last-child {
    margin-bottom: 0;
}

.content-nav-item a {
    display: block;
    padding: 8px 12px;
    color: var(--fi-dark);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: all 0.3s ease;
}

.content-nav-item a:hover,
.content-nav-item.active a {
    color: var(--fi-green);
    border-left-color: var(--fi-green);
    background: rgba(115, 163, 34, 0.1);
}

/* Navigation Farben basierend auf Titelfarbe */
.nav-color-blue .content-nav-item a:hover,
.nav-color-blue .content-nav-item.active a {
    color: var(--fi-blue);
    border-left-color: var(--fi-blue);
    background: rgba(0, 90, 144, 0.1);
}

.nav-color-green .content-nav-item a:hover,
.nav-color-green .content-nav-item.active a {
    color: var(--fi-green);
    border-left-color: var(--fi-green);
    background: rgba(115, 163, 34, 0.1);
}

.content-nav-item.level-3 a {
    padding-left: 24px;
    font-size: 13px;
    font-weight: 400;
}

/* Responsive */
@media (max-width: 900px) {
    .portfolio-content-wrapper.with-nav,
    .page-content-wrapper.with-nav {
        flex-direction: column !important;
        display: flex !important;
    }
    
    .content-nav-sidebar {
        flex: none !important;
        min-width: 100% !important;
        width: 100% !important;
        order: -1 !important;
    }
    
    .content-nav {
        position: relative !important;
        top: 0 !important;
        margin-bottom: 30px;
    }
    
    .portfolio-content-wrapper.with-nav .entry-content,
    .page-content-wrapper.with-nav .entry-content {
        width: 100% !important;
        flex: none !important;
    }
}

/* ==========================================================================
   Page Content
   ========================================================================== */

/* ==========================================================================
   Slider
   ========================================================================== */

.food-ing-slider {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: var(--fi-gray-light);
}

.slider-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

.slider-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
}

.slider-slide.active {
    opacity: 1;
}

.slider-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Navigation Arrows */
.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.8);
    border: none;
    cursor: pointer;
    font-size: 24px;
    color: var(--fi-dark);
    transition: all 0.3s ease;
    z-index: 10;
}

.slider-nav:hover {
    background: rgba(255, 255, 255, 1);
    color: var(--fi-green);
}

.slider-prev {
    left: 20px;
}

.slider-next {
    right: 20px;
}

/* Dots */
.slider-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.slider-dot:hover,
.slider-dot.active {
    background: var(--fi-green);
}

/* Responsive Slider */
@media (max-width: 768px) {
    .slider-nav {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .slider-prev {
        left: 10px;
    }
    
    .slider-next {
        right: 10px;
    }
    
    .slider-dots {
        bottom: 15px;
    }
    
    .slider-dot {
        width: 10px;
        height: 10px;
    }
}

/* ==========================================================================
   Page Content Styles
   ========================================================================== */

.page-content,
.site-main {
    margin-top: 100px;
}

/* Page Header - wie Original */
.page-header {
    padding: 20px 0 30px;
    text-align: left;
}

.page-header .page-title {
    font-size: 42px;
    font-weight: 700;
    color: var(--fi-blue);
    margin-bottom: 15px;
    line-height: 1.2;
}

.page-header .page-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: var(--fi-green);
    margin-top: 20px;
}

.page-header .page-description {
    font-size: 16px;
    color: var(--fi-gray);
    line-height: 1.8;
    max-width: 800px;
}

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

.container-narrow {
    max-width: 800px;
}

/* Content Section */
.content-section {
    padding: 60px 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.section-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--fi-dark);
    margin-bottom: 10px;
}

.section-separator {
    width: 60px;
    height: 3px;
    background-color: var(--fi-green);
    margin-bottom: 25px;
}

.section-text {
    font-size: 14px;
    line-height: 1.8;
    color: var(--fi-gray);
}

/* Entry Content */
.entry-content {
    padding: 0 0 40px 0;
}

.entry-content a {
    color: var(--fi-green);
}

.entry-content a:hover {
    color: var(--fi-green-dark);
}

.entry-content h1 { 
    font-size: 42px;
    color: var(--fi-blue);
}

.entry-content h2 { 
    font-size: 32px; 
    margin-top: 40px;
    color: var(--fi-blue);
}

.entry-content h3 { 
    font-size: 26px; 
    margin-top: 30px;
    color: var(--fi-dark);
}

.entry-content h4 { 
    font-size: 20px; 
    margin-top: 25px;
    color: var(--fi-dark);
}

.entry-content ul,
.entry-content ol {
    margin: 0 0 20px 25px;
}

.entry-content ul { list-style: disc; }
.entry-content ol { list-style: decimal; }
.entry-content li { margin-bottom: 8px; }

.entry-content blockquote {
    border-left: 4px solid var(--fi-green);
    padding-left: 20px;
    margin: 20px 0;
    font-style: italic;
    color: var(--fi-gray);
}

.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.entry-content th,
.entry-content td {
    padding: 12px;
    border: 1px solid var(--fi-border);
    text-align: left;
}

.entry-content th {
    background: var(--fi-gray-light);
    font-weight: 600;
}

/* ==========================================================================
   Posts / News
   ========================================================================== */

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    padding: 40px 0;
}

.post-card {
    background: var(--fi-white);
    border: 1px solid var(--fi-gray-lighter);
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.post-card:hover {
    box-shadow: var(--fi-shadow-lg);
}

.post-card .card-image {
    height: 200px;
    overflow: hidden;
}

.post-card .card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.post-card:hover .card-image img {
    transform: scale(1.05);
}

.post-card .card-content {
    padding: 20px;
}

.post-card .category {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    color: var(--fi-green);
    text-transform: uppercase;
    margin-bottom: 10px;
}

.post-card h3 {
    font-size: 16px;
    margin-bottom: 10px;
    line-height: 1.4;
}

.post-card h3 a:hover {
    color: var(--fi-green);
}

.post-card .meta {
    font-size: 12px;
    color: #999;
    margin-bottom: 10px;
}

.post-card .excerpt {
    font-size: 13px;
    color: var(--fi-gray);
    line-height: 1.6;
    margin-bottom: 15px;
}

.post-card .read-more {
    font-size: 13px;
    font-weight: 600;
    color: var(--fi-green);
}

.post-card .read-more:hover {
    color: var(--fi-green-dark);
}

/* Single Post */
.single-post-header {
    padding: 60px 0 40px;
    border-bottom: none;
    margin-bottom: 30px;
}

.single-post-header .category {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    color: var(--fi-green);
    text-transform: uppercase;
    margin-bottom: 15px;
}

.single-post-header h1,
.single-post-header .entry-title {
    font-size: 42px;
    color: var(--fi-blue);
    margin-bottom: 15px;
    line-height: 1.2;
}

.single-post-header h1::after,
.single-post-header .entry-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: var(--fi-green);
    margin-top: 20px;
}

.single-post-header .meta {
    font-size: 14px;
    color: var(--fi-gray);
    margin-top: 25px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 40px 0;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    background: var(--fi-gray-light);
    color: var(--fi-dark);
    font-weight: 500;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.pagination a:hover,
.pagination .current {
    background: var(--fi-green);
    color: var(--fi-white);
}

/* Posts Navigation (Vorherige/Nächste) */
.posts-navigation,
.post-navigation {
    padding: 40px 0;
    border-top: 1px solid var(--fi-border);
    margin-top: 40px;
}

.posts-navigation .nav-links,
.post-navigation .nav-links {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.posts-navigation .nav-previous a,
.posts-navigation .nav-next a,
.post-navigation .nav-previous a,
.post-navigation .nav-next a {
    display: inline-block;
    background: var(--fi-blue) !important;
    color: #ffffff !important;
    padding: 12px 25px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.3s ease;
}

.posts-navigation .nav-previous a:hover,
.posts-navigation .nav-next a:hover,
.post-navigation .nav-previous a:hover,
.post-navigation .nav-next a:hover {
    background: #004570 !important;
    color: #ffffff !important;
}

.posts-navigation .nav-next,
.post-navigation .nav-next {
    margin-left: auto;
}

@media (max-width: 600px) {
    .posts-navigation .nav-links,
    .post-navigation .nav-links {
        flex-direction: column;
        align-items: stretch;
    }
    
    .posts-navigation .nav-previous a,
    .posts-navigation .nav-next a,
    .post-navigation .nav-previous a,
    .post-navigation .nav-next a {
        display: block;
        text-align: center;
    }
    
    .posts-navigation .nav-next,
    .post-navigation .nav-next {
        margin-left: 0;
    }
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
    background-color: var(--fi-gray-light);
    border-top: 1px solid var(--fi-border);
}

/* Sticky Footer - Footer immer am unteren Rand */
.site {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.site-content {
    flex: 1;
}

/* Footer auf Startseite: Fly-in beim Scrollen nach unten */
body.is-front-page .site-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    transform: translateY(100%);
    transition: transform 0.4s ease;
    z-index: 100;
}

body.is-front-page .site-footer.visible {
    transform: translateY(0);
}

/* Footer Widgets Area */
.footer-widgets {
    padding: 50px 0;
}

.footer-widgets .container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.footer-widget {
    font-size: 14px;
}

.footer-widget h4,
.footer-widget .widget-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--fi-dark);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--fi-green);
}

.footer-widget p {
    color: var(--fi-gray);
    margin-bottom: 10px;
}

.footer-widget a {
    color: var(--fi-gray);
}

.footer-widget a:hover {
    color: var(--fi-green);
}

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

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

/* Footer Bottom */
.footer-bottom {
    padding: 20px 0;
    border-top: 1px solid var(--fi-border);
}

.footer-bottom .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.footer-copyright {
    font-family: var(--fi-font);
    font-size: 14px;
    font-weight: 600;
    color: var(--fi-dark);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-menu {
    display: flex;
    gap: 25px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-menu li {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-menu a {
    font-family: var(--fi-font);
    font-size: 14px;
    font-weight: 600;
    color: var(--fi-dark);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-menu a:hover {
    color: var(--fi-green);
}

/* ==========================================================================
   Widgets
   ========================================================================== */

.widget {
    margin-bottom: 30px;
}

.widget-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--fi-green);
}

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

.widget ul li {
    padding: 8px 0;
    border-bottom: 1px solid var(--fi-gray-lighter);
}

.widget ul li:last-child {
    border-bottom: none;
}

.widget ul li a {
    color: var(--fi-gray);
}

.widget ul li a:hover {
    color: var(--fi-green);
}

/* Search Widget */
.search-form {
    display: flex;
}

.search-field {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid var(--fi-border);
    border-right: none;
    font-size: 14px;
}

.search-field:focus {
    outline: none;
    border-color: var(--fi-green);
}

.search-submit {
    padding: 10px 20px;
    background: var(--fi-green);
    color: var(--fi-white);
    border: none;
    cursor: pointer;
    font-weight: 600;
}

.search-submit:hover {
    background: var(--fi-green-dark);
}

/* ==========================================================================
   WordPress Blocks & Alignments
   ========================================================================== */

.alignleft {
    float: left;
    margin: 0 20px 15px 0;
}

.alignright {
    float: right;
    margin: 0 0 15px 20px;
}

.aligncenter {
    display: block;
    margin: 0 auto 20px;
}

.alignwide {
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}

.alignfull {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

.wp-caption {
    max-width: 100%;
}

.wp-caption-text {
    font-size: 12px;
    color: var(--fi-gray);
    text-align: center;
    padding: 8px;
}

/* Gallery */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.gallery-item {
    margin: 0;
}

.gallery-item img {
    width: 100%;
    height: auto;
}

/* Screen Reader */
.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

/* ==========================================================================
   Portfolio / Vertretungen
   ========================================================================== */

.portfolio-section {
    padding: 40px 0;
    border-bottom: 1px solid var(--fi-gray-lighter);
}

.portfolio-section:last-child {
    border-bottom: none;
}

.portfolio-section .section-header {
    margin-bottom: 30px;
}

.portfolio-section .section-title {
    font-size: 42px;
    font-weight: 700;
    color: var(--fi-blue);
    margin-bottom: 15px;
    line-height: 1.2;
}

.portfolio-section .section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: var(--fi-green);
    margin-top: 20px;
}

.portfolio-section .section-description {
    font-size: 14px;
    color: var(--fi-gray);
    margin-bottom: 30px;
}

.page-intro {
    font-size: 16px;
    color: var(--fi-gray);
    margin-bottom: 40px;
}

/* Portfolio Grid */
.portfolio-grid {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* Portfolio Shortcode Grid mit Spalten */
.portfolio-shortcode.portfolio-grid,
.portfolio-shortcode .portfolio-grid {
    --portfolio-columns: 1;
}

@media (min-width: 769px) {
    .portfolio-shortcode.portfolio-grid,
    .portfolio-shortcode .portfolio-grid {
        display: grid;
        grid-template-columns: repeat(var(--portfolio-columns), 1fr);
        gap: 30px;
    }
    
    .portfolio-shortcode .portfolio-item {
        display: flex;
        flex-direction: column;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .portfolio-shortcode .portfolio-item-inner {
        grid-template-columns: 1fr;
        text-align: center;
        display: flex;
        flex-direction: column;
        height: 100%;
        padding: 0 !important;
        margin: 0 !important;
        gap: 0 !important;
    }
    
    .portfolio-shortcode .portfolio-logo {
        height: auto !important;
        max-height: 120px;
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: hidden;
        margin: 0 auto 0 auto !important;
        padding: 0 !important;
        width: 100%;
    }
    
    .portfolio-shortcode .portfolio-logo a {
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .portfolio-shortcode .portfolio-logo img {
        max-height: 120px;
        width: auto;
        max-width: 100%;
        object-fit: contain;
        margin: 0 auto !important;
        padding: 0 !important;
    }
    
    .portfolio-shortcode .portfolio-content {
        flex: 1;
        display: flex;
        flex-direction: column;
        margin: 20px 0 0 0 !important;
        padding: 0 !important;
    }
    
    .portfolio-shortcode .portfolio-title {
        margin: 0 0 8px 0 !important;
        padding: 0 !important;
    }
    
    .portfolio-shortcode .portfolio-subtitle {
        margin: 0 0 8px 0 !important;
        padding: 0 !important;
    }
    
    .portfolio-shortcode .portfolio-description {
        flex: 1;
        margin: 0 0 12px 0 !important;
        padding: 0 !important;
    }
    
    .portfolio-shortcode .portfolio-description p {
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .portfolio-shortcode .portfolio-links {
        margin: 0 !important;
        padding: 0 !important;
    }
}

/* Titel ausblenden wenn Bild vorhanden */
.hide-title-with-image .portfolio-item.has-post-thumbnail .portfolio-title {
    display: none;
}

/* Text ausblenden */
.hide-text .portfolio-description {
    display: none;
}

/* Link ausblenden */
.hide-link .portfolio-link,
.hide-link .portfolio-links,
.hide-link .read-more,
.hide-link .external-link {
    display: none;
}

/* Kachel-Ansicht mit Overlay */
.portfolio-kacheln {
    display: grid !important;
    grid-template-columns: repeat(var(--portfolio-columns), 1fr) !important;
    gap: 5px !important;
}

.portfolio-kacheln .portfolio-item {
    margin-bottom: 0 !important;
    display: block !important;
}

.portfolio-shortcode.portfolio-kacheln .portfolio-item-inner,
.portfolio-kacheln .portfolio-item-inner {
    display: block !important;
    position: relative !important;
    padding-top: 100% !important; /* Quadratisch */
    overflow: hidden !important;
    background-color: var(--fi-green) !important;
    height: auto !important;
    flex-direction: unset !important;
    text-align: left !important;
    grid-template-columns: unset !important;
}

.portfolio-shortcode.portfolio-kacheln .portfolio-logo,
.portfolio-kacheln .portfolio-logo {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    display: block !important;
    align-items: unset !important;
    justify-content: unset !important;
    max-height: unset !important;
    overflow: visible !important;
}

.portfolio-shortcode.portfolio-kacheln .portfolio-logo a,
.portfolio-kacheln .portfolio-logo a {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
}

.portfolio-shortcode.portfolio-kacheln .portfolio-logo img,
.portfolio-kacheln .portfolio-logo img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    transition: transform 0.3s ease;
    max-height: unset !important;
    max-width: unset !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
}

.portfolio-shortcode.portfolio-kacheln .portfolio-content,
.portfolio-kacheln .portfolio-content {
    position: absolute !important;
    bottom: 20px !important;
    left: 20px !important;
    right: 20px !important;
    top: auto !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    z-index: 2;
    text-align: left !important;
    display: block !important;
    flex: unset !important;
}

.portfolio-kacheln .portfolio-title {
    font-size: 22px;
    font-weight: 600;
    color: #ffffff !important;
    margin: 0 !important;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.6);
    line-height: 1.3;
}

.portfolio-kacheln .portfolio-title a {
    color: #ffffff !important;
}

/* Alles ausser Titel ausblenden */
.portfolio-kacheln .portfolio-description,
.portfolio-kacheln .portfolio-link,
.portfolio-kacheln .portfolio-links,
.portfolio-kacheln .portfolio-subtitle,
.portfolio-kacheln .read-more,
.portfolio-kacheln .external-link {
    display: none !important;
}

/* Grüner Rahmen wie im Original */
.portfolio-kacheln .portfolio-item-inner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 3px solid var(--fi-green);
    z-index: 1;
    pointer-events: none;
}

/* Hover-Effekt */
.portfolio-kacheln .portfolio-item-inner:hover .portfolio-logo img {
    transform: scale(1.05);
}

/* Hintergrundfarben für Portfolio Shortcode */
.portfolio-shortcode.bg-blue,
.portfolio-section.bg-blue {
    background-color: var(--fi-blue);
    padding: 40px;
    margin-left: -20px;
    margin-right: -20px;
}

.portfolio-shortcode.bg-green,
.portfolio-section.bg-green {
    background-color: var(--fi-green);
    padding: 40px;
    margin-left: -20px;
    margin-right: -20px;
}

.portfolio-shortcode.bg-blue .portfolio-title,
.portfolio-shortcode.bg-blue .portfolio-description,
.portfolio-shortcode.bg-blue .portfolio-link,
.portfolio-section.bg-blue .section-title,
.portfolio-section.bg-blue .section-description {
    color: #ffffff;
}

.portfolio-shortcode.bg-green .portfolio-title,
.portfolio-shortcode.bg-green .portfolio-description,
.portfolio-shortcode.bg-green .portfolio-link,
.portfolio-section.bg-green .section-title,
.portfolio-section.bg-green .section-description {
    color: #ffffff;
}

.portfolio-section.bg-blue .section-title::after,
.portfolio-section.bg-green .section-title::after {
    background-color: #ffffff;
}

/* Kompakte Ansicht */
.portfolio-kompakt .portfolio-item {
    margin-bottom: 15px;
}

.portfolio-kompakt .portfolio-logo {
    margin-bottom: 10px;
}

.portfolio-kompakt .portfolio-title {
    font-size: 18px;
    margin-bottom: 5px;
}

.portfolio-kompakt .portfolio-description {
    margin-bottom: 10px;
}

.portfolio-kompakt.portfolio-grid {
    gap: 20px;
}

/* Portfolio Item */
.portfolio-item {
    background: var(--fi-white);
}

.portfolio-item-inner {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 30px;
    align-items: start;
}

.portfolio-logo {
    flex-shrink: 0;
}

.portfolio-logo img {
    max-width: 100%;
    height: auto;
}

.portfolio-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 150px;
    height: 100px;
    background: var(--fi-gray-light);
    color: var(--fi-gray);
    font-size: 12px;
    text-align: center;
    padding: 10px;
}

.portfolio-content {
    flex: 1;
}

.portfolio-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--fi-dark);
    margin-bottom: 5px;
}

.portfolio-title a {
    color: var(--fi-dark);
}

.portfolio-title a:hover {
    color: var(--fi-green);
}

.portfolio-subtitle {
    font-size: 14px;
    font-weight: 600;
    color: var(--fi-green);
    margin-bottom: 15px;
}

.portfolio-description {
    font-size: 14px;
    line-height: 1.8;
    color: var(--fi-gray);
    margin-bottom: 15px;
}

.portfolio-description p {
    margin: 0;
}

.portfolio-links {
    display: flex;
    gap: 20px;
    margin-top: auto;
}

.portfolio-links .read-more,
.portfolio-links .external-link {
    font-size: 13px;
    font-weight: 600;
    color: var(--fi-green);
}

.portfolio-links .read-more:hover,
.portfolio-links .external-link:hover {
    color: var(--fi-green-dark);
}

/* Portfolio Shortcode Button Style */
.portfolio-shortcode .portfolio-links {
    justify-content: center;
}

.portfolio-shortcode .portfolio-links .read-more,
.portfolio-shortcode .portfolio-links .read-more:link,
.portfolio-shortcode .portfolio-links .read-more:visited {
    display: inline-block;
    background: var(--fi-blue) !important;
    color: #ffffff !important;
    padding: 12px 25px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.3s ease;
}

.portfolio-shortcode .portfolio-links .read-more:hover {
    background: #004570 !important;
    color: #ffffff !important;
}

/* Single Portfolio */
.portfolio-single {
    padding: 40px 0;
}

.portfolio-header {
    margin-bottom: 30px;
}

.portfolio-header .portfolio-category {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    color: var(--fi-green);
    text-transform: uppercase;
    margin-bottom: 10px;
}

.portfolio-header .entry-title {
    font-size: 32px;
    margin-bottom: 10px;
}

.portfolio-header .portfolio-subtitle {
    font-size: 16px;
    color: var(--fi-gray);
    margin: 0;
}

.portfolio-image {
    margin-bottom: 30px;
}

.portfolio-image img {
    max-width: 300px;
    height: auto;
}

.portfolio-website {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid var(--fi-gray-lighter);
}

.btn-website {
    display: inline-block;
    padding: 12px 30px;
    background: var(--fi-green);
    color: var(--fi-white);
    font-weight: 600;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.btn-website:hover {
    background: var(--fi-green-dark);
    color: var(--fi-white);
}

.portfolio-navigation {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--fi-gray-lighter);
}

.back-to-portfolio {
    font-weight: 600;
    color: var(--fi-green);
}

.back-to-portfolio:hover {
    color: var(--fi-green-dark);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 992px) {
    .services-container {
        gap: 40px;
    }

    .footer-widgets .container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    html { font-size: 15px; }

    .header-inner {
        padding: 10px 15px;
    }

    .site-logo img,
    .custom-logo {
        height: 50px;
    }

    .menu-toggle {
        display: flex !important;
        z-index: 1001;
    }

    .main-navigation {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--fi-white);
        box-shadow: var(--fi-shadow-lg);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        display: block !important;
    }

    .main-navigation.active {
        max-height: 80vh;
        overflow-y: auto;
    }

    .nav-menu,
    .main-navigation ul {
        flex-direction: column;
        padding: 15px;
        display: flex;
    }

    .nav-menu > li > a,
    .main-navigation > div > ul > li > a {
        padding: 12px 0;
        border-bottom: 1px solid var(--fi-gray-lighter);
    }

    .nav-menu .sub-menu,
    .main-navigation ul ul {
        position: static !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        box-shadow: none;
        padding-left: 20px;
        background: var(--fi-gray-light);
        display: block !important;
    }

    .home-content {
        margin-top: 70px;
        min-height: auto;
    }

    .services-container {
        flex-direction: column;
    }

    .service-box {
        min-width: 100%;
        min-height: 70vh;
        padding: 40px 20px;
    }

    .service-box .service-logo img {
        height: 160px;
    }

    .service-box h2 {
        font-size: 22px;
    }

    .service-box .description {
        font-size: 14px;
    }

    .page-content,
    .site-main {
        margin-top: 70px;
    }

    .posts-grid {
        grid-template-columns: 1fr;
    }

    .footer-widgets .container {
        grid-template-columns: 1fr;
    }

    .footer-bottom .container {
        flex-direction: column;
        text-align: center;
    }

    .footer-menu {
        justify-content: center;
    }

    /* Portfolio Responsive */
    .portfolio-item-inner {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .portfolio-logo {
        text-align: center;
    }

    .portfolio-logo img {
        max-width: 200px;
    }

    .portfolio-section .section-title {
        font-size: 22px;
    }

    .portfolio-links {
        flex-direction: column;
        gap: 10px;
    }
    
    /* Kacheln Mobile - 2 Spalten statt 3 */
    .portfolio-kacheln {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 3px;
    }
    
    .portfolio-kacheln .portfolio-title {
        font-size: 14px !important;
        line-height: 1.2;
    }
    
    /* Content Navigation Mobile Fix */
    .portfolio-content-wrapper.with-nav,
    .page-content-wrapper.with-nav {
        flex-direction: column !important;
    }
    
    .content-nav-sidebar {
        width: 100% !important;
        min-width: 100% !important;
        flex: none !important;
        order: -1 !important;
        margin-bottom: 20px;
    }
    
    .content-nav {
        position: relative !important;
        top: 0 !important;
    }
    
    .portfolio-content-wrapper.with-nav .entry-content,
    .page-content-wrapper.with-nav .entry-content {
        width: 100% !important;
        min-width: 100% !important;
    }
    
    /* Page Title Mobile */
    .page-title {
        font-size: 28px !important;
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
    }
}

/* Extra Small Screens */
@media (max-width: 480px) {
    /* Kacheln Mobile - Grössere Kacheln auf sehr kleinen Screens */
    .portfolio-kacheln {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .portfolio-kacheln .portfolio-title {
        font-size: 12px !important;
        bottom: 8px !important;
        left: 8px !important;
        right: 8px !important;
    }
    
    /* News Mobile */
    .news-grid {
        grid-template-columns: 1fr !important;
    }
    
    /* Page Title Extra Small */
    .page-title {
        font-size: 24px !important;
    }
    
    /* Container Padding */
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
}
