/*
Theme Name: Estonian Landing
Theme URI: https://example.com/estonian-landing
Author: OpenAI
Description: Contemporary landing theme with mega menu and full-screen hero.
Version: 1.0
Text Domain: estonian-landing
*/

:root {
  /* Modern Light Theme Palette */
  --bg: #ffffff;
  --bg-soft: #f5f5f5;
  /* Very light blue-grey for alternate sections */
  --accent: #2056FF;
  /* Professional Blue */
  --accent-dark: #1a45cc;
  /* Darker Blue for hover states */
  --text: #1a1a1a;
  /* High contrast black */
  --muted: #555555;
  /* Soft grey for secondary text */
  --card: #f4f4f4;
  --header-bg: #ffffff;
  --header-border: rgba(0, 0, 0, 0.05);

  --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  /* Soft, modern shadow */
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 10px;
  --grid-gap: 32px;
  --site-padding: calc(100vw / 5.5);
  font-size: 16px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Plus Jakarta Sans", "Inter", "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.4;
  /* Sticky Footer Setup */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.site-header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 20;
  background: var(--header-bg);
  backdrop-filter: blur(14px);
  /* border-bottom: 1px solid var(--header-border); removed for seamless look */
  /* box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03); removed for seamless look */
  transition: box-shadow 0.3s ease;
}

.site-header.scrolled {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* Hide toggle on desktop/tablet by default */
.menu-toggle {
  display: none;
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px var(--site-padding);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
}

.brand-logo-image {
  max-height: 42px;
  width: auto;
}

.brand-text {
  display: inline-block;
}

.primary-nav {
  display: flex;
  gap: 26px;
  align-items: center;
}

.primary-nav>li {
  list-style: none;
  position: relative;
}

.primary-nav>li>.nav-link {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  padding: 8px 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  /* Chevron down */
  position: relative;
}

.primary-nav>li>.nav-link::after {
  content: none;
}

.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;
}

/* Hover underline */
.primary-nav>li>.nav-link::before {
  content: '';
  position: absolute;
  bottom: 0px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent);
  transition: width 0.3s 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);
}

/* removed hover rule */

.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: var(--grid-gap);
  /* box-shadow: var(--shadow); removed for seamless look */
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: all 0.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.1rem;
  text-transform: none;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--accent);
  margin-bottom: 12px;
  line-height: 1.2;
  min-height: 1.32em;
}

.mega-group-link {
  display: block;
  text-decoration: none;
}

.mega-group-link.mega-link {
  padding-top: 0;
}

.mega-link {
  display: block;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  /* Removed padding/radius/bg transition for cleaner look */
  display: block;
  padding: 8px 0;
  text-decoration: none;
}

.mega-link:hover {
  background: transparent;
  /* No card hover effect */
}

.mega-link span {
  /* changed from block to inline-block for underline */
  font-weight: 700;
  font-size: 1.1rem;
  /* Increased from 1rem to match primary-nav items */
  color: var(--accent);
  margin-bottom: 2px;
  position: relative;
}

.mega-link-sub span {
  font-weight: 600;
  font-size: 0.9rem;
  opacity: 0.85;
}

.mega-link.mega-link-sub {
  padding-top: 2px;
}

.mega-link-sub small {
  font-size: 0.8rem;
}

.mega-link:hover span::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1.5px;
  background: currentColor;
}

.mega-link-no-underline:hover span::after {
  content: none;
}

.mega-item small {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.4;
  pointer-events: auto;
  /* allow selection */
  cursor: text;
  user-select: text;
  -webkit-user-select: text;
}

.mega-cta {
  grid-column: span 3;
  background: var(--bg-soft);
  padding: 20px;
  border-radius: var(--radius-md);
}

.mega-cta h3 {
  margin-bottom: 10px;
}

.mega-cta p {
  color: var(--muted);
  margin-bottom: 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 999px;
  background: var(--accent);
  color: #ffffff;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.btn:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
}

.hero {
  min-height: 80vh;
  display: grid;
  place-items: center;
  padding: 100px var(--site-padding) 40px;
  background: linear-gradient(rgba(40, 70, 140, 0.8), rgba(60, 90, 170, 0.75)),
    url("assets/hero-bg.png") center/cover no-repeat fixed;
  text-align: center;
  color: #ffffff;
  /* Changed to white for contrast on dark bg */
}

.hero-content {
  max-width: 720px;
}

.hero .eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.75rem;
  color: #a0c0ff;
  /* Lighter accent for dark bg */
  margin-bottom: 16px;
}

.hero-actions {
  display: flex;
  justify-content: center;
}

.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, 0.9);
  /* Lightened for dark bg */
  font-size: 1.1rem;
  margin-bottom: 28px;
}

.section {
  padding: 40px var(--site-padding);
}

.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 h2 {
  font-size: 2rem;
}

.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;
  /* justify-content: space-between; removed to use margin scaling */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  border: none;
}

.card h3 {
  margin-bottom: 2px;
}

.card-link {
  text-decoration: none;
}

.card-link:hover {
  color: var(--accent);
}

.card p {
  color: var(--muted);
}

.card .role {
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 8px;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
}

.section-alt {
  background: var(--bg);
}

.footer {
  padding: 60px var(--site-padding);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: grid;
  gap: 24px;
  background: #2b2e35;
  /* Anthracite / Dark Grey */
  color: #eeeeee;
  /* Light text for dark footer */
}

.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, 0.1);
}

.footer small {
  color: #bbbbbb;
}

.feedback-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #bbbbbb;
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

.feedback-link:hover {
  color: var(--accent);
}


/* --- RESPONSIVE BREAKPOINTS --- */

/* Small Desktop / Laptop */
@media (max-width: 1440px) {
  :root {
    --site-padding: 8vw;
    /* Reduced from ~22vw to 8vw for better content width */
  }
}

