/*
Theme Name: Malaka Markazi
Theme URI: https://malaka.tsue.ac
Author: Malaka Markazi
Description: TDIU huzuridagi Pedagog kadrlarni qayta tayyorlash va ularning malakasini oshirish tarmoq markazi uchun maxsus theme.
Version: 1.0.1
Requires at least: 7.0
Requires PHP: 8.2
Text Domain: malaka-markazi
*/

:root {
  --navy-950: #071d30;
  --navy-900: #0b2944;
  --navy-800: #123b5e;
  --navy-700: #185077;
  --blue-500: #1b78ad;
  --gold-500: #eeb72f;
  --gold-400: #f5ca5d;
  --ink: #142434;
  --muted: #607080;
  --line: #dce4ea;
  --surface: #f4f7f9;
  --white: #fff;
  --shadow-sm: 0 10px 28px rgba(7, 29, 48, .08);
  --shadow-lg: 0 25px 70px rgba(7, 29, 48, .18);
  --radius-sm: .7rem;
  --radius: 1.15rem;
  --radius-lg: 1.75rem;
  --wrap: min(1180px, calc(100% - 2rem));
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--white);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
}
body.menu-open { overflow: hidden; }
img { max-width: 100%; height: auto; }
a { color: var(--navy-700); text-decoration-thickness: .08em; text-underline-offset: .18em; }
a:hover { color: var(--blue-500); }
button, input, textarea, select { font: inherit; }
:focus-visible { outline: 3px solid var(--gold-500); outline-offset: 3px; }
.wrap { width: var(--wrap); margin-inline: auto; }
.screen-reader-text {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.screen-reader-text:focus {
  position: fixed; z-index: 9999; top: 1rem; left: 1rem; width: auto; height: auto;
  padding: .8rem 1rem; clip: auto; background: var(--white); color: var(--navy-900);
}

.topbar { background: var(--navy-950); color: #dce8f1; font-size: .84rem; }
.topbar__inner { min-height: 38px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.topbar__group { display: flex; align-items: center; gap: 1.25rem; }
.topbar a { color: inherit; text-decoration: none; }
.topbar a:hover { color: var(--gold-400); }
.topbar svg { width: 15px; height: 15px; vertical-align: -2px; margin-right: .35rem; }

.site-header { position: relative; z-index: 50; background: rgba(255, 255, 255, .98); border-bottom: 1px solid var(--line); }
.site-header__inner { min-height: 86px; display: flex; align-items: center; gap: 1.5rem; }
.site-brand { display: flex; align-items: center; gap: .8rem; min-width: 285px; color: var(--navy-900); text-decoration: none; }
.site-brand:hover { color: var(--navy-700); }
.brand-mark {
  width: 48px; height: 48px; flex: 0 0 48px; display: grid; place-items: center;
  border-radius: 14px; color: var(--gold-500); background: var(--navy-900);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12);
}
.brand-mark svg { width: 31px; height: 31px; }
.brand-copy { display: grid; line-height: 1.15; }
.brand-copy strong { font-size: 1.02rem; letter-spacing: .015em; }
.brand-copy span { margin-top: .28rem; color: var(--muted); font-size: .68rem; font-weight: 650; text-transform: uppercase; letter-spacing: .08em; }
.site-nav { margin-left: auto; }
.site-nav ul { display: flex; align-items: center; gap: .2rem; margin: 0; padding: 0; list-style: none; }
.site-nav li { position: relative; }
.site-nav a { display: block; padding: .75rem .72rem; color: var(--ink); font-size: .88rem; font-weight: 720; text-decoration: none; }
.site-nav a:hover, .site-nav .current-menu-item > a, .site-nav .current-menu-ancestor > a { color: var(--navy-700); }
.site-nav .menu-item-has-children > a::after { content: ""; display: inline-block; width: 6px; height: 6px; margin: 0 0 3px 7px; border-right: 1.5px solid; border-bottom: 1.5px solid; transform: rotate(45deg); }
.site-nav .sub-menu {
  position: absolute; top: calc(100% + .35rem); left: 0; z-index: 30; display: block; width: 260px;
  padding: .55rem; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg); opacity: 0; visibility: hidden; transform: translateY(8px); transition: .2s ease;
}
.site-nav li:hover > .sub-menu, .site-nav li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.site-nav .sub-menu a { padding: .65rem .75rem; border-radius: .45rem; font-size: .83rem; line-height: 1.35; }
.site-nav .sub-menu a:hover { background: var(--surface); }
.header-search { display: grid; place-items: center; width: 42px; height: 42px; flex: 0 0 auto; border: 1px solid var(--line); border-radius: 50%; color: var(--navy-900); background: var(--white); text-decoration: none; }
.header-search svg { width: 19px; height: 19px; }
.menu-toggle { display: none; width: 44px; height: 44px; padding: 10px; border: 1px solid var(--line); border-radius: .65rem; background: var(--white); }
.menu-toggle span { display: block; height: 2px; margin: 5px 0; background: var(--navy-900); }

.hero {
  position: relative; min-height: 640px; display: grid; align-items: center; color: var(--white);
  background: var(--navy-950) center / cover no-repeat; overflow: hidden;
}
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(4,24,40,.94) 0%, rgba(7,35,57,.82) 45%, rgba(7,29,48,.28) 100%); }
.hero::after { content: ""; position: absolute; right: -8%; bottom: -45%; width: 580px; height: 580px; border: 90px solid rgba(238,183,47,.11); border-radius: 50%; }
.hero__content { position: relative; z-index: 2; max-width: 760px; padding: 7rem 0 10rem; }
.eyebrow { display: inline-flex; align-items: center; gap: .55rem; color: var(--gold-400); font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .13em; }
.eyebrow::before { content: ""; width: 32px; height: 2px; background: currentColor; }
.hero h1 { max-width: 740px; margin: 1rem 0 1.35rem; font-size: clamp(2.5rem, 5.3vw, 4.75rem); line-height: 1.02; letter-spacing: -.04em; }
.hero p { max-width: 650px; margin: 0 0 2rem; color: #dbe8f1; font-size: clamp(1rem, 1.6vw, 1.18rem); }
.button-row { display: flex; flex-wrap: wrap; gap: .8rem; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: .75rem 1.35rem; border: 1px solid transparent; border-radius: .65rem; font-weight: 780; text-decoration: none; transition: .2s ease; }
.button--gold { color: var(--navy-950); background: var(--gold-500); }
.button--gold:hover { color: var(--navy-950); background: var(--gold-400); transform: translateY(-2px); }
.button--light { color: var(--white); border-color: rgba(255,255,255,.5); background: rgba(255,255,255,.08); backdrop-filter: blur(8px); }
.button--light:hover { color: var(--white); background: rgba(255,255,255,.16); }
.button--navy { color: var(--white); background: var(--navy-900); }
.button--navy:hover { color: var(--white); background: var(--navy-700); transform: translateY(-2px); }

.quick-panel { position: relative; z-index: 4; margin-top: -95px; }
.quick-grid { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); overflow: hidden; }
.quick-card { position: relative; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 1rem; min-height: 155px; padding: 1.7rem; color: var(--ink); text-decoration: none; }
.quick-card + .quick-card { border-left: 1px solid var(--line); }
.quick-card:hover { color: var(--navy-700); background: #f9fbfc; }
.quick-card__icon { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 16px; color: var(--gold-500); background: var(--navy-900); }
.quick-card__icon svg { width: 27px; height: 27px; }
.quick-card small { display: block; margin-bottom: .2rem; color: var(--muted); font-size: .72rem; font-weight: 760; text-transform: uppercase; letter-spacing: .1em; }
.quick-card strong { display: block; font-size: 1.05rem; line-height: 1.35; }

.section { padding: clamp(4.5rem, 8vw, 7rem) 0; }
.section--surface { background: var(--surface); }
.section--navy { color: var(--white); background: var(--navy-950); }
.section-heading { max-width: 720px; margin-bottom: 2.5rem; }
.section-heading--row { max-width: none; display: flex; align-items: end; justify-content: space-between; gap: 1rem; }
.section-heading h2 { margin: .8rem 0 0; color: var(--navy-950); font-size: clamp(2rem, 3.8vw, 3.15rem); line-height: 1.1; letter-spacing: -.035em; }
.section--navy .section-heading h2 { color: var(--white); }
.section-heading p { color: var(--muted); }
.section--navy .section-heading p { color: #b9c9d5; }

.about-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.about-media { position: relative; min-height: 510px; }
.about-media img { width: 88%; height: 470px; object-fit: cover; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
.about-note { position: absolute; right: 0; bottom: 0; width: min(285px, 74%); padding: 1.4rem; color: var(--white); background: var(--navy-900); border: 5px solid var(--white); border-radius: var(--radius); }
.about-note strong { display: block; margin-bottom: .25rem; font-size: 1.2rem; }
.about-copy h2 { margin: .8rem 0 1rem; font-size: clamp(2rem, 3.8vw, 3.3rem); line-height: 1.08; letter-spacing: -.035em; }
.about-copy p { color: var(--muted); }
.check-list { display: grid; gap: .7rem; margin: 1.5rem 0 2rem; padding: 0; list-style: none; }
.check-list li { display: flex; gap: .7rem; font-weight: 650; }
.check-list li::before { content: "✓"; width: 24px; height: 24px; flex: 0 0 24px; display: grid; place-items: center; border-radius: 50%; color: var(--navy-900); background: var(--gold-500); font-size: .8rem; font-weight: 900; }

.program-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.program-card { position: relative; min-height: 265px; padding: 1.65rem; border: 1px solid rgba(255,255,255,.12); border-radius: var(--radius); background: rgba(255,255,255,.055); overflow: hidden; }
.program-card::after { content: attr(data-number); position: absolute; right: 1rem; bottom: -.55rem; color: rgba(255,255,255,.045); font-size: 7rem; font-weight: 900; line-height: 1; }
.program-card__icon { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 13px; color: var(--navy-950); background: var(--gold-500); }
.program-card h3 { margin: 1.35rem 0 .65rem; color: var(--white); font-size: 1.25rem; line-height: 1.3; }
.program-card p { margin: 0 0 1rem; color: #b9c9d5; font-size: .92rem; }
.program-card a { position: relative; z-index: 1; color: var(--gold-400); font-weight: 750; text-decoration: none; }

.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.news-card { display: flex; flex-direction: column; min-width: 0; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); transition: .2s ease; }
.news-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.news-card__media { aspect-ratio: 16 / 10; display: block; overflow: hidden; background: #d9e3e9; }
.news-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.news-card:hover .news-card__media img { transform: scale(1.035); }
.news-card__placeholder { width: 100%; height: 100%; display: grid; place-items: center; color: rgba(255,255,255,.75); background: linear-gradient(135deg, var(--navy-900), var(--blue-500)); }
.news-card__placeholder svg { width: 54px; height: 54px; }
.news-card__body { display: flex; flex: 1; flex-direction: column; padding: 1.3rem; }
.post-meta { display: flex; flex-wrap: wrap; gap: .75rem; color: var(--muted); font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.news-card h2, .news-card h3 { margin: .7rem 0 .8rem; font-size: 1.08rem; line-height: 1.4; }
.news-card h2 a, .news-card h3 a { color: var(--ink); text-decoration: none; }
.news-card h2 a:hover, .news-card h3 a:hover { color: var(--navy-700); }
.news-card__body > a:last-child { margin-top: auto; font-weight: 750; text-decoration: none; }

.contact-band { padding: 2.3rem; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2rem; color: var(--white); background: linear-gradient(120deg, var(--navy-800), var(--navy-950)); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
.contact-band h2 { margin: 0 0 .35rem; font-size: clamp(1.5rem, 3vw, 2.3rem); }
.contact-band p { margin: 0; color: #c7d6e0; }

.page-hero { padding: 5.5rem 0 4rem; color: var(--white); background: radial-gradient(circle at 85% 10%, rgba(238,183,47,.18), transparent 28%), var(--navy-950); }
.page-hero h1 { max-width: 920px; margin: .7rem 0 .8rem; font-size: clamp(2.2rem, 4.8vw, 4rem); line-height: 1.08; letter-spacing: -.035em; }
.breadcrumbs { color: #c4d3de; font-size: .85rem; }
.breadcrumbs a { color: var(--gold-400); text-decoration: none; }
.content-layout { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 3rem; }
.content-layout--single { grid-template-columns: minmax(0, 790px) 290px; justify-content: space-between; }
.entry-content { min-width: 0; font-size: 1.02rem; }
.entry-content > *:first-child { margin-top: 0; }
.entry-content h2, .entry-content h3, .entry-content h4 { margin: 1.7em 0 .65em; color: var(--navy-950); line-height: 1.25; }
.entry-content h2 { font-size: clamp(1.55rem, 3vw, 2.25rem); }
.entry-content h3 { font-size: 1.35rem; }
.entry-content p { margin: 0 0 1.05rem; }
.entry-content ul, .entry-content ol { padding-left: 1.35rem; }
.entry-content blockquote { margin: 1.5rem 0; padding: 1.2rem 1.4rem; border-left: 4px solid var(--gold-500); background: var(--surface); }
.entry-content table { width: 100% !important; max-width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: .92rem; }
.entry-content th, .entry-content td { width: auto !important; padding: .75rem !important; border: 1px solid var(--line) !important; font-family: inherit !important; font-size: inherit !important; }
.entry-content th { color: var(--white); background: var(--navy-900); }
.entry-content img { border-radius: var(--radius-sm); }
.entry-content p[style], .entry-content span[style], .entry-content li[style] { font-family: inherit !important; }
.entry-content iframe { max-width: 100%; }
.sidebar-card { margin-bottom: 1rem; padding: 1.35rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.sidebar-card h2 { margin: 0 0 1rem; font-size: 1.05rem; }
.sidebar-card ul { display: grid; gap: .65rem; margin: 0; padding: 0; list-style: none; }
.sidebar-card a { font-size: .9rem; font-weight: 680; text-decoration: none; }
.post-featured { margin: -1rem 0 2rem; overflow: hidden; border-radius: var(--radius-lg); }
.post-featured img { width: 100%; max-height: 520px; object-fit: cover; }
.pagination, .nav-links { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 2.5rem; }
.page-numbers { min-width: 42px; min-height: 42px; display: grid; place-items: center; padding: .45rem .7rem; border: 1px solid var(--line); border-radius: .5rem; text-decoration: none; }
.page-numbers.current { color: var(--white); background: var(--navy-900); border-color: var(--navy-900); }
.search-form { display: flex; gap: .5rem; }
.search-field { width: 100%; min-height: 46px; padding: .65rem .8rem; border: 1px solid var(--line); border-radius: .55rem; }
.search-submit { padding: .65rem 1rem; border: 0; border-radius: .55rem; color: var(--white); background: var(--navy-900); cursor: pointer; }
.contact-details-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 2.5rem; }
.contact-detail-card { padding: 1.4rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.contact-detail-card h2 { margin-top: 0; font-size: 1.15rem; }
.contact-detail-card p:last-child { margin-bottom: 0; }

.site-footer { color: #c3d1db; background: var(--navy-950); }
.footer-main { padding: 4.5rem 0 3.5rem; display: grid; grid-template-columns: 1.45fr 1fr 1fr; gap: 3rem; }
.footer-brand { display: flex; align-items: center; gap: .8rem; margin-bottom: 1rem; color: var(--white); }
.footer-brand strong { max-width: 420px; line-height: 1.35; }
.site-footer h2 { margin: 0 0 1rem; color: var(--white); font-size: 1rem; }
.site-footer ul { display: grid; gap: .6rem; margin: 0; padding: 0; list-style: none; }
.site-footer a { color: #c3d1db; text-decoration: none; }
.site-footer a:hover { color: var(--gold-400); }
.footer-contact li { display: flex; gap: .6rem; }
.footer-contact svg { width: 18px; height: 18px; flex: 0 0 18px; margin-top: .25rem; color: var(--gold-400); }
.footer-bottom { padding: 1.1rem 0; border-top: 1px solid rgba(255,255,255,.1); font-size: .82rem; }
.footer-bottom__inner { display: flex; justify-content: space-between; gap: 1rem; }

@media (max-width: 1050px) {
  .menu-toggle { display: block; margin-left: auto; }
  .site-nav {
    position: fixed; inset: 0 0 0 auto; z-index: 100; width: min(390px, 88vw); margin: 0; padding: 6rem 1.25rem 2rem;
    background: var(--white); box-shadow: var(--shadow-lg); transform: translateX(105%); transition: transform .25s ease; overflow-y: auto;
  }
  .menu-open .site-nav { transform: none; }
  .site-nav ul { display: block; }
  .site-nav a { padding: .8rem; border-bottom: 1px solid var(--line); }
  .site-nav .sub-menu { position: static; width: auto; padding: 0 0 0 .75rem; border: 0; box-shadow: none; opacity: 1; visibility: visible; transform: none; }
  .header-search { display: none; }
  .program-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 780px) {
  :root { --wrap: min(100% - 1.25rem, 1180px); }
  .topbar__inner { padding: .45rem 0; }
  .topbar__group span { display: none; }
  .topbar__group { gap: .75rem; }
  .topbar__group:first-child a:first-child { display: none; }
  .topbar__group:first-child a, .topbar__group:last-child a { white-space: nowrap; }
  .topbar__group:last-child { margin-left: auto; }
  .site-header__inner { min-height: 72px; }
  .site-brand { min-width: 0; }
  .brand-copy strong { font-size: .88rem; }
  .brand-copy span { display: none; }
  .brand-mark { width: 42px; height: 42px; flex-basis: 42px; }
  .hero { min-height: 590px; }
  .hero::before { background: rgba(4,24,40,.78); }
  .hero__content { padding: 5rem 0 8.5rem; }
  .quick-panel { margin-top: -65px; }
  .quick-grid { grid-template-columns: 1fr; }
  .quick-card { min-height: 115px; }
  .quick-card + .quick-card { border-left: 0; border-top: 1px solid var(--line); }
  .about-grid, .content-layout, .content-layout--single, .contact-details-grid { grid-template-columns: 1fr; }
  .about-media { min-height: 410px; }
  .about-media img { height: 380px; }
  .program-grid, .news-grid { grid-template-columns: 1fr; }
  .section-heading--row { display: block; }
  .section-heading--row .button { margin-top: 1rem; }
  .contact-band { grid-template-columns: 1fr; padding: 1.5rem; }
  .footer-main { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom__inner { display: block; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
