/*
Theme Name: Estonian Landing
Description: Clean responsive EEEL style.css – header, mobile menu, homepage news, single posts, members.
Version: 1.1
Text Domain: estonian-landing
*/

:root {
  --bg: #ffffff;
  --bg-soft: #f5f5f5;
  --accent: #2056FF;
  --accent-dark: #1a45cc;
  --text: #1a1a1a;
  --muted: #555555;
  --card: #f4f4f4;
  --header-bg: #ffffff;
  --shadow: 0 4px 20px rgba(0,0,0,.08);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 10px;
  --site-padding: 8vw;
  font-size: 16px;
}
@media (max-width: 768px) {
  body.nav-open .mega-menu.is-open,
  .site-header nav.is-open .mega-menu.is-open {
    display: grid !important;
    position: static !important;
    width: 100% !important;
    background: transparent !important;
    padding: 8px 0 18px 18px !important;
    margin: 0 !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: none !important;
    box-shadow: none !important;
    grid-template-columns: 1fr !important;
  }

  body.nav-open .mega-menu.is-open a,
  body.nav-open .mega-menu.is-open span,
  body.nav-open .mega-menu.is-open h4,
  .site-header nav.is-open .mega-menu.is-open a,
  .site-header nav.is-open .mega-menu.is-open span,
  .site-header nav.is-open .mega-menu.is-open h4 {
    color: #ffffff !important;
  }

  body.nav-open .mega-item,
  .site-header nav.is-open .mega-item {
    padding: 6px 0 !important;
  }

  body.nav-open .mega-item small,
  .site-header nav.is-open .mega-item small {
    color: rgba(255,255,255,0.7) !important;
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "Plus Jakarta Sans", "Inter", "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.4;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* HEADER */
.site-header {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  z-index: 9999;
  background: var(--header-bg);
  backdrop-filter: blur(14px);
}
.site-header.scrolled { box-shadow: var(--shadow); }
.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px var(--site-padding);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  min-width: 0;
  font-size: 1.18rem;
  font-weight: 700;
  letter-spacing: .02em;
}
.brand-logo { display: inline-flex; align-items: center; flex-shrink: 0; }
.brand-logo-image { max-height: 42px; width: auto; }
.brand-text { white-space: nowrap; }
.brand-badge-svg { flex-shrink: 0; }
.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
  min-width: 0;
}
.header-right nav { display: flex; align-items: center; }
.primary-nav {
  display: flex;
  gap: 22px;
  align-items: center;
  list-style: none;
}
.primary-nav > li { list-style: none; position: relative; }
.primary-nav > li > .nav-link {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  padding: 8px 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  position: relative;
}
.primary-nav > li.has-mega-menu > .nav-link::after {
  content: '';
  display: inline-block;
  margin-left: 6px;
  width: 6px; height: 6px;
  border: solid currentColor;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  margin-bottom: 2px;
}
.primary-nav > li > .nav-link::before {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 2px;
  background: var(--accent);
  transition: width .25s ease;
}
.primary-nav > li > .nav-link:hover::before,
.primary-nav > li.current-menu-item > .nav-link::before { width: 100%; }
.primary-nav > li > .nav-link:hover,
.primary-nav > li.current-menu-item > .nav-link { color: var(--accent); }

.header-social { display: flex; align-items: center; gap: 9px; flex-shrink: 0; }
.header-social a {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: #0F4C81;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .2s ease, transform .2s ease;
}
.header-social a:hover { background: var(--accent); transform: translateY(-1px); }

