/*
Theme Name: MA-SPED Classic Refresh v3
Theme URI: https://masped.pl/
Author: OpenAI / ChatGPT
Description: Odświeżony klasyczny motyw WordPress dla MA-SPED: strona główna ze sliderem, oferta z mapą, kontakt bez formularza oraz panel do edycji osób kontaktowych.
Version: 3.0.0
Requires at least: 5.8
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: masped-classic-refresh
*/

:root {
  --masped-orange: #f15a24;
  --masped-blue: #0697c8;
  --masped-dark: #111827;
  --masped-muted: #64748b;
  --masped-light: #f4f6f8;
  --masped-border: #e6edf2;
  --masped-white: #ffffff;
  --masped-shadow: 0 18px 45px rgba(15, 23, 42, 0.10);
  --masped-radius: 18px;
  --masped-container: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--masped-dark);
  background: var(--masped-white);
  line-height: 1.65;
  font-size: 15px;
}

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

a {
  color: inherit;
  text-decoration: none;
}

a:hover,
a:focus {
  color: var(--masped-orange);
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.masped-container {
  width: min(var(--masped-container), calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--masped-border);
  backdrop-filter: blur(10px);
}

.admin-bar .site-header {
  top: 32px;
}

.header-inner {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-branding {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.site-logo {
  display: block;
  width: 174px;
  max-height: 62px;
  object-fit: contain;
}

.primary-navigation {
  display: flex;
  align-items: center;
}

.primary-navigation ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.primary-navigation a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 14px;
  color: #243041;
  font-size: 14px;
  font-weight: 700;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease;
}

.primary-navigation a:hover,
.primary-navigation a:focus,
.primary-navigation .current-menu-item > a,
.primary-navigation .current_page_item > a {
  color: var(--masped-orange);
  background: #fff3ed;
}

.nav-toggle {
  display: none;
  border: 0;
  background: var(--masped-orange);
  color: #fff;
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 700;
  cursor: pointer;
}

.page-title-bar {
  background: linear-gradient(180deg, #f7f8fa, #eef2f5);
  border-bottom: 1px solid var(--masped-border);
}

.page-title-bar .masped-container {
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.page-title-bar h1 {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -0.02em;
}

.breadcrumbs {
  color: var(--masped-muted);
  font-size: 13px;
}

.breadcrumbs a {
  color: var(--masped-blue);
}

.hero-title-strip {
  background: #f2f2f2;
  text-align: center;
  border-bottom: 1px solid var(--masped-border);
}

.hero-title-strip h1 {
  margin: 0;
  padding: 25px 20px;
  font-size: clamp(22px, 2.8vw, 34px);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.masped-slider-wrap {
  padding: 42px 0 0;
  background: #fff;
}

.masped-slider {
  position: relative;
  min-height: clamp(330px, 52vw, 540px);
  overflow: hidden;
  border-radius: var(--masped-radius);
  box-shadow: var(--masped-shadow);
  background: #1f2937;
}

.masped-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.65s ease, visibility 0.65s ease;
}

.masped-slide.is-active {
  opacity: 1;
  visibility: visible;
}

.masped-slide img {
  width: 100%;
  height: 100%;
  min-height: clamp(330px, 52vw, 540px);
  object-fit: cover;
  display: block;
}

.masped-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(7, 12, 22, 0.68), rgba(7, 12, 22, 0.28), rgba(7, 12, 22, 0.06));
}

.slide-caption {
  position: absolute;
  z-index: 2;
  left: clamp(24px, 6vw, 68px);
  bottom: clamp(26px, 7vw, 74px);
  max-width: 560px;
  color: #fff;
}

.slide-caption span {
  display: inline-flex;
  margin-bottom: 12px;
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.slide-caption h2 {
  margin: 0 0 12px;
  font-size: clamp(34px, 6vw, 62px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.slide-caption p {
  margin: 0;
  max-width: 460px;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(15px, 2vw, 18px);
}

.slider-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.90);
  color: #111827;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
  box-shadow: 0 12px 28px rgba(0,0,0,0.16);
}

.slider-arrow:hover,
.slider-arrow:focus {
  background: #fff;
  color: var(--masped-orange);
}

.slider-arrow.prev {
  left: 18px;
}

.slider-arrow.next {
  right: 18px;
}

.slider-dots {
  position: absolute;
  z-index: 4;
  left: 0;
  right: 0;
  bottom: 18px;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.slider-dots button {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
}

.slider-dots button.is-active {
  width: 30px;
  border-radius: 999px;
  background: var(--masped-orange);
}

.trust-section {
  padding: 52px 0 58px;
  text-align: center;
}

.trust-box {
  max-width: 930px;
  margin: 0 auto;
  padding: clamp(28px, 5vw, 46px);
  border-radius: var(--masped-radius);
  border: 1px solid var(--masped-border);
  background: linear-gradient(180deg, #ffffff, #f7fbfd);
  box-shadow: 0 14px 38px rgba(15, 23, 42, 0.07);
}

.trust-box h2 {
  margin: 0 0 16px;
  font-size: clamp(22px, 3vw, 34px);
  line-height: 1.25;
}

.trust-box p {
  margin: 0 auto 26px;
  max-width: 750px;
  color: #334155;
  font-size: 17px;
  font-weight: 700;
}

.masped-button,
.wp-block-button__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  background: var(--masped-blue);
  color: #fff !important;
  font-weight: 800;
  box-shadow: 0 12px 25px rgba(6, 151, 200, 0.25);
  transition: background 0.2s ease, transform 0.2s ease;
}

.masped-button:hover,
.masped-button:focus,
.wp-block-button__link:hover,
.wp-block-button__link:focus {
  background: var(--masped-orange);
  color: #fff !important;
  transform: translateY(-1px);
}

.content-section {
  padding: 48px 0 70px;
}

.content-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 42px;
  align-items: start;
}

.content-card,
.sidebar-card,
.contact-group,
.map-card {
  border: 1px solid var(--masped-border);
  border-radius: var(--masped-radius);
  background: #fff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.content-card {
  padding: clamp(28px, 5vw, 44px);
}

.entry-content p:first-child {
  margin-top: 0;
}

.entry-content p:last-child {
  margin-bottom: 0;
}

.entry-content a {
  color: var(--masped-blue);
  font-weight: 700;
}

.entry-content h2,
.entry-content h3 {
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.sidebar-card {
  padding: 24px;
  position: sticky;
  top: 110px;
}

.sidebar-section + .sidebar-section {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--masped-border);
}

.section-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  color: #111827;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.section-kicker::before {
  content: "";
  width: 3px;
  height: 18px;
  border-radius: 2px;
  background: var(--masped-blue);
}

.sidebar-card p,
.sidebar-card address {
  margin: 0 0 11px;
  color: #334155;
  font-style: normal;
}

.sidebar-card strong {
  color: var(--masped-dark);
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.contact-group {
  padding: 24px;
}

.contact-group h2 {
  margin: 0 0 18px;
  color: #111827;
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.contact-person + .contact-person {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px dashed var(--masped-border);
}

.contact-person h3 {
  margin: 0 0 8px;
  font-size: 16px;
  line-height: 1.25;
}

.contact-role {
  margin: -2px 0 10px;
  color: var(--masped-muted);
  white-space: pre-line;
}

.contact-line {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 6px 0;
  color: #334155;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.contact-line .icon {
  width: 18px;
  flex: 0 0 18px;
  text-align: center;
  color: var(--masped-blue);
}

.contact-line a {
  color: #1e293b;
  font-weight: 700;
}

.contact-line a:hover,
.contact-line a:focus {
  color: var(--masped-orange);
}

.contact-actions {
  margin-top: 12px;
}

.contact-actions .mail-button {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: #eef9fd;
  color: #036d91;
  font-size: 13px;
  font-weight: 900;
}

.contact-actions .mail-button:hover,
.contact-actions .mail-button:focus {
  background: var(--masped-orange);
  color: #fff;
}

.map-card {
  margin-top: 28px;
  padding: 24px;
}

.map-card h2 {
  margin: 0 0 18px;
}

.map-frame {
  width: 100%;
  min-height: 360px;
  border: 0;
  border-radius: 14px;
  background: var(--masped-light);
}

.offer-intro {
  margin-bottom: 34px;
  font-size: 16px;
}

.offer-map {
  margin: 20px auto 34px;
  display: block;
  max-width: 720px;
}

.country-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid var(--masped-border);
  border-radius: 14px;
  overflow: hidden;
}

.country-item {
  display: flex;
  gap: 10px;
  align-items: center;
  min-height: 44px;
  padding: 9px 16px;
  border-bottom: 1px solid var(--masped-border);
  background: #fff;
}

.country-item:nth-child(4n+3),
.country-item:nth-child(4n+4) {
  background: #f8fbfc;
}

.country-item:nth-last-child(-n+2) {
  border-bottom: 0;
}

.country-flag {
  font-size: 18px;
  line-height: 1;
}

.about-text {
  max-width: 780px;
  margin: 0 auto;
  text-align: center;
  font-size: 17px;
}

.about-text p {
  margin: 0 0 8px;
}

.site-footer {
  background: #101827;
  color: rgba(255,255,255,0.84);
  padding: 44px 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 30px;
  align-items: start;
}

.footer-logo {
  width: 160px;
  max-height: 68px;
  object-fit: contain;
  padding: 6px 10px;
  border-radius: 12px;
  background: #fff;
}

.site-footer h2,
.site-footer h3 {
  margin: 0 0 12px;
  color: #fff;
  font-size: 15px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.site-footer p,
.site-footer address {
  margin: 0 0 8px;
  font-style: normal;
}

.site-footer a {
  color: rgba(255,255,255,0.86);
}

.site-footer a:hover,
.site-footer a:focus {
  color: #fff;
}

.footer-bottom {
  margin-top: 34px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.10);
  color: rgba(255,255,255,0.62);
  font-size: 13px;
  text-align: center;
}

.post-list {
  display: grid;
  gap: 22px;
}

.post-card {
  padding: 26px;
  border: 1px solid var(--masped-border);
  border-radius: var(--masped-radius);
  background: #fff;
}

.post-card h2 {
  margin-top: 0;
}

.search-form {
  display: flex;
  gap: 10px;
}

.search-form input[type="search"] {
  flex: 1;
  min-height: 44px;
  border: 1px solid var(--masped-border);
  border-radius: 999px;
  padding: 0 16px;
}

.search-form button {
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  padding: 0 18px;
  background: var(--masped-blue);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

@media (max-width: 980px) {
  .content-layout {
    grid-template-columns: 1fr;
  }

  .sidebar-card {
    position: static;
  }

  .contact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 760px) {
  .admin-bar .site-header {
    top: 46px;
  }

  .header-inner {
    min-height: 72px;
  }

  .site-logo {
    width: 145px;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .primary-navigation {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    padding: 12px 20px 22px;
    border-bottom: 1px solid var(--masped-border);
    background: #fff;
    box-shadow: 0 18px 30px rgba(15, 23, 42, 0.10);
  }

  .primary-navigation.is-open {
    display: block;
  }

  .primary-navigation ul {
    display: grid;
    gap: 6px;
  }

  .primary-navigation a {
    width: 100%;
    justify-content: center;
  }

  .page-title-bar .masped-container {
    min-height: 82px;
    display: block;
    padding-top: 22px;
    padding-bottom: 18px;
  }

  .breadcrumbs {
    margin-top: 6px;
  }

  .masped-container {
    width: min(var(--masped-container), calc(100% - 28px));
  }

  .masped-slider-wrap {
    padding-top: 24px;
  }

  .slider-arrow {
    display: none;
  }

  .slide-caption {
    right: 24px;
  }

  .contact-grid,
  .country-list,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .country-item:nth-child(n) {
    background: #fff;
  }

  .country-item:nth-child(even) {
    background: #f8fbfc;
  }

  .country-item:nth-last-child(2) {
    border-bottom: 1px solid var(--masped-border);
  }

  .map-frame {
    min-height: 300px;
  }
}
