/*
Theme Name: TenoVisia
Theme URI: https://tenovisia.com
Author: TenoVisia
Author URI: https://tenovisia.com
Description: Vlastní WordPress šablona pro TenoVisia s podporou ACF. Landing page s blogem.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: tenovisia
*/

/* Reset a základní styly */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    height: 100%;
}

body {
    /* font-family: 'Barlow Semi Condensed', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif; */
    font-family: 'Barlow', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #151516;
    background-color: #fff;
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

@media screen and (min-width: 1920px) {
    body {
        max-width: 1920px;
        margin: auto;
    }
    .site-main {
        overflow: hidden;
    }
}

/* Header */
.site-header {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1.4rem 2rem;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
}

.site-logo {
    color: #fff;
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none;
    display: flex;
    align-items: center;
}

.logo-image {
    max-height: 50px;
    width: auto;
}

.logo-desktop {
    display: block;
}

.logo-mobile {
    display: none;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.logo-text-red {
    color: #E5231B;
}

.logo-text-white {
    color: #fff;
}

@media (max-width: 992px) {
    .logo-desktop {
        display: none;
    }
    
    .logo-mobile {
        display: block;
    }
    
    .logo-text {
        font-size: 1.25rem;
    }
}

.main-navigation {
    display: flex;
    margin: auto;
    max-width: 475px;
    width: -webkit-fill-available;
}

.main-navigation ul {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
    padding: 0;
    min-width: -webkit-fill-available;
    justify-content: space-between;
}

.main-navigation ul li {
    margin: 0;
}

.main-navigation a {
    color: #fff;
    text-decoration: none;
    transition: opacity 0.3s;
    font-size: 16px;
}

.main-navigation a:hover {
    text-decoration: underline;
}

.menu-toggle {
    display: none;
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 0.5rem;
    align-items: center;
    gap: 0.75rem;
    font-size: 16px;
    font-family: inherit;
    margin-left: auto;
}

.menu-toggle img
{
    margin-top: 4px;
}

.menu-toggle-text {
    color: #fff;
}

.mobile-menu-contact {
    display: none;
    flex-direction: column;
    gap: 1rem;
    padding-top: 1.5rem;
    margin-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.mobile-contact-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.mobile-contact-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.mobile-contact-link {
    color: #fff;
    text-decoration: none;
    font-size: 16px;
    transition: opacity 0.3s;
}

.mobile-contact-link:hover {
    opacity: 0.8;
}

.language-switcher {
    background: #E5231B;
    color: #fff;
    padding: 0.5rem 1rem;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
}

/* Hero Section */
.hero-section {
    width: 100%;
    height: 100vh;
    min-height: 600px;
    display: flex;
    overflow: hidden;
    max-height: 635px;
}

.hero-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    width: 100%;
    height: 100%;
}

.hero-panel {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, flex-grow 0.3s ease;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.3s ease;
}

.hero-panel:hover .hero-background {
    transform: scale(1.05);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: background 0.3s ease;
}

.hero-panel:hover .hero-overlay {
    background: rgba(0, 0, 0, 0.3);
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: #fff;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.hero-icon {
    width: 100%;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.hero-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.hero-title {
    font-size: 1.5rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    line-height: 1.2;
}

/* Main Content */
.site-main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 0;
    width: 100%;
    flex: 1 0 auto; /* sticky footer: pushes footer to bottom on short pages */
}
@media (max-width: 992px) {
    .site-main {
        padding: 2rem !important;
    }
    
    .site-main:first-child {
        padding-top: 0;
    }
}

.section-title {
    font-size: 40px;
    margin-bottom: 2rem;
    padding-bottom: 15px;
    position: relative; 
    border-bottom: none; 
    font-weight: 500;
}

.section-title::after {
    content: "";       
    position: absolute;
    bottom: 0;
    left: 0;         
    width: 30px;       
    height: 3px;     
    background-color: #E5231B;
}

/* News Section */
.flex {
    display: flex
}
.news-section .flex
{
    gap: 20px
}

.news-carousel .flex {
    justify-content: space-between;
}

.news-section {
    margin-top: 2rem;
    margin-bottom: 4rem;
}

.news-section .section-title
{
    margin-bottom: 0;
}

/* Featured (nejnovější) */
.news-featured {
    background: #fff;
    padding: 2rem 0rem;
    margin-bottom: 2rem;
}

.news-featured .news-label {
    display: inline-block;
    background: #111;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 200;
    padding: 2px 10px;
    border-radius: 8px;
    margin-right: 0.75rem;
    margin-bottom: 1rem;
}

.news-featured .news-date {
    color: #4D4D4D;
    font-size: 14px;
    font-weight: 400;
    margin-bottom: 1rem;
    display: inline-block;
}

.news-featured .news-title {
    font-size: 22px;
    margin-bottom: 8px;
    font-weight: 600;
}

.news-featured .news-excerpt {
    line-height: 1.7;
    font-size: 17px;
    color: #151516;
}

/* Carousel background area (full-bleed) */
.news-carousel-area {
    background: #F4F4F5;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    padding: 3rem 0;
}

.news-carousel-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Carousel indicators (čárky) */
.carousel-indicators {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
    padding: 20px 0 0 0;
    margin-top: 0;
}

.carousel-indicator {
    width: 20px;
    height: 4px;
    border-radius: 0;
    background: #D6D6D6;
    border: 0;
    padding: 0;
    cursor: pointer;
    display: inline-block;
    transition: background 0.3s ease;
}

.carousel-indicator:hover {
    background: #999;
}

.carousel-indicator.is-active {
    background: #E5231B;
}

/* News Carousel layout */
.news-carousel-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.news-carousel {
    flex: 1;
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding: 0.5rem 0;
    scroll-snap-type: x mandatory;
    scroll-padding: 1rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none !important; /* Firefox */
    -ms-overflow-style: none !important; /* IE/Edge legacy */
}

/* Prevent scroll-snap fighting during JS-driven animation */
.news-carousel.is-animating {
    scroll-snap-type: none !important;
}

.news-carousel::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.news-carousel > * {
    scroll-snap-align: start;
}

.read-more-btn {
    background: #E5231B;
    color: #fff;
    padding: 5px 18px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    margin-top: 1rem;
    border-radius: 100px;
    font-size: 16px;
    transition: transform 0.2s
}

.read-more-btn:hover {
    background: #B5140C;
    transition: transform 0.2s
}

.reverse-btn {
    background: transparent;
    color: #E5231B;
    border: 1px solid #E5231B;
    padding: 7px 18px;
    border-radius: 100px;
    font-size: 14px;
    text-decoration: none;
    font-weight: 600;
    margin-top: auto;
    margin-bottom: auto;
    transition: transform 0.2s
}

.reverse-btn:hover
{
    background: #E5231B;
    color: #fff;
    transition: transform 0.2s
}

.news-card {
    /* 4 cards per view (desktop) */
    flex: 0 0 calc((100% - 3rem) / 4);
    min-width: 0;
    padding: 1.5rem;
    border-radius: 8px;
    position: relative;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    cursor: pointer;
}

/* Svislá čára za každou kartou v carouselu (výška 80 %), kromě poslední viditelné */
.news-carousel-area .news-card::after {
    content: "";
    position: absolute;
    top: 10%;
    right: 0;
    width: 1px;
    height: 80%;
    background-color: #E0E0E0;
}

.news-carousel-area .news-card.last-visible::after {
    display: none;
}

.news-card:hover {
    transform: translateY(-2px);
}

.news-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    margin-bottom: 1rem;
}

.news-card-link:hover {
    text-decoration: none;
    color: inherit;
}

.news-card .news-date {
    color: #666;
    font-size: 14px;
    margin-bottom: 0.875rem;
}

.news-card .news-title {
    font-size: 22px;
    margin-bottom: 0px;
    text-transform: uppercase;
}

.news-card .news-excerpt {
    font-size: 16px;
    line-height: 1.5;
    color: #4D4D4D;
    margin-bottom: 2rem;
}

.news-attachments {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #878787;
    font-weight: 200;
    font-size: 17px;
    margin-top: 1rem;
    
}

.news-carousel-wrapper .news-attachments
{
    margin-top: 0rem;
}

.news-attachments .attachment-icon {
    display: inline-block;
    transform: scaleX(-1);
    margin-top: 4px;
}
.news-attachments img.emoji {
    height: 20px !important;
    width: 20px !important;
}

.attachments-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 22px;
    font-weight: 500;
    margin-bottom: 1rem;
    color: #151516
}
.attachment img
{
    top: 5px;
    position: relative;
}
.attachments-title .attachment-icon {
    font-size: 1.5rem;
    display: inline-block;
    transform: scaleX(-1);
}

