/* ===== Portia6 Theme — Dark ===== */
/* CSS proměnné přepíše layout.php ze settings */
:root {
  --p6-primary:   #4f8ef7;
  --p6-primary-l: #7fb0ff;
  --p6-primary-d: #2563eb;
  --p6-accent:    #f5c542;
  --p6-accent-l:  #ffe080;
  --p6-accent-d:  #d4a017;
  --p6-bg:        #07070f;
  --p6-bg2:       #0d0d1a;
  --p6-bg3:       #12121f;
  --p6-text:      #e2e8f0;
  --p6-dim:       #94a3b8;
  --p6-border:    rgba(255,255,255,0.08);
  --p6-glass:     rgba(255,255,255,0.04);
  --p6-radius:    14px;
}

/* ===== BASE ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--p6-bg);
  color: var(--p6-text);
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--p6-bg); }
::-webkit-scrollbar-thumb { background: var(--p6-primary-d); border-radius: 3px; }

/* ===== LAYOUT ===== */
.p6-container { max-width: 1160px; margin: 0 auto; padding: 0 24px; }

/* ===== NAV ===== */
.p6-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  transition: background .3s, border-color .3s;
}
.p6-nav--solid {
  background: rgba(7,7,15,.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--p6-border);
}
.p6-nav-inner {
  max-width: 1160px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.p6-brand {
  display: flex; align-items: center; gap: 10px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.25rem; font-weight: 700;
  color: var(--p6-text);
}
.p6-brand img { height: 36px; width: auto; border-radius: 6px; }
.p6-brand-icon {
  width: 32px; height: 32px; border-radius: 8px;
  background: linear-gradient(135deg, var(--p6-primary), var(--p6-primary-d));
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem; font-weight: 800; color: #fff;
  flex-shrink: 0;
}
.p6-nav-links {
  display: flex; list-style: none; gap: 28px; margin: 0; padding: 0;
  align-items: center;
}
.p6-nav-links a {
  font-size: .88rem; font-weight: 500; color: var(--p6-dim);
  transition: color .2s;
}
.p6-nav-links a:hover,
.p6-nav-links a.active { color: var(--p6-text); }
.p6-nav-toggle {
  display: none; flex-direction: column; gap: 5px; cursor: pointer;
  background: none; border: none; padding: 4px;
}
.p6-nav-toggle span {
  width: 22px; height: 2px; background: var(--p6-text); border-radius: 2px;
  display: block; transition: transform .3s;
}

/* ===== BUTTON ===== */
.p6-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 24px; border-radius: 100px;
  font-size: .87rem; font-weight: 600; cursor: pointer;
  transition: all .2s; border: none; text-decoration: none;
}
.p6-btn-primary {
  background: linear-gradient(135deg, var(--p6-primary), var(--p6-primary-d));
  color: #fff;
}
.p6-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(79,142,247,.4); color: #fff; }
.p6-btn-accent {
  background: linear-gradient(135deg, var(--p6-accent), var(--p6-accent-d));
  color: #0a0a0a;
}
.p6-btn-accent:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(245,197,66,.4); color: #0a0a0a; }
.p6-btn-ghost {
  background: transparent; color: var(--p6-dim);
  border: 1px solid var(--p6-border);
}
.p6-btn-ghost:hover { border-color: rgba(255,255,255,.2); color: var(--p6-text); }
.p6-btn-lg { padding: 14px 36px; font-size: 1rem; }

