/*
 * Theme Name: eszfk-intranet-2025
 * Author: Riba Zoltán
 * Author URI: https://www.eszfk.hu
 * Description: ESZFK Intranet 2025 téma.
 * Version: 1.0.13 (20251204)
 * Requires at least: 6.0
 * Tested up to: 6.6
 * License: GPL-2.0-or-later
 * Text Domain: eszfk-intranet-2025
 */

@font-face { font-family: "Segoe UI"; src: url("assets/fonts/segmdl2.ttf"); }

* { box-sizing: border-box; }

:root { --color0: #ffffff; --color1: #c20437; --color2: #004186; --color3: #0091ca; }

html, body { height: 100%; }
body { margin: 0; font-family: "Segoe UI", sans-serif; min-height: 100vh; display: flex; flex-direction: column; color: var(--color2)}
a { color: var(--color1); text-decoration: none; }

.site-main > .wp-block-columns { display: flex; gap: 1em;}
.site-main > .wp-block-columns > .wp-block-column { flex-basis: 0; flex-grow: 1}
.site-main > .wp-block-columns > .wp-block-column > .wp-block-buttons { display: flex; gap: 1em; flex-direction: column;}
.site-main > .wp-block-columns > .wp-block-column > .wp-block-buttons > .wp-block-button { flex-basis: 100%; width: 100%}
.site-main > .wp-block-columns > .wp-block-column > .wp-block-buttons > .wp-block-button > .wp-block-button__link { display: inline-block; width: 100%; text-decoration: none; text-align: center; font-size: 22px; padding: 30px 0; }

.has-white-color { color: white; }
.has-text-align-center { text-align: center; }

.site-header { height: 150px; display: grid; grid-template-columns: 300px 1fr 360px; gap: 16px; align-items: center; padding: 0 16px; }

.header-left { display: flex; align-items: center; justify-content: flex-start; height: 100%; }
.header-left img { width: 300px; height: 55px; object-fit: contain; object-position: left center; }

.header-center { height: 100%; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.header-center img { max-height: 100%; width: auto; height: 100%; object-fit: contain; }

.header-right { height: 100%; display: flex; flex-direction: column; justify-content: center; gap: 8px; }
.header-right .site-title { font-weight: inherit; font-size: 46px; margin: 20px 0 0 0; text-align: right; color: var(--color2); }
.header-right .user-name { font-size: 14px; text-align: right; color: var(--color2); padding-top: 8px; }
.header-right .logout-link { margin-left: 10px; font-weight: bold; text-decoration: none; color: var(--color1); }

.header-right .search { display: flex; justify-content: flex-end; }
.header-right .search form { display: flex; gap: 8px; border: 1px solid var(--color2); border-radius: 10px; overflow: hidden; }
.header-right .search input[type="search"] { flex: 1; padding: 8px 10px; border: unset; }
.header-right .search input[type="search"]::placeholder { color: var(--color2); }
.header-right .search input[type="search"]:focus { outline: none; }
.header-right .search button { padding: 8px 12px; border: unset; background: var(--color0); cursor: pointer; }

.site-navigation { display: flex; justify-content: space-between; align-items: center; padding: 10px 20px; }

.site-title h1 { margin: 0; color: var(--color2); font-size: 28px; font-weight: initial; }

.home-link a { text-decoration: none; color: var(--color2); }
.home-link a::after { content: " >"; }

.site-main { flex: 1 1 auto; padding: 8px 16px; color: var(--color2);}

.site-main a[href^="http"]:not([href*="eszfk"])::after { content: " ↗"; color: inherit; }

.message-box { padding: 16px; text-align: center; color: var(--color2); }

.site-footer { position: sticky; bottom: 0; background: var(--color2); color: white; padding: 12px 16px; display:flex; justify-content: space-between; align-items: center; }
.site-footer .left { display: flex; gap: 30px; }
.site-footer .right { text-align: right; }
.site-footer .footer-card { display:flex; align-items:center; gap:10px; margin:0; }
.site-footer .footer-icon { width: 32px; }

.wp-block { max-width: none; }
.alignwide { max-width: none; }
.alignfull { max-width: none; }

.twolvl-acc ul { list-style-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 142' height='12' width='12'><polygon fill='%23c20437' points='0.0,28.2843 28.2843,0.0 98.9949,70.7107 28.2843,141.4214 0.0,113.1371 42.4264,70.7107'/></svg>"); }

.twolvl-acc .lvl1>summary { display:flex; align-items:center; justify-content:space-between; cursor:pointer; list-style:none; padding:1rem 1rem; margin: 1px 0; font-size: 22px; }

.twolvl-acc .lvl1.sotetkek > summary { background: var(--color2); color: var(--color0); }
.twolvl-acc .lvl1.vilagoskek > summary { background: #0091ca; color: var(--color0); }
.twolvl-acc .lvl1.piros > summary { background: #c20437; color: var(--color0); }

.twolvl-acc .lvl2>summary { display:flex; align-items:center; justify-content:space-between; cursor:pointer; list-style:none; padding: 1rem 2rem; margin: 0; font-size: 20px; color: var(--color2); border-bottom: 1px solid #cccccc; }

.twolvl-acc .lvl2[open]>summary { border-bottom: unset; }

.twolvl-acc .lvl1 > div.wp-block-group { border-left: 1px solid #cccccc; border-right: 1px solid #cccccc; border-bottom: 1px solid #cccccc; }

.twolvl-acc .lvl1 > div.wp-block-group > div.wp-block-group__inner-container:not(:has(.lvl2)) { padding: 1rem 2rem; color: var(--color2); }

.twolvl-acc .lvl2 > div.wp-block-group { display:flex; align-items:center; justify-content:space-between; cursor:pointer; list-style:none; padding: 1rem 2rem; margin: 0; color: var(--color2); border-bottom: 1px solid #cccccc; }

.twolvl-acc summary::-webkit-details-marker{display:none}
.twolvl-acc summary::after{content:"▸";transition:transform .2s ease;font-size:2rem;color:var(--acc-muted)}
.twolvl-acc details[open]>summary::after{transform:rotate(90deg)}
.twolvl-acc .inner{padding:.25rem .25rem .5rem}
.twolvl-acc .content{margin:.1rem 0 0 .1rem;color:var(--acc-muted)}

.twolvl-acc details.lvl1:first-of-type { border-top-left-radius: 10px; border-top-right-radius: 10px !important; overflow: hidden; }
.twolvl-acc details.lvl1:last-of-type { border-bottom-left-radius: 10px; border-bottom-right-radius: 10px; overflow: hidden; }
.twolvl-acc details.lvl1:last-of-type[open] { border-bottom-left-radius: 0 !important; border-bottom-right-radius: 0 !important; }

/* login */
.login-container { display: flex; justify-content: center; align-items: center; min-height: calc(100vh - 100px); }
.login-left { background: var(--color0); padding: 20px 70px; text-align: center; border-right: 2px solid var(--color2); }
.login-left h2 { color: var(--color2); font-size: 42px; font-weight: normal; margin-bottom: 20px; }
.login-left input[type="text"],
.login-left input[type="password"] { width: 100%; padding: 10px; margin: 8px 0; border: 1px solid var(--color2); border-radius: 5px; color: var(--color2); }
.login-left button { background: var(--color2); color: var(--color0); padding: 10px 20px; border: none; border-radius: 5px; cursor: pointer; }
.login-left button:hover { background: var(--color3); }
.login-left .error { background: var(--color1); color: var(--color0); padding: 5px; border-radius: 5px; margin-bottom: 15px; }
.login-right { padding: 30px 50px; }
.login-logo { margin: 20px; width: 250px; }

/* Hírek */

/* Teljes szélességű bejegyzéslista */
.posts-fullwidth { width: 100%; margin: 0; padding: 0; }
.posts-list { display: flex; flex-direction: column; gap: 20px; }
.post-card { display: flex; align-items: stretch; gap: 20px; width: 100%; overflow: hidden; }
.thumb-wrap { flex: 0 0 300px; display: block; }
.post-thumb, .post-thumb.placeholder { width: 300px; height: 180px; object-fit: scale-down; border-radius: 10px; background: #f3f4f6; }
.post-thumb.placeholder { background: repeating-linear-gradient(45deg, #f3f4f6, #f3f4f6 10px, #eceff1 10px, #eceff1 20px); }
.post-content { flex-grow: 1; padding: 10px 30px; background: var(--color3); max-height: 180px; border-radius: 10px; }
.post-title { margin: 0 0 8px 0; font-size: 1.4rem; line-height: 1.2; }
.post-title a { text-decoration: none; color: var(--color0); }
.post-excerpt { color: var(--color0); line-height: 1.6; }

/* Lapozás */
.pagination { margin: 30px 0; text-align: center; }
.pagination .page-numbers { display: inline-block; padding: 8px 14px; margin: 0 4px; border: 1px solid var(--color2); border-radius: 4px; color: var(--color2); text-decoration: none; }
.pagination .page-numbers.current { background: var(--color2); color: var(--color0); border-color: var(--color2); }
.pagination .page-numbers:hover { background: var(--color3); color: var(--color0); border-color: var(--color3); }

.single-post-title { font-size: 24px; font-weight: normal; }
.single-featured-wrap { float: right; width: 300px; margin-left: 1.5rem; margin-bottom: 1rem; }
.single-featured-img { width: 100%; height: 180px; object-fit: cover; border-radius: 10px; display: block; }
.single-post-content { line-height: 1.6rem; }

.post-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 1rem;
  padding-top: 1.5rem;
}

.post-nav-prev {
  text-align: left;
}

.post-nav-next {
  text-align: right;
}

@media (max-width: 1200px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 700px) {
  .site-header { grid-template-columns: 1fr; height: auto; padding: 12px; }
  .header-left, .header-center, .header-right { height: auto; }
  .header-right .site-title, .header-right .user-name { text-align: left; }
  .card-grid { grid-template-columns: 1fr; }
  .post-card { flex-direction: column; align-items: center; text-align: center; }
  .thumb-wrap { flex: 0 0 auto; }
  .post-thumb, .post-thumb.placeholder { width: 100%; height: auto; max-height: 300px; }

  .single-featured-wrap {
    float: none;
    width: 100%;
    margin-left: 0;
  }

  .single-featured-img {
    height: auto;
  }
}
