/*
Theme Name: Finnish Property Nordic
Theme URI: https://www.finnishproperty.info/
Author: OpenAI
Author URI: https://openai.com/
Description: A lightweight Nordic editorial WordPress theme designed for Finnish Property Info.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
Text Domain: finnishproperty-nordic
*/

:root {
  --fp-bg: #f5f3ef;
  --fp-surface: #ffffff;
  --fp-surface-soft: #f8f8f6;
  --fp-text: #1f2933;
  --fp-muted: #667085;
  --fp-accent: #2f5d50;
  --fp-accent-dark: #24483e;
  --fp-border: #d9ded9;
  --fp-shadow: 0 10px 30px rgba(31, 41, 51, 0.05);
  --fp-radius: 16px;
  --fp-content: 1180px;
  --fp-narrow: 820px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--fp-bg);
  color: var(--fp-text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 18px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--fp-accent);
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

a:hover,
a:focus {
  color: var(--fp-accent-dark);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
}

figure {
  margin: 0;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 0.7em;
  color: var(--fp-text);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: 0.01em;
}

h1 { font-size: clamp(2.4rem, 4vw, 4.3rem); }
h2 { font-size: clamp(1.9rem, 2.5vw, 2.6rem); }
h3 { font-size: clamp(1.4rem, 2vw, 1.75rem); }
h4 { font-size: 1.15rem; }

p, ul, ol, blockquote {
  margin: 0 0 1.2em;
}

ul, ol {
  padding-left: 1.4em;
}

blockquote {
  margin-left: 0;
  padding-left: 1em;
  border-left: 3px solid var(--fp-border);
  color: var(--fp-muted);
}

.site {
  min-height: 100vh;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
  background: rgba(245, 243, 239, 0.92);
  border-bottom: 1px solid rgba(217, 222, 217, 0.8);
}

.header-inner,
.site-footer-inner,
.content-shell,
.archive-shell,
.page-shell,
.search-shell,
.not-found-shell {
  width: min(calc(100% - 32px), var(--fp-content));
  margin: 0 auto;
}

.header-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: end;
  padding: 24px 0 18px;
}

.branding-title {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 3rem);
}

.branding-title a {
  color: var(--fp-text);
}

.branding-tagline {
  margin: 6px 0 0;
  color: var(--fp-muted);
  font-size: 0.95rem;
}

.main-navigation ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 0;
  margin: 0;
}

.main-navigation a {
  color: var(--fp-text);
  font-size: 0.96rem;
  font-weight: 500;
  padding-bottom: 6px;
  border-bottom: 1px solid transparent;
}

.main-navigation a:hover,
.main-navigation .current-menu-item > a,
.main-navigation .current_page_item > a {
  color: var(--fp-accent);
  border-color: var(--fp-accent);
}

.menu-toggle {
  display: none;
}

.content-shell,
.archive-shell,
.page-shell,
.search-shell,
.not-found-shell {
  padding: 40px 0 72px;
}

.hero-card {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 28px;
  background: var(--fp-surface);
  border: 1px solid var(--fp-border);
  border-radius: calc(var(--fp-radius) + 4px);
  box-shadow: var(--fp-shadow);
  overflow: hidden;
  margin-bottom: 28px;
}

.hero-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
  min-height: 340px;
}

.hero-card-body {
  padding: 34px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-card .entry-title {
  font-size: clamp(2rem, 3vw, 3.1rem);
}

.hero-card .entry-excerpt {
  color: var(--fp-muted);
  font-size: 1.05rem;
}

.home-grid,
.archive-grid,
.search-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.post-card,
.page-article,
.single-article,
.search-card,
.not-found-card {
  background: var(--fp-surface);
  border: 1px solid var(--fp-border);
  border-radius: var(--fp-radius);
  box-shadow: var(--fp-shadow);
}

.post-card {
  overflow: hidden;
}

.post-card-media img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 0;
}

.post-card-body,
.page-article,
.search-card,
.not-found-card {
  padding: 26px;
}