/* Tablet (Landscape & Portrait) */
@media (max-width: 1024px) {
  :root {
    --site-padding: 4vw;
    --grid-gap: 24px;
    --radius-lg: 20px;
    --radius-md: 14px;
  }

  .primary-nav {
    gap: 16px;
  }

  .primary-nav>li>.nav-link {
    font-size: 1rem;
  }

  .hero {
    padding-top: 100px;
    background-attachment: scroll;
  }

  .hero h1 {
    font-size: 3rem;
  }
}

/* Mobile (small tablet & phone) */
@media (max-width: 768px) {
  :root {
    --site-padding: 6vw;
  }

  .site-header {
    background: rgba(255, 255, 255, 0.98);
  }

  .nav-wrap {
    padding: 16px var(--site-padding);
  }

  /* Hamburger Button */
  .menu-toggle {
    display: flex;
    padding: 0;
    margin: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    z-index: 100;
  }

  .hamburger-box {
    width: 24px;
    height: 24px;
    position: relative;
    display: inline-block;
  }

  .hamburger-inner {
    display: block;
    top: 50%;
    margin-top: -2px;
  }

  .hamburger-inner,
  .hamburger-inner::before,
  .hamburger-inner::after {
    width: 24px;
    height: 2px;
    background-color: var(--text);
    border-radius: 4px;
    position: absolute;
    transition-property: transform;
    transition-duration: 0.15s;
    transition-timing-function: ease;
  }

  .hamburger-inner::before,
  .hamburger-inner::after {
    content: "";
    display: block;
  }

  .hamburger-inner::before {
    top: -8px;
  }

  .hamburger-inner::after {
    bottom: -8px;
  }

  /* Hamburger Active State */
  .nav-open .hamburger-inner {
    background-color: transparent !important;
  }

  .nav-open .hamburger-inner::before {
    transform: translateY(8px) rotate(45deg);
  }

  .nav-open .hamburger-inner::after {
    transform: translateY(-8px) rotate(-45deg);
  }

  /* Mobile Navigation Overlay */
  .primary-nav {
    position: fixed;
    top: 72px;
    /* Header height approx */
    left: 0;
    width: 100%;
    height: calc(100vh - 72px);
    background: #ffffff;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 24px var(--site-padding);
    gap: 0;
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    overflow-y: auto;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
  }

  .nav-open .primary-nav {
    transform: translateX(0);
  }

  .primary-nav>li {
    width: 100%;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  }

  .primary-nav>li:last-child {
    border-bottom: none;
  }

  .primary-nav>li>.nav-link {
    padding: 16px 0;
    width: 100%;
    font-size: 1.15rem;
    display: flex;
    justify-content: space-between;
  }

  /* Mega Menu on Mobile (Accordion) */
  .mega-menu {
    position: static;
    width: 100%;
    grid-template-columns: 1fr;
    padding: 0 0 16px 16px;
    /* Indent */
    background: transparent;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
    box-shadow: none;
    display: none;
    margin-bottom: 0;
    border-top: none;
  }

  .mega-menu.is-open {
    display: grid;
    background: transparent;
    padding-top: 0;
  }

  .mega-group,
  .mega-cta {
    grid-column: span 1;
    margin-bottom: 24px;
    padding-left: 12px;
    border-left: 2px solid rgba(0, 0, 0, 0.05);
  }

  .mega-group:last-child {
    margin-bottom: 0;
  }

  .mega-group-heading {
    font-size: 1rem;
    margin-bottom: 8px;
  }

  .mega-group-link {
    margin-bottom: 0;
  }

  /* Hero & Section Adjustments */
  .hero {
    text-align: left;
    place-items: start;
    padding-top: 100px;
    /* Reduced top padding slightly as header is compact */
  }

  .hero-content {
    margin: 0;
  }

  .hero-actions {
    justify-content: flex-start;
    margin-bottom: 40px;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .section-grid {
    grid-template-columns: 1fr;
    /* Force 1 column on strictly mobile */
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
  }
}



/* Team Card Styles */
.team-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  justify-content: flex-start;
}

.team-card {
  background: #ffffff;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: 1px solid rgba(0, 0, 0, 0.05);
  width: 100%;
  max-width: 400px;
}

.team-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.team-photo {
  height: 350px;
  background: var(--bg-soft);
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.team-photo img {
  width: 120%;
  height: 120%;
  object-fit: cover;
}

.team-info {
  padding: 24px;
}

.team-info h3 {
  margin-bottom: 4px;
  color: var(--text);
  font-size: 1.25rem;
}

.team-info .role {
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 16px;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
}

.team-info .contact-details p {
  margin-bottom: 4px;
  font-size: 0.95rem;
  color: var(--muted);
}

.team-info .contact-details p a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.brand-badge {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  font-size: 0.75rem;
  font-weight: 700;
  margin-left: 6px;
  vertical-align: middle;
  transform: translateY(-2px);
}

.brand-badge-svg {
  color: var(--accent);
  vertical-align: middle;
}

/* Aasta Ehitaja Layout Controls */
.aasta-ehitaja-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 60px;
  align-items: start;
}

.aasta-ehitaja-sidebar {
  position: sticky;
  top: 100px;
  /* Offset for header */
}