.attachments-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); 
    gap: 1.5rem;
}

.attachment-card {
    background: #F4F4F5;
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.attachment-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.attachment-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
}

.file-icon {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-weight: bold;
    font-size: 0.75rem;
    color: #fff;
    text-transform: uppercase;
}

.file-pdf {
    background: #E5231B;
}

.file-image {
    background: #4CAF50;
}

.file-zip {
    background: #FF9800;
}

.file-document {
    background: #2196F3;
}

.attachment-card-name {
    font-size: 16px;
    font-weight: 400;
    color: #000;
    text-align: center;
    word-break: break-word;
    flex: 1;
    min-height: 2.5rem;
    display: flex;
    align-items: center;
    margin-left: 10px;
    text-align: start;
    line-height: 1.2;
}

.attachment-card-actions {
    display: flex;
    gap: 0.5rem;
    width: 100%;
    margin-top: auto;
}

.attachment-action-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    text-align: start;
    justify-content: start;
    text-decoration: none;
    color: #E5231B;
    font-size: 16px;
    font-weight: 400;
    transition: background 0.2s, border-color 0.2s;
}

.attachment-action-btn:hover {
    text-decoration: underline;
}

.attachment-action-btn .action-icon {
    font-size: 1rem;
}

.attachment-action-btn .action-text {
    font-size: 0.75rem;
}

