/*
Theme Name: Tyskie Inicjatywy Oświatowe
Theme URI: https://tio.oswiata.tychy.pl/
Author: MCO Tychy
Description: Nowoczesny motyw dla portalu "Uczenie się przez działanie" (Tyskie Inicjatywy Oświatowe). Zbudowany od podstaw, inspirowany oryginalną wersją strony, dostosowany do najnowszego WordPressa.
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 7.4
Text Domain: tio
*/

/* ==========================================================================
   0. RESET / BASE
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

:root{
	--c-green:  #009B40;
	--c-red:    #E3000F;
	--c-yellow: #FFD400;
	--c-blue:   #00A4E7;

	--ink:      #1A1F26;
	--ink-soft: #4B5563;
	--paper:    #FFFFFF;
	--paper-2:  #F6F7F9;
	--line:     #E6E8EC;

	--radius-lg: 22px;
	--radius-md: 14px;
	--radius-sm: 8px;

	--shadow-sm: 0 1px 3px rgba(20, 24, 33, 0.06);
	--shadow-md: 0 10px 30px rgba(20, 24, 33, 0.08);
	--shadow-lg: 0 20px 50px rgba(20, 24, 33, 0.14);

	--container: 1180px;
	--font-head: "Poppins", "Segoe UI", system-ui, sans-serif;
	--font-body: "Inter", "Segoe UI", system-ui, sans-serif;
}

html { scroll-behavior: smooth; }

body{
	margin: 0;
	font-family: var(--font-body);
	color: var(--ink);
	background: var(--paper);
	font-size: 17px;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--c-blue); text-decoration: none; }
a:hover { color: var(--c-green); }

h1, h2, h3, h4 {
	font-family: var(--font-head);
	font-weight: 700;
	line-height: 1.2;
	margin: 0 0 .5em;
	color: var(--ink);
}

h1 { font-size: clamp(2rem, 4vw, 2.9rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1.1em; }

ul { margin: 0; padding: 0; list-style: none; }

button, input, textarea { font-family: inherit; font-size: inherit; }

.container{
	max-width: var(--container);
	margin-inline: auto;
	padding-inline: 24px;
}

.visually-hidden{
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(1px,1px,1px,1px);
	white-space: nowrap;
}

.skip-link{
	position: absolute;
	left: -999px;
	top: auto;
	background: var(--ink);
	color: #fff;
	padding: 12px 20px;
	z-index: 10000;
	border-radius: 0 0 8px 0;
}
.skip-link:focus{ left: 0; top: 0; }

/* small decorative accent bar used to echo the puzzle-piece logo palette */
.accent-dots{
	display: inline-flex;
	gap: 6px;
	margin-bottom: 14px;
}
.accent-dots span{
	width: 10px; height: 10px; border-radius: 3px;
}
.accent-dots span:nth-child(1){ background: var(--c-green); }
.accent-dots span:nth-child(2){ background: var(--c-red); }
.accent-dots span:nth-child(3){ background: var(--c-yellow); }
.accent-dots span:nth-child(4){ background: var(--c-blue); }

.eyebrow{
	display: inline-block;
	font-family: var(--font-head);
	font-weight: 600;
	font-size: .78rem;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--c-blue);
	margin-bottom: 10px;
}