.year-nav {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.sidebar-heading {
  font-size: 0.95rem;
  /* Increased size */
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  /* Thin dividing line */
}

.year-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.year-nav a {
  display: block;
  padding: 10px 16px;
  border-radius: 0;
  color: var(--muted);
  font-weight: 600;
  transition: all 0.2s ease;
  text-decoration: none;
}

.year-nav a:hover,
.year-nav a.active {
  color: var(--accent);
  background: rgba(32, 86, 255, 0.04);
}

.page-template-page-aasta-ehitaja .content-area {
  display: block;
}

.page-template-page-aasta-ehitaja .content-area>* {
  max-width: 100%;
  margin-left: 0;
  margin-right: 0;
}

.page-template-page-aasta-ehitaja .content-area p {
  max-width: 700px;
  margin-right: auto;
}

/* Reset max-width for Contact Form 7 paragraph wrappers so inputs span the full grid */
.page-template-page-aasta-ehitaja .content-area .wpcf7 p {
  max-width: none;
}

@media (max-width: 768px) {
  .aasta-ehitaja-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .aasta-ehitaja-sidebar {
    position: static;
  }

  .year-nav ul {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
  }

  .year-nav a {
    border-radius: 0;
    background: rgba(0, 0, 0, 0.02);
    padding: 8px 16px;
  }

  .year-nav a.active {
    background: rgba(32, 86, 255, 0.05);
    color: var(--accent);
  }
}

/* Utility class for manual constraint in WP-Admin */
.page-template-page-aasta-ehitaja .content-area .narrow-width {
  max-width: 700px;
  margin-right: auto;
}

/* Allow images and full-width blocks to break out */
.page-template-page-aasta-ehitaja .content-area>.wp-block-image,
.page-template-page-aasta-ehitaja .content-area>.wp-block-cover,
.page-template-page-aasta-ehitaja .content-area>.alignwide,
.page-template-page-aasta-ehitaja .content-area>.alignfull {
  max-width: 100%;
}

/* Typography styles for the user-generated content */
.page-template-page-aasta-ehitaja .content-area h2 {
  font-size: 1.2rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 40px;
  margin-bottom: 16px;
  font-weight: 700;
  text-align: left;
  width: 100%;
}

.page-template-page-aasta-ehitaja .content-area h3 {
  font-size: 2.5rem;
  font-weight: 500;
  margin-bottom: 24px;
  color: var(--text);
  text-align: left;
  width: 100%;
}

.page-template-page-aasta-ehitaja .content-area p {
  font-size: 1.25rem;
  line-height: 1.6;
  margin-bottom: 16px;
  color: var(--muted);
  text-align: left;
}

/* Aasta Ehitaja CF7 Form Styling */
.wpcf7 {
  max-width: 700px;
  background: var(--card);
  padding: 40px;
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.04);
  margin-top: 40px;
}

.aasta-form-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.aasta-form-section:last-of-type {
  border-bottom: none;
  margin-bottom: 20px;
  padding-bottom: 0;
}

.aasta-form-section h3 {
  font-size: 1.4rem;
  color: var(--accent);
  margin-bottom: 0px;
  font-weight: 700;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

/* Bypass WordPress auto-<p> wrapping so labels become direct grid items */
.form-grid p {
  display: contents;
}

/* Hide auto-injected <br> tags that would disrupt the grid flow */
.form-grid br {
  display: none;
}

.form-grid label {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

.form-grid .full-width,
/* WordPress automatically wraps labels in <p> tags, so we must span the <p> itself */
.form-grid p:has(.full-width) {
  grid-column: span 2;
}

/* Force CF7 wrapper to be block so inputs can span 100% of grid cell */
.wpcf7-form-control-wrap {
  display: block;
}

.wpcf7-form-control-wrap input[type="text"],
.wpcf7-form-control-wrap input[type="email"],
.wpcf7-form-control-wrap input[type="tel"],
.wpcf7-form-control-wrap input[type="url"],
.wpcf7-form-control-wrap textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  font-family: inherit;
  font-size: 1rem;
  color: var(--text);
  transition: all 0.2s ease;
  margin-top: 6px;
  box-sizing: border-box;
}

/* Evaluation Matrix Likert Scale */
.evaluation-matrix {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: var(--radius-sm);
  padding: 24px;
  margin-top: 8px;
}

.matrix-header, .matrix-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  align-items: center;
  text-align: center;
}

.matrix-header {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--muted);
  border-bottom: 2px solid rgba(0,0,0,0.05);
  padding-bottom: 16px;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.matrix-row {
  padding: 16px 0;
  border-bottom: 1px solid rgba(0,0,0,0.03);
  transition: background 0.2s ease;
}

.matrix-row:hover {
  background: rgba(0,0,0,0.01);
}

.matrix-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.matrix-label {
  text-align: left;
  font-weight: 600;
  color: var(--text);
  padding-right: 16px;
}

/* CF7 Radio specific overrides for Matrix */
.matrix-radios .wpcf7-form-control {
  display: contents; /* Bypass inner span so list items become direct flex items */
}

.matrix-radios .wpcf7-radio {
  display: contents; /* Bypass the wrapping span generated by shortcode */
}

.matrix-radios .wpcf7-list-item {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0;
  height: 100%;
}

.matrix-radios .wpcf7-list-item label {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}

.matrix-radios input[type="radio"] {
  transform: scale(1.4);
  cursor: pointer;
  margin: 0;
  accent-color: var(--accent);
}

.matrix-radios .wpcf7-list-item-label {
  display: none !important; /* Hide the text, rely exclusively on the column header */
}

.wpcf7-form-control-wrap input:focus,
.wpcf7-form-control-wrap textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.1);
}

.form-submit-wrap {
  text-align: right;
  margin-top: 20px;
}

.wpcf7-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 999px;
  background: var(--accent);
  color: #ffffff;
  font-weight: 700;
  font-size: 1.1rem;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.wpcf7-submit:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
}

/* Deactivated Form State Settings */
.wpcf7 fieldset[disabled] {
  opacity: 0.6;
  border: none;
  padding: 0;
  margin: 0;
  pointer-events: none; /* Secondary prevention against any rogue hover states */
}
.wpcf7 fieldset[disabled] .wpcf7-submit {
  display: none; /* Hide the submit button completely when deactivated */
}

