/* =========================================================
   doc. Ing. Miloslav Hub, Ph.D. - KOMPLETNÍ REPREZENTATIVNÍ DESIGN
   Fix: Obnova rozvržení stránky O mně a sjednocení vizuálu
   ========================================================= */

/* --- 1. PROMĚNNÉ A ZÁKLAD --- */
:root {
  --upce-blue: #00418F;
  --upce-red: #E3000F;
  --bg-light: #f8fafc;
  --text-main: #1e293b;
  --text-muted: #475569;
  --border-light: #e2e8f0;
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
  --shadow-md: 0 10px 25px -5px rgba(0,0,0,0.05);
}

body { 
  background-color: var(--bg-light) !important; 
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; 
  color: var(--text-main); 
  line-height: 1.7; 
  -webkit-font-smoothing: antialiased;
}

/* --- 2. KOSTRA WEBU --- */
header.header, .site-grid {
  width: 100% !important; 
  max-width: 1100px !important; 
  margin: 0 auto !important;
  background: #ffffff !important;
  box-sizing: border-box !important;
}

header.header { 
  display: flex !important; 
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important; 
  justify-content: space-between !important; 
  padding: 2.5rem 3.5rem 1.5rem 3.5rem !important; 
  border-bottom: 1px solid var(--border-light) !important;
}

.site-grid { 
  padding: 0 3.5rem 4rem 3.5rem !important; 
  box-shadow: var(--shadow-md); 
  border-radius: 0 0 12px 12px; 
}

/* --- 3. LOGO (Ochrana proti deformaci) --- */
.container-topbar { flex: 0 0 auto !important; position: relative !important; }
.hub-brand-logo { 
  display: flex !important; flex-direction: column !important; 
  align-items: flex-start !important; text-decoration: none !important;
  align-self: flex-start !important; height: auto !important; 
}
.hub-brand-name { font-size: 1.75rem; font-weight: 800; color: var(--upce-blue) !important; letter-spacing: -1px; line-height: 1.1; white-space: nowrap !important; }
.hub-brand-name strong { color: var(--upce-red) !important; }
.hub-brand-title { font-size: 0.8rem; color: var(--text-muted) !important; text-transform: uppercase; letter-spacing: 2px; margin-top: 4px; font-weight: 700; }
.container-topbar .jmodedit { position: absolute !important; top: -10px; right: -10px; }

/* --- 4. NAVIGACE --- */
.container-nav { display: flex !important; align-items: center !important; justify-content: flex-end !important; }
.mod-menu { display: flex !important; list-style: none !important; margin: 0 !important; padding: 0 !important; }
.mod-menu .nav-item { margin-left: 2rem !important; }
.mod-menu a { 
  color: var(--text-muted) !important; font-weight: 700 !important; text-transform: uppercase; 
  font-size: 0.85rem !important; letter-spacing: 0.5px; text-decoration: none !important; 
  padding: 0.5rem 0 !important; transition: all 0.2s ease; border-bottom: 2px solid transparent;
}
.mod-menu a:hover { color: var(--upce-red) !important; }
.mod-menu .active > a { color: var(--upce-blue) !important; border-bottom: 2px solid var(--upce-blue) !important; }

/* --- 5. TLAČÍTKA (Ghost Blue) --- */
.hero-cta-wrapper, .archive-button-container { margin-top: 2rem; }
.btn-ghost-blue {
    display: inline-flex !important; align-items: center !important;
    padding: 12px 28px !important; background: transparent !important;
    color: var(--upce-blue) !important; border: 2px solid var(--upce-blue) !important;
    border-radius: 6px !important; font-weight: 700 !important;
    text-transform: uppercase !important; font-size: 0.85rem !important;
    letter-spacing: 1px !important; text-decoration: none !important;
    transition: all 0.3s ease !important;
}
.btn-ghost-blue:hover {
    background-color: var(--upce-blue) !important; color: #ffffff !important;
    transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0, 65, 143, 0.2) !important;
}
.btn-ghost-blue .arrow { margin-left: 10px; font-size: 1.1rem; }

