/*
Theme Name: SG Orchids Content First
Theme URI: https://sgorchids.com
Author: Codex
Description: A lightweight content-preserving WordPress theme for SG Orchids. Designed to refresh the site without importing demo content or deleting existing pages.
Version: 0.1.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
Text Domain: sgorchids-content-first
*/

:root {
  --sg-ink: #16211c;
  --sg-muted: #5d6963;
  --sg-line: #dce5df;
  --sg-paper: #fffdf9;
  --sg-soft: #f3f8f1;
  --sg-leaf: #286548;
  --sg-leaf-dark: #183d2d;
  --sg-orchid: #b23a79;
  --sg-gold: #b58538;
  --sg-white: #ffffff;
  --sg-radius: 8px;
  --sg-shadow: 0 18px 48px rgba(22, 33, 28, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--sg-paper);
  color: var(--sg-ink);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.65;
}

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

a {
  color: var(--sg-leaf);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--sg-orchid);
}

.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  height: 1px;
  overflow: hidden;
  position: absolute;
  width: 1px;
}

.site-header {
  background: rgba(255, 253, 249, 0.94);
  border-bottom: 1px solid var(--sg-line);
  position: sticky;
  top: 0;
  z-index: 20;
}

.site-header__inner,
.site-footer__inner,
.wrap {
  margin: 0 auto;
  max-width: 1160px;
  padding: 0 24px;
}

.site-header__inner {
  align-items: flex-start;
  display: flex;
  gap: 28px;
  justify-content: space-between;
  min-height: 76px;
  padding-bottom: 14px;
  padding-top: 16px;
}

.site-branding {
  color: var(--sg-ink);
  display: grid;
  text-decoration: none;
}

.site-title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.1;
}

.site-description {
  color: var(--sg-muted);
  font-size: 0.84rem;
  margin-top: 4px;
}

.site-navigation {
  padding-top: 4px;
}

.site-navigation ul {
  list-style: none;
}

.site-navigation li {
  position: relative;
}