@media (max-width: 768px) {
  .aasta-form-section {
    gap: 24px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-grid .full-width,
  .form-grid p:has(.full-width) {
    grid-column: span 1;
  }

  .wpcf7 {
    padding: 24px;
  }

  /* Matrix Mobile Fallback */
  .matrix-header {
    display: none; /* Hide headers completely on mobile */
  }
  
  .matrix-row {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 20px 0;
  }
  
  .matrix-radios {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr; /* Buttons sit in a row below the label */
    background: var(--bg-soft);
    border-radius: var(--radius-sm);
    padding: 8px;
  }
  
  .matrix-label {
    text-align: center;
    font-size: 1.1rem;
    padding: 0;
  }
  
  .matrix-radios .wpcf7-list-item-label {
    display: block !important; /* Bring text back on mobile */
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 8px;
  }
  
  .matrix-radios .wpcf7-list-item label {
    flex-direction: column;
    text-align: center;
  }
}

/* Dropdown Table Matrix for Aasta Ehitaja Form */
.dropdown-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  margin-top: 16px;
  border-top: 1px solid rgba(0,0,0,0.05);
}

.dropdown-table th {
  text-align: left;
  padding: 12px 12px 12px 0;
  border-bottom: 2px solid rgba(0,0,0,0.05);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--muted);
  vertical-align: bottom;
}

.dropdown-table td {
  padding: 16px 12px 16px 0;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  vertical-align: middle;
}

.dropdown-table .matrix-label {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
  width: 20%;
}

.dropdown-table .matrix-select-wrap select {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: var(--radius-sm);
  background-color: var(--card);
  font-size: 0.9rem;
  color: var(--text);
  cursor: pointer;
  appearance: auto;
}

@media (max-width: 1024px) {
  .dropdown-table, 
  .dropdown-table tbody, 
  .dropdown-table tr, 
  .dropdown-table td {
    display: block;
    width: 100%;
  }

  .dropdown-table thead {
    display: none;
  }
  
  .dropdown-table tr {
    padding: 24px 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
  }

  .dropdown-table td {
    padding: 0 0 16px 0;
    border: none;
  }
  
  .dropdown-table td:last-child {
    padding-bottom: 0;
  }
  
  .dropdown-table .matrix-label {
    font-size: 1.1rem;
    color: var(--accent);
    margin-bottom: 8px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    padding-bottom: 8px;
  }
  
  .dropdown-table td[data-label]:not(.matrix-label)::before {
    content: attr(data-label) ": ";
    display: block;
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: 6px;
    font-weight: 500;
  }
}

/* Custom Contact Form 7 Validation Styles */
.wpcf7-form-control.wpcf7-not-valid, 
.wpcf7-not-valid > input, 
.wpcf7-not-valid > textarea, 
.wpcf7-not-valid > select {
  border-color: #ff9800 !important;
  box-shadow: 0 0 0 1px #ff9800 !important;
}

/* Hide the default span text underneath */
.wpcf7-not-valid-tip {
  display: none !important;
}

.terms-acceptance a,
.wpcf7 a {
  color: var(--accent);
  text-decoration: underline;
}

.terms-acceptance a:hover,
.wpcf7 a:hover {
  color: var(--accent-dark);
}

/* Rich Text WYSIWYG Content Area Re-styling */
.content-area p {
  margin-bottom: 1.5em;
  line-height: 1.6;
}

.content-area ul, 
.content-area ol {
  margin-bottom: 1.5em;
  padding-left: 2em; /* Restores missing bullet indentation! */
}

.content-area li {
  margin-bottom: 0.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: 0.75em;
  color: var(--accent);
}

.content-area *:last-child {
  margin-bottom: 0;
}

/* ========================================
   MEMBERSHIP PAGES (Astu Liikmeks)
   ======================================== */

/* --- Value Proposition Page --- */
.membership-container {
  max-width: 1100px;
  margin-inline: auto;
}

.membership-intro {
  font-size: 1.2rem;
  line-height: 1.7;
  color: var(--muted);
  max-width: 750px;
  margin-bottom: 48px;
}

.membership-section {
  margin-bottom: 56px;
}

.membership-section h2 {
  font-size: 1.1rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

/* Benefits Grid */
.benefits-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.benefit-card {
  background: var(--card);
  padding: 28px 24px;
  border-radius: var(--radius-sm);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.benefit-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.benefit-icon {
  color: var(--accent);
  margin-bottom: 12px;
  line-height: 1;
}

.benefit-card h3 {
  font-size: 1.05rem;
  margin-bottom: 6px;
  color: var(--text);
}

.benefit-card p {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.5;
}

/* Eligibility List */
.eligibility-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.eligibility-list li {
  padding-left: 28px;
  position: relative;
  font-size: 1.05rem;
  color: var(--text);
  line-height: 1.5;
}

.eligibility-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

/* Requirements Numbered List */
.requirements-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 20px;
}

.requirement-item {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 1.05rem;
  line-height: 1.5;
}

.req-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
}

.requirements-note {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.6;
}

.requirements-note a {
  color: var(--accent);
  text-decoration: underline;
}

/* Fee Table */
.fee-intro {
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 20px;
}

.fee-table {
  width: 100%;
  max-width: 600px;
  border-collapse: collapse;
  margin-bottom: 16px;
}

.fee-table th {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 2px solid rgba(0, 0, 0, 0.06);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.fee-table td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
  font-size: 1rem;
}

.fee-table tbody tr:hover {
  background: rgba(0, 0, 0, 0.015);
}

.fee-note {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.6;
}

.fee-note a {
  color: var(--accent);
  text-decoration: underline;
}