/* ===== HERO ===== */
.p6-hero {
  min-height: 100vh; position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  padding: 120px 24px 80px;
}
#p6-canvas {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
}
.p6-hero-glow-1 {
  position: absolute; width: 640px; height: 640px; border-radius: 50%;
  filter: blur(120px); opacity: .18;
  background: radial-gradient(circle, var(--p6-primary), transparent 70%);
  top: -180px; left: -180px; pointer-events: none;
  animation: p6float 8s ease-in-out infinite;
}
.p6-hero-glow-2 {
  position: absolute; width: 480px; height: 480px; border-radius: 50%;
  filter: blur(100px); opacity: .14;
  background: radial-gradient(circle, var(--p6-accent), transparent 70%);
  bottom: -80px; right: -80px; pointer-events: none;
  animation: p6float 10s ease-in-out infinite reverse;
}
@keyframes p6float {
  0%,100% { transform: translate(0,0) scale(1); }
  50%      { transform: translate(30px,20px) scale(1.08); }
}
.p6-hero-content {
  position: relative; z-index: 2;
  text-align: center; max-width: 820px; width: 100%;
}
.p6-hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(245,197,66,.1); border: 1px solid rgba(245,197,66,.3);
  color: var(--p6-accent-l); font-size: .78rem; font-weight: 600;
  padding: 6px 16px; border-radius: 100px; margin-bottom: 28px;
  letter-spacing: .06em;
}
.p6-hero-badge-dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--p6-accent);
  animation: p6pulse 2s ease-in-out infinite;
}
@keyframes p6pulse {
  0%,100% { opacity:1; transform:scale(1); }
  50%      { opacity:.5; transform:scale(.8); }
}
.p6-hero-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2.6rem, 7vw, 5rem);
  font-weight: 800; line-height: 1.1; margin-bottom: 20px;
  color: var(--p6-text);
}
.p6-hero-title .p6-grad-primary {
  background: linear-gradient(90deg, var(--p6-primary-l), var(--p6-primary));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.p6-hero-title .p6-grad-accent {
  background: linear-gradient(90deg, var(--p6-accent), var(--p6-accent-l));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.p6-hero-sub {
  font-size: clamp(.95rem, 2.5vw, 1.15rem); color: var(--p6-dim);
  max-width: 580px; margin: 0 auto 36px; line-height: 1.75;
}
.p6-hero-actions {
  display: flex; align-items: center; justify-content: center;
  gap: 14px; flex-wrap: wrap;
}

/* Hero malý (podstránky) */
.p6-hero--sm {
  min-height: 220px; padding: 100px 24px 36px; align-items: flex-end;
}
.p6-hero--sm .p6-hero-content { text-align: left; max-width: 100%; }
.p6-hero--sm .p6-hero-title {
  font-size: clamp(1.6rem, 4vw, 2.4rem); margin-bottom: 0;
}

/* ===== SECTION ===== */
.p6-section { padding: 80px 0; }
.p6-section--alt { background: var(--p6-bg2); }

/* ===== CARDS ===== */
.p6-card {
  background: var(--p6-glass); border: 1px solid var(--p6-border);
  border-radius: var(--p6-radius); overflow: hidden;
  transition: border-color .2s, transform .2s;
}
.p6-card:hover { border-color: rgba(79,142,247,.3); transform: translateY(-3px); }
.p6-card-img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.p6-card-body { padding: 20px 24px; }
.p6-card-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem; font-weight: 700; margin-bottom: 8px;
  color: var(--p6-text);
}
.p6-card-sub { font-size: .88rem; color: var(--p6-dim); margin-bottom: 12px; }
.p6-card-footer {
  padding: 12px 24px; border-top: 1px solid var(--p6-border);
  font-size: .82rem; color: var(--p6-dim);
  display: flex; justify-content: space-between; align-items: center;
}
.p6-card-link {
  color: var(--p6-primary-l); font-weight: 600; font-size: .85rem;
  transition: color .2s;
}
.p6-card-link:hover { color: var(--p6-primary); }

/* ===== CONTENT ===== */
.p6-content {
  color: var(--p6-text); line-height: 1.75;
}
.p6-content h2,.p6-content h3,.p6-content h4 {
  font-family: 'Space Grotesk', sans-serif; font-weight: 700;
  margin: 1.5em 0 .6em; color: var(--p6-text);
}
.p6-content p { margin: 0 0 1.2em; }
.p6-content a { color: var(--p6-primary-l); text-decoration: underline; }
.p6-content ul, .p6-content ol { padding-left: 1.4em; margin: 0 0 1.2em; }
.p6-content li { margin-bottom: .4em; }
.p6-content img { border-radius: var(--p6-radius); margin: 1.2em 0; }
.p6-content blockquote {
  border-left: 3px solid var(--p6-primary); margin: 1.5em 0;
  padding: 12px 20px; background: var(--p6-glass); border-radius: 0 var(--p6-radius) var(--p6-radius) 0;
  color: var(--p6-dim);
}
.p6-content table { width: 100%; border-collapse: collapse; margin: 1.2em 0; }
.p6-content th, .p6-content td {
  padding: 10px 14px; border: 1px solid var(--p6-border); text-align: left;
}
.p6-content th { background: var(--p6-glass); font-weight: 600; }
.p6-content iframe { max-width: 100%; border-radius: var(--p6-radius); }

/* ===== BACK LINK ===== */
.p6-back { color: var(--p6-dim); font-size: .88rem; transition: color .2s; }
.p6-back:hover { color: var(--p6-text); }
.p6-back::before { content: '← '; }

/* ===== GALLERY GRID ===== */
.lg-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px; margin: 16px 0; border-radius: var(--p6-radius); overflow: hidden;
}
.lg-gallery a { display: block; aspect-ratio: 1; overflow: hidden; }
.lg-gallery a img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.lg-gallery a:hover img { transform: scale(1.06); }
@media (max-width: 576px) {
  .lg-gallery { grid-template-columns: repeat(2, 1fr); }
}

/* Gallery album grid */
.p6-gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px,1fr)); gap: 8px; }
.p6-gallery-thumb { display: block; aspect-ratio: 1; border-radius: 8px; overflow: hidden; }
.p6-gallery-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.p6-gallery-thumb:hover img { transform: scale(1.06); }
.p6-thumb-cap { font-size: .78rem; color: var(--p6-dim); margin-top: 4px; text-align: center; }

