/*
Theme Name:  CMC Silesia
Theme URI:   https://cmcsilesia.sum.edu.pl
Description: CMC_Silesia — Centrum Medycyny Cyfrowej SILESIA. Classic PHP theme, WCAG 2.1 AA.
Author:      Śląski Uniwersytet Medyczny w Katowicach
Version:     2.0.0
Requires at least: 6.4
Requires PHP: 8.0
Text Domain: cmc-silesia
*/

/* ─────────────────────────────────────────────────────────
   GOOGLE FONTS są ładowane przez enqueue.php (preconnect)
   Tutaj tylko @font-face fallback hint
   ───────────────────────────────────────────────────────── */

/* ─────────────────────────────────────────────────────────
   RESET
   ───────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
body { font-family: 'Inter', system-ui, sans-serif; color: #1a2a3a; background: #fff; overflow-x: hidden; -webkit-font-smoothing: antialiased; }
img, svg, video { display: block; max-width: 100%; height: auto; }
ul, ol { list-style: none; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }
a { color: #127A60; text-decoration: none; }
a:hover { color: #0A5A47; }
a:focus-visible { outline: 3px solid #3FC9A8; outline-offset: 2px; border-radius: 4px; }
:focus-visible { outline: 3px solid #3FC9A8; outline-offset: 2px; }
.site-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.site-main { flex: 1 0 auto; }
.site-footer { flex-shrink: 0; }

/* ─────────────────────────────────────────────────────────
   TOKENS — z Lovable styles.css (oklch → hex)
   brand-teal   #127A60
   brand-navy   #0E3A52
   brand-mint   #3FC9A8
   brand-mint-bg #E6F5F0
   ───────────────────────────────────────────────────────── */