/* CTA Section */
.membership-cta {
  background: linear-gradient(135deg, rgba(32, 86, 255, 0.06), rgba(32, 86, 255, 0.02));
  border: 1px solid rgba(32, 86, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: 48px;
  text-align: center;
  margin-top: 24px;
}

.membership-cta h2 {
  font-size: 1.8rem;
  color: var(--text);
  margin-bottom: 12px;
}

.membership-cta p {
  font-size: 1.1rem;
  color: var(--muted);
  margin-bottom: 24px;
}

/* --- Application Form Page --- */
.membership-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 60px;
  align-items: start;
}

.membership-sidebar {
  position: sticky;
  top: 100px;
}

.form-intro {
  font-size: 1.1rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 16px;
  max-width: 700px;
}

.form-intro a {
  color: var(--accent);
  text-decoration: underline;
}

.section-help {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 4px;
}

.req {
  display: none;
}

/* Eligibility Checklist (in-form) */
.eligibility-checklist-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.eligibility-check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  font-size: 0.95rem;
  line-height: 1.5;
}

.eligibility-check:hover {
  border-color: var(--accent);
  background: rgba(32, 86, 255, 0.02);
}

.eligibility-check input[type="checkbox"] {
  margin-top: 3px;
  min-width: 18px;
  min-height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
}

.eligibility-check:has(input:checked) {
  border-color: var(--accent);
  background: rgba(32, 86, 255, 0.04);
}

/* Activity Checkboxes */
.activity-checkboxes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.activity-check {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.95rem;
  transition: all 0.15s ease;
}

.activity-check:hover {
  border-color: var(--accent);
}

.activity-check input[type="checkbox"] {
  min-width: 16px;
  min-height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
}

.activity-check:has(input:checked) {
  border-color: var(--accent);
  background: rgba(32, 86, 255, 0.04);
}

/* Confirmation Checklist */
.confirmation-checklist {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.confirmation-check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.95rem;
  line-height: 1.5;
  transition: all 0.15s ease;
}

.confirmation-check:hover {
  border-color: var(--accent);
}

.confirmation-check input[type="checkbox"] {
  margin-top: 3px;
  min-width: 18px;
  min-height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
}

.confirmation-check a {
  color: var(--accent);
  text-decoration: underline;
}

.confirmation-check:has(input:checked) {
  border-color: var(--accent);
  background: rgba(32, 86, 255, 0.04);
}

/* Address Toggle */
.address-toggle-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 400;
  font-size: 0.9rem;
  color: var(--muted);
}

.toggle-checkbox {
  accent-color: var(--accent);
}

/* --- Membership Pages Responsive --- */
@media (max-width: 1024px) {
  .benefits-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .membership-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .membership-sidebar {
    position: static;
  }

  .benefits-grid {
    grid-template-columns: 1fr;
  }

  .activity-checkboxes {
    grid-template-columns: 1fr;
  }

  .membership-cta {
    padding: 32px 24px;
  }

  .membership-cta h2 {
    font-size: 1.4rem;
  }

  .fee-table {
    font-size: 0.9rem;
  }
}
/* Üksiku uudise / postituse leht */
.single-post .default-page-container,
.single-post .topic-page-section .container {
  max-width: 980px;
  margin-inline: auto;
}

.single-post .content-area {
  max-width: 760px;
  margin-inline: auto;
}

.single-post .content-area > h1,
.single-post .content-area > h2,
.single-post .content-area > h3,
.single-post .content-area > p,
.single-post .content-area > ul,
.single-post .content-area > ol {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

.single-post .content-area h1 {
  font-size: clamp(2rem, 3vw, 3rem);
  line-height: 1.15;
  margin-bottom: 24px;
}

.single-post .content-area .wp-block-post-featured-image,
.single-post .content-area > .wp-block-image,
.single-post .content-area > figure {
  max-width: 980px;
  margin: 0 auto 32px auto;
}

.single-post .content-area img {
  width: 100%;
  height: auto;
  border-radius: 14px;
  display: block;
}

.single-post .content-area p {
  font-size: 1.15rem;
  line-height: 1.75;
  margin-bottom: 1.2em;
  color: var(--text);
}

.single-post .content-area p + p {
  margin-top: 0.2em;
}

.single-post .content-area a {
  color: var(--accent);
  text-decoration: underline;
}

.single-post .content-area ul,
.single-post .content-area ol {
  padding-left: 1.4rem;
  margin-bottom: 1.4em;
}

.single-post .content-area li {
  margin-bottom: 0.5em;
  line-height: 1.7;
}

.single-post .content-area > *:first-child {
  margin-top: 0;
}

.single-post .content-area > *:last-child {
  margin-bottom: 0;
}

@media (max-width: 768px) {
  .single-post .content-area {
    max-width: 100%;
  }

  .single-post .content-area h1 {
    font-size: 2rem;
    margin-bottom: 18px;
  }

  .single-post .content-area p {
    font-size: 1.03rem;
    line-height: 1.65;
  }

  .single-post .content-area > .wp-block-image,
  .single-post .content-area > figure {
    margin-bottom: 22px;
  }
}
/* Üksiku uudise / postituse leht */
.single-post .default-page-container,
.single-post .topic-page-section .container {
  max-width: 980px;
  margin-inline: auto;
}

.single-post .content-area {
  max-width: 760px;
  margin-inline: auto;
}

.single-post .content-area > h1,
.single-post .content-area > h2,
.single-post .content-area > h3,
.single-post .content-area > p,
.single-post .content-area > ul,
.single-post .content-area > ol {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

.single-post .content-area h1 {
  font-size: clamp(2rem, 3vw, 3rem);
  line-height: 1.15;
  margin-bottom: 24px;
}

.single-post .content-area .wp-block-post-featured-image,
.single-post .content-area > .wp-block-image,
.single-post .content-area > figure {
  max-width: 980px;
  margin: 0 auto 32px auto;
}

.single-post .content-area img {
  width: 100%;
  height: auto;
  border-radius: 14px;
  display: block;
}

.single-post .content-area p {
  font-size: 1.15rem;
  line-height: 1.75;
  margin-bottom: 1.2em;
  color: var(--text);
}

.single-post .content-area p + p {
  margin-top: 0.2em;
}

.single-post .content-area a {
  color: var(--accent);
  text-decoration: underline;
}

.single-post .content-area ul,
.single-post .content-area ol {
  padding-left: 1.4rem;
  margin-bottom: 1.4em;
}

.single-post .content-area li {
  margin-bottom: 0.5em;
  line-height: 1.7;
}

.single-post .content-area > *:first-child {
  margin-top: 0;
}

.single-post .content-area > *:last-child {
  margin-bottom: 0;
}

@media (max-width: 768px) {
  .single-post .content-area {
    max-width: 100%;
  }

  .single-post .content-area h1 {
    font-size: 2rem;
    margin-bottom: 18px;
  }

  .single-post .content-area p {
    font-size: 1.03rem;
    line-height: 1.65;
  }

  .single-post .content-area > .wp-block-image,
  .single-post .content-area > figure {
    margin-bottom: 22px;
  }
}
#uudised .card {
  display: grid !important;
  grid-template-columns: 180px 1fr !important;
  gap: 24px !important;
  align-items: start !important;
  padding: 24px !important;
}

#uudised .card-image {
  margin: 0 !important;
}

