/*
Theme Name: ICZ Logistika
Author: Creative Dreamers / David Steinmann
Description: Base theme scaffold compatible with Divi Builder, inspired by Sage structure. Provides header/footer menus with nested dropdowns via custom walker.
Version: 1.0.0
Text Domain: icz
*/

/* Minimal, non-opinionated styles to not interfere with Divi */
.screen-reader-text {
  position: absolute !important;
  height: 1px; width: 1px;
  overflow: hidden; clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap; border: 0; padding: 0; margin: -1px;
}

.nav-primary, .nav-footer { list-style: none; margin: 0; padding: 0; }
.nav-primary > li { position: relative; display: inline-block; }
.nav-primary a { text-decoration: none; }

/* Dropdowns */
.nav-primary li.menu-item-has-children > a::after {
  content: "\25BE"; /* small down triangle */
  margin-left: .35rem; font-size: .8em;
}
.nav-primary .sub-menu {
  position: absolute; left: 0; top: 100%;
  display: none; min-width: 220px;
  z-index: 9999;
  background: #fff; border: 1px solid #e5e7eb; border-radius: 8px;
  padding: .5rem 0;
}
.nav-primary li:hover > .sub-menu,
.nav-primary li:focus-within > .sub-menu { display: block; }

.nav-primary .sub-menu li { display: block; position: relative; }
.nav-primary .sub-menu .sub-menu { left: 100%; top: 0; }

/* Keep footer simple */
.site-footer { padding: 2rem 0; border-top: 1px solid #eee; text-align: center; }

/* Container utility */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1rem; }

/* ICZ Corporate Colors & Styles */
:root {
    --icz-blue-dark: #0f3755;
    --icz-red: #c80000;
    --icz-blue-light: #00a4e8;
    --icz-gray: #cccccc;
    --icz-produkty-logistika: #003959;
    --gradient-general: linear-gradient(135deg, #00a4e8 0%, #0f3755 100%);
    --gradient-security: linear-gradient(135deg, #e6e6e6 0%, #999999 100%);
}

/* ICZ Custom Utility Classes */
.icz-bg-blue-600 { background-color: var(--icz-produkty-logistika) !important; }
.icz-text-blue-500 { color: var(--icz-blue-light) !important; }
.icz-text-blue-600 { color: var(--icz-produkty-logistika) !important; }
.icz-text-blue-800 { color: var(--icz-blue-dark) !important; }
.icz-border-blue-500 { border-color: var(--icz-blue-light) !important; }
.icz-border-blue-600 { border-color: var(--icz-produkty-logistika) !important; }
.icz-ring-blue-500 { --tw-ring-color: var(--icz-blue-light) !important; }
.icz-ring-blue-300 { --tw-ring-color: rgba(0, 164, 232, 0.3) !important; }
.icz-bg-gradient-corporate { background: var(--gradient-general) !important; }

/* Hover states for ICZ colors */
.hover\:icz-text-blue-500:hover { color: var(--icz-blue-light) !important; }
.hover\:icz-text-blue-600:hover { color: var(--icz-produkty-logistika) !important; }
.hover\:icz-text-blue-800:hover { color: var(--icz-blue-dark) !important; }

/* Focus states for ICZ colors */
.focus\:icz-border-blue-500:focus { border-color: var(--icz-blue-light) !important; }
.focus\:icz-ring-blue-500:focus { --tw-ring-color: var(--icz-blue-light) !important; }

/* Custom styles to extend Tailwind */
body {
    font-family: 'Inter', sans-serif;
}

.et-db #et-boc .et-l .et_pb_row {
    max-width: min(90%, 1080px) !important;
}

/* Screen Reader Only - Hide visually but keep accessible to screen readers */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Show on focus for skip links */
.sr-only.focus\:not-sr-only:focus {
    position: static;
    width: auto;
    height: auto;
    padding: 0.5rem;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
}

/* Ensure focus indicators are visible */
*:focus {
    outline: 2px solid transparent;
    outline-offset: 2px;
}

/* High contrast focus for better accessibility */
button:focus,
a:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

h2 {
    font-size: 2.25rem; /* 32px */
    font-weight: 700;
    margin-bottom: 4rem;
    color: #1f2937; /* Gray-800 */
}

/* Ensure sufficient color contrast for text */
.text-gray-700 {
    color: #374151; /* Meets WCAG AA standards */
}
.hero-bg {
    background-image: url('https://www.iczgroup.com/intralogistika-a-vyroba/wp-content/themes/img/hero.jpg');
    background-size: cover;
    background-position: center;
}
.stat-number {
    font-weight: 700;
    font-size: 3rem; /* 48px */
    line-height: 1;
    color: var(--icz-produkty-logistika);
}
.section-title {
    font-size: 2.25rem !important; /* 36px */
    font-weight: 700 !important;
    margin-bottom: 4rem !important; /* 64px */
    text-align: center !important;
}
.custom-blue {
    color: var(--icz-produkty-logistika);
}
.custom-bg-blue {
    background-color: var(--icz-produkty-logistika) !important;
}
.custom-border-blue {
    border-color: var(--icz-produkty-logistika);
}
.case-study-card {
    position: relative;
    overflow: hidden;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}
.case-study-card img {
    transition: transform 0.3s ease;
}
.case-study-card:hover img {
    transform: scale(1.05);
}
.case-study-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), rgba(0,0,0,0));
    padding: 1.5rem;
    color: white;
}

