/*
Theme Name: Nasz Włocławek Portal
Theme URI: https://naszwloclawek.pl
Author: Kujawianin & Gemini
Description: Wersja 50.0 - Nowy, przyjazny jasnomiętowy kolor górnego paska.
Version: 50.0
Text Domain: naszwloclawek
*/

/* --- 1. ZMIENNE I BAZA --- */
:root {
    --primary: #d61a21;
    --dark: #111111;
    --gray: #e0e0e0;
    --light: #f8f9fa;
    --font-main: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
    width: 100%;
    overflow-x: hidden;
    background-color: var(--light);
    color: var(--dark);
    font-family: var(--font-main);
    line-height: 1.6;
    margin: 0; 
}

a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    position: relative;
    width: 100%;
}

/* --- 2. PASKI --- */
.day-info-bar-wrapper, .top-ticker-bar-wrapper, .city-panorama-wrapper {
    padding: 0 15px;
    margin-bottom: 0 !important;
}

/* Jasny Pasek (Teraz przyjazny, pastelowy miętowy/zielony) */
.day-info-bar { 
    background: #e8f5e9; 
    color: #1b5e20;      
    height: 38px; 
    font-size: 0.9rem;
    width: 100%;
    border: 1px solid #c8e6c9;
    border-bottom: none;
    overflow: hidden;
    border-radius: 8px 8px 0 0; 
}

/* Czarny Pasek */
.top-ticker-bar { 
    background: var(--dark); 
    color: #fff; 
    height: 42px; 
    font-size: 0.85rem; 
    width: 100%; 
    border: 1px solid #333;
    overflow: hidden;
}

.ticker-flex { display: flex; align-items: center; height: 100%; overflow: hidden; width: 100%; }

/* Label Jasny (Dopasowany do paska miętowego) */
.ticker-label-grey {
    background: #c8e6c9; 
    color: #1b5e20;      
    padding: 0 15px;
    height: 100%;
    display: flex;
    align-items: center;
    font-weight: 700;
    font-size: 0.8rem;
    z-index: 2;
    white-space: nowrap;
    border-right: 1px solid #a5d6a7;
}

/* Animacja */
.ticker-wrap {
    flex-grow: 1;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
    mask-image: linear-gradient(to right, transparent, black 20px, black 95%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 20px, black 95%, transparent);
}

.ticker-move {
    display: flex; 
    width: fit-content; 
    white-space: nowrap;
    animation: marquee 40s linear infinite; 
}

.ticker-slow { 
    animation: marquee 300s linear infinite !important; 
}

.ticker-move:hover { animation-play-state: paused; }

.ticker-item { padding: 0 30px; display: inline-flex; align-items: center; }
.separator { color: #888; margin: 0 10px; opacity: 0.5; }
.top-ticker-bar a { color: #fff !important; }
.day-info-bar .ticker-item { color: #2e7d32 !important; font-weight: 600; }

@keyframes marquee { 
    0% { transform: translateX(0); } 
    100% { transform: translateX(-50%); } 
}

/* --- 3. POZOSTAŁE --- */
.city-panorama-wrapper { width: 100%; overflow: visible !important; position: relative !important; line-height: 0; }
.city-img { width: 100%; height: auto; max-height: 300px; object-fit: cover; display: block; }

/* --- HEADER --- */
header#masthead { 
    background: #fff; 
    border-bottom: 1px solid var(--gray); 
    padding: 20px 0; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.05); 
    margin-bottom: 0; 
    position: relative; 
    width: 100%;
    max-width: 1170px; 
    margin: 0 auto; 
    border-radius: 0 0 8px 8px;
}

header#masthead .container {
    padding: 0 30px !important; 
    width: 100%;
    max-width: 100%;
}

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

.main-navigation ul { display: flex; gap: 20px; margin: 0; }
.main-navigation a { font-weight: 600; text-transform: uppercase; font-size: 0.9rem; color: var(--dark); }
.main-navigation a:hover { color: var(--primary); }