/* Single News Styles */
.news-navigation {
    display: none;
}
.single-post .hero-section
{
    display: none;
}
.single-news {
    margin: 0 auto;
    padding-top: 2.5rem;
}

.news-back-link {
    margin-bottom: 1.5rem;
}

.back-home-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #E5231B;
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    transition: color 0.2s;
}

.back-home-link:hover {
    color: #E5231B;
}

.back-arrow {
    font-size: 1rem;
    font-weight: bold;
}

.news-header {
    margin-bottom: 1.5rem;
    position: relative;
}

.news-header .news-label {
    display: inline-block;
    background: #111;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    margin-right: 0.75rem;
    margin-bottom: 1rem;
}

.news-date {
    color: #666;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    display: inline-block;
}

.news-title {
    font-size: 40px;
    color: #151516;
    font-weight: 500;
}

.news-content {
    line-height: 1.8;
    margin-bottom: 2rem;
}

.news-content p {
    margin-bottom: 1rem;
}

/* Divisions Section */
.divisions-section {
    margin-bottom: 4rem;
}

.divisions-container {
    display: flex;
    gap: 7rem;
}

.divisions-list::before {
    content: url("/wp-content/themes/tenovisia/assets/img/arrow-right-blur.svg");
    position: absolute;
    top: 50%;
    right: -5.0rem;
    transform: translateY(-50%); 
    z-index: 3;
}

@media (max-width: 768px) {
    .divisions-list::before {
        top: inherit;
        bottom: -6rem !important;
        right: 50% !important;
        z-index: 3;
        transform: translateY(-50%) rotate(90deg);
    }
    
    .division-content {
        border: 1px solid #F4F4F5;
        padding-top: 2rem !important;
    }
}

.divisions-list {
    width: 40%;
    gap: 5px;
    position: relative;
    display: grid;
}

.division-button {
    width: 100%;
    padding: 29px 16px;
    margin-bottom: 0.5rem;
    background: #F4F4F5;
    border: none;
    cursor: pointer;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s;
}