.btn{
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-family: var(--font-head);
	font-weight: 600;
	font-size: .95rem;
	padding: 14px 26px;
	border-radius: 999px;
	background: var(--ink);
	color: #fff;
	border: 2px solid var(--ink);
	transition: transform .15s ease, background .2s ease, color .2s ease;
}
.btn:hover{ background: var(--c-blue); border-color: var(--c-blue); color: #fff; transform: translateY(-2px); }

.btn-outline{
	background: transparent;
	color: var(--ink);
	border-color: var(--line);
}
.btn-outline:hover{ background: var(--ink); border-color: var(--ink); color: #fff; }

.section{ padding: 72px 0; }
.section-head{
	max-width: 640px;
	margin-bottom: 40px;
}
.section-head.center{ margin-inline: auto; text-align: center; }

/* ==========================================================================
   1. HEADER
   ========================================================================== */

.site-header{
	position: sticky;
	top: 0;
	z-index: 999;
	background: rgba(255,255,255,.9);
	backdrop-filter: saturate(180%) blur(14px);
	border-bottom: 1px solid var(--line);
}

.site-header .container{
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	padding-block: 14px;
}

.brand{
	display: flex;
	align-items: center;
	gap: 14px;
	color: var(--ink);
}
.brand:hover{ color: var(--ink); }
.brand img{ height: 52px; width: auto; }
.brand-text{ font-family: var(--font-head); line-height: 1.15; }
.brand-text .line1{ display: block; font-weight: 700; font-size: 1rem; letter-spacing: .02em; }
.brand-text .line2{ display: block; font-weight: 400; font-size: .8rem; color: var(--ink-soft); }

.primary-nav ul{
	display: flex;
	align-items: center;
	gap: 6px;
}
.primary-nav a{
	display: inline-block;
	padding: 10px 16px;
	border-radius: 999px;
	color: var(--ink);
	font-weight: 500;
	font-size: .96rem;
}
.primary-nav a:hover,
.primary-nav .current-menu-item > a,
.primary-nav .current_page_item > a{
	background: var(--paper-2);
	color: var(--ink);
}

.header-right{ display: flex; align-items: center; gap: 14px; }
.header-phone{
	display: flex;
	align-items: center;
	gap: 8px;
	font-family: var(--font-head);
	font-weight: 600;
	font-size: .92rem;
	color: var(--ink);
	white-space: nowrap;
}
.header-phone svg{ flex-shrink: 0; color: var(--c-green); }

.menu-toggle{
	display: none;
	background: none;
	border: 1px solid var(--line);
	border-radius: 10px;
	width: 44px; height: 44px;
	align-items: center;
	justify-content: center;
	cursor: pointer;
}
.menu-toggle span,
.menu-toggle span::before,
.menu-toggle span::after{
	content: "";
	display: block;
	width: 20px; height: 2px;
	background: var(--ink);
	position: relative;
	transition: .2s;
}
.menu-toggle span::before{ position: absolute; top: -6px; }
.menu-toggle span::after{ position: absolute; top: 6px; }

/* ==========================================================================
   2. HERO
   ========================================================================== */

.hero{
	position: relative;
	overflow: hidden;
	background: linear-gradient(135deg, #0B1220 0%, #172236 55%, #0B1220 100%);
	color: #fff;
}
.hero::before{
	content: "";
	position: absolute;
	inset: 0;
	background-image:
		radial-gradient(circle at 12% 20%, rgba(0,155,64,.35), transparent 40%),
		radial-gradient(circle at 85% 15%, rgba(227,0,15,.30), transparent 40%),
		radial-gradient(circle at 75% 85%, rgba(0,164,231,.35), transparent 45%),
		radial-gradient(circle at 15% 85%, rgba(255,212,0,.25), transparent 40%);
	pointer-events: none;
}
.hero.has-image{ background-size: cover; background-position: center; }
.hero.has-image::after{
	content: "";
	position: absolute; inset: 0;
	background: linear-gradient(180deg, rgba(11,18,32,.72), rgba(11,18,32,.86));
}
.hero-inner{
	position: relative;
	z-index: 1;
	padding: 110px 0 90px;
	max-width: 760px;
}
.hero .eyebrow{ color: var(--c-yellow); }
.hero h1{ color: #fff; margin-bottom: .4em; }
.hero p.lead{ color: rgba(255,255,255,.82); font-size: 1.15rem; max-width: 560px; }
.hero-actions{ display: flex; gap: 14px; margin-top: 30px; flex-wrap: wrap; }
.hero .btn-outline{ color: #fff; border-color: rgba(255,255,255,.4); }
.hero .btn-outline:hover{ background: #fff; color: var(--ink); border-color: #fff; }

/* ==========================================================================
   3. CARDS / GRIDS
   ========================================================================== */

.grid{
	display: grid;
	gap: 26px;
}
.grid-3{ grid-template-columns: repeat(3, 1fr); }
.grid-4{ grid-template-columns: repeat(4, 1fr); }

.card{
	background: var(--paper);
	border: 1px solid var(--line);
	border-radius: var(--radius-lg);
	overflow: hidden;
	box-shadow: var(--shadow-sm);
	transition: transform .2s ease, box-shadow .2s ease;
	display: flex;
	flex-direction: column;
	height: 100%;
}
.card:hover{ transform: translateY(-4px); box-shadow: var(--shadow-md); }

.card-media{
	position: relative;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	background: var(--paper-2);
}
.card-media img{
	width: 100%; height: 100%; object-fit: cover;
	transition: transform .4s ease;
}
.card:hover .card-media img{ transform: scale(1.06); }

.card-media .play{
	position: absolute; inset: 0;
	display: flex; align-items: center; justify-content: center;
	background: linear-gradient(180deg, rgba(11,18,32,0) 40%, rgba(11,18,32,.65));
	opacity: 0; transition: opacity .2s ease;
}
.card:hover .card-media .play{ opacity: 1; }
.card-media .play svg{ color: #fff; width: 46px; height: 46px; }

.card-body{
	padding: 20px 22px 24px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	flex: 1;
}
.card-body .date{
	font-family: var(--font-head);
	font-size: .78rem;
	font-weight: 600;
	letter-spacing: .04em;
	text-transform: uppercase;
	color: var(--c-blue);
}
.card-body h3{ margin: 0; font-size: 1.08rem; }
.card-body h3 a{ color: var(--ink); }
.card-body h3 a:hover{ color: var(--c-blue); }
.card-body p{ color: var(--ink-soft); font-size: .95rem; margin: 0; }
.card-link{
	margin-top: auto;
	font-family: var(--font-head);
	font-weight: 600;
	font-size: .88rem;
	color: var(--ink);
	display: inline-flex; align-items: center; gap: 6px;
}
.card-link svg{ transition: transform .15s ease; }
.card:hover .card-link svg{ transform: translateX(3px); }

.section-alt{ background: var(--paper-2); }

.section-foot{ text-align: center; margin-top: 40px; }

.empty-note{
	color: var(--ink-soft);
	background: var(--paper-2);
	border: 1px dashed var(--line);
	border-radius: var(--radius-md);
	padding: 28px;
	text-align: center;
}

/* ==========================================================================
   4. INFO STRIP
   ========================================================================== */

.info-strip{
	background: var(--ink);
	color: #fff;
}
.info-strip .container{
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
	align-items: center;
	justify-content: space-between;
	padding-block: 26px;
}
.info-strip-item{
	display: flex;
	align-items: center;
	gap: 12px;
	font-family: var(--font-head);
	font-weight: 600;
}
.info-strip-item svg{ color: var(--c-yellow); flex-shrink: 0; }
.info-strip a{ color: #fff; }
.info-strip a:hover{ color: var(--c-yellow); }

/* ==========================================================================
   5. PAGE / CONTENT
   ========================================================================== */

.page-hero{
	background: var(--paper-2);
	border-bottom: 1px solid var(--line);
	padding: 64px 0 40px;
}
.page-hero h1{ margin-bottom: 6px; }
.breadcrumbs{
	font-size: .88rem;
	color: var(--ink-soft);
}
.breadcrumbs a{ color: var(--ink-soft); }
.breadcrumbs a:hover{ color: var(--c-blue); }

.entry-content{
	max-width: 780px;
	margin: 56px auto;
	padding-inline: 24px;
	font-size: 1.05rem;
	color: var(--ink);
}
.entry-content h2, .entry-content h3{ margin-top: 1.4em; }
.entry-content ul{ list-style: disc; padding-left: 1.4em; margin-bottom: 1.1em; }
.entry-content ul li{ margin-bottom: .4em; }
.entry-content img{ border-radius: var(--radius-md); margin: 1.5em 0; }
.entry-content a{ text-decoration: underline; text-underline-offset: 3px; }

.single-hero-media{
	max-width: var(--container);
	margin: 0 auto 40px;
	padding-inline: 24px;
}
.single-hero-media img{ border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }

/* ==========================================================================
   6. CONTACT PAGE
   ========================================================================== */

.contact-wrap{
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 50px;
	align-items: start;
	max-width: var(--container);
	margin: 60px auto;
	padding-inline: 24px;
}
.contact-card{
	background: var(--paper-2);
	border-radius: var(--radius-lg);
	padding: 34px;
}
.contact-card h2{ font-size: 1.3rem; }
.contact-detail{
	display: flex; align-items: center; gap: 12px;
	margin-bottom: 16px;
	font-weight: 500;
}
.contact-detail svg{ color: var(--c-green); flex-shrink: 0; }
.contact-detail a{ color: var(--ink); }
.contact-detail a:hover{ color: var(--c-blue); }
.contact-goal{
	margin-top: 24px;
	padding-top: 24px;
	border-top: 1px solid var(--line);
	color: var(--ink-soft);
	font-size: .96rem;
}

.contact-form .field{ margin-bottom: 18px; }
.contact-form label{
	display: block;
	font-family: var(--font-head);
	font-weight: 600;
	font-size: .88rem;
	margin-bottom: 6px;
}
.contact-form input,
.contact-form textarea{
	width: 100%;
	padding: 13px 16px;
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	background: #fff;
	transition: border-color .15s ease;
}
.contact-form input:focus,
.contact-form textarea:focus{
	outline: none;
	border-color: var(--c-blue);
}
.contact-form textarea{ min-height: 140px; resize: vertical; }
.contact-form .hp-field{ position: absolute; left: -9999px; }
.form-notice{
	padding: 14px 18px;
	border-radius: var(--radius-sm);
	margin-bottom: 20px;
	font-weight: 500;
}
.form-notice.success{ background: #E7F7EC; color: #0A6B32; }
.form-notice.error{ background: #FDECEC; color: #A3131A; }

/* ==========================================================================
   7. FOOTER
   ========================================================================== */

.site-footer{
	background: var(--ink);
	color: rgba(255,255,255,.78);
	padding-top: 60px;
}
.footer-grid{
	display: grid;
	grid-template-columns: 1.4fr 1fr 1fr;
	gap: 40px;
	padding-bottom: 40px;
	border-bottom: 1px solid rgba(255,255,255,.12);
}
.footer-brand{ display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.footer-brand img{ height: 46px; }
.footer-brand span{ font-family: var(--font-head); font-weight: 700; color: #fff; }
.site-footer h4{ color: #fff; font-size: .92rem; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 16px; }
.site-footer .widget ul li{ margin-bottom: 10px; }
.site-footer a{ color: rgba(255,255,255,.78); }
.site-footer a:hover{ color: var(--c-yellow); }
.footer-bottom{
	display: flex;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 10px;
	padding-block: 22px;
	font-size: .85rem;
	color: rgba(255,255,255,.55);
}

/* ==========================================================================
   8. RESPONSIVE
   ========================================================================== */

@media (max-width: 900px){
	.grid-3{ grid-template-columns: repeat(2, 1fr); }
	.grid-4{ grid-template-columns: repeat(2, 1fr); }
	.contact-wrap{ grid-template-columns: 1fr; }
	.footer-grid{ grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px){
	.header-phone{ display: none; }
	.menu-toggle{ display: flex; }
	.primary-nav{
		position: fixed;
		inset: 72px 16px auto 16px;
		background: #fff;
		border: 1px solid var(--line);
		border-radius: var(--radius-md);
		box-shadow: var(--shadow-lg);
		padding: 10px;
		display: none;
	}
	.primary-nav.is-open{ display: block; }
	.primary-nav ul{ flex-direction: column; align-items: stretch; }
	.primary-nav a{ display: block; }
	.grid-3, .grid-4{ grid-template-columns: 1fr; }
	.hero-inner{ padding: 80px 0 60px; }
	.footer-grid{ grid-template-columns: 1fr; }
	.section{ padding: 52px 0; }
}