/* --- WYSZUKIWARKA W NAGŁÓWKU --- */
.header-search { display: flex; align-items: center; }
.header-search form { display: flex; position: relative; margin: 0; }
.header-search input[type="search"], .header-search input[type="text"] {
    padding: 8px 15px;
    border: 1px solid var(--gray);
    border-radius: 4px 0 0 4px;
    outline: none;
    font-size: 0.9rem;
    width: 200px; 
    transition: width 0.3s ease;
}
.header-search input[type="search"]:focus, .header-search input[type="text"]:focus {
    border-color: var(--primary);
    width: 250px; 
}
.header-search button, .header-search input[type="submit"] {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 8px 15px;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s;
}
.header-search button:hover, .header-search input[type="submit"]:hover { background: #b71c1c; }

.menu-toggle { display: none; background: var(--dark); color: white; border: none; padding: 10px 15px; font-size: 1rem; font-weight: bold; cursor: pointer; border-radius: 4px; }

.holiday-runner { position: absolute !important; bottom: 0 !important; left: -100%; width: auto !important; height: auto !important; z-index: 9999 !important; pointer-events: none; animation: runSanta 20s linear infinite; }
.holiday-runner img { width: 120px !important; bottom: -5px !important; }
.runner-text { font-size: 2.5rem; font-weight: 900; color: #fff; text-shadow: 2px 2px 0px #000; bottom: 10px !important; white-space: nowrap; }
@keyframes runSanta { 0% { left: -20%; } 100% { left: 110%; } }

/* --- 4. UKŁAD STRONY --- */
.page-layout { display: grid; grid-template-columns: 2fr 1fr; gap: 40px; margin-bottom: 60px; margin-top: 40px; }

.home-banner-wrapper, .top-banner-wrapper { 
    grid-column: 1 / -1 !important; 
    width: 100% !important; 
    margin: 40px auto;
    border-radius: 8px; 
    display: flex; 
    flex-direction: column; 
    gap: 25px; 
}
.home-banner-wrapper iframe, .top-banner-wrapper iframe { width: 100% !important; aspect-ratio: 16/9; height: auto; }

.single-article, .static-page-card { background: #fff; padding: 40px; border-radius: 8px; box-shadow: 0 2px 15px rgba(0,0,0,0.05); margin-bottom: 40px; width: 100%; }

.entry-title { font-size: 2.2rem; line-height: 1.2; margin-bottom: 15px; }
.article-featured-image img { width: 100%; border-radius: 8px; margin-bottom: 30px; }
.entry-content { width: 100%; font-size: 1.1rem; line-height: 1.8; color: #222; overflow-wrap: break-word; }
.entry-content img { max-width: 100% !important; height: auto; }
.entry-content p { margin-bottom: 20px; }
.article-footer { margin-top: 40px; padding-top: 20px; color: #777; border-top: 1px solid #eee; }
.entry-content a { color: var(--primary); font-weight: 600; text-decoration: underline; }

.hero-section { display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: 250px 250px; gap: 20px; margin-bottom: 40px; }
.card { position: relative; border-radius: 8px; overflow: hidden; background-size: cover; background-position: center; color: white; display: flex; align-items: flex-end; }
.card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: linear-gradient(to top, rgba(0,0,0,0.9), transparent 80%); }
.card:hover::before { background: linear-gradient(to top, rgba(0,0,0,1), rgba(0,0,0,0.2)); }
.card-main { grid-row: 1 / 3; }
.card-overlay { position: relative; z-index: 2; padding: 25px; width: 100%; }
.card h2 { font-size: 1.5rem; margin: 10px 0; line-height: 1.2; text-shadow: 0 2px 4px rgba(0,0,0,0.5); }
.card-main h2 { font-size: 2.2rem; }
.category-badge { background: var(--primary); color: white; padding: 4px 10px; text-transform: uppercase; font-size: 0.7rem; font-weight: bold; border-radius: 4px; display: inline-block; }
.category-badge a { color: white; }
.card-date { font-size: 0.8rem; opacity: 0.8; }

.home-banner-wrapper img, .top-banner-wrapper img { width: 100% !important; max-width: 100% !important; display: block; border-radius: 8px; object-fit: cover; }

.section-title { border-left: 5px solid var(--primary); padding-left: 15px; font-size: 1.5rem; margin-bottom: 25px; color: var(--dark); }
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 25px; margin-bottom: 40px; }
.news-item { border-radius: 8px; overflow: hidden; box-shadow: 0 2px 5px rgba(0,0,0,0.05); border: 1px solid #eee; transition: transform 0.2s; }
.news-item:hover { transform: translateY(-5px); }

/* --- KOLORYSTYKA WIERSZY KAFELKÓW --- */
.news-grid .news-item:nth-child(-n+3) { background-color: #fff3e0; } 
.news-grid .news-item:nth-child(n+4):nth-child(-n+6) { background-color: #e0f2fe; } 
.news-grid .news-item:nth-child(n+7):nth-child(-n+9) { background-color: #fee2e2; } 

.news-img img { width: 100%; height: 200px; object-fit: cover; }
.news-content { padding: 20px; }
.news-content h3 { font-size: 1.2rem; margin-bottom: 10px; line-height: 1.3; }
.news-meta { font-size: 0.8rem; color: #888; margin-bottom: 10px; }

/* --- PAGINACJA --- */
.pagination { display: flex; justify-content: center; gap: 10px; margin: 40px 0; flex-wrap: wrap; width: 100%; }
.pagination .page-numbers { padding: 10px 18px; background: #fff; border: 1px solid var(--gray); border-radius: 4px; font-weight: bold; transition: 0.3s; }
.pagination .page-numbers:hover { background: var(--gray); }
.pagination .current { background: var(--primary); color: #fff; border-color: var(--primary); }

.sidebar-column .widget { background: #fff; padding: 25px; margin-bottom: 30px; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,0.05); border: 1px solid #eee; }
.widget-title { font-size: 1.1rem; text-transform: uppercase; border-bottom: 2px solid var(--primary); padding-bottom: 10px; margin-bottom: 20px; font-weight: 700; margin-top: 0; }
.widget ul li { border-bottom: 1px solid #eee; padding: 10px 0; }
.sidebar-animated-container { margin-bottom: 30px; text-align: center; }
.animated-widget img { max-width: 100%; animation: pulseEffect 2.5s infinite ease-in-out; }

/* --- MENU DOLNE (PRE-FOOTER) --- */
.pre-footer-menu-container { background-color: #fff; border-top: 1px solid #eee; padding: 20px 0; margin-top: 40px; width: 100%; }
.pre-footer-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 30px; margin: 0 !important; padding: 0; list-style: none; }
.pre-footer-links li a { font-size: 0.9rem; color: #555; font-weight: 700; text-transform: uppercase; }
.pre-footer-links li a:hover { color: var(--primary); }

/* STOPKA */
.site-footer { background: var(--dark); color: #888; padding: 40px 0; border-top: 4px solid var(--primary); text-align: center; font-size: 0.9rem; width: 100% !important; margin-top: 0; }
.footer-content { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px; }
.site-footer a { color: #fff; text-decoration: none; border-bottom: 1px dotted #666; }
.site-footer p.credits { color: #888868; }
.site-footer p.credits a { color: #888868; border-bottom-color: #888868; }

/* --- 5. IKONY SOCIAL MEDIA --- */
.social-menu { display: flex; gap: 10px; list-style: none; margin: 0; padding: 0; }
.social-menu li a { display: block; width: 42px; height: 42px; background-color: #333; border-radius: 50%; background-position: center; background-repeat: no-repeat; background-size: 22px; color: transparent !important; }

.social-menu li a[href*="facebook.com"] { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M14 13.5h2.5l1-4H14v-2c0-1.03 0-2 2-2h1.5V2.14c-.326-.043-1.557-.14-2.857-.14C11.928 2 10 3.657 10 6.7v2.8H7v4h3V22h4v-8.5z'/%3E%3C/svg%3E"); }
.social-menu li a[href*="facebook.com"]:hover { background-color: #1877F2; }

.social-menu li a[href*="youtube.com"] { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M19.615 3.184c-3.604-.246-11.631-.245-15.23 0-3.897.266-4.356 2.62-4.385 8.816.029 6.185.484 8.549 4.385 8.816 3.6.245 11.626.246 15.23 0 3.897-.266 4.356-2.62 4.385-8.816-.029-6.185-.484-8.549-4.385-8.816zm-10.615 12.816v-8l8 3.993-8 4.007z'/%3E%3C/svg%3E"); }
.social-menu li a[href*="youtube.com"]:hover { background-color: #FF0000; }

.social-menu li a[href*="instagram.com"] { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M12 2.163c3.204 0 3.584.012 4.85.07 3.252.148 4.771 1.691 4.919 4.919.058 1.265.069 1.645.069 4.849 0 3.205-.012 3.584-.069 4.849-.149 3.225-1.664 4.771-4.919 4.919-1.266.058-1.644.07-4.85.07-3.204 0-3.584-.012-4.849-.07-3.26-.149-4.771-1.699-4.919-4.92-.058-1.265-.07-1.644-.07-4.849 0-3.204.013-3.583.07-4.849.149-3.227 1.664-4.771 4.919-4.919 1.266-.057 1.645-.069 4.849-.069zm0-2.163c-3.259 0-3.667.014-4.947.072-4.958.2-6.78 2.618-6.98 6.98-.059 1.281-.073 1.689-.073 4.948 0 3.259.014 3.668.072 4.948.2 4.358 2.618 6.78 6.98 6.98 1.281.058 1.689.072 4.948.072 3.259 0 3.668-.014 4.948-.072 4.354-.2 6.782-2.618 6.979-6.98.059-1.28.073-1.689.073-4.949-.073zm0 5.838c-3.403 0-6.162 2.759-6.162 6.162s2.759 6.163 6.162 6.163 6.162-2.759 6.162-6.163-2.759-6.162-6.162-6.162zm0 10.162c-2.209 0-4-1.79-4-4 0-2.209 1.791-4 4-4s4 1.791 4 4c0 2.21-1.791 4-4 4zm6.406-11.845c-.796 0-1.441.645-1.441 1.44s.645 1.44 1.441 1.44c.795 0 1.439-.645 1.439-1.44s-.644-1.44-1.439-1.44z'/%3E%3C/svg%3E"); }
.social-menu li a[href*="instagram.com"]:hover { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%,#d6249f 60%,#285AEB 90%); }

.social-menu li a[href*="tiktok.com"] { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M12.525.02c1.31-.02 2.61-.01 3.91-.02.08 1.53.63 3.09 1.75 4.17 1.12 1.11 2.7 1.62 4.17 1.79v4.03c-1.44-.05-2.89-.35-4.2-.97-.57-.26-1.1-.59-1.62-.93v6.14c0 3.48-2.55 6.46-6.03 6.76-3.48.3-6.66-2.14-7.32-5.54-.66-3.41 1.47-6.82 4.87-7.74.46-.13.92-.2 1.4-.22v4.16c-.75.05-1.5.34-2.06.86-.97.9-1.17 2.4-.44 3.52.71 1.17 2.17 1.61 3.46 1.21 1.29-.4 2.17-1.61 2.17-2.98V.02h-.13z'/%3E%3C/svg%3E"); }
.social-menu li a[href*="tiktok.com"]:hover { background-color: #000; border: 1px solid #333; }

.social-menu li a:not([href*="facebook.com"]):not([href*="youtube.com"]):not([href*="instagram.com"]):not([href*="tiktok.com"]) { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z'/%3E%3C/svg%3E"); }
.social-menu li a:not([href*="facebook.com"]):not([href*="youtube.com"]):not([href*="instagram.com"]):not([href*="tiktok.com"]):hover { background-color: var(--primary); }

/* RESPONSIVE */
@media (max-width: 768px) {
    html, body { overflow-x: hidden; width: 100%; margin: 0; padding: 0; }
    .city-panorama-wrapper, .city-img, .top-ticker-bar, .day-info-bar, .day-info-bar-wrapper, .top-ticker-bar-wrapper { display: none !important; }
    
    header#masthead { max-width: 100% !important; width: 100% !important; border-radius: 0 !important; margin: 0 !important; }
    header#masthead .container { padding: 0 15px !important; display: flex !important; justify-content: space-between !important; align-items: center !important; }

    .header-flex { display: flex !important; flex-direction: row !important; justify-content: space-between !important; align-items: center !important; flex-wrap: wrap !important; width: 100% !important; gap: 15px !important; }
    
    .header-search { margin-left: auto; }
    .header-search input[type="search"], .header-search input[type="text"] { width: 120px; }
    .header-search input[type="search"]:focus, .header-search input[type="text"]:focus { width: 160px; }

    .main-navigation { width: auto !important; display: block !important; margin: 0 !important; }

    .menu-toggle { display: block !important; background: #000 !important; color: #fff !important; border: 1px solid #333; padding: 8px 12px !important; font-size: 12px !important; font-weight: 900 !important; text-transform: uppercase; margin: 0 !important; float: left; }
    .menu-toggle::after { content: " ☰"; }
    
    .main-navigation ul { display: none; position: absolute; top: 100%; left: 0; width: 100%; background: #f9f9f9; border: 1px solid #eee; flex-direction: column; z-index: 999; }
    .main-navigation.toggled ul { display: flex; }
    .main-navigation li { border-bottom: 1px solid #ddd; }
    .main-navigation li:last-child { border-bottom: none; }
    .main-navigation a { display: block; padding: 15px; text-align: left; }
    
    .page-layout { display: block; width: 100%; }
    .single-article, .static-page-card { width: 100%; max-width: 100%; padding: 20px; margin: 0 auto 20px auto; box-sizing: border-box; }
    .hero-section { grid-template-columns: 1fr; height: auto; grid-template-rows: auto; }
    .card { height: 250px; }
    .card-main { grid-row: auto; }
    
    .pre-footer-links { flex-direction: column; gap: 10px; text-align: center; }
    
    .site-footer { width: 100vw !important; margin-left: calc(-50vw + 50%); margin-right: calc(-50vw + 50%); padding: 30px 10px; }
    .footer-content { flex-direction: column; text-align: center; gap: 20px; }
    .social-menu { justify-content: center; }
}
@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }