/* ==========================================================
   UP IAM Block Theme — Koncept C Design
   Based on: ~/koncept-c/index.html
   ========================================================== */

/* Reset */
body { font-family:'IBM Plex Sans',-apple-system,sans-serif; background:var(--wp--preset--color--surface); color:var(--wp--preset--color--foreground); line-height:1.7; font-size:16px; }

/* Default heading colors */
h1, h2, h3, h4, h5, h6 { color:var(--wp--preset--color--primary); }
.entry-title, .wp-block-post-title, .page-title { color:var(--wp--preset--color--primary); }

/* Page title sizing */
.wp-block-post-title { font-size:26px; font-weight:600; margin-bottom:20px; }

/* Default content text */
.entry-content p, .entry-content li { color:var(--wp--preset--color--foreground); }

/* Links inside content */
.entry-content a { color:var(--wp--preset--color--link); }
.entry-content a:hover { color:var(--wp--preset--color--primary); text-decoration:underline; }

.wp-site-blocks { display:flex; flex-direction:column; min-height:100vh; }
.wp-site-blocks > .wp-block-group:not(.site-header):not(footer) { flex:1; }

/* ============ TOP BAR ============ */
.top-bar { background:var(--wp--preset--color--primary); color:var(--wp--preset--color--white); font-size:13px; padding:6px 48px; display:flex; justify-content:space-between; align-items:center; }
.top-bar a { color:var(--wp--preset--color--white); text-decoration:none; margin-left:16px; }
.top-bar a:hover { color:rgba(255,255,255,0.75); }
.top-bar .left { display:flex; gap:20px; }
.top-bar .left span { color:rgba(255,255,255,0.7); font-weight:300; }

/* ============ HEADER ============ */
.site-header { background:var(--wp--preset--color--white); border-bottom:1px solid var(--wp--preset--color--border); position:sticky; top:0; z-index:100; }
.header-inner {
  max-width:1300px;
  margin:0 auto;
  padding:0 48px;
  display:flex !important;
  align-items:center;
  justify-content:space-between;
}
/* Header-inner is-layout-flex override — use our layout, not WP's default */
.header-inner.is-layout-flex { gap:0; }
/* Logo + text side by side */
.site-logo-wrap { display:flex !important; align-items:center; gap:18px; }
.site-logo-wrap .site-logo { display:block; line-height:0; margin:0; }
.site-title-text { display:flex; flex-direction:column; gap:2px; }
.site-title-line { display:flex; align-items:baseline; gap:8px; }
.site-title-line .st-upiam { font-size:22px; font-weight:700; color:var(--wp--preset--color--primary); line-height:1.1; font-family:'IBM Plex Sans',-apple-system,sans-serif; }
.site-title-line .st-dot { font-size:14px; color:var(--wp--preset--color--primary); line-height:1; font-family:'IBM Plex Sans',-apple-system,sans-serif; }
.site-title-line .st-name { font-size:14px; font-weight:400; color:var(--wp--preset--color--muted); line-height:1.2; font-family:'IBM Plex Sans',-apple-system,sans-serif; }
.site-sub-line { font-size:11px; color:var(--wp--preset--color--subtle); letter-spacing:0.8px; text-transform:uppercase; line-height:1.2; font-family:'IBM Plex Sans',-apple-system,sans-serif; }
.site-title-link { text-decoration:none; color:inherit; display:block; }
/* Main navigation — wp:navigation block */
.site-header .wp-block-navigation { display:flex; align-items:center; gap:2px; }
.wp-block-navigation__container { display:flex; align-items:center; gap:2px; }
.site-header .wp-block-navigation .wp-block-navigation-item,
.site-header .wp-block-navigation .wp-block-navigation-link {
  list-style:none;
}
.site-header .wp-block-navigation .wp-block-navigation-item a,
.site-header .wp-block-navigation .wp-block-navigation-link a,
.site-header .wp-block-navigation a,
.wp-block-navigation .wp-block-navigation-item__content {
  color:var(--wp--preset--color--foreground) !important;
  text-decoration:none !important;
  font-size:14px;
  font-weight:500;
  padding:8px 14px;
  border-radius:6px;
  transition:all 0.15s;
  letter-spacing:0.2px;
  background:none;
}
.site-header .wp-block-navigation .wp-block-navigation-item a:hover,
.site-header .wp-block-navigation .wp-block-navigation-link a:hover,
.site-header .wp-block-navigation a:hover { background:var(--wp--preset--color--surface); color:var(--wp--preset--color--primary) !important; }

/* Nav link sizing */
.site-header .wp-block-navigation .wp-block-navigation-item a {
  font-size: 15px;
  padding: 8px 12px;
  border-radius: 6px;
}

/* Mobile overlay — bigger, more spacious links */
body .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
  font-size: 18px !important;
  padding: 16px 22px !important;
}
body .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
  gap: 8px !important;
}

/* Language-specific footer — show SI, hide EN by default (frontend only) */
body:not(.editor-styles-wrapper) .footer-en {
  display: none !important;
}
html[lang="en-GB"] body:not(.editor-styles-wrapper) .footer-en,
html[lang="en-US"] body:not(.editor-styles-wrapper) .footer-en {
  display: block !important;
}
html[lang="en-GB"] body:not(.editor-styles-wrapper) .footer-si,
html[lang="en-US"] body:not(.editor-styles-wrapper) .footer-si {
  display: none !important;
}