#uudised .card-image img {
  width: 180px !important;
  height: 120px !important;
  object-fit: cover !important;
  border-radius: 10px !important;
  display: block !important;
}

#uudised .card-content {
  display: flex !important;
  flex-direction: column !important;
  min-width: 0 !important;
}

#uudised .card-content h3 {
  margin: 0 0 14px 0 !important;
  line-height: 1.25 !important;
}

#uudised .card-content p {
  margin: 0 !important;
  line-height: 1.6 !important;
  color: var(--muted) !important;
}
/* =========================================================
   Õhulisem single post kujundus EEEL / WordPress jaoks
   Kleebi: Välimus → Kohanda → Additional CSS
   ========================================================= */

/* 1) Kitsam ja loetavam sisuveerg */
.single-post .site-main article,
.single-post .content-area article,
.single-post article.post {
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
}

/* 2) Pealkirjale rohkem hingamisruumi */
.single-post .entry-header,
.single-post header.entry-header {
  margin-bottom: 28px;
}

.single-post .entry-title,
.single-post h1.entry-title {
  margin-bottom: 18px;
  line-height: 1.18;
  max-width: 18ch;
}

/* 3) Meta (kuupäev, autor jms) veidi pehmemaks */
.single-post .entry-meta,
.single-post .post-meta,
.single-post .posted-on {
  margin-top: 10px;
  margin-bottom: 0;
  opacity: 0.8;
}

/* 4) Foto ümber rohkem õhku */
.single-post .post-thumbnail,
.single-post .featured-image,
.single-post .wp-post-image,
.single-post .entry-media,
.single-post figure.post-thumbnail {
  margin-top: 22px;
  margin-bottom: 34px;
}

/* Kui teema paneb margini pildi wrapperile, mitte pildile */
.single-post .post-thumbnail img,
.single-post .featured-image img,
.single-post img.wp-post-image,
.single-post .entry-media img,
.single-post figure.post-thumbnail img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
}

/* 5) Sisuosa kitsamaks ja õhulisemaks */
.single-post .entry-content,
.single-post .post-content,
.single-post .article-content {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

/* 6) Lõikude vahel rohkem ruumi */
.single-post .entry-content p,
.single-post .post-content p,
.single-post .article-content p {
  margin-bottom: 1.35em;
  line-height: 1.8;
}

/* 7) Esimene lõik pärast pilti ei oleks liiga kinni */
.single-post .entry-content > p:first-of-type,
.single-post .post-content > p:first-of-type,
.single-post .article-content > p:first-of-type {
  margin-top: 8px;
}

/* 8) Pealkirjad sisu sees ka korrektse rütmiga */
.single-post .entry-content h2,
.single-post .entry-content h3,
.single-post .entry-content h4 {
  margin-top: 1.9em;
  margin-bottom: 0.65em;
  line-height: 1.25;
}

/* 9) Nimekirjad ja tsitaadid ka õhulisemaks */
.single-post .entry-content ul,
.single-post .entry-content ol {
  margin-top: 0.8em;
  margin-bottom: 1.4em;
  padding-left: 1.25em;
}

.single-post .entry-content blockquote {
  margin: 1.8em 0;
  padding: 1em 1.2em;
  border-left: 3px solid rgba(0,0,0,0.12);
  background: rgba(0,0,0,0.03);
}

/* 10) Mobiilis veidi kompaktsem, aga ikka õhuline */
@media (max-width: 768px) {
  .single-post .entry-header,
  .single-post header.entry-header {
    margin-bottom: 22px;
  }

  .single-post .entry-title,
  .single-post h1.entry-title {
    margin-bottom: 14px;
    max-width: 100%;
    line-height: 1.2;
  }

  .single-post .post-thumbnail,
  .single-post .featured-image,
  .single-post .wp-post-image,
  .single-post .entry-media,
  .single-post figure.post-thumbnail {
    margin-top: 18px;
    margin-bottom: 26px;
  }

  .single-post .entry-content,
  .single-post .post-content,
  .single-post .article-content {
    max-width: 100%;
  }

  .single-post .entry-content p,
  .single-post .post-content p,
  .single-post .article-content p {
    line-height: 1.75;
    margin-bottom: 1.2em;
  }
}
/* =========================================================
   EEEL / WordPress single post – lõplik puhas variant
   - Laiem pealkiri pildi kohal
   - Pilt veidi kitsam kui tekst
   - Suurem vahe foto ja esimese lõigu vahel
   - Tekst 20px
   - Reavahe natuke kitsam
   - Automaatne poolitus ainult sisutekstil
   Kleebi: Välimus → Kohanda → Additional CSS
   ========================================================= */

/* Üldine artikli konteiner */
.single-post .site-main article,
.single-post .content-area article,
.single-post article.post {
  max-width: 980px;
  margin-left: auto;
  margin-right: auto;
}

/* Päis */
.single-post .entry-header,
.single-post header.entry-header {
  max-width: 920px;
  margin: 0 auto 26px auto;
}

/* Pealkiri laiaks pildi kohale */
.single-post .entry-title,
.single-post h1.entry-title {
  max-width: 100%;
  margin-bottom: 16px;
  line-height: 1.15;
  text-wrap: balance;
}

/* Meta */
.single-post .entry-meta,
.single-post .post-meta,
.single-post .posted-on {
  margin-top: 8px;
  margin-bottom: 0;
  opacity: 0.8;
}

/* Tunnuspilt – natuke kitsam kui tekst */
.single-post .post-thumbnail,
.single-post .featured-image,
.single-post .wp-post-image,
.single-post .entry-media,
.single-post figure.post-thumbnail {
  max-width: 860px;
  margin: 22px auto 30px auto;
}

.single-post .post-thumbnail img,
.single-post .featured-image img,
.single-post img.wp-post-image,
.single-post .entry-media img,
.single-post figure.post-thumbnail img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
}

