/**
 * Theme Name: PCM-CMM Theme
 * Description: A custom theme for PCM-CMM conference website.
 * Author: PB
 * Version: 1.0.0
 * License: GPL v2 or later
 * License URI: https://www.gnu.org/licenses/gpl-2.0.html
 * Text Domain: pcm-cmm-theme
 * Tags: responsive, custom-colors, custom-menu, featured-images
 * Requires at least: 5.0
 * Tested up to: 6.3
 * Requires PHP: 7.4
 */

/* ===============================================
   PCM-CMM THEME STYLES
   Styles for Bootstrap 5.3.7 integration
   =============================================== */

/* ===============================================
   CSS CUSTOM PROPERTIES (VARIABLES)
   =============================================== */
:root {
  /* Primary Colors */
  --pcm-primary: #1e3a8a; /* Deep blue */
  --pcm-primary-light: #3b82f6; /* Light blue */
  --pcm-primary-dark: #1e293b; /* Dark blue */

  /* Secondary Colors */
  --pcm-secondary: #64748b; /* Gray blue */
  --pcm-accent: #ffa722; /* Amber */
  --pcm-accent-light: #fbbf24; /* Light amber */

  /* Neutral Colors */
  --pcm-gray-50: #f8fafc;
  --pcm-gray-100: #f1f5f9;
  --pcm-gray-200: #e2e8f0;
  --pcm-gray-300: #cbd5e1;
  --pcm-gray-400: #94a3b8;
  --pcm-gray-500: #64748b;
  --pcm-gray-600: #475569;
  --pcm-gray-700: #334155;
  --pcm-gray-800: #1e293b;
  --pcm-gray-900: #0f172a;

  --pcm-text-color: #27282a;

  /* Typography */
  --pcm-font-family: "Aleo", system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif,
    "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  --pcm-font-monospace: SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", "Courier New", monospace;
  --pcm-font-size-base: 1rem;
  --pcm-line-height-base: 1.5;

  /* Spacing */
  --pcm-section-padding: 4rem 0;
  --pcm-container-padding: 1rem;

  /* Content width variables for align-wide and align-full support */
  --pcm-content-width: 768px;
  --pcm-wide-width: 1140px;
  --pcm-full-width: 100vw;

  /* Border Radius */
  --pcm-border-radius: 0.5rem;
  --pcm-border-radius-lg: 1rem;

  /* Shadows */
  --pcm-shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --pcm-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --pcm-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1),
    0 4px 6px -4px rgb(0 0 0 / 0.1);
  --pcm-shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1),
    0 8px 10px -6px rgb(0 0 0 / 0.1);

  /* Sponsor border colors */
  --pcm-sponsor-border-platinum: #bfd8ff;
  --pcm-sponsor-border-gold: #fbbc43;
  --pcm-sponsor-border-silver: #e0e0e0;
}

/* ===============================================
   GLOBAL STYLES
   =============================================== */
body {
  font-family: var(--pcm-font-family);
  line-height: var(--pcm-line-height-base);
  color: var(--pcm-gray-700);
  background-color: #ffffff;
  overflow-x: hidden;
}

/* Improve typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 600;
  line-height: 1.2;
  color: var(--pcm-gray-800);
  margin-bottom: 1rem;
}

h1 {
  font-size: 2.5rem;
}
h2 {
  font-size: 2rem;
}
h3 {
  font-size: 1.75rem;
}
h4 {
  font-size: 1.5rem;
}
h5 {
  font-size: 1.25rem;
}
h6 {
  font-size: 1.125rem;
}

/* Links */
a {
  color: var(--pcm-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--pcm-primary-light);
  text-decoration: underline;
}

/* ===============================================
   NAVIGATION STYLES
   =============================================== */
.main-navigation {
  background: rgba(245, 245, 245, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--pcm-accent);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: all 0.3s ease;
}

.main-navigation .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem var(--pcm-container-padding);
}