/* Hamburger at 800px */
@media (max-width: 800px) {
  .wp-block-navigation__responsive-container-open.always-shown,
  .wp-block-navigation__responsive-container-open:not(.always-shown) {
    display: flex !important;
  }
  .wp-block-navigation__responsive-container:not(.is-menu-open):not(.hidden-by-default) {
    display: none !important;
  }
  .wp-block-navigation__responsive-container.hidden-by-default:not(.is-menu-open) {
    display: none !important;
  }
}
@media (min-width: 801px) {
  .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) {
    display: block !important;
    position: relative !important;
    width: 100% !important;
    z-index: auto !important;
  }
  .wp-block-navigation__responsive-container-open:not(.always-shown) {
    display: none !important;
  }
}

/* Let nav wrap to next line on desktop — only when space runs out */
@media (min-width: 801px) {
  .site-header .header-inner {
    flex-wrap: wrap !important;
  }
  .site-header .header-inner > .wp-block-navigation {
    flex: 1 1 auto;
    min-width: 0;
  }
}

/* Navigation item hover — no underline */
.wp-block-navigation .wp-block-navigation-item__content:hover { text-decoration:none !important; }
.header-right { display:flex; align-items:center; gap:8px; }
.header-right .lang { font-size:14px; font-weight:500; display:flex; gap:2px; }
.header-right .lang ul { list-style:none; margin:0; padding:0; display:flex; gap:2px; }
.header-right .lang li { margin:0; }
.header-right .lang a { color:var(--wp--preset--color--subtle); text-decoration:none; padding:4px 8px; border-radius:4px; }
.header-right .lang a.active { color:var(--wp--preset--color--primary); background:var(--wp--preset--color--surface); }
.header-right .search-btn { color:var(--wp--preset--color--subtle); text-decoration:none; font-size:14px; padding:6px 10px; border-radius:4px; transition:all 0.15s; }
.header-right .search-btn:hover { background:var(--wp--preset--color--surface); color:var(--wp--preset--color--primary); }

/* ============ CONTENT ============ */
.page-wrap { max-width:1300px; margin:0 auto; padding:0 48px; flex:1; width:100%; }
.page-interior { width:100%; flex:1; display:flex; flex-direction:column; }
.section-block { margin-bottom:48px; flex:1; }

/* Breadcrumb — custom block */
.breadcrumb { padding:16px 0 8px; font-size:14px; color:var(--wp--preset--color--meta); }
.breadcrumb a { color:var(--wp--preset--color--link); text-decoration:none; font-weight:500; }
.breadcrumb a:hover { color:var(--wp--preset--color--primary); text-decoration:underline; }
.breadcrumb span.sep { color:var(--wp--preset--color--muted); margin:0 4px; font-weight:300; }
.breadcrumb span.current { color:var(--wp--preset--color--foreground); font-weight:500; }
.breadcrumb .wp-block-post-title { font-size:14px !important; font-weight:500 !important; display:inline !important; margin:0 !important; padding:0 !important; color:var(--wp--preset--color--primary) !important; line-height:inherit !important; }

/* ============ HERO ============ */
.hero {
  margin: 12px 0 32px;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  min-height: 420px;
  border: 1px solid var(--wp--preset--color--border);
  background: var(--wp--preset--color--primary);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.hero-gradient { background-image: linear-gradient(135deg, var(--wp--preset--color--primary) 0%, #001a4a 100%); }
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.5) 40%, rgba(0,0,0,0.25) 65%, rgba(0,0,0,0.1) 100%);
  pointer-events: none;
  z-index: 1;
}
.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 1300px;
  margin: 0 auto;
  padding: 56px 48px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  min-height: 420px;
}
.hero-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.hero-content h1 {
  font-size: 30px;
  font-weight: 600;
  color: var(--wp--preset--color--white);
  line-height: 1.25;
  letter-spacing: -0.5px;
  font-family: 'IBM Plex Serif', serif;
  margin-bottom: 14px;
}
.hero-content h1 .sub {
  display: block;
  font-size: 1rem;
  font-weight: 400;
  color: rgba(255,255,255,0.9);
  margin-top: 8px;
  font-family: 'IBM Plex Sans', sans-serif;
  letter-spacing: 0;
  line-height: 1.6;
}
.hero-content p {
  font-size: 1rem;
  color: rgba(255,255,255,0.9);
  line-height: 1.7;
  margin-bottom: 20px;
}
.hero-cta { display:inline-block; color:var(--wp--preset--color--primary); background:var(--wp--preset--color--white); font-weight:600; font-size:1rem; text-decoration:none; padding:10px 24px; border-radius:6px; align-self:flex-start; transition:all 0.15s; }
.hero-cta:hover { background:var(--wp--preset--color--surface); }
.hero-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.hero-stat {
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px;
  padding: 14px 18px;
  color: var(--wp--preset--color--white);
}
.hero-stat .num { font-size:22px; font-weight:600; line-height:1.1; }
.hero-stat .lbl { font-size:1rem; }