/* Dropdown Menu Styles */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    max-width: 90vw;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    margin-top: 16px;
    border: 1px solid #e5e7eb;
}

.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid white;
    z-index: 1001;
}

.dropdown-menu::after {
    content: '';
    position: absolute;
    top: -9px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 9px solid transparent;
    border-right: 9px solid transparent;
    border-bottom: 9px solid #e5e7eb;
    z-index: 1000;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
}

.dropdown-content {
    display: flex;
    min-height: 400px;
}

.dropdown-left {
    flex: 1;
    padding: 2rem;
    border-right: 1px solid #e5e7eb;
}

.dropdown-right {
    flex: 1;
    padding: 2rem;
    background: #f9fafb;
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.dropdown-products {
    list-style: none;
    margin: 0;
    padding: 0;
}

.aligncenter {
    display: block;
    margin-left: auto !important;
    margin-right: auto !important;
}

.dropdown-product-item {
    /* margin-bottom: 0.5rem; */
}

.dropdown-product-link {
    display: block;
    padding: 0.75rem 1rem;
    color: #374151;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-weight: 500;
}

.dropdown-product-link:hover {
    background: #f3f4f6;
    color: var(--icz-produkty-logistika);
    transform: translateX(4px);
    background: #eff6ff;
    color: var(--icz-produkty-logistika);
    border-left: 3px solid var(--icz-produkty-logistika);
}

.dropdown-product-link.active {
    background: #eff6ff;
    color: var(--icz-produkty-logistika);
    border-left: 3px solid var(--icz-produkty-logistika);
}

.dropdown-product-description {
    color: #6b7280;
    font-size: 0.95rem;
    line-height: 1.6;
}

.dropdown-product-description .item-title {
    color: var(--icz-produkty-logistika);
    font-weight: 600;
    font-size: 1.125rem;
    margin-bottom: 0.75rem;
}

.dropdown-default-content {
    color: #9ca3af;
    font-style: italic;
}

/* Hero text arrow block */
.hero-text-block {
    position: absolute;
    top: 0 !important;
    left: 0 !important;
    height: 100%;
    width: calc(40% + 1000px); /* Left third of hero */
    background: rgba(255, 255, 255, 0.9) !important;
    color: #1f2937 !important;
    display: flex !important;
    align-items: center !important;
    padding: 2rem 4rem 2rem 2rem !important;
    clip-path: polygon(0 0, calc(100% - 40px) 0, 100% 50%, calc(100% - 40px) 100.1%, 0 100.1%) !important;
    z-index: 20 !important;
    /* Animation for slide-in from left */
    /* transform: translateX(-100%) !important; */
    animation: slideInFromLeft 1.2s ease-out forwards !important;
    animation-delay: 0.3s !important;
    margin-left: -1000px !important; /* Start off-screen */
    padding-left: calc(1000px + 2rem) !important; /* Adjust padding to match */
}

@keyframes slideInFromLeft {
    0% {
        transform: translateX(-100%);
        opacity: 0.8;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .hero-text-block {
        width: calc(50% + 1000px); /* Wider on mobile */
        padding: 1.5rem 3rem 1.5rem 1.5rem;
        clip-path: polygon(0 0, calc(100% - 30px) 0, 100% 50%, calc(100% - 30px) 100%, 0 100%);
        /* Keep the same animation on mobile */
        transform: translateX(-100%);
        animation: slideInFromLeft 1.2s ease-out forwards;
        animation-delay: 0.3s;
        padding-left: calc(1000px + 1.5rem) !important; /* Adjust padding to match */
    }
}

@media (max-width: 480px) {
    .hero-text-block {
        width: calc(70% + 1000px); /* Even wider on small mobile */
        padding: 1rem 2rem 1rem 1rem;
        clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 50%, calc(100% - 20px) 100%, 0 100%);
        /* Keep the same animation on small mobile */
        transform: translateX(-100%);
        animation: slideInFromLeft 1.2s ease-out forwards;
        animation-delay: 0.3s;
        padding-left: calc(1000px + 1rem) !important; /* Adjust padding to match */
    }
}

/* Reference Carousel Styles */
.reference-carousel {
    position: relative;
    overflow: hidden;
    margin: 0 auto;
    max-width: 1200px;
    padding-bottom: 1rem !important;
    padding-top: 1rem !important;
}

.reference-track {
    display: flex;
    transition: transform 0.5s ease;
    /* gap: 2rem; */
}

.reference-slide {
    /* flex: 0 0 calc(33.333% - 1.33rem); */
    flex-shrink: 0;
    background: linear-gradient(to bottom, #e5e7eb, #f9fafb);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.reference-slide:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 12px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.reference-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    font-size: 1.125rem;
}

.reference-company {
    font-size: 1.25rem;
    font-weight: bold;
    color: #374151;
    margin-bottom: 1rem;
}

.reference-quote {
    font-style: italic;
    color: #6b7280;
    margin-bottom: 1.5rem;
    line-height: 1.6;
    min-height: 4rem;
    display: flex;
    align-items: center;
}

.reference-quote::before {
    content: '"';
    font-size: 2rem;
    color: #9ca3af;
    margin-right: 0.25rem;
}

.reference-quote::after {
    content: '"';
    font-size: 2rem;
    color: #9ca3af;
    margin-left: 0.25rem;
}

.reference-author {
    font-weight: 600;
    color: var(--icz-produkty-logistika);
    font-size: 0.875rem;
}

.carousel-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem !important;
}

.carousel-btn {
    background: var(--icz-produkty-logistika);
    color: white;
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.carousel-btn:hover {
    background: var(--icz-blue-dark);
    transform: scale(1.1);
}

.carousel-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
}

.carousel-indicators {
    display: flex;
    gap: 0.5rem;
}

.carousel-dot {
    width: 12px !important;
    height: 12px !important;
    border-radius: 50% !important;
    background: #d1d5db !important;
    cursor: pointer !important;
    transition: background-color 0.3s ease !important;
}

.carousel-dot.active {
    background: var(--icz-produkty-logistika) !important;
}

/* Case Studies Carousel Styles */
.case-studies-carousel {
    position: relative;
    overflow: hidden;
    margin: 0 auto;
    max-width: 1200px;
    padding-bottom: 1rem !important;
    padding-top: 1rem !important;
}

.case-studies-track {
    display: flex !important;
    transition: transform 0.5s ease !important;
    gap: 2rem !important;
}

.case-study-slide {
    flex: 0 0 calc(33.333% - 1.33rem) !important;
    height: 400px !important;
}

.case-study-card {
    position: relative !important;
    overflow: hidden !important;
    border-radius: 16px !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important;
    height: 100% !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
}

.case-study-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.case-study-card img {
    transition: transform 0.3s ease;
}

.case-study-card:hover img {
    transform: scale(1.05);
}

.case-study-overlay {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: linear-gradient(to bottom, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.2) 50%, rgba(0,0,0,0.8) 100%) !important;
    padding: 2rem !important;
    color: white !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
}