.division-button-left {
    display: inline-flex;
    gap: 0.75rem;
    flex: 1;
}

.division-button-icon {
    display: inline-flex;
    margin-right: 15px;
}

.division-button-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.division-content .division-button-icon img
{
    max-width: 400px;
}

.divisions-list .division-button-icon img
{
    max-height: 30px;
}

.division-button.active {
    background: #FFFFFF;
    box-shadow: rgba(149, 157, 165, 0.1) 0px 8px 24px;

}
.division-button.active .division-toggle
{
    color: #E5231B;
}

.division-toggle
{
    font-size: 24px;
    color: #878787;
 
}
.division-button .division-name {
    color: #E5231B;
    font-weight: bold;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.division-content {
    flex: 1;
    background: #fff;
    padding: 0 2rem 2rem 2rem;
}

.division-content-header {
    position: relative;
    padding-bottom: 15px;
    margin-bottom: 1rem;
}
.division-content-header::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 3px;
    background-color: #E5231B;
}

.division-content ul {
    list-style: none;
    padding-left: 0;
}

.division-content li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: #878787;
    font-size: 18px;
    line-height: 36px;
    font-weight: 500;
}

.division-content li:before {
    content: "";
    position: absolute;
    left: 0;
    align-self: center;
    width: 0;
    height: 0;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-left: 10px solid #E5231B;
}

.division-content-image {
    margin-top: 1.5rem;
}

.division-content-image img {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.carousel-nav
{
    background: transparent !important;
}

/* Hide mobile arrows on desktop */
.carousel-nav-mobile {
    display: none;
}

.carousel-next img, .carousel-prev img
{
    width: 24px !important;
    height: 24px !important;
}

.carousel-nav img {
    filter: brightness(0) !important; /* Zajistí, že obrázek bude skutečně černý */
    transition: filter 0.3s ease; /* Plynulý přechod barvy */
}
.carousel-nav:hover img {
    /* Tento filtr vytvoří barvu odpovídající #E5231B */
    filter: invert(21%) sepia(91%) saturate(5435%) hue-rotate(354deg) brightness(91%) contrast(93%) !important;
}

/* Footer */
.site-footer {
    background: transparent;
    color: #fff;
    padding: 0;
    position: relative;
    overflow: hidden;
}

.footer-mobile-title {
    display: none;
}

.footer-container {
    max-width: 100%;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    position: relative;
    z-index: 1;
}

.footer-column {
    position: relative;
    padding: 0;
    border-radius: 0;
    overflow: hidden;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 20px;
}

.footer-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 0;
}

.footer-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1;
}

.footer-content {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    width: 50%;
}

@media (min-width: 992px) {
    .footer-content {
        top: 75px;
    }
}

.footer-icon {
    margin-right: 12px;
    display: inline-block;
}

.footer-icon svg {
    width: 24px;
    height: 24px;
}

/* Samotný text nadpisu */
.footer-column-contact .footer-content::before {
    content: "Kontakt";
    position: absolute;
    top: -55px;
    left: 1.5rem;
    font-size: 40px;
    font-weight: 400;
    line-height: 1.2;
    -webkit-font-smoothing: antialiased;
    z-index: 3;
    color: #fff;
}

/* Červená linka pod nadpisem */
.footer-column-contact .footer-content::after {
    content: "";
    position: absolute;
    top: 0px; 
    left: 1.5rem;
    width: 30px;
    height: 5px;
    background-color: #E5231B;
    z-index: 3;
}
.footer-label {
    color: #fff;
    font-size: 16px;
    text-transform: uppercase;
    font-weight: 500;
    margin-bottom: 20px;
    letter-spacing: 0.5px;
    display: flex;
    width: max-content;
}

.footer-link {
    color: #fff;
    text-decoration: none;
    display: block;
    font-size: 16px;
    transition: opacity 0.3s;
}

.footer-link:hover {
    opacity: 0.8;
}