/* ============ SECTIONS ============ */
.section-block { margin-bottom: 56px; }
.section-header { margin-bottom: 24px; border-bottom:1px solid var(--wp--preset--color--border); padding-bottom:0; display:flex; justify-content:space-between; align-items:flex-end; }
.section-header h2 { font-size:22px; font-weight:600; color:var(--wp--preset--color--primary); font-family:'IBM Plex Serif',serif; margin:0; }
.section-header .meta-nav a { font-size:1rem; color:var(--wp--preset--color--link); text-decoration:none; font-weight:500; white-space:nowrap; }
.section-header .meta-nav a:hover { text-decoration:underline; }

/* ============ DEPARTMENTS & CENTRES ============ */
.dept-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.dept-grid-bg { gap:14px; }
.dept-card { background:var(--wp--preset--color--white); border:1px solid var(--wp--preset--color--primary); border-radius:10px; padding:22px 24px; box-shadow:0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04); transition:all 0.15s; text-decoration:none !important; color:inherit; display:flex; flex-direction:column; }
.dept-card:hover { border-color:var(--wp--preset--color--primary-hover); background:var(--wp--preset--color--surface); text-decoration:none !important; }
.dept-card-bg { backdrop-filter:blur(6px); -webkit-backdrop-filter:blur(6px); border-color:rgba(255,255,255,0.18) !important; box-shadow:0 4px 16px rgba(0,0,0,0.15) !important; min-height:220px; justify-content:flex-end; color:var(--wp--preset--color--surface); }
.dept-card-bg:hover { border-color:rgba(255,255,255,0.35) !important; }
.dept-card .dept-head { display:flex; gap:12px; align-items:flex-start; margin-bottom:8px; }
.dept-card .dept-abbr { font-size:1.2rem; font-weight:600; text-transform:none; letter-spacing:1.2px; color:var(--wp--preset--color--surface); margin-bottom:2px; }
.dept-card h3 { font-size:1.2rem; font-weight:600; color:var(--wp--preset--color--surface); line-height:1.3; margin:0; }
.dept-card p { font-size:1rem; color:var(--wp--preset--color--surface); line-height:1.65; margin-top:6px; flex:1; }
.dept-card .dept-head-link { display:inline; font-size:1rem; color:var(--wp--preset--color--surface); text-decoration:none; margin-top:8px; font-weight:500; }
.dept-card .dept-head-link:hover { text-decoration:underline; }
.section-sub { font-size:1rem; color:var(--wp--preset--color--subtle); margin:0 0 16px; }

/* ============ DEPT INFO GRID (single department page) ============ */
.dept-info-grid { display:grid; grid-template-columns:1fr 1fr; gap:24px; margin-bottom:40px; }
.dept-description { background:var(--wp--preset--color--white); border:1px solid var(--wp--preset--color--border); border-radius:10px; padding:28px 32px; }
.dept-description h2 { font-size:18px; font-weight:600; color:var(--wp--preset--color--primary); margin-bottom:12px; font-family:var(--wp--preset--font-family--ibm-plex-sans); }
.dept-description p { font-size:1rem; color:var(--wp--preset--color--muted); line-height:1.8; margin-bottom:16px; }
.dept-description p:last-child { margin-bottom:0; }
.dept-head-card { background:var(--wp--preset--color--white); border:1px solid var(--wp--preset--color--border); border-radius:10px; padding:28px 32px; display:flex; flex-direction:column; align-items:center; text-align:center; justify-content:center; }
.dept-head-card .head-person { display:flex; flex-direction:column; align-items:center; width:100%; }
.dept-head-card .avatar { width:80px; height:80px; border-radius:50%; background:var(--wp--preset--color--surface); display:flex; align-items:center; justify-content:center; font-size:28px; font-weight:600; color:var(--wp--preset--color--primary); margin-bottom:14px; }
.dept-head-card .head-label { font-size:1rem; color:var(--wp--preset--color--subtle); margin-bottom:4px; }
.dept-head-card .head-name { font-size:1.2rem; font-weight:600; line-height:1.4; }
.dept-head-card .head-name a { color:var(--wp--preset--color--link); text-decoration:none; }
.dept-head-card .head-name a:hover { text-decoration:underline; }
.dept-head-card .head-title { font-size:1rem; color:var(--wp--preset--color--muted); }
.dept-head-card .head-card-divider { width:100%; padding-top:16px; margin-top:16px; border-top:1px solid var(--wp--preset--color--border); }

/* ============ NEWS ============ */
.news-list { display:flex; flex-direction:column; gap:16px; }
.news-item { display:grid !important; grid-template-columns:260px 1fr; gap:0; background:var(--wp--preset--color--white); border:1px solid var(--wp--preset--color--border); border-radius:8px; overflow:hidden; box-shadow:0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04); text-decoration:none; color:inherit; transition:background 0.12s, border-color 0.12s; min-height:120px; }
/* Override WP is-layout-flex which breaks the grid in editor */
.news-item.is-layout-flex { display:grid !important; flex-wrap:nowrap; }
/* Fallback: when no thumbnail, use full-width single column */
.news-item:not(:has(.thumb)) { grid-template-columns:1fr; }
.news-item:hover { background:var(--wp--preset--color--surface); }
.news-item .thumb { overflow:hidden; position:relative; width:260px; height:140px; }
.news-item .thumb img { width:100%; height:100%; object-fit:cover; display:block; }
.news-item .body { padding:20px 28px; display:flex; flex-direction:column; justify-content:center; }
.news-item .meta { font-size:1rem; color:var(--wp--preset--color--meta); margin-bottom:4px; }
.news-item .title { font-size:1.2rem; font-weight:500; color:var(--wp--preset--color--foreground); margin-bottom:4px; line-height:1.4; }
.news-item .title a:visited { color:var(--wp--preset--color--link); }
.news-item .excerpt { font-size:1rem; color:var(--wp--preset--color--muted); line-height:1.6; }