.case-study-company {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.case-study-quote {
    font-style: italic;
    font-size: 1.125rem;
    line-height: 1.6;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
    flex-grow: 1;
    display: flex;
    align-items: center;
    padding: 1rem 0;
}

.case-study-quote::before {
    content: '"';
    font-size: 2rem;
    opacity: 0.7;
    margin-right: 0.25rem;
}

.case-study-quote::after {
    content: '"';
    font-size: 2rem;
    opacity: 0.7;
    margin-left: 0.25rem;
}

.case-study-btn {
    background: rgba(255, 255, 255, 0.9) !important;
    color: var(--icz-produkty-logistika) !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 0.75rem 1.5rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem !important;
    backdrop-filter: blur(10px) !important;
    margin-top: auto !important;
}

.case-study-btn:hover {
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.case-study-btn svg {
    transition: transform 0.3s ease;
}

.case-study-btn:hover svg {
    transform: translateX(4px);
}

/* Product Page Styles */
.feature-tab-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 0.75rem;
    color: #6b7280;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    cursor: pointer;
    min-width: 200px;
}

.feature-tab-btn:hover {
    border-color: var(--icz-produkty-logistika);
    color: var(--icz-produkty-logistika);
    background: #f0f9ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 57, 89, 0.1);
}

.feature-tab-btn.active {
    background: var(--icz-produkty-logistika);
    border-color: var(--icz-produkty-logistika);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 57, 89, 0.3);
}