/* ===== LIGHTBOX ===== */
.gallery-lightbox {
  position: fixed; inset: 0; background: rgba(0,0,0,.93);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999; cursor: zoom-out;
}
.gallery-lb-inner { position: relative; max-width: 90vw; max-height: 90vh; cursor: default; }
.gallery-lb-inner img { max-width: 90vw; max-height: 82vh; object-fit: contain; border-radius: 8px; display: block; }
.gallery-lb-caption {
  text-align: center; color: #ccc; font-size: .88rem; margin-top: 10px;
  font-family: 'Space Grotesk', sans-serif;
}
.gallery-lb-close,.gallery-lb-prev,.gallery-lb-next {
  position: fixed; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2);
  color: #fff; border-radius: 50%; font-size: 1.3rem; line-height: 1;
  cursor: pointer; transition: background .2s;
}
.gallery-lb-close:hover,.gallery-lb-prev:hover,.gallery-lb-next:hover { background: rgba(255,255,255,.25); }
.gallery-lb-close { top: 20px; right: 20px; width: 40px; height: 40px; }
.gallery-lb-prev  { left: 20px; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; }
.gallery-lb-next  { right: 20px; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; }

/* ===== CONTACT ===== */
.p6-contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
@media (max-width: 768px) { .p6-contact-grid { grid-template-columns: 1fr; } }
.p6-contact-label { font-size: .8rem; color: var(--p6-dim); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 4px; }
.p6-contact-value { color: var(--p6-text); font-weight: 500; }

/* ===== FORM ===== */
.p6-form-group { margin-bottom: 20px; }
.p6-label { display: block; font-size: .85rem; color: var(--p6-dim); margin-bottom: 6px; }
.p6-input {
  width: 100%; padding: 12px 16px;
  background: var(--p6-glass); border: 1px solid var(--p6-border);
  border-radius: 10px; color: var(--p6-text); font-size: .95rem;
  transition: border-color .2s; outline: none;
}
.p6-input:focus { border-color: var(--p6-primary); }
.p6-textarea { min-height: 120px; resize: vertical; }
.p6-form-success {
  background: rgba(79,247,120,.1); border: 1px solid rgba(79,247,120,.3);
  color: #6bff8a; padding: 14px 20px; border-radius: 10px; font-size: .9rem;
}
.p6-form-error {
  background: rgba(247,79,79,.1); border: 1px solid rgba(247,79,79,.3);
  color: #ff8080; padding: 14px 20px; border-radius: 10px; font-size: .9rem;
}

/* ===== NEWS ===== */
.p6-news-item {
  padding: 20px 0; border-bottom: 1px solid var(--p6-border);
}
.p6-news-item:last-child { border-bottom: none; }
.p6-news-date { font-size: .8rem; color: var(--p6-dim); margin-bottom: 6px; }
.p6-news-title { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 1.05rem; margin-bottom: 6px; }
.p6-news-body { font-size: .9rem; color: var(--p6-dim); }

/* ===== FOOTER ===== */
.p6-footer {
  background: var(--p6-bg2); border-top: 1px solid var(--p6-border);
  padding: 36px 0;
}
.p6-footer-inner {
  display: flex; flex-wrap: wrap; justify-content: space-between;
  align-items: center; gap: 16px;
}
.p6-footer-copy { font-size: .85rem; color: var(--p6-dim); }
.p6-footer-links { display: flex; gap: 20px; }
.p6-footer-link { font-size: .85rem; color: var(--p6-dim); transition: color .2s; }
.p6-footer-link:hover { color: var(--p6-text); }

/* ===== BACK TO TOP ===== */
.p6-back-top {
  position: fixed; bottom: 28px; right: 28px; z-index: 150;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--p6-primary); color: #fff;
  border: none; cursor: pointer; font-size: 1rem;
  opacity: 0; transform: translateY(10px);
  transition: opacity .3s, transform .3s;
}
.p6-back-top--show { opacity: 1; transform: translateY(0); }

/* ===== REVEAL ===== */
.p6-reveal { opacity: 0; transform: translateY(24px); transition: opacity .5s, transform .5s; }
.p6-reveal--in { opacity: 1; transform: translateY(0); }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .p6-nav-links { display: none; flex-direction: column; gap: 0; }
  .p6-nav-links.open {
    display: flex; position: absolute; top: 64px; left: 0; right: 0;
    background: rgba(7,7,15,.97); border-bottom: 1px solid var(--p6-border);
    padding: 12px 0;
  }
  .p6-nav-links.open li a { display: block; padding: 12px 24px; }
  .p6-nav-toggle { display: flex; }
  .p6-section { padding: 56px 0; }
}