:root {
  --teal:         #127A60;
  --teal-dark:    #0A5A47;
  --teal-bright:  #1B9B7A;
  --mint:         #3FC9A8;
  --navy:         #0E3A52;
  --navy-dark:    #071F2E;
  --mint-bg:      #E6F5F0;
  --white:        #ffffff;
  --foreground:   #1a2a3a;
  --muted-fg:     #3D5162;
  --border:       #C8EDE5;
  --gray-100:     #F0F4F7;
  --gray-200:     #DDE5EC;

  /* Gradient hero — z Lovable */
  --gradient-hero:   linear-gradient(135deg, #0E3A52 0%, #1B5E78 60%, #127A60 100%);
  --gradient-accent: linear-gradient(135deg, #127A60, #3FC9A8);

  /* Shadows */
  --shadow-elegant: 0 20px 50px -20px rgba(14,58,82,.35);
  --shadow-card:    0 10px 30px -15px rgba(18,122,96,.25);

  /* Radius — z Lovable (base 0.625rem) */
  --r-sm:  0.375rem;
  --r-md:  0.5rem;
  --r-lg:  0.625rem;
  --r-xl:  0.875rem;
  --r-2xl: 1rem;
  --r-3xl: 1.25rem;
  --r-4xl: 1.5rem;

  /* Transitions */
  --tr: 200ms ease;
}

/* ─────────────────────────────────────────────────────────
   TYPOGRAPHY
   ───────────────────────────────────────────────────────── */
h1,h2,h3,h4,h5,h6 { font-family: 'Outfit', system-ui, sans-serif; letter-spacing: -0.02em; color: #0E3A52; line-height: 1.2; }
p { line-height: 1.7; color: #3D5162; }
strong { color: #0E3A52; font-weight: 700; }

/* ─────────────────────────────────────────────────────────
   LAYOUT
   ───────────────────────────────────────────────────────── */
.container { width: 100%; max-width: 1280px; margin-inline: auto; padding-inline: 1rem; }
@media (min-width: 768px) { .container { padding-inline: 1.5rem; } }

/* ─────────────────────────────────────────────────────────
   SKIP LINK (screen reader / keyboard only)
   ───────────────────────────────────────────────────────── */
.skip-link {
  position: absolute; top: -100px; left: 16px;
  background: var(--teal); color: #fff;
  padding: 10px 20px; border-radius: 0 0 8px 8px;
  font-family: 'Outfit', sans-serif; font-weight: 700; font-size: 14px;
  z-index: 9999; transition: top .15s; text-decoration: none;
}
.skip-link:focus { top: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

/* ─────────────────────────────────────────────────────────
   SITE HEADER
   Lovable: bg-secondary = #0E3A52, h-20 (80px), sticky
   ───────────────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 200;
  height: 80px;
  background: #0E3A52;
  box-shadow: none;
  transition: box-shadow var(--tr);
}
.site-header.is-scrolled { box-shadow: 0 4px 20px rgba(7,31,46,.25); }
.header-inner {
  height: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}

/* Logo link */
.header-logo-link { display: flex; align-items: center; gap: 12px; text-decoration: none; flex-shrink: 0; }
.header-logo-link:focus-visible { outline: 2px solid #3FC9A8; outline-offset: 2px; border-radius: 6px; }

/* White box — bg-white rounded-md p-1.5 shadow */
.header-logo-box {
  background: #ffffff; border-radius: var(--r-md); padding: 6px 10px;
  box-shadow: 0 2px 8px rgba(14,58,82,.20); flex-shrink: 0; display: flex; align-items: center; line-height: 0;
}
.header-logo-img { height: 36px; width: auto; display: block; }
.header-logo-fallback { font-family: 'Outfit', sans-serif; font-weight: 800; color: #0E3A52; font-size: 18px; }

/* Text next to logo — hidden < md */
.header-logo-text { display: flex; flex-direction: column; line-height: 1.25; }
.header-logo-name { font-family: 'Outfit', sans-serif; font-weight: 600; font-size: 14px; color: #fff; letter-spacing: .025em; white-space: nowrap; }
.header-logo-sub  { font-size: 12px; color: rgba(255,255,255,.65); white-space: nowrap; }
@media (max-width: 767px) { .header-logo-text { display: none; } }

/* Navigation */
.site-navigation { display: flex; align-items: center; }
.nav-menu { display: flex; align-items: center; gap: 4px; list-style: none; }
.nav-menu > li > a { display: block; padding: 8px 12px; font-family: 'Outfit', sans-serif; font-size: 14px; font-weight: 500; color: rgba(255,255,255,.85); text-decoration: none; border-radius: var(--r-md); transition: color var(--tr), background var(--tr); white-space: nowrap; }
.nav-menu > li > a:hover, .nav-menu > li.current-menu-item > a { color: #fff; background: rgba(255,255,255,.10); }
.nav-menu > li > a:focus-visible { outline: 2px solid #3FC9A8; }

/* Mobile hamburger */
.nav-toggle { display: none; flex-direction: column; justify-content: space-between; width: 24px; height: 18px; background: none; border: none; cursor: pointer; padding: 0; flex-shrink: 0; }
.nav-toggle-bar { display: block; width: 100%; height: 2px; background: #fff; border-radius: 99px; transform-origin: center; transition: transform .2s, opacity .15s; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* CTA button — bg-gradient-accent text-secondary */
.header-cta {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 8px 16px; font-family: 'Outfit', sans-serif; font-size: 14px; font-weight: 600;
  color: #0E3A52; background: var(--gradient-accent);
  border-radius: var(--r-md); text-decoration: none; white-space: nowrap; flex-shrink: 0;
  transition: opacity var(--tr), transform var(--tr);
}
.header-cta:hover { opacity: .88; transform: translateY(-1px); color: #0E3A52; }
.header-cta:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

@media (max-width: 900px) {
  .site-header { height: 64px; }
  .nav-toggle { display: flex; }
  .header-cta { display: none; }
  .nav-menu {
    position: fixed; inset: 64px 0 0 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #071F2E; padding: 24px;
    transform: translateX(105%); transition: transform .35s cubic-bezier(.25,.46,.45,.94);
    z-index: 300; overflow-y: auto;
  }
  .nav-menu.is-open { transform: translateX(0); }
  .nav-menu > li > a { padding: 14px 16px; font-size: 18px; border-bottom: 1px solid rgba(255,255,255,.06); border-radius: 0; }
}

/* ─────────────────────────────────────────────────────────
   FOOTER — bg-secondary = #0E3A52
   ───────────────────────────────────────────────────────── */
.site-footer { background: #0E3A52; color: rgba(255,255,255,.75); }
.footer-top { padding: 64px 0; border-bottom: 1px solid rgba(255,255,255,.08); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.5fr; gap: 40px; align-items: start; }
@media (max-width: 1024px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px)  { .footer-grid { grid-template-columns: 1fr; } }

/* Logo w stopce — biały box */
.footer-logo-box { display: inline-block; background: #fff; padding: 8px 12px; border-radius: var(--r-md); margin-bottom: 16px; }
.footer-logo-img { height: 36px; width: auto; display: block; }
.footer-brand-name { font-family: 'Outfit', sans-serif; font-weight: 800; color: #fff; font-size: 18px; display: block; margin-bottom: 16px; text-decoration: none; }
.footer-brand-desc { font-size: 14px; color: rgba(255,255,255,.70); line-height: 1.6; max-width: 280px; margin: 0; }

.footer-col__title { font-family: 'Outfit', sans-serif; font-weight: 600; font-size: 16px; color: #fff; margin-bottom: 16px; }

/* Nav list */
.footer-nav-list { list-style: none; }
.footer-nav-list li { margin-bottom: 8px; }
.footer-nav-list a { font-size: 14px; color: rgba(255,255,255,.70); text-decoration: none; transition: color var(--tr); }
.footer-nav-list a:hover { color: #3FC9A8; }

/* Address */
.footer-address { font-style: normal; }
.footer-address__row { font-size: 14px; color: rgba(255,255,255,.70); margin-bottom: 8px; line-height: 1.5; }
.footer-address__row a { color: rgba(255,255,255,.70); transition: color var(--tr); }
.footer-address__row a:hover { color: #3FC9A8; }

/* Financing */
.footer-funding-text { font-size: 14px; color: rgba(255,255,255,.70); line-height: 1.6; margin-bottom: 20px; }
.footer-funding-text strong { color: #fff; }

/* Social buttons */
.footer-social { display: flex; gap: 12px; }
.footer-social-btn { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.10); color: rgba(255,255,255,.75); text-decoration: none; transition: background var(--tr), color var(--tr); }
.footer-social-btn:hover { background: #127A60; color: #fff; }
.footer-social-btn svg { width: 16px; height: 16px; }

/* Footer bottom */
.footer-bottom { padding: 20px 0; }
.footer-bottom__inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.footer-bottom__copy { font-size: 12px; color: rgba(255,255,255,.45); }
.footer-bottom__links { display: flex; gap: 20px; list-style: none; flex-wrap: wrap; }
.footer-bottom__links a { font-size: 12px; color: rgba(255,255,255,.45); text-decoration: none; transition: color var(--tr); }
.footer-bottom__links a:hover { color: #3FC9A8; }

/* ─────────────────────────────────────────────────────────
   WORDPRESS CORE
   ───────────────────────────────────────────────────────── */
.alignleft  { float: left;  margin: 0 24px 16px 0; }
.alignright { float: right; margin: 0 0 16px 24px; }
.aligncenter { text-align: center; }
@media (max-width: 600px) { .alignleft, .alignright { float: none; margin: 0 0 16px; } }

.gallery { display: grid; gap: 16px; }
.gallery-columns-2 { grid-template-columns: repeat(2,1fr); }
.gallery-columns-3 { grid-template-columns: repeat(3,1fr); }
@media (max-width: 600px) { .gallery-columns-3 { grid-template-columns: repeat(2,1fr); } }
.gallery-item img { border-radius: var(--r-lg); }

/* Pagination */
.nav-links { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 48px; flex-wrap: wrap; }
.page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; padding: 0 12px; font-family: 'Outfit', sans-serif; font-size: 14px; font-weight: 600; border-radius: var(--r-md); text-decoration: none; color: #1a2a3a; background: var(--gray-100); border: 1px solid var(--gray-200); transition: background var(--tr), color var(--tr); }
.page-numbers.current, .page-numbers:hover { background: #127A60; color: #fff; border-color: #127A60; }

/* Breadcrumb */
.breadcrumb { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 14px; color: #8899AA; padding-block: 12px; }
.breadcrumb a { color: #127A60; }
.breadcrumb__sep { color: #BCC9D4; }

/* ─────────────────────────────────────────────────────────
   PAGE HERO (wewnętrzne strony)
   ───────────────────────────────────────────────────────── */
.page-hero { background: var(--gradient-hero); padding: 80px 0 48px; position: relative; overflow: hidden; }
.page-hero::before { content: ''; position: absolute; inset: 0; background-image: radial-gradient(circle at 1px 1px, rgba(63,201,168,.08) 1px, transparent 0); background-size: 32px 32px; pointer-events: none; }
.page-hero__content { position: relative; z-index: 1; }
.page-hero__eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #3FC9A8; margin-bottom: 12px; }
.page-hero__title { color: #fff; font-size: clamp(32px, 4vw, 56px); margin-bottom: 16px; }
.page-hero__desc { font-size: 18px; color: rgba(255,255,255,.75); max-width: 60ch; line-height: 1.6; }

/* ─────────────────────────────────────────────────────────
   UTIL
   ───────────────────────────────────────────────────────── */
.text-center { text-align: center; }
.section-label { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #127A60; margin-bottom: 12px; }

/* ─────────────────────────────────────────────────────────
   PRINT
   ───────────────────────────────────────────────────────── */
@media print {
  .site-header, .site-footer, .wcag-widget { display: none !important; }
  body { font-size: 11pt; color: #000; }
  a::after { content: " (" attr(href) ")"; font-size: .75em; }
}