.feature-tab-btn:focus {
    outline: none;
    ring: 2px solid #3b82f6;
    ring-offset: 2px;
}

.feature-tab-content {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}

.feature-tab-content.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
    animation: fadeInUp 0.5s ease forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive adjustments for product page */
@media (max-width: 768px) {
    .feature-tab-btn {
        min-width: auto;
        width: 100%;
        padding: 0.75rem 1rem;
        font-size: 0.8rem;
    }
    
    .feature-tab-btn svg {
        width: 1rem;
        height: 1rem;
    }
}

/* Timeline Styles */
.timeline-container {
    position: relative;
    padding: 4rem 2rem;
    overflow: visible;
    min-height: 300px;
    max-width: 100%;
}

.timeline-line {
    position: absolute;
    top: 50%;
    left: 5%;
    right: 5%;
    height: 4px;
    background: linear-gradient(to right, 
        transparent 0%, 
        transparent 8%, 
        var(--icz-produkty-logistika) 8%, 
        var(--icz-blue-light) 50%, 
        var(--icz-produkty-logistika) 92%, 
        transparent 92%, 
        transparent 100%
    );
    transform: translateY(-50%);
    border-radius: 2px;
    box-shadow: 0 2px 4px rgba(0, 57, 89, 0.2);
}

.timeline-line::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 8%;
    height: 100%;
    background: repeating-linear-gradient(
        to right,
        var(--icz-produkty-logistika) 0px,
        var(--icz-produkty-logistika) 6px,
        transparent 6px,
        transparent 12px
    );
    border-radius: 2px 0 0 2px;
}

.timeline-line::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    width: 8%;
    height: 100%;
    background: repeating-linear-gradient(
        to right,
        transparent 0px,
        transparent 6px,
        var(--icz-produkty-logistika) 6px,
        var(--icz-produkty-logistika) 12px
    );
    border-radius: 0 2px 2px 0;
}

.timeline-item {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
}

.timeline-item[data-year="1995"] { left: calc(5% + 8%); }
.timeline-item[data-year="2003"] { left: calc(5% + 19%); }
.timeline-item[data-year="2009"] { left: calc(5% + 30%); }
.timeline-item[data-year="2010"] { left: calc(5% + 41%); }
.timeline-item[data-year="2019"] { left: calc(5% + 51%); }
.timeline-item[data-year="2023"] { left: calc(5% + 61%); }
.timeline-item[data-year="2025"] { left: calc(5% + 71%); }
.timeline-item[data-year="2026"] { left: calc(5% + 83%); }

