/* ===== ZMIENNE CSS ===== */
:root {
    --primary-color: #C8102E;
    --secondary-color: #012169;
    --light-bg: #f8f9fa;
    --dark-bg: #212529;
    --white: #ffffff;
    --text-dark: #333333;
    --text-light: #666666;
    --border-color: #dee2e6;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
}

/* ===== PODSTAWOWE STYLE ===== */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--white);
}

/* ===== TYPOGRAFIA ===== */
h1 {
    font-weight: 700;
    font-size: 2.5rem;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h2 {
    font-weight: 600;
    font-size: 2rem;
    line-height: 1.3;
    margin-bottom: 1rem;
}

h3 {
    font-weight: 500;
    font-size: 1.5rem;
    line-height: 1.4;
    margin-bottom: 0.75rem;
}

h4 {
    font-weight: 400;
    font-size: 1.25rem;
    line-height: 1.4;
    margin-bottom: 0.75rem;
}

h5 {
    font-weight: 300;
    font-size: 1.1rem;
    line-height: 1.4;
    margin-bottom: 0.5rem;
}

p {
    margin-bottom: 1rem;
    font-size: 16px;
}

.lead {
    font-size: 1.125rem;
    font-weight: 400;
}

/* ===== TOP BAR ===== */
.top-bar {
    background-color: var(--secondary-color);
    color: white;
    padding: 8px 0;
    font-size: 14px;
}

.top-contact span {
    margin-right: 15px;
}

.top-contact i,
.top-info i {
    color: var(--primary-color);
}

/* ===== HEADER ===== */
.main-header {
    background-color: var(--white);
    border-bottom: 1px solid var(--border-color);
    padding: 15px 0;
}

.logo-img {
    max-width: 300px;
    max-height: 120px;
    width: auto;
    height: auto;
}

.header-title {
    color: var(--primary-color);
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.header-subtitle {
    color: var(--text-light);
    font-size: 1rem;
    font-weight: 400;
}

/* ===== NAVIGATION ===== */
.main-navigation {
    background-color: var(--primary-color);
    min-height: 60px;
    padding: 0;
}

.main-navigation .navbar-nav .nav-link {
    color: white !important;
    font-weight: 500;
    padding: 20px 15px;
    transition: var(--transition);
    position: relative;
}

.main-navigation .navbar-nav .nav-link:hover,
.main-navigation .navbar-nav .nav-link.active {
    background-color: rgba(255,255,255,0.1);
    color: white !important;
}

.main-navigation .navbar-toggler {
    border-color: white;
    padding: 8px 12px;
}

.main-navigation .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* ===== MEGA MENU ===== */
.mega-dropdown {
    position: static;
}

.mega-dropdown .mega-menu {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    width: 90vw;
    max-width: 1140px;
    background-color: white;
    border: none;
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 30px;
    margin-top: 0;
    z-index: 1050;
}

.mega-menu .dropdown-header {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1rem;
    padding-bottom: 10px;
    margin-bottom: 15px;
    border-bottom: 2px solid var(--primary-color);
}

.mega-menu .dropdown-item {
    padding: 8px 0;
    color: var(--text-dark);
    font-size: 14px;
    border: none;
    transition: var(--transition);
}

.mega-menu .dropdown-item:hover {
    background-color: var(--light-bg);
    color: var(--primary-color);
    padding-left: 10px;
}

.mega-menu .dropdown-item img {
    width: 16px;
    height: 12px;
}

/* ===== BREADCRUMBS ===== */
.breadcrumb-nav {
    background-color: var(--light-bg);
    padding: 15px 0;
}

.breadcrumb {
    background-color: transparent;
    margin-bottom: 0;
    padding: 0;
}

.breadcrumb-item a {
    color: var(--text-light);
    text-decoration: none;
}

.breadcrumb-item a:hover {
    color: var(--primary-color);
}

.breadcrumb-item.active {
    color: var(--text-dark);
    font-weight: 500;
}

/* ===== 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(0, 0, 0, 0.5);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 0 20px;
}

.hero-content h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero-content .lead {
    font-size: 1.25rem;
    margin-bottom: 30px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

/* ===== SECTIONS ===== */
.section {
    padding: 60px 0;
}

.section.bg-light {
    background-color: var(--light-bg);
}

.section-primary {
    background-color: var(--primary-color);
    color: white;
}

.section-secondary {
    background-color: var(--secondary-color);
    color: white;
}

/* ===== BUTTONS ===== */
.btn {
    font-weight: 500;
    padding: 12px 24px;
    border-radius: 6px;
    transition: var(--transition);
    text-decoration: none;
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #a00d26;
    border-color: #a00d26;
    color: white;
}

.btn-secondary {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background-color: #001a5c;
    border-color: #001a5c;
    color: white;
}

.btn-outline-light {
    border-color: white;
    color: white;
}

.btn-outline-light:hover {
    background-color: white;
    color: var(--primary-color);
}

.btn-apply {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    font-weight: 600;
    padding: 12px 30px;
}

.btn-apply:hover {
    background-color: #a00d26;
    border-color: #a00d26;
    color: white;
    transform: translateY(-2px);
}

/* ===== PULSE ANIMATION ===== */
.pulse-button {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(200, 16, 46, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(200, 16, 46, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(200, 16, 46, 0);
    }
}

/* ===== TILES/CARDS ===== */
.tiles-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.tile {
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.tile:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.tile-icon {
    font-size: 3em;
    color: var(--primary-color);
    margin-bottom: 20px;
    display: block;
}

.tile h3 {
    color: var(--text-dark);
    margin-bottom: 15px;
}

.tile p {
    color: var(--text-light);
    margin-bottom: 20px;
}

/* ===== ACCORDION ===== */
.accordion-item {
    border: 1px solid var(--border-color);
    margin-bottom: 10px;
    border-radius: 8px;
    overflow: hidden;
}

.accordion-header {
    margin-bottom: 0;
}

.accordion-button {
    background-color: var(--light-bg);
    color: var(--text-dark);
    font-weight: 500;
    padding: 20px;
    border: none;
    position: relative;
}

.accordion-button:not(.collapsed) {
    background-color: var(--primary-color);
    color: white;
}

.accordion-button:focus {
    box-shadow: none;
    border: none;
}

.accordion-body {
    padding: 20px;
    background-color: white;
}

/* ===== LISTS ===== */
.list-numbered {
    counter-reset: item;
    padding-left: 0;
}

.list-numbered li {
    display: block;
    margin-bottom: 20px;
    padding-left: 60px;
    position: relative;
    list-style: none;
}

.list-numbered li::before {
    content: counter(item);
    counter-increment: item;
    position: absolute;
    left: 0;
    top: 0;
    background-color: var(--primary-color);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 18px;
}

ul.list-styled {
    list-style: none;
    padding-left: 0;
}

ul.list-styled li {
    padding-left: 25px;
    position: relative;
    margin-bottom: 10px;
}

ul.list-styled li::before {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    left: 0;
    color: var(--primary-color);
}

/* ===== IMAGES ===== */
.img-fluid {
    max-width: 100%;
    height: auto;
}

.rounded {
    border-radius: 8px;
}

.shadow {
    box-shadow: var(--shadow);
}

.loaded {
    opacity: 1 !important;
    transition: opacity 0.3s ease;
}

/* Ensure images are visible by default */
img {
    opacity: 1;
}

/* Only apply lazy loading opacity to images without loaded class */
img[loading="lazy"]:not(.loaded) {
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* ===== FOOTER ===== */
.main-footer {
    background-color: #9F041D;
    color: white;
    padding: 50px 0 20px;
 
}

.footer-title {
    color: white;
    font-weight: 600;
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.footer-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-menu li {
    margin-bottom: 8px;
}

.footer-menu a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    font-size: 14px;
    transition: var(--transition);
}

.footer-menu a:hover {
    color: white;
    padding-left: 5px;
}

.footer-contact .contact-item {
    margin-bottom: 15px;
    font-size: 14px;
}

.footer-contact i {
    color: white;
    width: 20px;
}

.footer-contact a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
}

.footer-contact a:hover {
    color: white;
}

.footer-separator {
    border-color: rgba(255,255,255,0.2);
    margin: 30px 0;
}

.footer-company,
.footer-legal {
    font-size: 13px;
    color: rgba(255,255,255,0.8);
}

.copyright {
    font-size: 12px;
    color: rgba(255,255,255,0.6);
    padding-top: 15px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 991.98px) {
    /* Mobile-only dropdown styling */
    .mega-dropdown .mega-menu {
        position: static !important;
        width: 100% !important;
        transform: none !important;
        left: auto !important;
        margin-top: 0;
        padding: 15px;
        max-width: none !important;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        border: 1px solid var(--border-color);
        border-radius: 0 0 8px 8px;
        border-top: none;
        background-color: white;
        z-index: 1000;
    }
    
    /* Regular dropdown styling for mobile */
    .dropdown .dropdown-menu {
        position: static !important;
        width: 100% !important;
        transform: none !important;
        left: auto !important;
        margin-top: 0;
        padding: 15px;
        max-width: none !important;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        border: 1px solid var(--border-color);
        border-radius: 0 0 8px 8px;
        border-top: none;
        background-color: white;
        z-index: 1000;
    }
    
    /* Force show when style attribute is set - MOBILE ONLY */
    .mega-dropdown .mega-menu[style*="display: block"],
    .dropdown .dropdown-menu[style*="display: block"] {
        display: block !important;
    }
    
    /* Show dropdown when display is set to flex */
    .mega-dropdown .mega-menu[style*="display: flex"],
    .dropdown .dropdown-menu[style*="display: flex"] {
        display: flex !important;
        flex-direction: column;
    }
    
    /* Show dropdown when display is set to block (fallback) */
    .mega-dropdown .mega-menu[style*="display: block"],
    .dropdown .dropdown-menu[style*="display: block"] {
        display: block !important;
    }
    
    /* Mobile dropdown toggle styling */
    .navbar-collapse .dropdown-toggle {
        position: relative;
        padding: 15px 20px;
        width: 100%;
        text-align: left;
        border: none;
        background: none;
        color: white;
    }
    
    .navbar-collapse .dropdown-toggle::after {
        position: absolute;
        right: 20px;
        top: 50%;
        transform: translateY(-50%);
        transition: transform 0.3s ease;
    }
    
    .navbar-collapse .dropdown-toggle[aria-expanded="true"]::after {
        transform: translateY(-50%) rotate(180deg);
    }
    
    /* Dropdown items styling */
    .navbar-collapse .dropdown-item {
        padding: 12px 20px;
        border-bottom: 1px solid rgba(0,0,0,0.05);
        color: var(--text-dark);
        background: white;
        display: block;
        width: 100%;
        text-decoration: none;
    }
    
    .navbar-collapse .dropdown-item:hover {
        background-color: var(--light-bg);
        color: var(--primary-color);
    }
    
    .navbar-collapse .dropdown-item:last-child {
        border-bottom: none;
    }
    
    /* Mobile mega menu columns */
    .mega-menu .row {
        margin: 0;
    }
    
    .mega-menu .col-lg-3,
    .mega-menu .col-lg-4 {
        padding: 0;
        margin-bottom: 15px;
    }
    
    .mega-menu .col-lg-3:last-child,
    .mega-menu .col-lg-4:last-child {
        margin-bottom: 0;
    }
    
    .mega-menu .dropdown-header {
        color: var(--primary-color);
        font-weight: 600;
        font-size: 0.9rem;
        margin-bottom: 10px;
        padding-bottom: 5px;
        border-bottom: 1px solid var(--border-color);
    }
    
    /* Ensure nav items don't have bottom margin */
    .navbar-collapse .nav-item {
        margin-bottom: 0;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .tiles-container {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 20px;
    }
    
    .header-content {
        text-align: center !important;
        margin-top: 20px;
    }
}

@media (max-width: 767.98px) {
    .hero-section {
        height: 420px;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-content .lead {
        font-size: 1.1rem;
    }
    
    .section {
        padding: 40px 0;
    }
    
    .tiles-container {
        grid-template-columns: 1fr;
    }
    
    .top-bar {
        text-align: center;
    }
    
    .top-contact span {
        display: block;
        margin: 5px 0;
    }
    
    /* Enhanced mobile dropdown styling */
    .navbar-collapse .mega-menu {
        padding: 15px !important;
    }
    
    .mega-menu .dropdown-header {
        font-size: 0.9rem;
        margin-bottom: 10px;
        padding-bottom: 8px;
    }
    
    .mega-menu .dropdown-item {
        font-size: 13px;
        padding: 10px 0;
    }
    
    /* Ensure touch targets are large enough */
    .navbar-collapse .nav-link,
    .navbar-collapse .dropdown-toggle {
        padding: 15px 20px;
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    .navbar-collapse .dropdown-item {
        padding: 15px 20px;
        font-size: 16px; /* Prevent zoom on iOS */
    }
}

@media (max-width: 575.98px) {
    .hero-section {
        height: 400px;
    }
    
    .hero-content h1 {
        font-size: 1.8rem;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .main-footer {
        text-align: center;
    }
    
    .footer-legal {
        text-align: center !important;
        margin-top: 20px;
    }
}

/* ===== UTILITIES ===== */
.text-primary {
    color: var(--primary-color) !important;
}

.text-secondary {
    color: var(--secondary-color) !important;
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

.bg-secondary {
    background-color: var(--secondary-color) !important;
}

.border-primary {
    border-color: var(--primary-color) !important;
}

.border-secondary {
    border-color: var(--secondary-color) !important;
}

/* ===== ACCESSIBILITY ===== */
.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;
}

/* ===== PRINT STYLES ===== */
@media print {
    .top-bar,
    .main-navigation,
    .breadcrumb-nav,
    .main-footer,
    .btn {
        display: none !important;
    }
    
    .hero-section {
        height: auto;
        padding: 40px 0;
        background: none !important;
        color: var(--text-dark) !important;
    }
    
    .hero-section::before {
        display: none;
    }
}