.nav-menu {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 2rem;
}

.nav-menu li a {
  color: var(--pcm-gray-700);
  font-weight: 500;
  padding: 0.5rem 0;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
}

.nav-menu li a:hover,
.nav-menu li.current-menu-item a {
  color: var(--pcm-primary);
  border-bottom-color: var(--pcm-primary);
  text-decoration: none;
}

.nav-link.dropdown-toggle {
  font-weight: 700;
}

/* Mobile menu toggle */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--pcm-gray-700);
  cursor: pointer;
}

@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: block;
  }

  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    flex-direction: column;
    padding: 1rem;
    box-shadow: var(--pcm-shadow-lg);
    border-top: 1px solid var(--pcm-gray-200);
  }

  .nav-menu.active {
    display: flex;
  }
}

/* ===============================================
   HERO SECTION
   =============================================== */
.hero-section {
  background: linear-gradient(
    135deg,
    var(--pcm-primary) 0%,
    var(--pcm-primary-dark) 100%
  );
  color: white;
  padding: 6rem 0;
  position: relative;
  overflow: hidden;
  background-size: cover;
  background-position: fixed;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

.hero-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><polygon fill="rgba(255,255,255,0.05)" points="0,1000 1000,0 1000,1000"/></svg>');
  background-size: cover;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  background: rgba(0, 0, 0, 0.3);
  padding: 3em 0;
}

.hero-title {
  color: white;
  font-size: 4rem;
  font-weight: 700;
  margin-bottom: 1rem;

  text-shadow: 0 2px 2px rgba(0, 0, 0, 0.5);
}

.hero-subtitle {
  font-size: 1.6rem;
  margin-bottom: 2rem;
  opacity: 0.9;
  margin-left: auto;
  margin-right: auto;
  text-shadow: 0 2px 2px rgba(0, 0, 0, 0.5);
}

.hero-meta {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
  text-shadow: 0 2px 2px rgba(0, 0, 0, 0.5);
}

.hero-meta-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 2.4rem;
  font-weight: 500;
}


.hero-cta {
  margin-top: 2rem;
}

@media (max-width: 768px) {
  .hero-content{
    padding: 2rem 1rem;
  }
  .hero-title {
    font-size: 2.5rem;
  }

  .hero-meta {
    flex-direction: column;
    gap: 1rem;
  }
  .hero-meta-item {
    font-size: 1.8rem;
  }
}

/* ===============================================
   BUTTON STYLES (Bootstrap overrides)
   =============================================== */
.btn-primary {
  background-color: var(--pcm-primary);
  border-color: var(--pcm-primary);
  border-radius: var(--pcm-border-radius);
  font-weight: 600;
  padding: 0.75rem 2rem;
  transition: all 0.2s ease;
}

.btn-primary:hover {
  background-color: var(--pcm-primary-light);
  border-color: var(--pcm-primary-light);
  transform: translateY(-1px);
  box-shadow: var(--pcm-shadow-lg);
}

.btn-outline-primary {
  color: var(--pcm-primary);
  border-color: var(--pcm-primary);
  border-radius: var(--pcm-border-radius);
  font-weight: 600;
  padding: 0.75rem 2rem;
}

.btn-outline-primary:hover {
  background-color: var(--pcm-primary);
  border-color: var(--pcm-primary);
}

/* ===============================================
   CARD STYLES (Bootstrap overrides)
   =============================================== */
.card {
  border: none;
  border-radius: var(--pcm-border-radius-lg);
  box-shadow: var(--pcm-shadow);
  transition: all 0.3s ease;
  overflow: hidden;
}

.card:hover {
  box-shadow: var(--pcm-shadow-xl);
  transform: translateY(-2px);
}

.card-header {
  background-color: var(--pcm-gray-50);
  border-bottom: 1px solid var(--pcm-gray-200);
  font-weight: 600;
}

/* ===============================================
   SECTION STYLES
   =============================================== */