/* Tekstiveerg */
.single-post .entry-content,
.single-post .post-content,
.single-post .article-content {
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

/* Põhitekst – 20px, natuke kitsam reavahe, automaatne poolitus */
.single-post .entry-content p,
.single-post .post-content p,
.single-post .article-content p {
  font-size: 20px;
  line-height: 1.5;
  margin-bottom: 1.2em;

  -webkit-hyphens: auto;
  -ms-hyphens: auto;
  hyphens: auto;

  overflow-wrap: normal;
  word-break: normal;
}

/* Suurem vahe foto ja esimese lõigu vahel */
.single-post .entry-content > p:first-of-type,
.single-post .post-content > p:first-of-type,
.single-post .article-content > p:first-of-type {
  margin-top: 22px;
}

/* Alapealkirjad */
.single-post .entry-content h2,
.single-post .entry-content h3,
.single-post .entry-content h4 {
  margin-top: 1.7em;
  margin-bottom: 0.6em;
  line-height: 1.22;
}

/* Loendid */
.single-post .entry-content ul,
.single-post .entry-content ol {
  margin-top: 0.7em;
  margin-bottom: 1.2em;
  padding-left: 1.25em;
}

/* Tsitaadid */
.single-post .entry-content blockquote {
  margin: 1.8em 0;
  padding: 1em 1.2em;
  border-left: 3px solid rgba(0,0,0,0.12);
  background: rgba(0,0,0,0.03);
}

/* Pildiallkirjad */
.single-post .wp-caption-text,
.single-post figcaption {
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.45;
  opacity: 0.75;
}

/* Mobiil */
@media (max-width: 768px) {
  .single-post .entry-header,
  .single-post header.entry-header,
  .single-post .post-thumbnail,
  .single-post .featured-image,
  .single-post .wp-post-image,
  .single-post .entry-media,
  .single-post figure.post-thumbnail,
  .single-post .entry-content,
  .single-post .post-content,
  .single-post .article-content {
    max-width: 100%;
  }

  .single-post .entry-title,
  .single-post h1.entry-title {
    line-height: 1.18;
    margin-bottom: 14px;
  }

  .single-post .post-thumbnail,
  .single-post .featured-image,
  .single-post .wp-post-image,
  .single-post .entry-media,
  .single-post figure.post-thumbnail {
    margin: 18px auto 26px auto;
  }

  .single-post .entry-content p,
  .single-post .post-content p,
  .single-post .article-content p {
    font-size: 18px;
    line-height: 1.58;
    margin-bottom: 1.1em;
  }

  .single-post .entry-content > p:first-of-type,
  .single-post .post-content > p:first-of-type,
  .single-post .article-content > p:first-of-type {
    margin-top: 18px;
  }
}
.post-featured-image {
  margin: 20px 0 28px;
}

.post-featured-image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
}

.entry-header {
  margin-bottom: 18px;
}

.entry-title {
  line-height: 1.2;
}

.entry-content {
  line-height: 1.7;
}

.entry-content p {
  margin-bottom: 1.2em;
}
.single .section-grid {
  display: block;
}

.single .card {
  max-width: 900px;
  margin: 0 auto;
  padding: 0;
  background: transparent;
  box-shadow: none;
}
.post-featured-image {
  margin: 20px 0 28px;
}

.post-featured-image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
}

.entry-header {
  margin-bottom: 18px;
}

.entry-title {
  line-height: 1.2;
}

.entry-content {
  line-height: 1.7;
}

.entry-content p {
  margin-bottom: 1.2em;
}
/* Vähenda vahet pealkiri → pilt */
.entry-header {
  margin-bottom: 10px;
}

/* Vähenda vahet pilt → tekst */
.post-featured-image {
  margin: 10px 0 16px;
}

/* Vähenda esimese lõigu ülemist vahet */
.entry-content p:first-child {
  margin-top: 0;
}

/* Üldine tekstivahe natuke kompaktsemaks */
.entry-content p {
  margin-bottom: 1em;
}
.entry-header {
  margin-bottom: 6px;
}