/* --- 6. DOMOVSKÁ STRÁNKA: HERO A KARTY --- */
.hub-hero-section { padding: 4rem 0 2.5rem 0; }
.hub-hero-section h1 { font-size: 1.7rem; color: var(--upce-blue); font-weight: 800; line-height: 1.2; margin-bottom: 1.5rem; letter-spacing: -0.8px; }
.grid-3-cols { display: flex; gap: 2rem; margin: 2rem 0 4rem 0; flex-wrap: wrap; }
.info-card { 
  flex: 1 1 calc(33.333% - 2rem); min-width: 280px;
  background: #ffffff; padding: 2.5rem; border-radius: 12px; 
  border: 1px solid var(--border-light); border-top: 4px solid var(--upce-blue);
  box-shadow: var(--shadow-sm); transition: all 0.3s ease;
}
.info-card:hover { transform: translateY(-5px); box-shadow: 0 15px 30px rgba(0,0,0,0.08); }
.info-card h3 { font-size: 1.3rem; color: var(--upce-blue); font-weight: 800; margin-bottom: 1.5rem; margin-top: 0; }
.custom-bullets { list-style: none; padding: 0; margin: 0 0 1.5rem 0; }
.custom-bullets li { position: relative; padding-left: 1.5rem; margin-bottom: 0.5rem; font-size: 0.95rem; }
.custom-bullets li::before { content: "→"; color: var(--upce-red); position: absolute; left: 0; font-weight: 900; }

/* --- 7. VĚDECKÉ VÝSTUPY A SEKCE --- */
.section-title { font-size: 1.8rem; color: var(--upce-blue); font-weight: 800; margin-bottom: 2rem; border-top: 1px solid var(--border-light); padding-top: 3rem; }
.highlight-item { padding: 1.5rem 2rem; background: var(--bg-light); border-left: 4px solid var(--upce-red); margin-bottom: 1.5rem; border-radius: 0 8px 8px 0; }

/* --- 8. O MNĚ: STRÁNKA S PROFILEM (OPRAVENO) --- */
.grid-sidebar-left { 
  display: flex !important; 
  gap: 3.5rem; 
  margin: 2rem 0; 
  flex-wrap: wrap; 
  align-items: flex-start; 
}
.grid-sidebar-left > :first-child { 
  flex: 0 0 280px; /* Fixní šířka pro sloupec s fotkou */
} 
.grid-sidebar-left > :last-child { 
  flex: 1; 
  min-width: 300px; 
} 
.hub-profile-image { 
  width: 100%; 
  aspect-ratio: 3 / 4; 
  background-color: var(--border-light); 
  border-radius: 8px; 
  overflow: hidden; 
  margin-bottom: 1.5rem; 
  box-shadow: var(--shadow-sm); 
  border-bottom: 4px solid var(--upce-red); 
}
.hub-profile-image img { 
  width: 100%; 
  height: 100%; 
  object-fit: cover; 
  display: block; 
}

/* --- 9. PUBLIKACE: KARTY V SEZNAMU --- */
.top-publikace .com-content-category-blog__item {
    background: #ffffff !important; border-left: 6px solid var(--upce-red) !important;
    padding: 2.5rem !important; margin-bottom: 1.5rem !important; 
    box-shadow: var(--shadow-sm) !important;
    border: 1px solid var(--border-light) !important;
    border-radius: 8px !important;
}

/* --- 10. SPODNÍ SEKCE A KONTAKT --- */
.dark-section { background: #f1f5f9; padding: 4rem 3.5rem; text-align: center; border-radius: 12px; margin-top: 4rem; border-top: 4px solid var(--upce-blue); }
.contact-grid { display: flex; gap: 4rem; margin-top: 3rem; flex-wrap: wrap; }
.contact-visual { flex: 0 0 250px; text-align: center; background: #fff; padding: 2rem; border-radius: 12px; border: 1px solid var(--border-light); }

/* --- 11. MOBILY --- */
@media (max-width: 768px) {
  header.header { flex-direction: column !important; padding: 2rem 1.5rem !important; }
  .grid-sidebar-left > :first-child { flex: 0 0 100%; }
  .grid-3-cols { flex-direction: column; }
}

.field-entry, .navbar-brand, .btn-primary { display: none !important; }

/* --- KONTAKTNÍ STRÁNKA - ROZVRŽENÍ --- */
.contact-grid {
    display: flex !important;
    gap: 4rem;
    margin-top: 2rem;
    flex-wrap: wrap;
    align-items: flex-start;
}

.contact-info {
    flex: 1;
    min-width: 320px;
}

.contact-visual {
    flex: 0 0 300px;
    text-align: center;
    background: #ffffff;
    padding: 2.5rem 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    margin-top: 1rem;
}

.qr-code {
    width: 200px;
    height: 200px;
    margin-bottom: 1rem;
    padding: 10px;
    border: 1px solid #f1f5f9;
    background: #fff;
}

.qr-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--upce-blue);
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 1.4;
    margin-top: 10px;
}

/* Pojistka pro editační tlačítka v hlavičce (aby nepřekrývala logo) */
.jmodedit {
    position: absolute !important;
    top: -15px !important;
    right: -15px !important;
    opacity: 0.5;
    transition: opacity 0.2s;
}
.jmodedit:hover { opacity: 1; }

@media (max-width: 768px) {
    .contact-grid { flex-direction: column; gap: 2rem; }
    .contact-visual { flex: 1 1 100%; width: 100%; box-sizing: border-box; }
}