/* ====== BASE STYLES ====== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #111827;
    background-color: #ffffff;
    overflow-x: hidden;
}

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

/* ====== HEADER STYLES ====== */
.site-header {
    background: #ffffff;
    color: #111827;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    border-bottom: 1px solid #e5e7eb;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
    color: #1e3a8a;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    font-size: 1.8rem;
}

/* ====== DESKTOP NAVIGATION ====== */
.main-nav {
    display: block;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
    align-items: center;
}

.main-nav a {
    color: #374151;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
    font-size: 0.95rem;
    white-space: nowrap;
}

.main-nav a:hover {
    color: #1e3a8a;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #1e3a8a;
    transition: width 0.3s;
}

.main-nav a:hover::after {
    width: 100%;
}

/* Dropdown Menu */
.nav-item-has-children {
    position: relative;
}

.nav-item-has-children:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-icon {
    margin-left: 5px;
    font-size: 0.7rem;
}

.sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #ffffff;
    min-width: 280px;
    box-shadow: 0 10px 15px rgba(0,0,0,0.1);
    padding: 1rem 0;
    border-radius: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1001;
    border: 1px solid #e5e7eb;
    max-height: 400px;
    overflow-y: auto;
}

.sub-menu::-webkit-scrollbar {
    width: 6px;
}

.sub-menu::-webkit-scrollbar-track {
    background: #f3f4f6;
}

.sub-menu::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

.sub-menu::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

.sub-menu li {
    list-style: none;
}

.sub-menu a {
    display: block;
    padding: 0.75rem 1.5rem;
    color: #374151;
    text-decoration: none;
    font-weight: 400;
    transition: background 0.3s;
    position: relative;
    white-space: normal;
}

.sub-menu a:hover {
    background: #f3f4f6;
    color: #1e3a8a;
    padding-left: 2rem;
}

.sub-menu a::after {
    content: none;
}

.product-count {
    background: #1e3a8a;
    color: #ffffff;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    float: right;
    margin-left: 10px;
}

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

.mobile-menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: #1e3a8a;
    transition: all 0.3s;
}

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 320px;
    height: 100%;
    background: #ffffff;
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
    transition: right 0.3s ease;
    z-index: 1000;
    overflow-y: auto;
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #ffffff;
    position: sticky;
    top: 0;
    z-index: 1001;
}

.mobile-menu-close {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #374151;
}

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

.mobile-nav-menu > li {
    border-bottom: 1px solid #e5e7eb;
}

.mobile-nav-menu > li > a,
.mobile-nav-toggle {
    display: block;
    padding: 1.25rem 1.5rem;
    color: #111827;
    text-decoration: none;
    font-weight: 500;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
}

.mobile-nav-menu > li > a:hover,
.mobile-nav-toggle:hover {
    background: #f3f4f6;
    color: #1e3a8a;
}

.mobile-nav-item-has-children {
    position: relative;
}

.mobile-sub-menu {
    display: none;
    list-style: none;
    padding: 0;
    margin: 0;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
}

.mobile-sub-menu.active {
    display: block;
}

.mobile-sub-menu li a {
    padding: 0.75rem 1.5rem 0.75rem 3rem;
    color: #374151;
    text-decoration: none;
    display: block;
    transition: background 0.3s;
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
}

.mobile-sub-menu li a:hover {
    background: #ffffff;
    color: #1e3a8a;
}

.toggle-icon {
    float: right;
    transition: transform 0.3s;
    font-size: 1.2rem;
    line-height: 1;
}

.toggle-icon.active {
    transform: rotate(45deg);
}

/* ====== BREADCRUMBS ====== */
.breadcrumbs {
    background: #ffffff;
    padding: 1rem 0;
    margin-bottom: 2rem;
    border-bottom: 1px solid #e5e7eb;
    font-family: 'Poppins', sans-serif;
}

.breadcrumbs span[itemprop="itemListElement"] {
    display: inline-block;
}

.breadcrumbs a {
    color: #1e3a8a;
    text-decoration: none;
    font-weight: 500;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

.separator {
    margin: 0 10px;
    color: #6b7280;
}

/* ====== FOOTER ====== */
.site-footer {
    background: #111827;
    color: #ffffff;
    padding: 3rem 0;
    margin-top: 4rem;
}

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

.footer-section h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: #ffffff;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #9ca3af;
    text-decoration: none;
    transition: color 0.3s;
    font-size: 0.95rem;
    font-family: 'Poppins', sans-serif;
}

.footer-section a:hover {
    color: #ffffff;
}

.copyright {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #374151;
    margin-top: 2rem;
    color: #6b7280;
    font-size: 0.9rem;
    font-family: 'Poppins', sans-serif;
}

/* ====== RESPONSIVE ====== */
@media (max-width: 992px) {
    .main-nav ul {
        gap: 1rem;
    }
    
    .main-nav a {
        font-size: 0.9rem;
        padding: 0.5rem 0.5rem;
    }
}

@media (max-width: 768px) {
    .main-nav {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .header-content {
        padding: 0 15px;
    }
    
    .logo {
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .sub-menu {
        min-width: 250px;
        font-size: 0.9rem;
    }
    
    .mobile-menu {
        width: 280px;
    }
}

/* ====== SMOOTH SCROLL ====== */
html {
    scroll-behavior: smooth;
}

/* ====== FOCUS STATES ====== */
a:focus,
button:focus {
    outline: 2px solid #1e3a8a;
    outline-offset: 2px;
}


/* ===== MEGA SUBMENU — DESKTOP ===== */

@media (min-width: 993px) {

.sub-menu.mega-submenu {

    min-width: 620px;
    max-width: 920px;

    padding: 20px 22px;

    display: grid;

    grid-template-columns:
        180px
        repeat(auto-fit, minmax(200px, 1fr));

    gap: 12px 18px;

    background: #fff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);

    align-content: start;
}

/* kolumna ikony */

.submenu-icon {
    grid-row: 1 / span 999;
    border-right: 1px solid #e5e7eb;
    padding-right: 14px;
}

}


/* mapowanie kategorii → emoji */

.icon[data-category="Ubezpieczenia"]::before { content: "🛡️"; }
.icon[data-category="Inwestycje"]::before { content: "📈"; }
.icon[data-category="Finanse osobiste"]::before { content: "💰"; }
.icon[data-category="Dla Twojej firmy"]::before { content: "🏢"; }
.icon[data-category="Programy niefinansowe"]::before { content: "🎁"; }
.icon[data-category="Kredyty"]::before { content: "💳"; }
.icon[data-category="Lokaty"]::before { content: "🏦"; }
.icon[data-category="Konta"]::before { content: "💳"; }