.section {
  padding: var(--pcm-section-padding);
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--pcm-gray-800);
  margin-bottom: 1rem;
}

.section-subtitle,
.page-content-inner .section-subtitle {
  font-size: 1.2rem;
  color: var(--pcm-gray-800);
  margin: 0 auto;
}

/* Alternate section backgrounds */
.section-alt {
  background-color: var(--pcm-gray-50);
}

/* ===============================================
   ORGANIZER & SPONSOR STYLES
   =============================================== */
.organizer-card,
.sponsor-card {
  text-align: center;
  padding: 2rem;
  background: white;
  border-radius: var(--pcm-border-radius-lg);
  box-shadow: var(--pcm-shadow);
  transition: all 0.3s ease;
  height: 100%;
}

.organizer-card:hover,
.sponsor-card:hover {
  box-shadow: var(--pcm-shadow-xl);
  transform: translateY(-4px);
}

.organizer-logo,
.sponsor-logo {
  max-width: 150px;
  max-height: 80px;
  object-fit: contain;
  margin-bottom: 1rem;
}

.sponsor-type {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: var(--pcm-border-radius);
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.sponsor-type.main {
  background-color: var(--pcm-accent);
  color: white;
}
.sponsor-type.platinum {
  background-color: #e5e7eb;
  color: var(--pcm-gray-700);
}
.sponsor-type.gold {
  background-color: #fbbf24;
  color: white;
}
.sponsor-type.silver {
  background-color: #d1d5db;
  color: var(--pcm-gray-700);
}

.page-content .entry-content > p {
  font-size: 1.6rem;
}

/* ===============================================
   FOOTER STYLES
   =============================================== */
.site-footer {
  background-color: var(--pcm-gray-800);
  color: var(--pcm-gray-300);
  padding: 3rem 0 1rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h4 {
  color: white;
  margin-bottom: 1rem;
}

.footer-section ul {
  list-style: none;
  padding: 0;
}

.footer-section ul li {
  margin-bottom: 0.5rem;
}

.footer-section ul li a {
  color: var(--pcm-gray-300);
  transition: color 0.2s ease;
}

.footer-section ul li a:hover {
  color: white;
  text-decoration: none;
}

.footer-bottom {
  border-top: 1px solid var(--pcm-gray-700);
  padding-top: 1rem;
  text-align: center;
  color: var(--pcm-gray-400);
}

/* ===============================================
   UTILITY CLASSES
   =============================================== */
.text-primary {
  color: var(--pcm-primary) !important;
}
.bg-primary {
  background-color: var(--pcm-primary) !important;
}
.border-primary {
  border-color: var(--pcm-primary) !important;
}

.text-accent {
  color: var(--pcm-accent) !important;
}
.bg-accent {
  background-color: var(--pcm-accent) !important;
}

/* Spacing utilities */
.py-section {
  padding-top: 4rem;
  padding-bottom: 4rem;
}
.my-section {
  margin-top: 4rem;
  margin-bottom: 4rem;
}

/* ===============================================
   RESPONSIVE DESIGN
   =============================================== */
@media (max-width: 1200px) {
  .section-title {
    font-size: 2.25rem;
  }
  .hero-title {
    font-size: 3.5rem;
  }
}

@media (max-width: 992px) {
  .section-title {
    font-size: 2rem;
  }
  .hero-title {
    font-size: 3rem;
  }
  .section {
    padding: 3rem 0;
  }
}

@media (max-width: 768px) {
  .section-title {
    font-size: 1.75rem;
  }
  .hero-title {
    font-size: 2.5rem;
  }
  .section {
    padding: 2rem 0;
  }

  .organizer-card,
  .sponsor-card {
    padding: 1.5rem;
  }
}

@media (max-width: 576px) {
  .hero-title {
    font-size: 2rem;
  }
  .section-title {
    font-size: 1.5rem;
  }

  .hero-cta .btn-primary,
  .hero-cta .btn-light,
  .hero-cta .btn-outline-primary {
    display: block;
    width: 100%;
    margin-bottom: 1rem;
  }
}

/* ===============================================
   WORDPRESS SPECIFIC STYLES
   =============================================== */
.wp-block-group {
  margin-bottom: 2rem;
}

.wp-block-heading {
  margin-bottom: 1rem;
}

.wp-block-paragraph {
  margin-bottom: 1rem;
}

/* WordPress image alignment */
.alignleft {
  float: left;
  margin-right: 1rem;
  margin-bottom: 1rem;
}

.alignright {
  float: right;
  margin-left: 1rem;
  margin-bottom: 1rem;
}

.aligncenter {
  display: block;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 1rem;
}

/* WordPress gallery styles */
.wp-block-gallery {
  margin-bottom: 2rem;
}

.wp-block-gallery .wp-block-image {
  margin-bottom: 1rem;
}

/* ===============================================
   ACCESSIBILITY IMPROVEMENTS
   =============================================== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus styles */
*:focus {
  outline: 2px solid var(--pcm-primary);
  outline-offset: 2px;
}

/* Skip to content link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--pcm-primary);
  color: white;
  padding: 8px 16px;
  text-decoration: none;
  z-index: 100000;
  border-radius: var(--pcm-border-radius);
}

.skip-link:focus {
  top: 6px;
  text-decoration: none;
  color: white;
}

/* ===============================================
   PRINT STYLES
   =============================================== */
@media print {
  .main-navigation,
  .hero-section,
  .mobile-menu-toggle {
    display: none;
  }

  body {
    font-size: 12pt;
    line-height: 1.5;
    color: black;
  }

  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    color: black;
    page-break-after: avoid;
  }

  .section {
    padding: 1rem 0;
  }
}

.fullwidth-content {
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  padding: 0;
  box-sizing: border-box;
  margin: 0 auto;
}

/* ===============================================
   GUTENBERG BLOCK ALIGNMENTS
   Wide and Full width support
   =============================================== */

/* Base content container */
.entry-content,
.content-body {
  max-width: var(--pcm-content-width);
  margin: 0 auto;
}

/* Wide alignment */
.alignwide {
  width: var(--pcm-wide-width);
  max-width: var(--pcm-wide-width);
  margin-left: auto;
  margin-right: auto;
  clear: both;
}

/* Full alignment */
.alignfull {
  width: var(--pcm-full-width);
  max-width: var(--pcm-full-width);
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  clear: both;
}

/* Responsive adjustments for wide alignment */
@media (max-width: 1200px) {
  .alignwide {
    width: calc(100vw - 2rem);
    max-width: calc(100vw - 2rem);
    margin-left: calc(50% - 50vw + 1rem);
    margin-right: calc(50% - 50vw + 1rem);
  }
}

@media (max-width: 768px) {
  .alignwide {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
  }
}

/* Ensure blocks inside containers work properly */
.entry-content .alignwide,
.content-body .alignwide {
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  width: var(--pcm-wide-width);
  max-width: var(--pcm-wide-width);
}

.entry-content .alignfull,
.content-body .alignfull {
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  max-width: 100vw;
}

@media (max-width: 1200px) {
  .entry-content .alignwide,
  .content-body .alignwide {
    width: calc(100vw - 2rem);
    max-width: calc(100vw - 2rem);
  }
}

@media (max-width: 768px) {
  .entry-content .alignwide,
  .content-body .alignwide {
    left: 0;
    transform: none;
    width: 100%;
    max-width: 100%;
  }

  .entry-content .alignfull,
  .content-body .alignfull {
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    max-width: 100vw;
  }
}

/* Specific block adjustments */
.wp-block-group.alignwide,
.wp-block-cover.alignwide,
.wp-block-columns.alignwide,
.wp-block-gallery.alignwide,
.wp-block-image.alignwide {
  padding-left: 1rem;
  padding-right: 1rem;
}

.wp-block-group.alignfull,
.wp-block-cover.alignfull,
.wp-block-columns.alignfull,
.wp-block-gallery.alignfull,
.wp-block-image.alignfull {
  padding-left: 2rem;
  padding-right: 2rem;
}

@media (max-width: 768px) {
  .wp-block-group.alignfull,
  .wp-block-cover.alignfull,
  .wp-block-columns.alignfull,
  .wp-block-gallery.alignfull,
  .wp-block-image.alignfull {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

/* Additional blocks support */
.wp-block-media-text.alignwide,
.wp-block-latest-posts.alignwide,
.wp-block-embed.alignwide {
  max-width: var(--pcm-wide-width);
}

.wp-block-media-text.alignfull,
.wp-block-latest-posts.alignfull,
.wp-block-embed.alignfull {
  max-width: var(--pcm-full-width);
}

/* Image alignment adjustments */
.wp-block-image.alignwide img,
.wp-block-image.alignfull img {
  width: 100%;
  height: auto;
}

/* Gallery adjustments */
.wp-block-gallery.alignwide,
.wp-block-gallery.alignfull {
  margin-bottom: 2rem;
}

/* Cover block adjustments */
.wp-block-cover.alignwide,
.wp-block-cover.alignfull {
  margin-bottom: 2rem;
}

/* Group block adjustments */
.wp-block-group.alignwide .wp-block-group__inner-container,
.wp-block-group.alignfull .wp-block-group__inner-container {
  max-width: var(--pcm-content-width);
  margin: 0 auto;
  padding: 0 1rem;
}

.navbar-expand-lg .navbar-nav .nav-link {
  white-space: nowrap;
  padding: 0.5em 20px;
}

/* Sponsor cards (poprawione: brak zagnieżdżonych reguł) */
.platinum-sponsor,
.gold-sponsor,
.silver-sponsor {
  padding: 1em 1.5em;
  border: 1px solid var(--pcm-gray-200);
  border-radius: var(--pcm-border-radius);
  background: white;
  box-shadow: var(--pcm-shadow-sm);
  transition: all 0.3s ease;
  li::marker {
    font-size: 0;
  }
}

/* Ustawienia li w blokach sponsorów — dopasuj wysokość linii, aby marker był wycentrowany na pierwszej linii tekstu */
.platinum-sponsor li,
.gold-sponsor li,
.silver-sponsor li {
  line-height: 1.2; /* dopasuj jeśli potrzeba */
  margin-bottom: 0.5em;
  position: relative;
}

/* Stylowanie markerów: kropka 10px, jednolity glyph '•' i wycentrowanie względem pierwszej linii */
.platinum-sponsor li::before,
.gold-sponsor li::before,
.silver-sponsor li::before {
  position: absolute;
  left: -2.5em; /* dostosuj w razie potrzeby */
  top: 0.2em; /* dostosuj w razie potrzeby */
  content: "✓"; /* check ikona */
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  background-color: var(--pcm-gray-200) !important;
  border-radius: 50%;
  color: #fff;
  font-size: 12px;
  line-height: 1;
}

/* Kolory brzegów i markerów specyficzne dla typów sponsorów */
.platinum-sponsor {
  border-color: var(--pcm-sponsor-border-platinum) !important;
}
.platinum-sponsor li::before {
  background-color: var(--pcm-sponsor-border-platinum) !important;
}

.gold-sponsor {
  border-color: var(--pcm-sponsor-border-gold) !important;
}
.gold-sponsor li::before {
  background-color: var(--pcm-sponsor-border-gold) !important;
}

.silver-sponsor {
  border-color: var(--pcm-sponsor-border-silver) !important;
}
.silver-sponsor li::before {
  background-color: var(--pcm-sponsor-border-silver) !important;
}

.accordion-header .accordion-button {
  font-size: inherit;
  font-weight: 600;
  color: var(--pcm-gray-800);
}