.menu-toggle {
  display: none;
  padding: 0; margin: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  width: 42px; height: 42px;
  align-items: center;
  justify-content: center;
  z-index: 10001;
  flex-shrink: 0;
}
.hamburger-box { width: 24px; height: 24px; position: relative; display: inline-block; }
.hamburger-inner,
.hamburger-inner::before,
.hamburger-inner::after {
  width: 24px; height: 2px;
  background: var(--text);
  border-radius: 4px;
  position: absolute;
  left: 0;
  transition: transform .2s ease, background .2s ease;
}
.hamburger-inner { top: 50%; transform: translateY(-50%); }
.hamburger-inner::before,
.hamburger-inner::after { content: ""; display: block; }
.hamburger-inner::before { top: -8px; }
.hamburger-inner::after { top: 8px; }
.menu-toggle[aria-expanded="true"] .hamburger-inner { background: transparent; }
.menu-toggle[aria-expanded="true"] .hamburger-inner::before { transform: translateY(8px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .hamburger-inner::after { transform: translateY(-8px) rotate(-45deg); }

/* MEGA MENU DESKTOP */
.mega-menu {
  position: fixed;
  left: 0; top: 78px;
  width: 100vw;
  background: #f5f5f5;
  padding: 36px var(--site-padding);
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 32px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: all .2s ease;
  visibility: hidden;
}
.mega-menu.is-open { opacity: 1; pointer-events: auto; transform: translateY(0); visibility: visible; }
.mega-group { grid-column: span 3; align-self: start; }
.mega-group-heading {
  display: block;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 12px;
  line-height: 1.2;
}
.mega-link { display: block; padding: 8px 0; }
.mega-link span { font-weight: 700; font-size: 1rem; color: var(--accent); position: relative; }
.mega-link-sub span { font-weight: 600; font-size: .9rem; opacity: .85; }
.mega-link:hover span::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1.5px;
  background: currentColor;
}
.mega-item small { display: block; font-size: .85rem; color: var(--muted); line-height: 1.4; }

/* GENERAL */
.hero {
  min-height: 80vh;
  display: grid;
  place-items: center;
  padding: 110px var(--site-padding) 48px;
  background: linear-gradient(rgba(40,70,140,.8), rgba(60,90,170,.75)), url("assets/hero-bg.png") center/cover no-repeat fixed;
  text-align: center;
  color: #fff;
}
.hero-content { max-width: 760px; }
.hero .eyebrow { text-transform: uppercase; letter-spacing: .18em; font-size: .75rem; color: #a0c0ff; margin-bottom: 16px; }
.hero h1 { font-size: clamp(2.5rem, 3.6vw, 4.2rem); margin-bottom: 20px; line-height: 1.1; }
.hero p { color: rgba(255,255,255,.92); font-size: 1.1rem; margin-bottom: 28px; }
.hero-actions { display: flex; justify-content: center; }
.section { padding: 44px var(--site-padding); }
.section-alt { background: var(--bg); }
.topic-page-section { padding-top: 120px; }
.topic-page-section .container { max-width: 1400px; margin-inline: auto; }
.default-page-container { max-width: 1100px; margin-inline: auto; }
.default-page-content { background: var(--bg); color: var(--text); }
.default-page-content .section-header { margin-bottom: 24px; }
.default-page-content .content-area { max-width: 760px; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 32px; gap: 20px; }
.section-header h1, .section-header h2 { font-size: 2rem; line-height: 1.2; }
.section-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; }
.card { background: var(--card); padding: 20px; border-radius: var(--radius-sm); min-height: 130px; display: flex; flex-direction: column; box-shadow: 0 4px 12px rgba(0,0,0,.06); border: none; }
.card h3 { margin-bottom: 8px; }
.card p { color: var(--muted); line-height: 1.55; }
.card-link:hover { color: var(--accent); }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 999px; background: var(--accent); color: #fff; font-weight: 600; border: none; cursor: pointer; transition: transform .2s ease, background .2s ease; }
.btn:hover { background: var(--accent-dark); transform: translateY(-1px); }
.content-area p { margin-bottom: 1.5em; line-height: 1.65; }
.content-area ul, .content-area ol { margin-bottom: 1.5em; padding-left: 2em; }
.content-area li { margin-bottom: .5em; line-height: 1.6; }
.content-area ul li { list-style-type: disc; }
.content-area ol li { list-style-type: decimal; }
.content-area h2, .content-area h3, .content-area h4 { margin-top: 1.5em; margin-bottom: .75em; color: var(--accent); }

/* HOMEPAGE NEWS */
#uudised .section-grid, #seisukohad .section-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
#uudised .card, #seisukohad .card { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 22px; align-items: start; padding: 24px; }
#uudised .card-image, #seisukohad .card-image { margin: 0; }
#uudised .card-image img, #seisukohad .card-image img { width: 180px; height: 120px; object-fit: cover; border-radius: 10px; }
#uudised .card-content, #seisukohad .card-content { min-width: 0; display: flex; flex-direction: column; }
#uudised .news-card-title, #seisukohad .news-card-title { margin: 0 0 10px 0; font-size: 1.1rem; line-height: 1.25; font-weight: 700; }
#uudised .news-card-title a, #uudised .news-card-title .card-link, #uudised .news-card-title .card-link span, #seisukohad .news-card-title a, #seisukohad .news-card-title .card-link, #seisukohad .news-card-title .card-link span { color: var(--text); font-weight: 700; }
#uudised .news-card-title a:hover, #seisukohad .news-card-title a:hover { color: var(--accent); }
#uudised .card-content p, #seisukohad .card-content p { margin: 0; line-height: 1.55; color: var(--muted); }
#uudised .older-news-item { display: none !important; }
#uudised .older-news-toggle-wrap { grid-column: 1 / -1; display: flex; justify-content: center; margin-top: 12px; }
#uudised .older-news-toggle { padding: 8px 18px; font-size: .85rem; font-weight: 500; text-transform: none; border-radius: 999px; }

/* NEWS ARCHIVE */
.news-archive-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px 40px; }
.news-archive-card { background: transparent; padding: 0 0 32px; box-shadow: none; border-bottom: 1px solid rgba(0,0,0,.08); }
.news-archive-card .entry-title { font-size: 1.8rem; line-height: 1.2; margin: 0 0 10px; font-weight: 700; }
.news-archive-card .entry-title a:hover { color: var(--accent); }
.archive-image { margin: 0 0 14px 0; }
.archive-image img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 12px; }
.news-archive-card .entry-content p { font-size: 1rem; line-height: 1.65; color: var(--muted); margin-bottom: 16px; }
.read-more-btn { display: inline-block; font-size: .85rem; padding: 8px 14px; background: transparent; border: 1px solid var(--accent); color: var(--accent); border-radius: 20px; text-transform: uppercase; letter-spacing: .05em; font-weight: 500; }
.read-more-btn:hover { background: var(--accent); color: #fff; }

/* SINGLE POSTS */
.single-post .default-page-container, .single-post .topic-page-section .container, .single-post-container, .single-news-article { max-width: 980px; margin-inline: auto; }
.single-news-article { padding: 0 !important; }
.single-news-article .entry-header, .single-news-article .post-featured-image, .single-news-article .post-date, .single-news-article .entry-content, .single-post .section-header, .single-post .post-image, .single-post .post-date, .single-post .entry-content { max-width: 860px; margin-left: auto; margin-right: auto; }
.single-news-article .entry-title, .single-post .section-header h1 { margin: 0 0 10px 0; line-height: 1.15; font-size: clamp(2rem, 3vw, 3rem); }
.post-featured-image, .single-post .post-image { margin-top: 12px; margin-bottom: 18px; }
.post-featured-image img, .single-post .post-image img { width: 100%; height: auto; display: block; border-radius: 12px; }
.post-date { margin-top: 14px; margin-bottom: 16px; color: #667085; font-size: 15px; font-weight: 500; }
.single-news-article .entry-content p, .single-post .entry-content p { font-size: 20px; line-height: 1.6; margin-bottom: 1.15em; hyphens: auto; overflow-wrap: normal; word-break: normal; }
.single-news-article .entry-content a, .single-post .entry-content a { color: var(--accent); text-decoration: underline; }

/* MEMBERS */
.members-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.member-card { display: flex; flex-direction: column; justify-content: space-between; min-height: 170px; text-align: center; }
.member-name { margin-bottom: 10px; font-size: 1rem; }
.member-name a:hover { color: var(--accent); text-decoration: underline; }
.member-logo { display: flex; justify-content: center; align-items: center; min-height: 110px; }
.member-logo img { max-height: 95px; width: auto; max-width: 100%; }

/* SIDEBAR */
.membership-container { max-width: 1100px; margin-inline: auto; }
.membership-layout, .aasta-ehitaja-layout { display: grid; grid-template-columns: 240px 1fr; gap: 60px; align-items: start; }
.membership-sidebar, .aasta-ehitaja-sidebar { position: sticky; top: 100px; }
.year-nav, .sidebar-nav { display: flex; flex-direction: column; gap: 32px; }
.sidebar-heading { font-size: .95rem; font-weight: 700; letter-spacing: .08em; color: var(--muted); text-transform: uppercase; margin-bottom: 20px; padding-bottom: 12px; border-bottom: 1px solid rgba(0,0,0,.08); }
.year-nav ul, .sidebar-nav ul { list-style: none; padding: 0; margin: 0; }
.year-nav a, .sidebar-nav a { display: block; padding: 10px 16px; color: var(--muted); font-weight: 600; transition: all .2s ease; }
.year-nav a:hover, .year-nav a.active, .sidebar-nav a:hover, .sidebar-nav a.active { color: var(--accent); background: rgba(32,86,255,.04); }

/* FORMS */
.wpcf7 { max-width: 700px; background: var(--card); padding: 40px; border-radius: var(--radius-lg); box-shadow: 0 8px 32px rgba(0,0,0,.04); margin-top: 40px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

/* FOOTER */
.footer { padding: 60px var(--site-padding); border-top: 1px solid rgba(255,255,255,.08); display: grid; gap: 24px; background: #2b2e35; color: #eee; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 24px; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.1); }
.footer small { color: #bbb; }

/* TABLET */
@media (max-width: 1200px) {
  :root { --site-padding: 5vw; }
  .primary-nav { gap: 15px; }
  .primary-nav > li > .nav-link { font-size: .95rem; }
  .brand { font-size: 1.05rem; }
}
@media (max-width: 1024px) {
  :root { --site-padding: 4vw; }
  .hero { background-attachment: scroll; }
  .hero h1 { font-size: 3rem; }
  #uudised .section-grid, #seisukohad .section-grid { grid-template-columns: 1fr; }
}

/* MOBILE */
@media (max-width: 768px) {
  :root { --site-padding: 20px; }
  body { overflow-x: hidden; }
  .site-header { position: fixed !important; background: rgba(255,255,255,.98); box-shadow: 0 2px 10px rgba(0,0,0,.05); }
  .nav-wrap { padding: 12px var(--site-padding); gap: 10px; flex-wrap: nowrap; }
  .brand { max-width: calc(100% - 56px); min-width: 0; gap: 8px; font-size: 1rem; }
  .brand-text { white-space: normal; font-size: 16px; line-height: 1.15; max-width: 210px; }
  .brand-logo-image { max-height: 36px; }
  .brand-badge-svg { width: 38px !important; min-width: 38px; height: auto; }
  .header-right { margin-left: auto; gap: 8px; flex-shrink: 0; }
  .menu-toggle { display: flex; }
  .header-social { display: none; }
  .site-header nav { display: none !important; }
  .site-header nav.is-open {
    display: block !important;
    position: absolute !important;
    top: 100% !important;
    left: 0 !important; right: 0 !important;
    width: 100% !important;
    max-height: calc(100vh - 66px);
    overflow-y: auto;
    background: #111827 !important;
    padding: 18px 24px !important;
    z-index: 10000 !important;
    box-shadow: 0 14px 28px rgba(0,0,0,.18);
  }
  .site-header nav.is-open .primary-nav {
    position: static !important;
    transform: none !important;
    height: auto !important;
    width: 100% !important;
    background: transparent !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    padding: 0 !important;
    margin: 0 !important;
    gap: 0 !important;
    overflow: visible !important;
    list-style: none !important;
  }
  .site-header nav.is-open .primary-nav > li { display: block !important; width: 100% !important; border-bottom: 1px solid rgba(255,255,255,.14) !important; }
  .site-header nav.is-open .primary-nav > li:last-child { border-bottom: none !important; }
  .site-header nav.is-open .primary-nav > li > a, .site-header nav.is-open .nav-link {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    color: #fff !important;
    font-size: 17px !important;
    font-weight: 700 !important;
    padding: 14px 0 !important;
    text-decoration: none !important;
  }
  .site-header nav.is-open .primary-nav > li > .nav-link::before { display: none !important; }
  .site-header nav.is-open .mega-menu { position: static !important; width: 100% !important; background: transparent !important; padding: 0 0 12px 14px !important; margin: 0 !important; opacity: 1 !important; visibility: visible !important; pointer-events: auto !important; transform: none !important; box-shadow: none !important; display: none !important; grid-template-columns: 1fr !important; }
  .site-header nav.is-open .mega-menu.is-open { display: grid !important; }
  .site-header nav.is-open .mega-group { grid-column: span 1 !important; margin-bottom: 14px; padding-left: 12px; border-left: 2px solid rgba(255,255,255,.14); }
  .site-header nav.is-open .mega-group-heading, .site-header nav.is-open .mega-link span { color: #fff !important; }
  .site-header nav.is-open .mega-item small { color: rgba(255,255,255,.72); }
  .hero { min-height: 430px; text-align: left; place-items: start; padding: 100px var(--site-padding) 44px; }
  .hero-content { max-width: 100%; }
  .hero-actions { justify-content: flex-start; }
  .hero h1 { font-size: 34px; line-height: 1.15; }
  .hero p { font-size: 17px; }
  .section { padding: 46px var(--site-padding); }
  .topic-page-section { padding-top: 92px; }
  .section-header { flex-direction: column; align-items: flex-start; gap: 14px; margin-bottom: 24px; }
  .section-header h1, .section-header h2 { font-size: 1.75rem; }
  .section-grid { grid-template-columns: 1fr !important; gap: 22px; }
  .card { min-height: 0; }
  #uudised .section-grid, #seisukohad .section-grid { grid-template-columns: 1fr !important; gap: 22px; }
  #uudised .card, #seisukohad .card { display: block !important; width: 100% !important; padding: 18px !important; }
  #uudised .card-image, #seisukohad .card-image { width: 100% !important; max-width: 100% !important; margin: 0 0 16px 0 !important; }
  #uudised .card-image img, #seisukohad .card-image img { width: 100% !important; height: auto !important; aspect-ratio: 16/9; object-fit: cover !important; border-radius: 10px !important; }
  #uudised .card-content, #seisukohad .card-content { width: 100% !important; max-width: 100% !important; display: block !important; }
  #uudised .news-card-title, #seisukohad .news-card-title { font-size: 20px; line-height: 1.3; margin-bottom: 12px; }
  #uudised .card-content p, #seisukohad .card-content p { font-size: 16px; line-height: 1.6; white-space: normal !important; word-break: normal !important; overflow-wrap: break-word !important; }
  .news-archive-grid { grid-template-columns: 1fr; gap: 32px; }
  .news-archive-card .entry-title { font-size: 1.4rem; }
  .single-news-article .entry-header, .single-news-article .post-featured-image, .single-news-article .post-date, .single-news-article .entry-content, .single-post .section-header, .single-post .post-image, .single-post .post-date, .single-post .entry-content { max-width: 100%; }
  .single-news-article .entry-title, .single-post .section-header h1 { font-size: 2rem; line-height: 1.18; }
  .single-news-article .entry-content p, .single-post .entry-content p { font-size: 18px; line-height: 1.58; }
  .membership-layout, .aasta-ehitaja-layout { grid-template-columns: 1fr; gap: 32px; }
  .membership-sidebar, .aasta-ehitaja-sidebar { position: static; }
  .year-nav ul, .sidebar-nav ul { display: flex; flex-direction: row; flex-wrap: wrap; gap: 8px; }
  .year-nav a, .sidebar-nav a { background: rgba(0,0,0,.03); padding: 8px 12px; }
  .form-grid { grid-template-columns: 1fr; }
  .wpcf7 { padding: 24px; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 16px; align-items: flex-start; }
}

@media (max-width: 420px) {
  .brand-text { max-width: 170px; font-size: 15px; }
  .brand-badge-svg { width: 34px !important; min-width: 34px; }
  .hero h1 { font-size: 30px; }
}
@media (max-width: 768px) {

  body.nav-open .site-header nav,
  .site-header nav.is-open {
    display: block !important;
    position: fixed !important;
    top: 64px !important;
    left: 0 !important;
    width: 100% !important;
    height: calc(100vh - 64px) !important;
    background: #111827 !important;
    padding: 24px !important;
    z-index: 999999 !important;
    overflow-y: auto !important;
  }

  body.nav-open .primary-nav,
  .site-header nav.is-open .primary-nav {
    display: flex !important;
    position: static !important;
    transform: none !important;
    width: 100% !important;
    height: auto !important;
    background: transparent !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    padding: 0 !important;
    margin: 0 !important;
    gap: 0 !important;
    list-style: none !important;
  }

  body.nav-open .primary-nav > li,
  .site-header nav.is-open .primary-nav > li {
    display: block !important;
    width: 100% !important;
    border-bottom: 1px solid rgba(255,255,255,0.18) !important;
  }

  body.nav-open .primary-nav > li > a,
  body.nav-open .primary-nav .nav-link,
  .site-header nav.is-open .primary-nav > li > a,
  .site-header nav.is-open .nav-link {
    display: block !important;
    width: 100% !important;
    color: #ffffff !important;
    font-size: 19px !important;
    font-weight: 700 !important;
    padding: 16px 0 !important;
    opacity: 1 !important;
    visibility: visible !important;
  }

  body.nav-open .mega-menu,
  .site-header nav.is-open .mega-menu {
    display: none !important;
  }
}
.team-page-section .team-grid {  display: flex;  flex-wrap: wrap;  gap: 32px;  align-items: flex-start;}.team-page-section .team-card {  width: 100%;  max-width: 340px;  background: #ffffff;  border-radius: var(--radius-md);  overflow: hidden;  box-shadow: 0 4px 12px rgba(0,0,0,0.06);}.team-page-section .team-photo {  height: 260px;  overflow: hidden;  background: var(--bg-soft);}.team-page-section .team-photo img {  width: 100%;  height: 100%;  max-width: 100%;  object-fit: cover;  object-position: center top;  display: block;}.team-page-section .team-info {  padding: 24px;}.team-page-section .team-info h3 {  font-size: 1.25rem;  margin-bottom: 4px;}.team-page-section .role {  color: var(--accent);  font-weight: 600;  margin-bottom: 16px;  text-transform: uppercase;  font-size: 0.85rem;  letter-spacing: 0.05em;}.team-page-section .contact-details p {  margin-bottom: 6px;  color: var(--muted);}@media (max-width: 768px) {  .team-page-section .team-card {    max-width: 100%;  }  .team-page-section .team-photo {    height: 300px;  }}
/* ========================================
   TEAM PAGE – FORCE FIX
======================================== */

body.page-id-5 .team-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(280px, 320px)) !important;
    gap: 32px !important;
    align-items: start !important;
    justify-content: start !important;
}

body.page-id-5 .team-card {
    width: 320px !important;
    max-width: 320px !important;
    background: #ffffff !important;
    border-radius: 16px !important;
    overflow: hidden !important;
    box-shadow: 0 4px 14px rgba(0,0,0,0.06) !important;
}

body.page-id-5 .team-photo {
    width: 100% !important;
    height: 240px !important;
    min-height: 240px !important;
    max-height: 240px !important;
    overflow: hidden !important;
    position: relative !important;
    background: #f5f5f5 !important;
}

body.page-id-5 .team-photo img {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 100% !important;
    max-width: 100% !important;
    object-fit: cover !important;
    object-position: center top !important;
    display: block !important;
    margin: 0 !important;
    transform: none !important;
}

body.page-id-5 .team-info {
    padding: 24px !important;
}

body.page-id-5 .team-info h3 {
    font-size: 22px !important;
    margin-bottom: 6px !important;
}

body.page-id-5 .role {
    color: #2056FF !important;
    font-weight: 700 !important;
    margin-bottom: 16px !important;
    font-size: 14px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.04em !important;
}

@media (max-width: 768px) {
    body.page-id-5 .team-grid {
        grid-template-columns: 1fr !important;
    }

    body.page-id-5 .team-card {
        width: 100% !important;
        max-width: 100% !important;
    }

    body.page-id-5 .team-photo {
        height: 220px !important;
        min-height: 220px !important;
        max-height: 220px !important;
    }
}
/* ========================================
   UUDISED LEHT – PILDID NORMAALSEKS
======================================== */

.news-archive-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 40px !important;
}

.news-archive-card {
    padding-bottom: 24px !important;
}

.archive-image {
    margin-bottom: 16px !important;
    overflow: hidden !important;
    border-radius: 12px !important;
}

.archive-image img {
    width: 100% !important;
    height: 260px !important;
    max-height: 260px !important;
    object-fit: cover !important;
    object-position: center center !important;
    display: block !important;
    border-radius: 12px !important;
}

.news-archive-card .entry-title {
    font-size: 30px !important;
    line-height: 1.2 !important;
}

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

    .archive-image img {
        height: 220px !important;
        max-height: 220px !important;
    }

    .news-archive-card .entry-title {
        font-size: 24px !important;
    }
}
.team-photo {
    height: 260px !important;
    overflow: hidden !important;
    position: relative !important;
}

.team-photo img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
}

.team-photo img.indrek-photo {
    object-position: center 20% !important;
}