.entry-meta,
.post-meta,
.archive-intro,
.search-intro {
  color: var(--fp-muted);
  font-size: 0.95rem;
}

.post-card .entry-title {
  font-size: 1.75rem;
}

.entry-excerpt {
  color: var(--fp-muted);
}

.single-shell {
  width: min(calc(100% - 32px), var(--fp-narrow));
  margin: 0 auto;
  padding: 40px 0 72px;
}

.single-article {
  padding: 38px;
}

.single-article .featured-image {
  margin-bottom: 24px;
}

.single-article .featured-image img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.entry-content > *:last-child,
.entry-summary > *:last-child,
.page-content > *:last-child {
  margin-bottom: 0;
}

.taxonomy-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.taxonomy-links a,
.tag-cloud-link,
.page-numbers,
.posts-navigation a,
.post-navigation a,
input[type="submit"],
button,
.wp-block-button__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 18px;
  border-radius: 999px;
  border: 1px solid var(--fp-border);
  background: var(--fp-surface-soft);
  color: var(--fp-text);
  font-weight: 600;
}

.taxonomy-links a:hover,
.tag-cloud-link:hover,
.page-numbers:hover,
.page-numbers.current,
.posts-navigation a:hover,
.post-navigation a:hover,
input[type="submit"]:hover,
button:hover,
.wp-block-button__link:hover {
  background: var(--fp-accent);
  border-color: var(--fp-accent);
  color: #fff;
}

.pagination-wrap,
.posts-navigation,
.post-navigation {
  margin-top: 28px;
}

.posts-navigation .nav-links,
.post-navigation .nav-links {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.archive-header,
.search-header {
  margin-bottom: 24px;
}

.archive-title,
.search-title,
.page-title,
.not-found-title {
  margin-bottom: 10px;
}

.site-footer {
  border-top: 1px solid var(--fp-border);
  background: rgba(255, 255, 255, 0.5);
}

.site-footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 26px 0 52px;
  color: var(--fp-muted);
  font-size: 0.95rem;
}

.search-form {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.search-form label {
  flex: 1 1 260px;
}

.search-field,
input[type="text"],
input[type="email"],
input[type="url"],
input[type="search"],
textarea,
select {
  width: 100%;
  border: 1px solid var(--fp-border);
  border-radius: 12px;
  background: #fff;
  padding: 13px 14px;
  font: inherit;
  color: var(--fp-text);
}

.screen-reader-text {
  position: absolute;
  left: -9999px;
}

.wp-caption,
.gallery,
.aligncenter {
  max-width: 100%;
}

.alignleft {
  float: left;
  margin: 0 1.3em 1em 0;
}

.alignright {
  float: right;
  margin: 0 0 1em 1.3em;
}

.aligncenter {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 960px) {
  .hero-card,
  .header-inner,
  .site-footer-inner,
  .home-grid,
  .archive-grid,
  .search-grid {
    grid-template-columns: 1fr;
  }

  .header-inner {
    align-items: start;
  }

  .site-footer-inner {
    justify-content: flex-start;
  }
}

@media (max-width: 720px) {
  body {
    font-size: 17px;
  }

  .menu-toggle {
    display: inline-flex;
    margin-top: 12px;
    padding: 10px 16px;
    border-radius: 999px;
    border: 1px solid var(--fp-border);
    background: var(--fp-surface);
    color: var(--fp-text);
    font-weight: 600;
    cursor: pointer;
  }

  .main-navigation {
    width: 100%;
  }

  .main-navigation ul {
    display: none;
    width: 100%;
    padding-top: 12px;
    flex-direction: column;
    gap: 12px;
  }

  .main-navigation.is-open ul {
    display: flex;
  }

  .hero-card-body,
  .post-card-body,
  .page-article,
  .single-article,
  .search-card,
  .not-found-card {
    padding: 22px;
  }

  .content-shell,
  .archive-shell,
  .page-shell,
  .single-shell,
  .search-shell,
  .not-found-shell {
    padding-top: 28px;
  }
}