/* ============ CONFERENCES ============ */
.conf-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.conf-card { background:var(--wp--preset--color--white); border:1px solid var(--wp--preset--color--border); border-radius:8px; padding:20px 24px; display:flex; gap:16px; box-shadow:0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04); text-decoration:none; color:inherit; transition:all 0.15s; }
.conf-card:hover { border-color:var(--wp--preset--color--primary); background:var(--wp--preset--color--surface); }
.conf-card .date-box { flex-shrink:0; width:56px; text-align:center; padding-top:4px; }
.conf-card .date-box .day { font-size:20px; font-weight:700; color:var(--wp--preset--color--foreground); line-height:1.1; }
.conf-card .date-box .month { font-size:1rem; color:var(--wp--preset--color--primary); font-weight:600; }
.conf-card .info { flex:1; }
.conf-card .info .name { font-size:1.2rem; font-weight:500; color:var(--wp--preset--color--foreground); margin-bottom:2px; }
.conf-card .info .when { font-size:1rem; color:var(--wp--preset--color--muted); }

/* ============ EMPLOYEE FILTER ============ */
.employee-filter { margin-bottom:20px; }
.employee-filter .filter-tabs { display:flex; gap:4px; flex-wrap:wrap; margin-bottom:12px; }
.employee-filter .filter-tab {
/* Screen-reader only, for accessibility labels */
.screen-reader-text { border:0; clip:rect(1px,1px,1px,1px); clip-path:inset(50%); height:1px; margin:-1px; overflow:hidden; padding:0; position:absolute; width:1px; word-wrap:normal !important; }
  display:inline-flex; align-items:center; gap:4px;
  font-size:1rem; font-weight:500; color:var(--wp--preset--color--primary);
  text-decoration:none; padding:7px 16px;
  border-radius:6px; border:1px solid var(--wp--preset--color--primary);
  background:var(--wp--preset--color--white); transition:all 0.12s;
}
.employee-filter .filter-tab:hover { background:var(--wp--preset--color--surface); }
.employee-filter .filter-tab.active { border-color:var(--wp--preset--color--primary); background:var(--wp--preset--color--primary); color:var(--wp--preset--color--white); }
.employee-filter .filter-tab .count { font-size:0.8rem; opacity:0.7; }
.employee-filter .filter-tab.active .count { opacity:0.9; }
.employee-filter .filter-search { margin-bottom:0; }
.employee-filter .filter-search form { display:flex; flex-direction:column; }
.employee-filter .filter-search .search-wrap { flex:1; position:relative; }
.employee-filter .filter-search input.search-field {
  font-size:1rem; padding:8px 14px; border:1px solid var(--wp--preset--color--border);
  border-radius:6px; background:var(--wp--preset--color--white); width:100%; box-sizing:border-box;
  outline:none; transition:border-color 0.12s;
  padding-right:32px;
}
.employee-filter .filter-search input.search-field:focus { border-color:var(--wp--preset--color--primary); }
.employee-filter .filter-search input.search-field::placeholder { color:var(--wp--preset--color--meta); }
.employee-filter .filter-search .search-clear {
  position:absolute; right:10px; top:50%; transform:translateY(-50%);
  text-decoration:none; color:var(--wp--preset--color--meta); font-size:1.3rem; line-height:1;
  cursor:pointer;
}
.employee-filter .filter-search .search-clear:hover { color:var(--wp--preset--color--muted); }
.employee-filter .filter-search .search-btn {
  padding:8px 18px; background:var(--wp--preset--color--primary); color:var(--wp--preset--color--white); border:none;
  border-radius:6px; cursor:pointer; font-size:1rem; font-weight:500;
  white-space:nowrap; transition:background 0.12s;
}
.employee-filter .filter-search .search-btn:hover { background:var(--wp--preset--color--primary-hover); }

/* Mobile: stack filter elements, tabs match dropdown width */
@media (max-width: 768px) {
  .employee-filter .filter-tabs { flex-direction:column; width:100%; }
  .employee-filter .filter-tab { width:100%; justify-content:center; box-sizing:border-box; }
  .employee-filter .filter-dept { width:100%; }
  .employee-filter .filter-search form { flex-direction:column; width:100%; }
  .employee-filter .filter-search .search-wrap { width:100%; }
  .employee-filter .filter-search .search-btn { width:100%; justify-content:center; box-sizing:border-box; }
  .employee-filter .filter-search input.search-field { padding-right:32px; }
  .employee-filter select { width:100%; box-sizing:border-box; }
}