.timeline-dot {
    width: 20px;
    height: 20px;
    background: white;
    border: 4px solid var(--icz-produkty-logistika);
    border-radius: 50%;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 15;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.8), 0 4px 8px rgba(0, 57, 89, 0.3);
    transition: all 0.3s ease;
}

.timeline-item:hover .timeline-dot {
    transform: translate(-50%, -50%) scale(1.2);
    border-color: #3B82F6;
    box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.9), 0 6px 12px rgba(0, 82, 155, 0.4);
}

.timeline-content {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    min-width: 160px;
    max-width: 180px;
    padding: 0 8px;
}

.timeline-above .timeline-content {
    bottom: 35px;
}

.timeline-below .timeline-content {
    top: 35px;
}

.timeline-year {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--icz-produkty-logistika);
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(255, 255, 255, 0.8);
}

.timeline-below .timeline-year {
    margin-bottom: 0;
    margin-top: 0.5rem;
    order: 2;
}

.timeline-below .timeline-content {
    display: flex;
    flex-direction: column;
}

.timeline-text {
    font-size: 0.8rem;
    font-weight: 600;
    color: #374151;
    line-height: 1.3;
    background: rgba(255, 255, 255, 0.95);
    padding: 0.6rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.timeline-item:hover .timeline-text {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
    z-index: 20;
}

/* Responsive timeline */
@media (max-width: 1024px) {
    .timeline-container {
        padding: 3rem 1rem;
    }
    
    .timeline-content {
        min-width: 140px;
        max-width: 160px;
    }
    
    .timeline-year {
        font-size: 1.125rem;
    }
    
    .timeline-text {
        font-size: 0.75rem;
        padding: 0.5rem;
    }
}

@media (max-width: 768px) {
    .timeline-container {
        padding: 2rem 0.5rem;
        min-height: 250px;
    }
    
    .timeline-content {
        min-width: 120px;
        max-width: 140px;
    }
    
    .timeline-year {
        font-size: 1rem;
    }
    
    .timeline-text {
        font-size: 0.7rem;
        padding: 0.4rem;
        line-height: 1.2;
    }
    
    .timeline-dot {
        width: 16px;
        height: 16px;
        border-width: 3px;
    }
    
    .timeline-above .timeline-content {
        bottom: 25px;
    }
    
    .timeline-below .timeline-content {
        top: 25px;
    }
}

/* Animation for timeline items */
@keyframes timelineSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.timeline-item {
    animation: timelineSlideIn 0.6s ease forwards;
}

.timeline-item:nth-child(2) { animation-delay: 0.1s; }
.timeline-item:nth-child(3) { animation-delay: 0.2s; }
.timeline-item:nth-child(4) { animation-delay: 0.3s; }
.timeline-item:nth-child(5) { animation-delay: 0.4s; }
.timeline-item:nth-child(6) { animation-delay: 0.5s; }
.timeline-item:nth-child(7) { animation-delay: 0.6s; }
.timeline-item:nth-child(8) { animation-delay: 0.7s; }
.timeline-item:nth-child(9) { animation-delay: 0.8s; }

/* Product Service Cards */
.product-service-card {
    background: linear-gradient(to right, #f9fafb, #e5e7eb);
    padding: 2rem !important;
    border-radius: 1rem ;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06) !important;
    transition: all 0.3s ease !important;
    position: relative !important;
    overflow: hidden !important;
    border: 1px solid #e5e7eb;
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
}

.product-service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-general);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    background: linear-gradient(to right, #ffffff, #f3f4f6);
}

.product-service-card:hover::before {
    opacity: 1;
}

.product-service-btn {
    display: inline-flex !important;
    align-items: center !important;
    background: var(--icz-produkty-logistika) !important;
    color: white !important;
    font-weight: 600 !important;
    padding: 0.75rem 1.5rem !important;
    border-radius: 0.5rem !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
    font-size: 0.875rem !important;
    margin-top: auto !important;
}

