/* Winiety Czechy - Custom Styles */
/* Kolory akcentów: #bf1e26 (czerwony), #122c46 (granatowy) */
/* Czcionka: Montserrat */

:root {
    --primary-color: #bf1e26;
    --secondary-color: #122c46;
    --light-gray: #f8f9fa;
    --dark-gray: #6c757d;
    --white: #ffffff;
    --black: #000000;
}

/* Podstawowe style */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    font-weight: 400;
}

/* Hierarchia nagłówków */
h1 {
    font-weight: 700;
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
}

h2 {
    font-weight: 600;
    font-size: 2rem;
    color: var(--secondary-color);
    margin-bottom: 1.25rem;
}

h3 {
    font-weight: 500;
    font-size: 1.5rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

h4 {
    font-weight: 400;
    font-size: 1.25rem;
    color: var(--secondary-color);
    margin-bottom: 0.75rem;
}

h5 {
    font-weight: 300;
    font-size: 1.1rem;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

/* Logo */
.logo {
    max-width: 500px;
    max-height: 200px;
    height: auto;
    min-width: 300px;
    min-height: 100px;
}

.logo-link {
    text-decoration: none;
}

/* Top Bar */
.top-bar {
    border-bottom: 1px solid #dee2e6;
}

.contact-info {
    font-size: 14px;
}

.contact-item {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

/* Navigation */
.navbar {
    min-height: 60px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar-nav .nav-link {
    color: rgba(255,255,255,0.9) !important;
    font-weight: 500;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: #ffffff !important;
    background-color: rgba(255,255,255,0.1);
    border-radius: 4px;
}

/* Mega Menu */
.mega-dropdown {
    position: static;
}

.mega-dropdown .mega-menu {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    width: 90vw;
    max-width: 1140px;
    border: none;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    padding: 2rem;
    margin-top: 0;
}

.mega-menu .dropdown-header {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
}

.mega-menu .dropdown-item {
    padding: 0.5rem 0;
    color: #333;
    font-size: 14px;
    transition: all 0.3s ease;
}

.mega-menu .dropdown-item:hover {
    background-color: var(--light-gray);
    color: var(--primary-color);
    padding-left: 0.5rem;
}

/* Hero Section */
.hero-section {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    height: 450px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(18, 44, 70, 0.85);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 2rem;
}

/* Specjalna klasa dla myto-cz-system.php - bez overlay */
.hero-section.no-overlay::before {
    display: none !important;
}

.hero-content h1 {
    color: white;
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero-content .lead {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    color: rgba(255,255,255,0.9);
}

/* Buttons */
.btn {
    font-weight: 500;
    border-radius: 6px;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #a01a22;
    border-color: #a01a22;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(191, 30, 38, 0.3);
}

.btn-apply {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-apply:hover {
    background-color: #a01a22;
    border-color: #a01a22;
    color: white;
}

.btn-outline-light:hover {
    background-color: white;
    color: var(--secondary-color);
}

/* Pulse Button Animation */
.pulse-button {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(191, 30, 38, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(191, 30, 38, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(191, 30, 38, 0);
    }
}

/* Sections */
.section {
    padding: 4rem 0;
}

.section:nth-child(even) {
    background-color: var(--light-gray);
}

.section-primary {
    background-color: var(--secondary-color);
    color: white;
}

.section-primary h2,
.section-primary h3,
.section-primary h4 {
    color: white;
}

/* Tiles/Cards */
.tiles-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.tile {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border-top: 4px solid var(--primary-color);
}

.tile:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.tile-icon {
    font-size: 3em;
    color: var(--primary-color);
    margin-bottom: 1rem;
    display: block;
}

.tile h3 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.tile p {
    color: var(--dark-gray);
    margin-bottom: 1.5rem;
}

/* Cards */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.card-header {
    background-color: var(--secondary-color);
    color: white;
    border-radius: 12px 12px 0 0 !important;
    font-weight: 600;
}

/* Accordion */
.accordion-item {
    border: 1px solid #dee2e6;
    border-radius: 8px !important;
    margin-bottom: 0.5rem;
}

.accordion-button {
    background-color: var(--light-gray);
    color: var(--secondary-color);
    font-weight: 500;
    border-radius: 8px !important;
}

.accordion-button:not(.collapsed) {
    background-color: var(--primary-color);
    color: white;
}

.accordion-button:focus {
    box-shadow: 0 0 0 0.25rem rgba(191, 30, 38, 0.25);
}

.accordion-body {
    padding: 1.5rem;
}

/* Lists */
.list-numbered {
    counter-reset: item;
    padding-left: 0;
}

.list-numbered li {
    display: block;
    margin-bottom: 1.5rem;
    padding-left: 3rem;
    position: relative;
    counter-increment: item;
}

.list-numbered li::before {
    content: counter(item);
    background-color: var(--primary-color);
    color: white;
    font-weight: bold;
    font-size: 14px;
    border-radius: 50%;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    left: 0;
    top: 0;
}

ul.list-styled {
    list-style: none;
    padding-left: 0;
}

ul.list-styled li {
    padding-left: 1.5rem;
    position: relative;
    margin-bottom: 0.5rem;
}

ul.list-styled li::before {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: var(--primary-color);
    position: absolute;
    left: 0;
}

/* Tables */
.table {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.table thead th {
    background-color: var(--secondary-color);
    color: white;
    border: none;
    font-weight: 600;
    padding: 1rem;
}

.table tbody tr:nth-child(even) {
    background-color: var(--light-gray);
}

.table tbody td {
    padding: 1rem;
    border-color: #dee2e6;
}

/* Breadcrumbs */
.breadcrumb-nav {
    background-color: var(--light-gray);
    padding: 1rem 0;
    position: relative;
    z-index: 10;
}

.breadcrumb {
    margin-bottom: 0;
    background-color: white;
    border: 1px solid #dee2e6;
}

.breadcrumb-item a {
    color: var(--primary-color);
}

.breadcrumb-item.active {
    color: var(--secondary-color);
    font-weight: 500;
}

/* Footer */
.footer {
    margin-top: auto;
}

.footer h5 {
    color: white;
    font-weight: 600;
    margin-bottom: 1rem;
}

.footer-link {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 14px;
    line-height: 1.8;
}

.footer-link:hover {
    color: white;
    text-decoration: underline;
}

.contact-info-footer p {
    margin-bottom: 0.5rem;
    font-size: 14px;
}

/* Responsive Design */
@media (max-width: 991.98px) {
    .mega-dropdown .mega-menu {
        position: static !important;
        width: 100% !important;
        transform: none !important;
        left: auto !important;
        padding: 1rem;
        margin-top: 0;
        border-radius: 0;
        box-shadow: none;
        background-color: #f8f9fa;
        border-top: 1px solid #dee2e6;
        display: none;
    }
    
    .mega-dropdown .mega-menu.show {
        display: block !important;
    }
    
    .mega-dropdown .mega-menu .row {
        flex-direction: column;
    }
    
    .mega-dropdown .mega-menu .col-lg-3,
    .mega-dropdown .mega-menu .col-lg-4 {
        width: 100%;
        margin-bottom: 1rem;
    }
    
    .mega-menu .dropdown-header {
        font-size: 1rem;
        margin-bottom: 0.5rem;
        padding-bottom: 0.25rem;
        border-bottom: 1px solid var(--primary-color);
        cursor: default;
    }
    
    .mega-menu .dropdown-item {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
        border-bottom: 1px solid #e9ecef;
        display: block;
        color: #333;
        text-decoration: none;
        cursor: pointer;
        touch-action: manipulation;
        -webkit-tap-highlight-color: rgba(0,0,0,0.1);
    }
    
    .mega-menu .dropdown-item:last-child {
        border-bottom: none;
    }
    
    .mega-menu .dropdown-item:hover,
    .mega-menu .dropdown-item:focus,
    .mega-menu .dropdown-item:active {
        background-color: #e9ecef;
        color: var(--primary-color);
        text-decoration: none;
    }
    
    /* Ensure dropdown toggles work on mobile */
    .navbar-nav .dropdown-toggle {
        cursor: pointer;
        touch-action: manipulation;
        -webkit-tap-highlight-color: rgba(0,0,0,0.1);
    }
    
    .navbar-nav .dropdown-toggle::after {
        margin-left: auto;
    }
    
    /* Make sure regular dropdowns also work on mobile */
    .dropdown-menu {
        position: static !important;
        width: 100% !important;
        transform: none !important;
        border: none;
        border-radius: 0;
        box-shadow: none;
        background-color: #f8f9fa;
        margin-top: 0;
    }
    
    .dropdown-menu .dropdown-item {
        padding: 0.75rem 1rem;
        color: #333;
        cursor: pointer;
        touch-action: manipulation;
        -webkit-tap-highlight-color: rgba(0,0,0,0.1);
    }
    
    .dropdown-menu .dropdown-item:hover,
    .dropdown-menu .dropdown-item:focus,
    .dropdown-menu .dropdown-item:active {
        background-color: #e9ecef;
        color: var(--primary-color);
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .tiles-container {
        grid-template-columns: 1fr;
    }
    
    .contact-item {
        justify-content: flex-start;
        margin-bottom: 0.5rem;
    }
}

@media (max-width: 767.98px) {
    .hero-section {
        height: 400px;
    }
    
    .hero-content {
        padding: 1.5rem;
    }
    
    .hero-content h1 {
        font-size: 1.75rem;
        margin-bottom: 1.5rem;
    }
    
    .hero-content .lead {
        font-size: 1.1rem;
        margin-bottom: 2.5rem;
    }
    
    .hero-buttons {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }
    
    .hero-buttons .btn {
        width: 100%;
        max-width: 280px;
    }
    
    .btn-apply {
        transform: scale(0.7);
        font-size: 1rem;
    }
    
    .btn-outline-light {
        transform: scale(0.7);
        font-size: 1rem;
    }
    
    .section {
        padding: 2rem 0;
    }
    
    .tile {
        padding: 1.5rem;
    }
}

/* Dodatkowe style dla bardzo małych ekranów (360px) */
@media (max-width: 360px) {
    .hero-section {
        height: 450px;
    }
    
    .hero-content {
        padding: 1rem;
    }
    
    .hero-content h1 {
        font-size: 1.5rem;
        line-height: 1.3;
        margin-bottom: 1.5rem;
    }
    
    .hero-content .lead {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
    
    .hero-buttons {
        gap: 1.5rem;
    }
    
    .btn-apply {
        transform: scale(0.7);
        font-size: 0.9rem;
        padding: 0.6rem 1.2rem;
    }
    
    .btn-outline-light {
        font-size: 0.9rem;
        padding: 0.6rem 1.2rem;
    }
}

/* Utility Classes */
.text-primary-custom {
    color: var(--primary-color) !important;
}

.text-secondary-custom {
    color: var(--secondary-color) !important;
}

.bg-primary-custom {
    background-color: var(--primary-color) !important;
}

.bg-secondary-custom {
    background-color: var(--secondary-color) !important;
}

/* Image Styles */
.img-fluid {
    border-radius: 8px;
}

.shadow {
    box-shadow: 0 4px 15px rgba(0,0,0,0.1) !important;
}

/* Loading Animation */
.loaded {
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* Contrast Improvements */
.bg-light {
    color: #333 !important;
}

.bg-dark, .bg-primary, .bg-secondary {
    color: white !important;
}

/* Focus States for Accessibility */
.btn:focus,
.nav-link:focus,
.dropdown-item:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .navbar,
    .footer,
    .breadcrumb-nav {
        display: none !important;
    }
    
    .hero-section {
        height: auto !important;
        background: none !important;
        color: black !important;
    }
    
    .hero-section::before {
        display: none !important;
    }
}

/* Poprawki kontrastu tekstu - błędy z raportu */

/* Błąd 65: Dodanie tła dla niewidocznego tekstu w zwrocie winiety */
.accordion-body ul.list-styled li:nth-of-type(3) {
    background-color: rgba(255, 255, 255, 0.9);
    padding: 0.5rem;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

/* Błąd 70: Dodanie tła dla niewidocznego tekstu w błędach winiety */
.section-primary .col-12.text-center {
    background-color: rgba(0, 0, 0, 0.3);
    padding: 2rem;
    border-radius: 8px;
}

/* Błąd 107: Dodanie tła dla niewidocznego tekstu w winiecie rocznej */
.accordion-body {
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 4px;
}

/* Błąd 120: Dodanie tła dla niewidocznego tekstu w winiecie 30-dniowej */
.section-primary {
    background-color: var(--secondary-color);
    color: white;
    position: relative;
}

.section-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(18, 44, 70, 0.9);
    z-index: 1;
}

.section-primary > * {
    position: relative;
    z-index: 2;
}

/* Błąd 153: Poprawa kontrastu dla sekcji kontroli winiety */
.section:nth-of-type(5) > div:nth-of-type(1) {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 1rem;
    border-radius: 8px;
}

/* Błąd 161: Dodanie tła dla niewidocznego tekstu w eco winiety */
.section-primary .container {
    background-color: rgba(0, 0, 0, 0.2);
    padding: 2rem;
    border-radius: 8px;
}

/* Błąd 166: Dodanie tła dla niewidocznego tekstu w pojazdach wodorowych */
.section-primary .row {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    border-radius: 6px;
}

/* Błąd 145: Poprawa kontrastu dla tekstu w sekcji kar */
.section-primary .text-white {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    background-color: rgba(0, 0, 0, 0.3);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    display: inline-block;
}

/* Dodatkowe poprawki kontrastu dla lepszej czytelności */
.text-white-50 {
    color: rgba(255, 255, 255, 0.9) !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* Poprawa kontrastu dla przycisków na ciemnym tle */
.section-primary .btn {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

/* Poprawa kontrastu dla nagłówków na ciemnym tle */
.section-primary h1,
.section-primary h2,
.section-primary h3 {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

/* Poprawki układu elementów - błędy z raportu */

/* Błąd 76: Wyśrodkowanie elementu tile w jak-kupic-winiete-do-czech.php */
.tiles-container .tile:nth-of-type(5),
.tiles-container .tile:nth-of-type(6) {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    justify-content: center;
}

/* Błąd 39: Poprawa szerokości przycisku accordion */
.accordion-button {
    min-width: 100%;
    width: 100%;
    white-space: normal;
    word-wrap: break-word;
    padding: 1rem 1.5rem;
    text-align: left;
}

/* Błąd 40: Poprawa szerokości przycisku accordion */
.accordion-button::after {
    flex-shrink: 0;
    margin-left: auto;
}

/* Błąd 219: Poprawa elementu wystającego poza kontener */
.tile h3 {
    font-size: 1.1rem;
    line-height: 1.3;
    word-wrap: break-word;
    hyphens: auto;
    max-width: 100%;
    overflow-wrap: break-word;
}

/* Dodatkowe poprawki układu */
.tiles-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
    align-items: stretch;
}

.tile {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 300px;
}

/* Responsive poprawki dla małych ekranów */
@media (max-width: 768px) {
    .tiles-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .tile h3 {
        font-size: 1rem;
    }
    
    .accordion-button {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
}

/* Poprawki dla obrazków i ikon - błędy z raportu */

/* Błąd 138: Dodanie ikonki nad tekstem dla pojazdu wodorowego */
.tile:nth-of-type(4)::before {
    content: '\f2dc';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 2.5rem;
    color: var(--primary-color);
    display: block;
    text-align: center;
    margin-bottom: 1rem;
}

/* Błąd 196: Dodanie flag dla motocykli */
.section:nth-of-type(4) > div:nth-of-type(1)::before {
    content: '\f024 \f024 \f024';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: var(--primary-color);
    display: block;
    text-align: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

/* Dodatkowe style dla lepszej prezentacji ikon */
.tile-icon {
    font-size: 3em;
    color: var(--primary-color);
    margin-bottom: 1rem;
    display: block;
    text-align: center;
}

/* Poprawa wyświetlania obrazków */
.img-fluid {
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.img-fluid:hover {
    transform: scale(1.02);
}