/* ============ EMPLOYEE SINGLE PAGE ============ */
/* Two-column layout using wp:columns (Gutenberg native) */
.wp-block-columns.employee-single { gap:40px !important; align-items:flex-start; }
.employee-single .employee-details-col { flex:1; min-width:0; }
.employee-single .employee-image-col { flex:0 0 300px; }
.employee-single .employee-details-col h1.wp-block-post-title { font-size:1.5rem; margin-bottom:20px; }
.employee-image-col .placeholder-image { width:200px; height:200px; background:var(--wp--preset--color--surface); border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:3rem; color:var(--wp--preset--color--meta); }
.employee-image-col .wp-block-post-featured-image { margin:0; }
.employee-image-col .wp-block-post-featured-image img { width:100%; height:auto; border-radius:8px; object-fit:cover; }

/* Details block */
.employee-details { display:flex; flex-direction:column; gap:10px; margin-bottom:20px; }
.employee-details .ed-row { display:flex; flex-direction:column; gap:2px; padding-bottom:8px; border-bottom:1px solid var(--wp--preset--color--border); }
.employee-details .ed-label { font-size:0.8rem; font-weight:600; color:var(--wp--preset--color--subtle); text-transform:uppercase; letter-spacing:0.5px; }
.employee-details .ed-value { font-size:1rem; color:var(--wp--preset--color--foreground); }
.employee-details .ed-value a { color:var(--wp--preset--color--primary); text-decoration:none; }
.employee-details .ed-value a:hover { text-decoration:underline; }
.employee-details .ed-tags { display:flex; flex-wrap:wrap; gap:6px; }
.employee-details .ed-tag { font-size:0.85rem; background:var(--wp--preset--color--surface); color:var(--wp--preset--color--primary); padding:4px 10px; border-radius:4px; }

/* Image placeholder */
.employee-image-col .employee-placeholder { margin:0; }
.employee-image-col .placeholder-image {
  width:100%; aspect-ratio:3/4; background:var(--wp--preset--color--surface); border:2px dashed var(--wp--preset--color--border);
  border-radius:8px; display:flex; align-items:center; justify-content:center;
  font-size:3rem; color:var(--wp--preset--color--meta);
}

@media (max-width:768px) {
  .wp-block-columns.employee-single { flex-direction:column !important; gap:24px !important; }
  .employee-single .employee-image-col { flex:0 0 auto !important; }
  .employee-image-col .placeholder-image { max-width:200px; margin:0 auto; }
  .site-footer .footer-grid { display:grid !important; grid-template-columns:1fr !important; }
  .site-footer .footer-grid > * { width:100% !important; max-width:100% !important; flex:0 0 100% !important; }
  .site-footer .footer-bottom { flex-direction:column; gap:4px; text-align:center; }
  .site-footer { padding-left:24px; padding-right:24px; }
  .iam-leadership .leadership-card { min-width:0; }
}