.post-featured-image {
  margin: 8px 0 12px;
}
/* Väga kompaktne uudise layout */

.entry-header {
  margin-bottom: 4px;
}

.entry-title {
  margin-bottom: 0;
  line-height: 1.15;
}

.post-featured-image {
  margin: 6px 0 10px;
}

.entry-content {
  margin-top: 0;
}

.entry-content p:first-child {
  margin-top: 0;
}

.entry-content p {
  margin-bottom: 0.9em;
}
.entry-header {
  margin-bottom: 2px;
}

.post-featured-image {
  margin: 4px 0 8px;
}
#uudised .section-grid {
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
#uudised .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 {
  color: var(--text);
  font-weight: 700;
}

#uudised .card-content p {
  margin: 0;
  line-height: 1.55;
}
#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: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-transform: none;   /* väiksed tähed */
  border-radius: 999px;
}
/* UUDISTE LEHT – PUHAS PORTAALIVADE */
.news-archive-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 48px 40px;
}

/* Kaart */
.news-archive-card {
  background: transparent;
  padding: 0;
  box-shadow: none;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  padding-bottom: 32px;
}

/* Pealkiri */
.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 {
  color: var(--text);
}

.news-archive-card .entry-title a:hover {
  color: var(--accent);
}

/* Pilt */
.archive-image {
  margin: 0 0 14px 0;
}

.archive-image img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 12px;
}

/* Tekst */
.news-archive-card .entry-content p {
  font-size: 1rem;
  line-height: 1.65;
  color: var(--muted);
  margin-bottom: 16px;
}

/* Loe rohkem nupp */
.read-more-btn {
  display: inline-block;
  font-size: 0.85rem;
  padding: 8px 14px;
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
}

.read-more-btn:hover {
  background: var(--accent);
  color: #fff;
}
@media (max-width: 768px) {
  .news-archive-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .news-archive-card .entry-title {
    font-size: 1.4rem;
  }
}
.single-post-container {
  max-width: 980px;
  margin: 0 auto;
}

.single-news-article {
  max-width: 980px;
  margin: 0 auto;
}

.single-news-article .entry-header,
.single-news-article .post-featured-image,
.single-news-article .entry-content {
  max-width: 980px;
  margin-left: 0;
  margin-right: 0;
}

.single-news-article .entry-title {
  margin: 0 0 8px 0;
  line-height: 1.1;
}

.post-featured-image {
  margin: 8px 0 14px 0;
}

.post-featured-image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 14px;
}

.single-news-article .entry-content {
  max-width: 980px;
}

.single-news-article .entry-content p {
  margin-bottom: 1.1em;
  line-height: 1.75;
}
/* Üksiku uudise vaade – kõik samale vasakule joonele */
.single-news-article {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 !important;
}

.single-news-article .entry-header,
.single-news-article .post-featured-image,
.single-news-article .entry-content {
  margin-left: 0 !important;
  padding-left: 0 !important;
}

/* Võta figure vaikimisi nihked maha */
.single-news-article figure,
.single-news-article .post-featured-image {
  margin: 8px 0 14px 0 !important;
}

/* Võta sisuploki võimalik nihutus maha */
.single-news-article .entry-content,
.single-news-article .entry-content p,
.single-news-article .entry-content > * {
  margin-left: 0 !important;
}

/* Kui Gutenberg lisab pildile wrapperi */
.single-news-article .post-featured-image img,
.single-news-article .entry-content img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
}

/* Pealkirja alumine vahe */
.single-news-article .entry-title {
  margin: 0 0 6px 0 !important;
  line-height: 1.12;
}
/* Uudiste leht – pildid kompaktseks */
.blog article img,
.archive article img {
  width: 100%;
  height: 180px;        /* <-- MUUDA SIIN (150–220px) */
  object-fit: cover;    /* lõikab ilusti, ei veni */
  border-radius: 12px;
}
/* Üksiku uudise vaade – pilt vasakule joondada */
.single-news-article .post-featured-image {
  margin-left: 0 !important;
  margin-right: 0 !important;
  text-align: left !important;
}

/* Kui WordPress paneb pildi figure sisse */
.single-news-article .post-featured-image figure {
  margin: 0 !important;
}

/* Pilt ise */
.single-news-article .post-featured-image img {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 !important;
}
#seisukohad .section-grid {
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

#seisukohad .card {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 22px;
  align-items: start;
  padding: 24px;
}

#seisukohad .card-image img {
  width: 180px;
  height: 120px;
  object-fit: cover;
  border-radius: 10px;
  display: block;
}

#seisukohad .card-content {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

#seisukohad .news-card-title {
  margin: 0 0 10px 0;
  font-size: 1.15rem;
  line-height: 1.25;
  font-weight: 700;
}

#seisukohad .card-content p {
  margin: 0;
  line-height: 1.55;
  color: var(--muted);
}

@media (max-width: 768px) {
  #seisukohad .section-grid {
    grid-template-columns: 1fr;
  }

  #seisukohad .card {
    grid-template-columns: 1fr;
  }

  #seisukohad .card-image img {
    width: 100%;
    height: 200px;
  }
}
/* Ainult üksiku postituse (uudis / seisukoht) vaates */
.single-post .entry-content p {
    text-align: justify;
    hyphens: auto;
}

/* kui kasutad ka lehti (page template seisukohtade jaoks) */
.page .entry-content p {
    text-align: justify;
    hyphens: auto;
}
.members-grid {
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.member-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 140px;
}

.member-name {
  margin-bottom: 10px;
  font-size: 1rem;
}

.member-name a {
  text-decoration: none;
  color: var(--text);
}

.member-name a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.member-logo img {
  max-width: 110px;
  max-height: 45px;
  width: auto;
  height: auto;
}