.footer-text {
    color: #fff;
    font-size: 16px;
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.footer-column-company .footer-label {
    font-size: 16px;
    margin-bottom: 20px;

}

/* Footer Copyright Section */
.footer-copyright {
    background: #000;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding: 1.5rem 2rem;
    position: relative;
}

.footer-copyright-container {
    max-width: 1920px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-copyright-left {
    display: flex;
    align-items: center;
}

.footer-copyright-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.footer-copyright-text {
    color: #fff;
    font-size: 16px;
    margin: 0;
    line-height: 1.6;
}

.footer-copyright-bold {
    font-weight: 700;
}

.footer-copyright-logo {
    height: 22px;
    width: auto;
    display: block;
    margin-top: 3px;
}

/* Responsive */

@media (max-width: 1200px) {
         /* 3 cards per view (tablet landscape / smaller desktop) */
         .news-card {
            flex: 0 0 calc((100% - 2rem) / 2);
        }
}


@media (max-width: 1024px) {
    .hero-section {
        height: auto;
        min-height: 400px !important;
        max-height: 400px !important;
    }
 

    .hero-section {
        height: auto;
        min-height: 800px;
    }

    .hero-panel {
        min-height: 400px;
    }

    .footer-container {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-column {
        min-height: 250px;
    }
   
}

@media (max-width: 992px) {
    .header-container {
        justify-content: space-between;
        position: relative;
    }

    .site-logo {
        order: 1;
        z-index: 1001;
    }

    .menu-toggle {
        display: flex;
        order: 2;
        z-index: 1001;
        position: relative;
    }

    .main-navigation {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(0, 0, 0, 0.95);
        backdrop-filter: blur(10px);
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        padding: 6rem 2rem 2rem;
        margin: 0;
        max-width: none;
        width: 100%;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 1000;
        overflow-y: auto;
    }

    .main-navigation.active {
        transform: translateX(0);
    }

    .main-navigation ul {
        flex-direction: column;
        gap: 0.5rem !important;
        width: 100%;
        min-width: auto;
        justify-content: flex-start;
        margin-bottom: 0;
        padding: 0;
        flex-wrap: wrap;
    }

    .main-navigation ul li {
        width: 100%;
        margin: 0;
    }

    .main-navigation a {
        font-size: 14px;
        display: block;
        padding: 0.75rem 0;
        color: #D4D4D4
    }

    .mobile-menu-contact {
        display: flex;
        flex-direction: column;
        width: 100%;
        gap: 1rem;
        padding-top: 1.5rem;
        margin-top: 1.5rem;
        border-top: 1px solid rgba(255, 255, 255, 0.2);
    }

    .mobile-contact-item {
        display: flex;
        align-items: center;
        gap: 0.75rem;
    }

    .mobile-contact-icon {
        width: 20px;
        height: 20px;
        flex-shrink: 0;
    }

    .mobile-contact-link {
        color: #fff;
        text-decoration: none;
        font-size: 16px;
    }

    /* Hero Carousel for Mobile */
    .hero-section {
        height: 60vh;
        min-height: 400px;
        max-height: none;
    }

    .hero-container {
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        grid-template-columns: none;
    }

    .hero-container::-webkit-scrollbar {
        display: none;
    }

    .hero-panel {
        flex: 0 0 100%;
        min-width: 100%;
        width: 100%;
        height: 100%;
        flex-shrink: 0;
        scroll-snap-align: start;
    }

    .hero-container.dragging {
        cursor: grabbing;
        scroll-behavior: auto;
    }

    .hero-container.dragging .hero-panel {
        cursor: grabbing;
        pointer-events: none;
    }

    .hero-container {
        cursor: grab;
    }

    .site-header {
        background: black;
    }
    .hero-icon {
        top: 32px;
        position: relative;
    }
}

@media (max-width: 768px) {
    .header-container {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .main-navigation {
        order: 3;
        width: 100%;
    }

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

    .hero-section {
        height: auto;
        min-height: auto;
    }

    .hero-panel {
        min-height: 348px;
    }

    .hero-icon {
        width: 250px;
        height: auto;
    }

    .hero-title {
        font-size: 1.25rem;
    }

    .news-section {
        margin-top: 0rem;
    }

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

    .divisions-list {
        flex: 1;
        display: flex;
        width: 100%;
        gap: 10px;
        flex-wrap: wrap;
    }

    .divisions-list .division-button {
        flex: 1 1 calc(50% - 10px) !important; /* Nastaví šířku na cca 50 % minus mezera */
    }

    .footer-container {
        grid-template-columns: repeat(2, 1fr);
        grid-template-areas:
            "title title"
            "email phone"
            "address company";
        padding: 1.5rem;
        position: relative;
        height: 500px;
    }
    
    .footer-column {
        min-height: auto;
        display: block;
        padding: 0;
    }

    /* Mobile: use ONE unified background for the whole footer-container */
    .footer-container::before {
        content: '';
        position: absolute;
        inset: 0;
        background-image: url('/wp-content/themes/tenovisia/assets/img/mobile-footer.png');
        background-size: cover;
        background-position: top;
        z-index: 0;
        pointer-events: none;
    }

    /* mobile-footer.png should already include the right overlay/contrast */
    .footer-container::after { content: none; }

    .footer-mobile-title {
        display: block;
        grid-area: title;
        position: relative;
        z-index: 2;
        font-size: 32px;
        font-weight: 400;
        line-height: 1.2;
        
        margin: 0 0 1.25rem 0;
    }

    .footer-mobile-title::after {
        content: '';
        display: block;
        width: 30px;
        height: 5px;
        background: #E5231B;
        margin-top: 0.75rem;
    }

    /* Place the four blocks into a 2x2 grid under the title */
    .footer-column-contact { grid-area: email; }
    .footer-column-phone { grid-area: phone; }
    .footer-column-address { grid-area: address; }
    .footer-column-company { grid-area: company; }

    /* Remove per-column backgrounds on mobile (we use container background instead) */
    .footer-column .footer-background,
    .footer-column .footer-overlay {
        display: none;
    }

    .footer-content {
        width: 100% !important;
        height: auto;
        padding: 0;
        position: relative;
        z-index: 2;
    }

    /* Turn off the desktop Kontakt title pseudo-element (mobile has its own title row) */
    .footer-column-contact .footer-content::before,
    .footer-column-contact .footer-content::after {
        content: none;
    }
    
    .footer-label {
        margin-bottom: 0.5rem;
    }
    
    .footer-copyright-container {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .footer-copyright-right {
        justify-content: center;
        flex-wrap: wrap;
    }

}

@media (max-width: 640px) {
    .carousel-indicators
    {
        display: none !important;
    }
    
    .news-card {
        flex: 0 0 100%;
    }
    
    /* Attachments grid - 1 column on mobile */
    .attachments-grid {
        grid-template-columns: 1fr;
    }
    
    .attachment-card-actions {
        flex-direction: column;
    }
    
    .attachment-action-btn {
        width: 100%;
    }

    /* Carousel navigation - move arrows below on mobile */
    .news-carousel-wrapper {
        flex-direction: column;
        gap: 1.5rem;
        align-items: stretch;
    }

    .news-carousel {
        order: 1;
        width: 100%;
    }

    /* Hide original arrows on mobile */
    .news-carousel-wrapper > .carousel-nav:not(.carousel-nav-mobile-btn) {
        display: none;
    }

    /* Show mobile arrows container */
    .carousel-nav-mobile {
        order: 2;
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        width: 100%;
        padding-top: 1rem;
    }

    .carousel-nav-mobile-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0.5rem;
    }

/* Hide carousel controls when there is nothing to scroll */
.news-carousel-wrapper.carousel-no-scroll .carousel-nav,
.news-carousel-wrapper.carousel-no-scroll .carousel-nav-mobile,
.news-carousel-wrapper.carousel-no-scroll + [data-carousel-indicators],
.news-carousel-wrapper.carousel-no-scroll ~ [data-carousel-indicators],
.news-carousel-wrapper.carousel-no-scroll [data-carousel-indicators] {
    display: none !important;
}
}

@media (max-width: 768px) {
    /* Attachments grid - 2 columns on tablet */
    .attachments-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
