/*
Theme Name: Szpital Pińczów
Theme URI: https://szpitalpinczow.pl
Author: Zespół Opieki Zdrowotnej w Pińczowie
Description: Responsywny motyw WordPress dla Szpitala w Pińczowie. Treści edytowalne z panelu, menu 3-poziomowe, odporne skalowanie zdjęć i obsługa edytora blokowego/klasycznego.
Version: 1.2.0
Requires at least: 5.9
Requires PHP: 5.6
Text Domain: szpital-pinczow
*/

/* ===== RESET / BASE ===== */
*,*::before,*::after{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;font-family:Arial,Helvetica,sans-serif;color:#20323b;line-height:1.65;background:#fff}
img{max-width:100%;height:auto}
a{color:#075b86;text-decoration:none}
a:hover{text-decoration:underline}
h1,h2,h3,h4{font-family:Arial,Helvetica,sans-serif;line-height:1.25}
.container{width:92%;max-width:1240px;margin:0 auto}
.screen-reader-text{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.screen-reader-text:focus,.skip-link:focus{clip:auto!important;width:auto;height:auto;margin:0;left:12px;top:12px;z-index:99999;background:#fff;color:#075b86;padding:10px 14px;border:2px solid #075b86;border-radius:6px}
:focus-visible{outline:3px solid #ffb703;outline-offset:2px}
button{font-family:inherit}

/* ===== TOP BAR ===== */
.top{background:#075b86;color:#fff;font-size:13px}
.topin{min-height:40px;display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:6px;padding:6px 0}
.topin .top-contact{display:flex;gap:18px;flex-wrap:wrap}
.topin a{color:#fff}
.topin .top-social a{margin-left:10px}

/* ===== HEADER ===== */
header.site-header{background:#fff;box-shadow:0 1px 0 #dce9ee}
.head{display:flex;justify-content:space-between;align-items:center;padding:16px 0;gap:20px}
.identity{display:flex;align-items:center;gap:15px;min-width:0}
.identity a{display:flex;align-items:center;gap:15px;color:inherit;min-width:0}
.identity a:hover{text-decoration:none}
.logo-img{width:auto;height:64px;max-width:64px;object-fit:contain;flex-shrink:0}
.custom-logo-link img{height:64px;width:auto;max-width:170px;object-fit:contain}
.identity .site-title{margin:0;color:#087fb7;font-size:21px;font-weight:bold;line-height:1.2;overflow-wrap:break-word}
.identity .site-tagline{margin:3px 0 0;color:#8bc531;font-weight:bold;font-size:14px}
.quick{display:flex;gap:10px;flex-shrink:0}
.quick a{padding:11px 16px;border:2px solid #dce9ee;border-radius:8px;font-weight:bold;color:#075b86;white-space:nowrap}
.quick a:hover{background:#f3f9fb;text-decoration:none}
.quick a.reg{background:#92c51b;color:#fff;border-color:#92c51b}
.quick a.reg:hover{background:#7ead13}

/* ===== HAMBURGER (mobile) ===== */
.nav-toggle{display:none;border:2px solid #dce9ee;background:#fff;border-radius:8px;padding:9px 12px;cursor:pointer}
.nav-toggle .bar{display:block;width:22px;height:2px;background:#075b86;margin:5px 0}

/* ===== NAWIGACJA GŁÓWNA (do 3 poziomów) ===== */
.nav{background:#fff;border-top:1px solid #dce9ee;border-bottom:3px solid #92c51b}
.menu{display:flex;list-style:none;padding:0;margin:0;flex-wrap:wrap}
.menu .menu-item{position:relative}
.menu .menu-item>a{display:flex;align-items:center;gap:5px;padding:14px 15px;font-weight:bold;color:#20323b;font-size:14.5px}
.menu .menu-item>a:hover,.menu .menu-item.current>a{background:#f3f9fb;color:#075b86;text-decoration:none}
.menu .arrow{width:7px;height:7px;border-right:2px solid currentColor;border-bottom:2px solid currentColor;transform:rotate(45deg);margin-top:-3px}
.menu .sub{display:none;position:absolute;top:100%;left:0;background:#fff;min-width:255px;list-style:none;padding:8px 0;margin:0;border:1px solid #dce9ee;box-shadow:0 12px 30px rgba(0,0,0,.12);z-index:20}
.menu .sub .menu-item{position:relative}
.menu .sub .menu-item>a{padding:10px 16px;font-weight:normal;font-size:14px;justify-content:space-between}
.menu .sub .menu-item>a:hover{background:#f3f9fb;color:#075b86}
.menu .sub .sub{top:-9px;left:100%}
.menu li.menu-item:hover>.sub{display:block}
.menu .sub .arrow{transform:rotate(-45deg);margin-top:0}

/* ===== BREADCRUMBS ===== */
.breadcrumbs{background:#f3f9fb;border-bottom:1px solid #dce9ee;font-size:13px;padding:10px 0;color:#5c7079}
.breadcrumbs a{color:#075b86}
.breadcrumbs .sep{margin:0 6px;color:#9db0b8}
.breadcrumbs .current{color:#20323b;font-weight:bold}

/* ===== HERO (strona główna) ===== */
.hero{background:linear-gradient(135deg,#eaf9fd,#fff 55%,#f5fbe7)}
.heroIn{display:grid;grid-template-columns:1.25fr .75fr;gap:35px;align-items:center;padding:55px 0}
.hero h1{font-size:42px;line-height:1.12;color:#075b86;margin:0 0 15px}
.hero p{font-size:17px;color:#5c7079;margin:0 0 22px}
.hero-buttons{display:flex;gap:10px;flex-wrap:wrap}
.btn{display:inline-block;padding:13px 22px;border-radius:8px;border:2px solid #087fb7;font-weight:bold;color:#087fb7}
.btn:hover{text-decoration:none;background:#eaf7fc}
.btn.primary{background:#087fb7;color:#fff}
.btn.primary:hover{background:#066a99}
.visual{position:relative;min-height:300px;display:flex;align-items:center;justify-content:center}
.visual::before{content:'';position:absolute;width:300px;height:300px;border-radius:50%;background:#dff5fb;z-index:0}
.visual img{position:relative;width:270px;height:270px;object-fit:contain;z-index:1}

/* ===== KAFELKI SZYBKIEGO DOSTĘPU ===== */
.strip{position:relative;margin-top:-25px}
.grid4,.quick-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.quickcard{display:block;background:#fff;border:1px solid #dce9ee;border-radius:12px;padding:20px;box-shadow:0 8px 22px rgba(7,91,134,0.08)}
.quickcard:hover{border-color:#92c51b;text-decoration:none}
.quickcard strong{display:block;color:#075b86;font-size:17px;margin-bottom:4px}
.quickcard small{color:#5c7079}

/* ===== SEKCJE OGÓLNE ===== */
.section{padding:50px 0}
.section.gray{background:#f3f9fb}
.title{color:#075b86;font-size:29px;margin:0 0 8px}
.lead{color:#5c7079;margin:0 0 25px}
.grid3{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}
.card{background:#fff;border:1px solid #dce9ee;border-radius:12px;padding:22px;box-shadow:0 6px 20px rgba(7,91,134,0.06)}
.card h3{color:#075b86;margin:0 0 8px}
.card p{color:#5c7079;margin:0 0 10px}

/* ===== AKTUALNOŚCI (posty) ===== */
.news{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}
.article{background:#fff;border:1px solid #dce9ee;border-radius:12px;padding:22px;box-shadow:0 6px 20px rgba(7,91,134,0.06);min-width:0;overflow:hidden}
.article small{color:#8bc531;font-weight:bold;text-transform:uppercase;font-size:12px}
.article h3{color:#075b86;margin:8px 0}
.article p{color:#5c7079}
.article.featured{background:#075b86;grid-row:span 2}
.article.featured h3,.article.featured a,.article.featured p,.article.featured small{color:#fff}
.article-image{display:block;margin:-22px -22px 16px}.article-image img,.article img{display:block;width:100%;max-width:100%;height:auto;max-height:300px;object-fit:cover}.article.featured .article-image img{max-height:390px}.readmore{font-weight:bold}

/* ===== ALERT ===== */
.alert-bar{background:#fff9e6;border:1px solid #efd77a;border-radius:10px;padding:20px 22px}
.alert-bar strong{display:block;margin-bottom:4px;color:#8a6d00}.alert-bar a{display:inline-block;margin-top:8px;font-weight:bold}.compact-section{padding:26px 0 0}

/* ===== TREŚĆ PODSTRONY ===== */
.page-wrap{display:grid;grid-template-columns:1fr;gap:35px}
.page-wrap.has-sidebar{grid-template-columns:2.2fr 1fr}
.entry-content{color:#33454d;overflow-wrap:break-word}
.entry-content::after{content:'';display:table;clear:both}
.entry-content h2,.entry-content h3{color:#075b86}
.entry-content img{border-radius:10px;max-width:100%;height:auto}
.entry-content table{width:100%;max-width:100%;border-collapse:collapse;display:block;overflow-x:auto;-webkit-overflow-scrolling:touch}
.entry-content table td,.entry-content table th{border:1px solid #dce9ee;padding:8px}
.entry-content a{text-decoration:underline}
.entry-meta{color:#8a99a0;font-size:13px;margin-bottom:18px}

/* ===== WYRÓWNANIA I PODPISY OBRAZKÓW (klasy generowane przez edytor WP) ===== */
.alignnone{margin:5px 20px 20px 0}
.aligncenter,div.aligncenter{display:block;margin:10px auto 20px}
.alignright{float:right;margin:5px 0 15px 20px}
.alignleft{float:left;margin:5px 20px 15px 0}
img.aligncenter,img.alignnone,img.alignleft,img.alignright{max-width:100%;height:auto}
.wp-caption{max-width:100%;margin-bottom:20px}
.wp-caption.alignleft{margin:5px 20px 15px 0}
.wp-caption.alignright{margin:5px 0 15px 20px}
.wp-caption.aligncenter{margin:10px auto 20px}
.wp-caption img[class*="wp-image-"]{display:block;max-width:100%;height:auto;margin:0}
.wp-caption .wp-caption-text{font-size:13px;color:#5c7079;padding:8px 4px;margin:0;text-align:center}
.wp-block-image{margin:0 0 20px}
.wp-block-image img{border-radius:10px;max-width:100%;height:auto}
.wp-block-image figcaption{font-size:13px;color:#5c7079;text-align:center;padding-top:6px}
.wp-block-columns{display:flex;gap:24px;flex-wrap:wrap;margin-bottom:20px}
.wp-block-column{flex:1;min-width:220px}
.wp-block-gallery{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:0 0 20px;padding:0;list-style:none}
.wp-block-gallery .blocks-gallery-item img,.wp-block-gallery img{display:block;width:100%;height:auto;object-fit:contain;border-radius:8px}
.gallery{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:0 0 20px}
.gallery-item img{width:100%;height:auto;border-radius:8px}
.entry-content iframe,.entry-content video,.entry-content embed,.entry-content object{max-width:100%}.entry-content figure{max-width:100%;margin-left:0;margin-right:0}.entry-content img{image-orientation:from-image}.entry-content p img{max-width:100%;height:auto!important}
.wp-block-embed{margin:0 0 20px}
.wp-block-embed iframe{width:100%}
@media(max-width:650px){
	.alignleft,.alignright{float:none;display:block;margin:10px 0}
	.wp-block-gallery,.gallery{grid-template-columns:1fr 1fr}
}

/* ===== WIDGETY (uniwersalne, boczne i stopka) ===== */
.widget{margin-bottom:28px}
.widget h3{margin:0 0 10px;font-size:17px}
.widget ul{list-style:none;margin:0;padding:0}
.widget li{padding:6px 0;border-bottom:1px dashed #dce9ee}
.sidebar .widget{background:#f3f9fb;border:1px solid #dce9ee;border-radius:12px;padding:18px}
.sidebar .widget h3{color:#075b86}

/* ===== STOPKA ===== */
.footer{background:#123e51;color:#c9dde4;padding:45px 0 18px}
.foot{display:grid;grid-template-columns:1.3fr 1fr 1fr 1fr;gap:30px}
.foot h3{color:#fff;font-size:17px;margin:0 0 12px}
.foot img{width:86px;height:auto;margin-bottom:12px;object-fit:contain}
.foot p{color:#c9dde4}
.foot .widget{margin-bottom:0}
.foot .widget ul{list-style:none;margin:0;padding:0}
.foot .widget li{border-bottom:1px solid rgba(255,255,255,0.08);padding:6px 0}
.foot .widget a{color:#c9dde4}
.foot .widget a:hover{color:#fff}
.copy{border-top:1px solid rgba(255,255,255,0.15);margin-top:28px;padding-top:14px;display:flex;justify-content:space-between;flex-wrap:wrap;gap:8px;font-size:13px}
.copy a{color:#c9dde4}

/* ===== 404 / BRAK WYNIKÓW ===== */
.notfound{text-align:center;padding:60px 0}

/* ===== FORMULARZ WYSZUKIWANIA ===== */
.search-form{display:flex;gap:8px}
.search-form input[type=search]{flex:1;padding:10px 12px;border:1px solid #dce9ee;border-radius:8px}
.search-form button{padding:10px 16px;border:none;border-radius:8px;background:#087fb7;color:#fff;font-weight:bold;cursor:pointer}

/* ===== PAGINACJA ===== */
.pagination{display:flex;gap:8px;flex-wrap:wrap;margin-top:25px}
.pagination a,.pagination span{padding:9px 14px;border:1px solid #dce9ee;border-radius:7px;color:#075b86}
.pagination .current{background:#087fb7;color:#fff;border-color:#087fb7}

/* ===== KOMENTARZE ===== */
.comments-area{margin-top:35px;border-top:1px solid #dce9ee;padding-top:25px}
.comment-list{list-style:none;margin:0;padding:0}
.comment-list li{margin-bottom:18px;padding-bottom:18px;border-bottom:1px dashed #dce9ee}
.comment-form input,.comment-form textarea{width:100%;padding:10px;border:1px solid #dce9ee;border-radius:7px;margin-bottom:10px;font-family:inherit}
.comment-form button{padding:11px 20px;border:none;border-radius:8px;background:#087fb7;color:#fff;font-weight:bold;cursor:pointer}

/* ===== RESPONSYWNOŚĆ ===== */
@media(max-width:1000px){
	.foot{grid-template-columns:1fr 1fr}
	.page-wrap.has-sidebar{grid-template-columns:1fr}
}
@media(max-width:900px){
	.heroIn{grid-template-columns:1fr}
	.visual{display:none}
	.grid4,.quick-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
	.grid3,.news{grid-template-columns:1fr}
	.article.featured{grid-column:1/-1}
}
@media(max-width:800px){
	.nav-toggle{display:inline-flex;flex-direction:column;align-items:center;justify-content:center}
	.nav{border-bottom:none}
	.nav .container{padding:0}
	.menu{display:none;flex-direction:column;width:100%;border-top:3px solid #92c51b}
	.nav.open .menu{display:flex}
	.menu .menu-item{width:100%;border-bottom:1px solid #eef3f5}
	.menu .menu-item>a{padding:14px 20px}
	.menu .sub{display:none;position:static;box-shadow:none;border:none;width:100%;padding:0 0 0 15px;background:#f9fcfd}
	.menu li.menu-item:hover>.sub{display:none}
	.menu li.menu-item.sub-open>.sub{display:block}
	.menu .sub .sub{left:0;top:0;padding-left:15px}
	.quick{display:none}
}
@media(max-width:650px){
	.hero h1{font-size:32px}
	.grid4,.quick-grid,.grid3,.news,.foot{grid-template-columns:1fr}
	.section{padding:36px 0}
	.copy{display:block;text-align:center}
	.head{flex-wrap:wrap}
}


/* ===== OCHRONA UKŁADU PRZED „ROZJEŻDŻANIEM” TREŚCI ===== */
html,body{max-width:100%;overflow-x:hidden}
.entry-content,.article,.quickcard,.widget,.identity-text{min-width:0}
.entry-content img,.entry-content svg,.entry-content canvas,.entry-thumb img,.widget img{max-width:100%!important;height:auto!important}
.entry-content pre,.entry-content code{max-width:100%;overflow:auto}
.entry-content .wp-block-media-text{max-width:100%}
.entry-content .wp-block-cover,.entry-content .wp-block-cover-image{max-width:100%;overflow:hidden}
.entry-content .wp-block-cover img,.entry-content .wp-block-cover-image img{width:100%;height:100%!important;object-fit:cover}
.alignwide{width:min(1100px,100%);max-width:100%;margin-left:auto;margin-right:auto}
.alignfull{width:100%;max-width:100%;margin-left:0;margin-right:0}
.home-editor-section:empty{display:none}
@media(max-width:520px){
 .container{width:94%}
 .head{padding:10px 0}
 .logo-img,.custom-logo-link img{height:54px;max-width:120px}
 .identity .site-title{font-size:17px}
 .identity .site-tagline{font-size:12px}
 .topin .top-contact{gap:8px 14px}
 .heroIn{padding:38px 0}
 .hero h1{font-size:29px}
 .hero p{font-size:16px}
 .btn{width:100%;text-align:center}
 .article{padding:18px}
 .article-image{margin:-18px -18px 14px}
 .wp-block-gallery,.gallery{grid-template-columns:1fr}
}
