/* --- ZMIENNE I DARK MODE --- */
:root {
    --primary: #006d77;   /* Morski */
    --accent: #ffb703;    /* Bursztyn */
    --bg-body: #fdfcf8;   /* Kremowa biel */
    --bg-card: #ffffff;
    --text-main: #1d3557;
    --text-sec: #6c757d;
    --border: #e9ecef;
    --container: 1240px;
    --radius: 12px;
}

/* Ustawienia dla trybu ciemnego */
[data-theme="dark"] {
    --primary: #4db6ac;   /* Jaśniejszy morski dla kontrastu */
    --accent: #ffca3a;
    --bg-body: #0f172a;   /* Ciemny granat */
    --bg-card: #1e293b;   /* Jaśniejszy granat */
    --text-main: #f1f5f9;
    --text-sec: #94a3b8;
    --border: #334155;
}

/* --- RESET & BAZA --- */
*, *::before, *::after { box-sizing: border-box; }
body { 
    background-color: var(--bg-body); 
    color: var(--text-main); 
    font-family: 'Inter', sans-serif; 
    margin: 0; 
    transition: background-color 0.3s, color 0.3s; 
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.mt-4 { margin-top: 1.5rem; }
.mb-large { margin-bottom: 4rem; }

/* --- HEADER & PROGRESS --- */
.reading-progress {
    position: fixed; top: 0; left: 0; height: 3px; background: var(--accent); z-index: 1001; width: 0%;
}
.site-header {
    background: var(--bg-card); /* Glass effect removed for simpler dark mode handling */
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 1000; padding: 15px 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}
.header-grid { display: flex; justify-content: space-between; align-items: center; }
.logo-link { font-size: 1.5rem; font-weight: 800; color: var(--text-main); }
.logo-highlight { color: var(--primary); }
.header-tools { display: flex; gap: 15px; align-items: center; }
.theme-toggle { background: none; border: 1px solid var(--border); padding: 5px 10px; border-radius: 20px; cursor: pointer; color: var(--text-main); }
[data-theme="light"] .moon { display: none; }
[data-theme="dark"] .sun { display: none; }

/* MENU */
.main-navigation ul { display: flex; gap: 20px; list-style: none; margin: 0; padding: 0; }
.main-navigation a { font-weight: 600; font-size: 0.95rem; color: var(--text-main); }
.main-navigation a:hover { color: var(--primary); }

/* --- UTILITY GRID (Pogoda, Transport, Apteka) --- */
.utility-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}
.util-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}
.util-header { font-size: 0.85rem; text-transform: uppercase; color: var(--text-sec); font-weight: 700; margin-bottom: 15px; border-bottom: 1px solid var(--border); padding-bottom: 10px; }

/* Transport Styles */
.transport-links { display: flex; flex-direction: column; gap: 10px; }
.transport-btn {
    display: flex; align-items: center; gap: 10px;
    background: var(--bg-body); border: 1px solid var(--border);
    padding: 10px; border-radius: 8px; font-weight: 600;
    transition: 0.2s; color: var(--text-main);
}
.transport-btn:hover { border-color: var(--primary); color: var(--primary); background: rgba(0, 109, 119, 0.05); }

/* Apteka Styles */
.pharmacy-info { display: flex; flex-direction: column; gap: 5px; }
.pharmacy-info strong { color: var(--accent); font-size: 1.1rem; }
.nav-link { 
    margin-top: 10px; display: inline-block; background: var(--text-main); color: var(--bg-body); 
    padding: 6px 12px; border-radius: 20px; font-size: 0.8rem; text-align: center; width: fit-content; 
}

/* --- HERO & CARDS --- */
.card { background: var(--bg-card); border-radius: var(--radius); overflow: hidden; box-shadow: 0 4px 12px rgba(0,0,0,0.05); transition: transform 0.3s; }
.card:hover { transform: translateY(-5px); }
.card img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.hero-single .card-img-container { height: 450px; position: relative; }
.hero-single .card-content {
    position: absolute; bottom: 0; left: 0; width: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    padding: 30px; color: white;
}
.hero-title { font-size: 2rem; margin: 10px 0; line-height: 1.2; text-shadow: 0 2px 4px rgba(0,0,0,0.5); }
.badge { background: var(--primary); color: white; padding: 4px 8px; border-radius: 4px; font-size: 0.75rem; text-transform: uppercase; font-weight: bold; }
.badge-accent { background: var(--accent); color: #000; }

/* --- GASTRO SCROLLER --- */
.lunch-scroller { display: flex; gap: 20px; overflow-x: auto; padding-bottom: 20px; }
.lunch-card { min-width: 240px; background: var(--bg-card); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.lunch-img { height: 150px; position: relative; }
.lunch-price { position: absolute; bottom: 10px; right: 10px; background: var(--accent); color: black; font-weight: bold; padding: 5px 10px; border-radius: 20px; }
.lunch-info { padding: 15px; }
.lunch-info h4 { margin: 0 0 5px; color: var(--text-main); }
.lunch-info p { margin: 0; font-size: 0.9rem; color: var(--text-sec); }

/* --- PHOTO OF DAY --- */
.photo-of-day { height: 400px; position: relative; border-radius: var(--radius); overflow: hidden; }
.pod-image { position: absolute; top:0; left:0; width:100%; height:100%; }
.pod-content { position: relative; z-index: 2; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; padding: 40px; background: linear-gradient(to top, rgba(0,0,0,0.8), transparent); color: white; }

/* --- FLASH TICKER --- */
.flash-ticker-wrap { background: var(--text-main); color: var(--bg-body); font-size: 0.85rem; display: flex; overflow: hidden; height: 36px; line-height: 36px; }
.flash-label { background: var(--accent); color: #000; padding: 0 15px; font-weight: 800; z-index: 2; }
.flash-content { display: flex; animation: ticker 20s linear infinite; padding-left: 20px; white-space: nowrap; }
.ticker-item { margin-right: 40px; }
@keyframes ticker { 0% { transform: translateX(0); } 100% { transform: translateX(-100%); } }

/* --- UTILS --- */
.grid-3-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.fab-alert { position: fixed; bottom: 30px; right: 30px; background: #d32f2f; color: white; padding: 12px 24px; border-radius: 50px; font-weight: bold; box-shadow: 0 4px 15px rgba(211,47,47,0.4); z-index: 999; }
.mobile-menu-toggle { display: none; background: none; border: none; font-size: 1.5rem; color: var(--text-main); }

@media (max-width: 768px) {
    .main-navigation { display: none; } /* Tu dodamy JS do otwierania */
    .mobile-menu-toggle { display: block; }
    .hero-title { font-size: 1.5rem; }
    .utility-grid { grid-template-columns: 1fr; }
}
/* --- LAYOUT 2-KOLUMNOWY (MAIN + SIDEBAR) --- */
.news-layout-wrapper {
    display: grid;
    grid-template-columns: 1fr; /* Domyślnie mobilnie: 1 kolumna */
    gap: 30px;
}

@media (min-width: 992px) {
    .news-layout-wrapper {
        grid-template-columns: 2fr 1fr; /* Desktop: 66% Treść / 33% Sidebar */
    }
}

/* LEWA KOLUMNA */
.grid-2-col {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

/* PRAWA KOLUMNA (SIDEBAR) */
.news-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* WIDGET "W SKRÓCIE" */
.widget-brief {
    background: white;
    padding: 20px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}
.widget-title {
    margin-top: 0;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent);
    color: var(--primary);
}
.brief-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.brief-item a {
    display: flex;
    gap: 10px;
    align-items: baseline;
    font-size: 0.9rem;
    line-height: 1.4;
    transition: color 0.2s;
}
.brief-item a:hover { color: var(--primary); }
.brief-time {
    font-weight: 700;
    color: var(--accent);
    font-size: 0.8rem;
    min-width: 40px;
}
.brief-title {
    color: var(--text-main);
}
.ad-sidebar .ad-placeholder {
    padding: 100px 20px; /* Wysoki baner pionowy */
}
/* RESET I ODSTĘPY */
.mb-section { margin-bottom: 50px !important; }
.container { padding: 0 15px; }

/* LAYOUTY SIATEK */
.grid-3-col {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px; /* Równa odległość między kafelkami */
}

/* SIDEBAR I GŁÓWNA KOLUMNA */
.news-layout-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}
.news-main-column { flex: 1; min-width: 300px; }
.news-sidebar { width: 320px; display: flex; flex-direction: column; gap: 20px; }

@media (max-width: 992px) {
    .news-sidebar { width: 100%; }
}

/* KARTY */
.card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.card-img-top { height: 200px; }
.card-img-top img { width: 100%; height: 100%; object-fit: cover; }

.card-content { padding: 20px; flex-grow: 1; }
.card-content h3 { font-size: 1.1rem; margin: 0; line-height: 1.4; }

/* UTILITY GRID (Dashboard) */
.utility-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.util-card {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #eee;
}
/* ODSTĘPY MIĘDZY SEKCJAMI */
.mt-section { margin-top: 40px !important; margin-bottom: 20px !important; }

/* UKŁAD KOLUMNOWY */
.content-columns {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

@media (min-width: 992px) {
    .content-columns { grid-template-columns: 2fr 1fr; }
}

/* SIATKA NEWSÓW */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

/* KARTY - STABILIZACJA */
.card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid #eee;
}

.img-top { aspect-ratio: 16 / 9; overflow: hidden; }
.img-top img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 15px; flex-grow: 1; }

/* HERO CARD FIX */
.hero-card { position: relative; min-height: 400px; }
.hero-img-wrap { position: absolute; top:0; left:0; width:100%; height:100%; z-index: 1; }
.hero-text { 
    position: relative; z-index: 2; margin-top: auto; 
    padding: 30px; background: linear-gradient(transparent, rgba(0,0,0,0.8)); color: #fff; 
}

/* PRZYCISKI "ZOBACZ WIĘCEJ" */
.view-more {
    display: inline-block; padding: 10px 20px; background: #f0f0f0; 
    border-radius: 50px; font-weight: 600; font-size: 0.9rem; transition: 0.3s;
}
.view-more:hover { background: var(--primary); color: #fff; }
/* RESET ODSTĘPÓW */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.section-block { margin-top: 50px !important; margin-bottom: 50px !important; clear: both; }

/* SIATKA 3 KAFELKI */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

/* KARTY */
.card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
}

.card-dark { background: #1a1a1a; color: #fff; border: none; }
.card-body { padding: 20px; flex-grow: 1; }
.card-img img { width: 100%; height: 200px; object-fit: cover; }

/* PRZYCISKI */
.btn-more {
    display: inline-block; margin-top: 20px; padding: 10px 25px;
    background: #f4f4f4; border-radius: 50px; font-weight: 600;
}
.btn-more:hover { background: #006d77; color: #fff; }

/* UTILITY GRID */
.utility-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px; margin-top: 30px;
}
.util-card { background: #fff; padding: 20px; border-radius: 12px; border: 1px solid #eee; }
/* --- GLOBALNE ODSTĘPY I KOLORY --- */
:root {
    --color-dark: #111111;
    --color-light: #ffffff;
    --color-accent: #e63946; /* Np. czerwony akcent */
    --gap-std: 2rem;
}

.section-spacing {
    margin-bottom: 4rem; /* Jednolite odstępy */
}

.section-heading {
    font-size: 1.5rem;
    border-bottom: 2px solid var(--color-dark);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    font-weight: 800;
}

/* --- HERO SECTION --- */
.hero-card {
    position: relative;
    height: 500px;
    overflow: hidden;
    border-radius: 8px;
}
.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}
.hero-card:hover .hero-img {
    transform: scale(1.02);
}
.hero-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    color: #fff;
}
.hero-title {
    font-size: 2.5rem;
    margin: 0.5rem 0;
    color: #fff;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

/* --- SLIDER + REKLAMA ROW --- */
.slider-ad-row {
    display: grid;
    grid-template-columns: 3fr 1fr; /* Slider zajmuje 3/4, reklama 1/4 */
    gap: var(--gap-std);
    height: 250px; /* Stała wysokość wiersza */
}

/* Scroll Snap Slider (Bez JS!) */
.promo-slider {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    border-radius: 8px;
    background: #f4f4f4;
}
.slider-track {
    display: flex;
    height: 100%;
}
.slide-item {
    min-width: 40%; /* Pokaż 2.5 kafelka na raz */
    scroll-snap-align: start;
    position: relative;
    border-right: 1px solid #fff;
}
.slide-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.slide-title {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(0,0,0,0.7);
    color: #fff;
    padding: 5px 10px;
    font-size: 0.9rem;
}

/* Ad Slot */
.ad-slot-square {
    background: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed #ccc;
    height: 100%;
}

/* --- SPORT (DARK MODE) --- */
.full-width-dark {
    background-color: var(--color-dark);
    color: var(--color-light);
    padding: 3rem 0;
    width: 100vw;
    margin-left: calc(50% - 50vw); /* Full bleed trick */
}
.section-header-white {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    border-bottom: 1px solid #444;
}
.section-header-white h2 {
    color: #fff;
    border: none;
    margin: 0;
}
.btn-white-outline {
    color: #fff;
    border: 1px solid #fff;
    padding: 5px 15px;
    text-decoration: none;
    border-radius: 20px;
}
/* Wymuszenie stylów dla kart w sekcji sport */
.dark-mode-wrapper .news-card {
    background: #222;
    color: #fff;
    border: none;
}
.dark-mode-wrapper .card-title a {
    color: #fff;
}

/* --- TABS (ZAKŁADKI) --- */
.tabs-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--color-dark);
    margin-bottom: 1.5rem;
}
.tabs-header h2 { border: none; margin: 0; }

.tab-btn {
    background: none;
    border: none;
    font-size: 1rem;
    font-weight: 700;
    padding: 10px 20px;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.3s;
}
.tab-btn.active {
    opacity: 1;
    border-bottom: 3px solid var(--color-dark);
}
.tab-pane {
    display: none;
    animation: fadeIn 0.3s ease;
}
.tab-pane.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- RESPONSYWNOŚĆ --- */
@media (max-width: 768px) {
    .slider-ad-row {
        grid-template-columns: 1fr; /* Na mobilce jedno pod drugim */
        height: auto;
    }
    .hero-card { height: 300px; }
    .hero-title { font-size: 1.5rem; }
}