.product-service-btn:hover {
    background: var(--icz-blue-dark) !important;
    transform: translateX(2px) !important;
    box-shadow: 0 4px 8px rgba(0, 57, 89, 0.2) !important;
}

.product-service-btn svg {
    transition: transform 0.3s ease !important;
}

.product-service-btn:hover svg {
    transform: translateX(4px) !important;
}

/* Hero News Carousel Styles */
.hero-news-carousel {
    position: relative;
    overflow: visible; /* Allow triangle to extend beyond rounded corners */
}

.hero-news-track {
    position: relative;
    width: 100%;
    height: auto;
}

.hero-news-slide {
    display: none;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.hero-news-slide.active {
    display: block;
    opacity: 1;
}

.hero-news-indicators {
    margin-top: 1rem;
}

.hero-news-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.hero-news-dot.active {
    background-color: var(--icz-produkty-logistika) !important;
    transform: scale(1.2);
}

.hero-news-dot:hover {
    background-color: var(--icz-blue-light);
    transform: scale(1.1);
}

/* ICZ Triangle Element */
.icz-triangle {
    position: absolute;
    top: 0;
    right: 0;
    width: 0;
    height: 0;
    border-style: solid !important;
    border-width: 0 40px 40px 0 !important;
    border-color: transparent var(--icz-red) transparent transparent !important;
    z-index: 10 !important;
}

/* ICZ Triangle Element - Left positioned */
.icz-triangle-left {
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    border-style: solid !important;
    border-width: 40px 0 0 40px !important;
    border-color: var(--icz-blue-light) transparent transparent transparent !important;
    z-index: 10 !important;
    transform: rotate(270deg) !important;
}

/* ICZ Triangle Element - Right positioned (Dark Blue) */
.icz-triangle-right {
    position: absolute;
    top: 0;
    right: 0;
    width: 0;
    height: 0;
    border-style: solid !important;
    border-width: 0 30px 30px 0 !important;
    border-color: transparent var(--icz-blue-dark) transparent transparent !important;
    z-index: 10 !important;
}

/* ICZ Triangle Element - Above H2 titles */
.section-title {
    position: relative;
    text-align: center;
    display: inline-block;
}

/* Center the title container */
.section-title-container {
    text-align: center;
}

/* ICZ Arrow Element */
.icz-arrow-svg {
    width: 12px;
    height: 12px;
    color: var(--icz-blue-light);
    margin-left: 4px;
    flex-shrink: 0;
}

/* Mobile Hero News Carousel Styles */
.hero-news-carousel-mobile {
    position: relative;
    overflow: visible; /* Allow triangle to extend beyond rounded corners */
}

.hero-news-track-mobile {
    position: relative;
    width: 100%;
    height: auto;
}

.hero-news-slide-mobile {
    display: none;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.hero-news-slide-mobile.active {
    display: block;
    opacity: 1;
}

.hero-news-indicators-mobile {
    margin-top: 1rem;
}

.hero-news-dot-mobile {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.hero-news-dot-mobile.active {
    background-color: var(--icz-produkty-logistika) !important;
    transform: scale(1.2);
}

.hero-news-dot-mobile:hover {
    background-color: var(--icz-blue-light);
    transform: scale(1.1);
}

/* Interactive Cards Styling */
.active-card {
    box-shadow: 0 10px 25px rgba(0, 57, 89, 0.15);
    transform: translateY(-2px);
}

.active-card .icz-triangle-left {
    border-color: var(--icz-red) transparent transparent transparent !important;
}

/* Smooth transitions for interactive cards */
[data-theme] {
    transition: all 0.3s ease;
}

#dynamic-image {
    transition: opacity 0.3s ease;
}

#box-1, #box-2, #box-3 {
    transition: all 0.3s ease;
}

#mobile-boxes {
    transition: all 0.3s ease;
}

.et-db #et-boc .et-l .et_pb_section {
    padding: 30px 0;
}