/* ============ PEOPLE ============ */
.people-list { display:grid; grid-template-columns:repeat(3,1fr); gap:12px; }
.person { background:var(--wp--preset--color--white); border:1px solid var(--wp--preset--color--border); border-radius:8px; padding:16px; text-decoration:none; color:inherit; transition:all 0.12s; display:flex; flex-direction:column; gap:8px; }
.person:hover { border-color:var(--wp--preset--color--primary); background:var(--wp--preset--color--surface); text-decoration:none !important; }
.person-top { display:flex; align-items:center; gap:12px; }
.person-top .name { font-weight:700; color: var(--wp--preset--color--link); }
.person .avatar { width:48px; height:48px; border-radius:50%; background:var(--wp--preset--color--surface); flex-shrink:0; display:flex; align-items:center; justify-content:center; font-size:15px; font-weight:700; color:var(--wp--preset--color--primary); }
.person .det .dept { font-size:1rem; color:var(--wp--preset--color--muted); }
.person .det .contact { font-size:1rem; color:var(--wp--preset--color--meta); display:flex; flex-direction:column; gap:3px; margin-top:4px; }
.person .det .contact span { display:block; padding:0; }
.person .det .contact .email:before { content:""; display:inline-block; width:16px; height:16px; margin-right:6px; background:currentColor; -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4-8 5-8-5V6l8 5 8-5v2z'/%3E%3C/svg%3E") no-repeat center; mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4-8 5-8-5V6l8 5 8-5v2z'/%3E%3C/svg%3E") no-repeat center; -webkit-mask-size:contain; mask-size:contain; vertical-align:middle; }
.person .det .contact .phone:before { content:""; display:inline-block; width:16px; height:16px; margin-right:6px; background:currentColor; -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.62 10.79c1.44 2.83 3.76 5.14 6.59 6.59l2.2-2.2c.27-.27.67-.36 1.02-.24 1.12.37 2.33.57 3.57.57.55 0 1 .45 1 1V20c0 .55-.45 1-1 1-9.39 0-17-7.61-17-17 0-.55.45-1 1-1h3.5c.55 0 1 .45 1 1 0 1.25.2 2.45.57 3.57.11.35.03.74-.25 1.02l-2.2 2.2z'/%3E%3C/svg%3E") no-repeat center; mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.62 10.79c1.44 2.83 3.76 5.14 6.59 6.59l2.2-2.2c.27-.27.67-.36 1.02-.24 1.12.37 2.33.57 3.57.57.55 0 1 .45 1 1V20c0 .55-.45 1-1 1-9.39 0-17-7.61-17-17 0-.55.45-1 1-1h3.5c.55 0 1 .45 1 1 0 1.25.2 2.45.57 3.57.11.35.03.74-.25 1.02l-2.2 2.2z'/%3E%3C/svg%3E") no-repeat center; -webkit-mask-size:contain; mask-size:contain; vertical-align:middle; }
.person .det .contact .office:before { content:""; display:inline-block; width:16px; height:16px; margin-right:6px; background:currentColor; -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z'/%3E%3C/svg%3E") no-repeat center; mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z'/%3E%3C/svg%3E") no-repeat center; -webkit-mask-size:contain; mask-size:contain; vertical-align:middle; }

/* Employee filter — department dropdown */
.employee-filter { margin-bottom:24px; }


/* ============ PROJECT SINGLE ============ */
.project-detail-table { background:var(--wp--preset--color--white); border-radius:8px; padding:24px 32px; margin-bottom:32px; display:grid; gap:0; }
.pd-row { display:grid; grid-template-columns:180px 1fr; padding:10px 0; border-bottom:1px solid var(--wp--preset--color--border); gap:16px; }
@media (max-width:600px) { .pd-row { grid-template-columns:1fr; gap:4px; } }
.pd-row:last-child { border-bottom:none; }
.pd-label { font-size:14px; font-weight:600; color:var(--wp--preset--color--primary); text-transform:uppercase; letter-spacing:0.5px; }
.pd-value { font-size:15px; color:var(--wp--preset--color--foreground); line-height:1.6; }
.pd-acronym { font-family:'IBM Plex Serif',serif; font-size:1.1rem; font-weight:700; color:var(--wp--preset--color--foreground); letter-spacing:0.02em; }

/* ============ DEPARTMENT ACCORDIONS ============ */
.department-accordions { margin-top:32px; }
.dept-accordion { background:var(--wp--preset--color--white); border:1px solid var(--wp--preset--color--border); border-radius:8px; margin-bottom:12px; overflow:hidden; }
.dept-accordion-summary { display:flex; align-items:center; justify-content:space-between; padding:16px 20px; cursor:pointer; list-style:none; user-select:none; transition:background 0.12s; }
.dept-accordion-summary::-webkit-details-marker { display:none; }
.dept-accordion-summary:hover { background:var(--wp--preset--color--surface); }
.dept-accordion[open] .dept-accordion-summary { border-bottom:1px solid var(--wp--preset--color--border); }
.accordion-count { font-size:13px; font-weight:500; color:var(--wp--preset--color--white); background:var(--wp--preset--color--primary); border-radius:999px; padding:2px 10px; line-height:1.6; }
.dept-accordion-body { padding:12px 20px 16px; }
.accordion-empty { font-size:14px; color:var(--wp--preset--color--meta); margin:8px 0; }

.accordion-project-list, .accordion-employee-list { display:flex; flex-direction:column; gap:2px; }
.accordion-project-item, .accordion-employee-item { border-radius:6px; transition:background 0.12s; }
.accordion-project-item:hover, .accordion-employee-item:hover { background:var(--wp--preset--color--surface); }
.accordion-employee-link {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    padding: 8px 12px;
    text-decoration: none;
    color: inherit;
    align-items: center;
}
.accordion-project-status {
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 500;
    white-space: nowrap;
}
.status-active { background:#e6f7ed; color:#0a7e3c; }
.status-concluded, .status-zakljucen { background:var(--wp--preset--color--surface); color:var(--wp--preset--color--subtle); }
.accordion-employee-name { font-size:1rem; font-weight:500; color:var(--wp--preset--color--primary); }
.accordion-employee-email { font-size:13px; color:var(--wp--preset--color--subtle); }
.site-footer { background:var(--wp--preset--color--dark-bg); margin-top:48px; padding:48px 48px 24px; color:rgba(255,255,255,0.5); font-size:14px; }
.footer-grid { max-width:1300px; margin:0 auto; display:grid; grid-template-columns:2.5fr 1fr 1fr 1.2fr; gap:40px; }
.footer-grid.is-layout-flow > * { max-width:none; }
.footer-grid .wp-block-heading { font-size:14px; font-weight:600; color:rgba(255,255,255,0.85); margin-bottom:12px; letter-spacing:0.3px; text-transform:uppercase; }
.footer-grid a, .footer-grid li a { color:rgba(255,255,255,0.7); text-decoration:none; display:block; line-height:1.9; font-size:14px; }
.footer-grid a:hover { color:var(--wp--preset--color--white); }
.footer-grid ul, .footer-grid ol, .footer-grid menu { list-style:none; padding:0; margin:0; }
.footer-grid li::before { display:none; content:none; }
.footer-grid li::marker { display:none; content:none; }
.footer-grid p { line-height:1.8; }
.footer-brand { font-size:22px; font-weight:700; color:var(--wp--preset--color--white); margin-bottom:2px; }
/* Wrapped theme name */
.footer-brand .iam { color:var(--wp--preset--color--accent); }
.footer-sub { font-size:12px; text-transform:uppercase; letter-spacing:1px; color:rgba(255,255,255,0.5); margin-bottom:16px; }
.footer-bottom { max-width:1300px; margin:36px auto 0; padding-top:16px; border-top:1px solid rgba(255,255,255,0.12); display:flex; justify-content:space-between; font-size:13px; color:rgba(255,255,255,0.5); }

/* ============ SOCIAL SECTION ============ */
.social-section { padding:24px 0 0; }
.social-inner { max-width:1300px; margin:0 auto; padding:0 48px; display:flex; align-items:center; gap:20px; flex-wrap:wrap; }
.social-heading { white-space:nowrap; }
.social-links { display:flex; flex-wrap:wrap; flex:1; justify-content:center; gap:16px; }
.social-link-lg { display:inline-flex; align-items:center; justify-content:center; color:var(--wp--preset--color--primary); text-decoration:none; transition:color 0.15s; }
.social-link-lg:hover { color:var(--wp--preset--color--meta); }
.social-link-lg svg { width:42px; height:42px; }

/* ============ RESPONSIVE ============ */
@media (max-width:900px) {
  .dept-grid { grid-template-columns:1fr; }
  .dept-info-grid { grid-template-columns:1fr; }
  .hero-inner { grid-template-columns:1fr; padding:32px 24px; }
  .conf-grid { grid-template-columns:1fr; }
  .people-list { grid-template-columns:repeat(2,1fr); }
  .footer-grid { grid-template-columns:1fr 1fr; }
}
.site-logo { display:flex; align-items:center; text-decoration:none; gap:14px; }
.site-logo-img { height:38px; width:auto; }
@media (max-width:900px) {
  .header-right { display:none; }
}
@media (max-width:600px) {
  .header-inner { padding-left:16px; padding-right:16px; }
  .site-logo-img { height:32px; }
}
@media (max-width:640px) {
  .page-wrap, .top-bar, .header-inner, .site-footer { padding-left:16px; padding-right:16px; }
  .top-bar { display:none; }
  .social-inner { flex-direction:column; text-align:center; }
  .hero-content { padding:24px; }
  .hero-content h1 { font-size:22px; }
  .news-item { grid-template-columns:1fr; }
  .news-item .thumb { width:100%; min-height:80px; height:auto; }
  .news-item .body { padding:16px 20px; }
  .people-list { grid-template-columns:1fr; }
  .footer-grid { grid-template-columns:1fr; }
  .footer-bottom { flex-direction:column; gap:4px; text-align:center; }
}

/* =================================================
   WP BLOCK OVERRIDES
   ================================================= */

/* Strip WP default site blocks wrapper */
.wp-site-blocks,
.wp-block-template-part {
  max-width: none;
  width: auto;
  margin: 0;
  padding: 0;
}
.wp-site-blocks > * + * {
  margin-block-start: 0;
}
.wp-block-template-part {
  margin: 0;
  padding: 0;
}

/* Universal: reset WP constrained/flow width on everything inside page-wrap,
   except post content which should have its own narrower reading width.
   This avoids having to list every new block class. */
.page-wrap .is-layout-flow,
.page-wrap .is-layout-constrained {
  max-width: none !important;
  width: auto !important;
}
.page-wrap .entry-content.wp-block-post-content.is-layout-flow {
  max-width: 900px;
}

/* Post content (entry content) — narrower reading width */

/* Query blocks — keep full width */
.wp-block-query {
  max-width: none;
  margin: 0;
  padding: 0;
}

.wp-block-post {
  margin: 0 0 0.5rem;
}

/* Single post excerpt — lead styling */
.wp-block-post-excerpt {
  max-width: 900px;
  font-size: 1.15rem;
  line-height: 1.6;
  color: #444;
}

/* Restore default margins for text inside content areas */
.dept-card p, .dept-card h2,
.dept-card h3, .dept-card h4,
.news-item .excerpt, .news-item .meta {
  margin: revert;
}

/* Section-block margin — restore after the override above */
.section-block {
  margin-bottom: 56px;
}
.post-content-block {
  max-width: 900px;
}
.breadcrumb {
  padding: 16px 0 8px;
}

/* Hero inside page-wrap */
.hero {
  margin: 12px 0 32px;
}

/* ============================================
   Leadership block — iam/leadership
   ============================================ */
.iam-leadership {
  max-width: 100%;
}

.iam-leadership .leadership-section-title {
  font-size: 1.3rem;
  font-weight: 600;
  margin: 2.5rem 0 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--wp--preset--color--primary);
}

.iam-leadership .leadership-section-title:first-child {
  margin-top: 0;
}

/* Top cards */
.iam-leadership .leadership-top {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.iam-leadership .leadership-card {
  background: var(--wp--preset--color--white);
  border: 1px solid var(--wp--preset--color--border);
  border-radius: 6px;
  padding: 1.25rem 1.5rem;
  min-width: 0;
  box-sizing: border-box;
}

.iam-leadership .leadership-card--director {
  grid-column: 1 / -1;
}

.iam-leadership .leadership-card--secretary {
  grid-column: 1 / -1;
}

@media (max-width: 900px) {
  .iam-leadership .leadership-top {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .iam-leadership .leadership-top {
    grid-template-columns: 1fr;
  }
}

.iam-leadership .leadership-role {
  font-size: 1rem;
  font-weight: 600;
  color: var(--wp--preset--color--primary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 0.5rem;
}

.iam-leadership .leadership-name {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}
.iam-leadership .leadership-name a {
  color: inherit;
  text-decoration: none;
}
.iam-leadership .leadership-name a:visited {
  color: inherit;
}

.iam-leadership .leadership-title {
  font-size: 1rem;
  color: var(--wp--preset--color--muted);
  margin-bottom: 0.5rem;
}

.iam-leadership .leadership-contact {
  font-size: 0.875rem;
  color: var(--wp--preset--color--subtle);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
}

.iam-leadership .leadership-contact a {
  color: var(--wp--preset--color--primary);
  text-decoration: none;
}

.iam-leadership .leadership-contact a:hover {
  text-decoration: underline;
}

/* Department list */
.iam-leadership .leadership-departments {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.iam-leadership .dept-leadership-item {
  background: var(--wp--preset--color--white);
  border: 1px solid var(--wp--preset--color--border);
  border-radius: 6px;
  padding: 1.25rem 1.5rem;
}

.iam-leadership .dept-leadership-heading {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.iam-leadership .dept-leadership-heading a {
  color: var(--wp--preset--color--primary);
  text-decoration: none;
}
.iam-leadership .dept-leadership-heading a:visited {
  color: var(--wp--preset--color--primary);
}

.iam-leadership .dept-leadership-heading a:hover {
  text-decoration: underline;
}

.iam-leadership .dept-leadership-people {
  font-size: 1rem;
  line-height: 1.7;
}

.iam-leadership .dept-leadership-person {
  display: inline-block;
}

.iam-leadership .dept-leadership-role {
  font-weight: 500;
  color: var(--wp--preset--color--muted);
}

.iam-leadership .dept-leadership-people a {
  color: var(--wp--preset--color--primary);
  text-decoration: none;
}
.iam-leadership .dept-leadership-people a:visited {
  color: var(--wp--preset--color--primary);
}

.iam-leadership .dept-leadership-people a:hover {
  text-decoration: underline;
}

.iam-leadership .leadership-empty {
  color: var(--wp--preset--color--subtle);
  font-style: italic;
}

.iam-leadership .leadership-annotation {
  font-size: 0.875rem;
  color: var(--wp--preset--color--muted);
  margin: 1px 0 2px;
  font-style: italic;
}

/* ============================================
   DEPARTMENT PAGE — description + research areas
   ============================================ */
.research-areas { background:var(--wp--preset--color--white); border:1px solid var(--wp--preset--color--border); border-radius:10px; padding:28px 32px; margin-bottom:40px; }
.research-areas h2 { font-size:18px; font-weight:600; color:var(--wp--preset--color--primary); font-family:'IBM Plex Serif',serif; margin-bottom:16px; }
.research-tags { list-style:disc; padding-left:20px; margin:0; }
.research-tag { font-size:1rem; line-height:1.6; color:var(--wp--preset--color--body); }

/* Conference cards — remove ALL underlines on hover */
.conf-card,
.conf-card:hover,
.conf-card:focus,
.conf-card:active,
.conf-card .name,
.conf-card .name:hover,
.conf-card .info .name,
.conf-card .info .name:hover {
  text-decoration: none !important;
}


/* Mobile: stack project filter tabs */
@media (max-width: 600px) {
  .project-filters { flex-direction:column; width:100%; }
  .project-filters .filter-tab, .project-filters a.filter-tab { width:100% !important; justify-content:center; box-sizing:border-box; }
}

/* ============================================
   EMPLOYEE LIST — filter area layout
   ============================================ */
.filter-dept {
  margin-bottom: 10px;
  width: 100%;
}
.filter-dept select.dept-select {
  width: 100%;
  max-width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--wp--preset--color--border, #d0d0d0);
  border-radius: 8px;
  font-size: 14px;
  background: var(--wp--preset--color--white, #fff);
  color: var(--wp--preset--color--foreground, #333);
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23666' d='M1.41 0L6 4.58 10.59 0 12 1.41l-6 6-6-6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  box-sizing: border-box;
}
.filter-search-row {
  display: flex;
  gap: 8px;
  width: 100%;
}
.filter-search-row .search-wrap {
  flex: 1;
  position: relative;
}
.filter-search-row .search-wrap input.search-field {
  width: 100%;
  padding: 10px 38px 10px 14px;
  border: 1px solid var(--wp--preset--color--border, #d0d0d0);
  border-radius: 8px;
  font-size: 14px;
  box-sizing: border-box;
  background: var(--wp--preset--color--white, #fff);
  color: var(--wp--preset--color--foreground, #333);
}
.filter-search-row .search-btn {
  padding: 10px 20px;
  background: var(--wp--preset--color--primary, #1b2a4a);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}
.filter-search-row .search-clear {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  text-decoration: none;
  font-size: 20px;
  color: var(--wp--preset--color--muted, #999);
  line-height: 1;
}

/* Mobile: break search button to its own line */
@media (max-width: 768px) {
  .filter-search-row {
    flex-direction: column;
    gap: 8px;
  }
  .filter-search-row .search-btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .dept-grid {
    grid-template-columns: 1fr !important;
  }
}