.site-navigation li:hover > .sub-menu,
.site-navigation li:focus-within > .sub-menu,
.site-navigation li:hover > .children,
.site-navigation li:focus-within > .children {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.primary-menu {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  justify-content: flex-end;
  list-style: none;
  margin: 0;
  padding: 0;
}

.primary-menu a {
  color: var(--sg-ink);
  font-size: 0.94rem;
  font-weight: 650;
  text-decoration: none;
}

.primary-menu a:hover,
.primary-menu .current-menu-item > a {
  color: var(--sg-orchid);
}

.primary-menu .sub-menu,
.primary-menu .children {
  background: var(--sg-white);
  border: 1px solid var(--sg-line);
  border-radius: var(--sg-radius);
  box-shadow: 0 16px 38px rgba(22, 33, 28, 0.13);
  left: 0;
  margin: 0;
  min-width: 220px;
  opacity: 0;
  padding: 10px;
  pointer-events: none;
  position: absolute;
  top: calc(100% + 12px);
  transform: translateY(6px);
  transition: opacity 160ms ease, transform 160ms ease;
  z-index: 30;
}

.primary-menu .sub-menu::before,
.primary-menu .children::before {
  content: "";
  height: 12px;
  left: 0;
  position: absolute;
  right: 0;
  top: -12px;
}

.primary-menu .sub-menu a,
.primary-menu .children a {
  display: block;
  font-size: 0.9rem;
  padding: 8px 10px;
  white-space: nowrap;
}

.primary-menu .sub-menu a:hover,
.primary-menu .children a:hover {
  background: var(--sg-soft);
  border-radius: 6px;
}

.hero {
  background: linear-gradient(115deg, rgba(243, 248, 241, 0.96), rgba(255, 253, 249, 0.92));
  border-bottom: 1px solid var(--sg-line);
  overflow: hidden;
}

.hero__inner {
  display: grid;
  gap: 40px;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
  min-height: 560px;
  padding-bottom: 64px;
  padding-top: 64px;
}

.hero__copy {
  align-self: center;
}

.eyebrow {
  color: var(--sg-gold);
  font-size: 0.82rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  margin: 0 0 18px;
  text-transform: uppercase;
}

h1,
h2,
h3,
h4 {
  color: var(--sg-ink);
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: 0;
  line-height: 1.12;
}

h1 {
  font-size: clamp(2.45rem, 5vw, 4.8rem);
  margin: 0 0 20px;
  max-width: 780px;
}

h2 {
  font-size: clamp(1.9rem, 3vw, 3rem);
  margin: 0 0 18px;
}

h3 {
  font-size: 1.35rem;
  margin: 0 0 10px;
}

.lead {
  color: var(--sg-muted);
  font-size: clamp(1.06rem, 1.5vw, 1.24rem);
  max-width: 680px;
}

.hero__actions,
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button,
.wp-block-button__link,
button,
input[type="submit"] {
  align-items: center;
  background: var(--sg-leaf);
  border: 1px solid var(--sg-leaf);
  border-radius: var(--sg-radius);
  color: var(--sg-white);
  cursor: pointer;
  display: inline-flex;
  font-weight: 750;
  justify-content: center;
  min-height: 46px;
  padding: 11px 18px;
  text-decoration: none;
}

.button:hover,
.wp-block-button__link:hover,
button:hover,
input[type="submit"]:hover {
  background: var(--sg-leaf-dark);
  color: var(--sg-white);
}

.button--secondary {
  background: transparent;
  color: var(--sg-leaf);
}

.button--secondary:hover {
  background: var(--sg-soft);
  color: var(--sg-leaf-dark);
}

.hero__media {
  align-self: stretch;
  min-height: 380px;
}

.hero__image,
.hero__placeholder {
  border-radius: var(--sg-radius);
  box-shadow: var(--sg-shadow);
  height: 100%;
  min-height: 380px;
  object-fit: cover;
  width: 100%;
}

.hero__placeholder {
  background:
    radial-gradient(circle at 20% 20%, rgba(178, 58, 121, 0.24), transparent 28%),
    radial-gradient(circle at 80% 30%, rgba(40, 101, 72, 0.24), transparent 32%),
    linear-gradient(135deg, #f8eee8, #eaf4ee 52%, #fffdf9);
}

.section {
  padding: 72px 0;
}

.section--soft {
  background: var(--sg-soft);
}

.section__head {
  margin-bottom: 30px;
  max-width: 760px;
}

.grid {
  display: grid;
  gap: 22px;
}

.grid--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.feature-card,
.post-card {
  background: var(--sg-white);
  border: 1px solid var(--sg-line);
  border-radius: var(--sg-radius);
  overflow: hidden;
}

.feature-card {
  padding: 24px;
}

.feature-card p,
.post-card p {
  color: var(--sg-muted);
  margin-bottom: 0;
}

.post-card__body {
  padding: 22px;
}

.post-card__meta,
.entry-meta {
  color: var(--sg-muted);
  font-size: 0.88rem;
  margin-bottom: 10px;
}

.entry {
  padding: 56px 0 76px;
}

.entry__header {
  margin: 0 auto 34px;
  max-width: 860px;
}

.entry__content {
  margin: 0 auto;
  max-width: 860px;
}

.entry__content > *:first-child {
  margin-top: 0;
}

.entry__content p,
.entry__content li {
  color: var(--sg-ink);
}

.entry__content figure {
  margin-left: 0;
  margin-right: 0;
}

.entry__content h2,
.entry__content h3,
.entry__content h4 {
  margin-top: 1.8em;
}

.entry__content a {
  font-weight: 650;
}

.entry__content iframe {
  border: 0;
  max-width: 100%;
}

.entry__content iframe[src*="google.com/maps"],
.entry__content iframe[src*="maps.google"] {
  aspect-ratio: 4 / 3;
  border: 1px solid var(--sg-line);
  border-radius: var(--sg-radius);
  height: auto;
  width: 100%;
}

.wp-block-group.has-background {
  border-radius: var(--sg-radius);
  padding: clamp(22px, 4vw, 42px);
}

.wp-block-columns {
  gap: 28px;
}

.wp-block-image img,
.wp-block-gallery img {
  border-radius: var(--sg-radius);
}

.wp-block-quote {
  border-left: 3px solid var(--sg-orchid);
  color: var(--sg-muted);
  margin-left: 0;
  padding-left: 22px;
}

.wp-block-separator {
  border: 0;
  border-top: 1px solid var(--sg-line);
  margin: 42px auto;
}

.entry__content .alignwide {
  margin-left: calc(50% - min(560px, 50vw - 24px));
  max-width: 1120px;
  width: min(1120px, calc(100vw - 48px));
}

.entry__content .alignfull {
  margin-left: calc(50% - 50vw);
  max-width: 100vw;
  width: 100vw;
}

.wp-caption-text,
figcaption {
  color: var(--sg-muted);
  font-size: 0.9rem;
  margin-top: 8px;
}

.site-footer {
  background: var(--sg-ink);
  color: rgba(255, 255, 255, 0.78);
  padding: 44px 0;
}

.site-footer a {
  color: var(--sg-white);
}

.site-footer__inner {
  max-width: 760px;
}

.footer-brand {
  color: var(--sg-white);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.page-links,
.pagination {
  margin-top: 34px;
}

input,
textarea,
select {
  border: 1px solid var(--sg-line);
  border-radius: var(--sg-radius);
  color: var(--sg-ink);
  font: inherit;
  padding: 11px 12px;
  width: 100%;
}

textarea {
  min-height: 150px;
}

@media (max-width: 860px) {
  .site-header {
    position: static;
  }

  .site-header__inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
    padding-bottom: 18px;
    padding-top: 18px;
  }

  .primary-menu {
    justify-content: flex-start;
  }

  .primary-menu .sub-menu,
  .primary-menu .children {
    background: transparent;
    border: 0;
    box-shadow: none;
    display: block;
    margin-top: 8px;
    min-width: 0;
    opacity: 1;
    padding: 0 0 0 14px;
    pointer-events: auto;
    position: static;
    transform: none;
    width: 100%;
  }

  .primary-menu .sub-menu::before,
  .primary-menu .children::before {
    display: none;
  }

  .hero__inner,
  .grid--three {
    grid-template-columns: 1fr;
  }

  .hero__inner {
    min-height: auto;
    padding-bottom: 44px;
    padding-top: 44px;
  }

  .section {
    padding: 52px 0;
  }

}

@media (max-width: 560px) {
  body {
    font-size: 16px;
  }

  .site-header__inner,
  .site-footer__inner,
  .wrap {
    padding-left: 18px;
    padding-right: 18px;
  }

  .primary-menu {
    gap: 8px 14px;
  }

  .hero__actions,
  .cta-row {
    align-items: stretch;
    flex-direction: column;
  }

  .button,
  .wp-block-button__link {
    width: 100%;
  }
}
