/*
 Theme Name:   Hillside Sanctuary
 Theme URI:    https://hillsidesanctuary.pt
 Description:  Custom standalone theme for Hillside Sanctuary agroturismo. No parent theme dependency.
 Author:       Agent Zero — AZ-DESIGN-001
 Author URI:   https://thesynergygroup.ch
 Version:      4.1.0
 License:      Proprietary
 Text Domain:  hsp-starter
*/

/* ============================================================
   DESIGN SYSTEM — Hillside Sanctuary
   Reference: Six Senses Douro Valley
   ============================================================ */

/* -- Reset -- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* -- Custom Properties -- */
:root {
  /* Palette */
  --hsp-olive:       #5C6B3C;
  --hsp-olive-light: #7A8C5A;
  --hsp-olive-dark:  #3E4A28;
  --hsp-terra:       #C4704A;
  --hsp-terra-light: #D4896A;
  --hsp-stone:       #B8A88A;
  --hsp-stone-light: #D4C8B0;
  --hsp-cream:       #F5F0E8;
  --hsp-cream-dark:  #E8E0D0;
  --hsp-charcoal:    #2C2C2C;
  --hsp-white:       #FDFCFA;
  --hsp-black:       #1A1A1A;

  /* Typography */
  --hsp-serif:   'Playfair Display', Georgia, 'Times New Roman', serif;
  --hsp-sans:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Spacing (8px base) */
  --s1: 0.5rem;    /* 8px */
  --s2: 1rem;      /* 16px */
  --s3: 1.5rem;    /* 24px */
  --s4: 2rem;      /* 32px */
  --s5: 3rem;      /* 48px */
  --s6: 4rem;      /* 64px */
  --s7: 6rem;      /* 96px */
  --s8: 8rem;      /* 128px */

  /* Layout */
  --max-w: 1200px;
  --max-w-narrow: 720px;
  --gutter: clamp(1rem, 4vw, 2rem);

  /* Transitions */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --duration: 0.3s;
}

/* -- Base Typography -- */
html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--hsp-sans);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--hsp-charcoal);
  background: var(--hsp-white);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--hsp-serif);
  font-weight: 600;
  line-height: 1.2;
  color: var(--hsp-black);
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); margin-bottom: var(--s4); }
h2 { font-size: clamp(1.75rem, 4vw, 3rem); margin-bottom: var(--s3); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); margin-bottom: var(--s2); }

p { margin-bottom: var(--s3); max-width: 65ch; }
p:last-child { margin-bottom: 0; }

a { color: var(--hsp-terra); text-decoration: none; transition: color var(--duration) var(--ease); }
a:hover { color: var(--hsp-olive); }

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

/* -- Layout -- */
.container { width: 100%; max-width: var(--max-w); margin: 0 auto; padding: 0 var(--gutter); }
.container--narrow { max-width: var(--max-w-narrow); }

.section { padding: var(--s7) 0; }
.section--cream { background: var(--hsp-cream); }
.section--olive { background: var(--hsp-olive-dark); color: var(--hsp-cream); }
.section--olive h2, .section--olive h3 { color: var(--hsp-cream); }
.section--olive p { color: var(--hsp-stone-light); }

/* ============================================================
   SITE HEADER
   ============================================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(253, 252, 250, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(184, 168, 138, 0.15);
  transition: background var(--duration) var(--ease);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.site-header__logo {
  display: flex;
  align-items: center;
  gap: var(--s2);
  text-decoration: none;
  color: var(--hsp-black);
}

.site-header__logo img {
  height: 44px;
  width: auto;
}

.site-header__logo-text {
  font-family: var(--hsp-serif);
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.site-nav { display: flex; align-items: center; gap: var(--s4); list-style: none; }
.site-nav li { list-style: none; }

.site-nav a {
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--hsp-charcoal);
  text-decoration: none;
  position: relative;
  padding: var(--s1) 0;
  transition: color var(--duration) var(--ease);
}

.site-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--hsp-terra);
  transition: width var(--duration) var(--ease);
}

.site-nav a:hover { color: var(--hsp-terra); }
.site-nav a:hover::after { width: 100%; }

.site-nav__cta {
  background: var(--hsp-olive-dark);
  color: var(--hsp-white) !important;
  padding: 0.625rem 1.25rem;
  border-radius: 4px;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  transition: background var(--duration) var(--ease);
}

.site-nav__cta::after { display: none; }
.site-nav__cta:hover { background: var(--hsp-olive); color: var(--hsp-white) !important; }

/* Mobile nav toggle */
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: var(--s1); }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--hsp-charcoal); margin: 5px 0; transition: all var(--duration) var(--ease); }

@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--hsp-white);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--s5);
    transform: translateX(100%);
    transition: transform var(--duration) var(--ease);
  }
  .site-nav.is-open { transform: translateX(0); }
  .site-nav a { font-size: 1rem; }
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--hsp-olive-dark);
  margin-top: 72px; /* header height */
}

.hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(26, 26, 26, 0.15) 40%,
    rgba(62, 74, 40, 0.65) 100%
  );
  z-index: 1;
}

.hero__content {
  position: relative;
  z-index: 2;
  padding: var(--s8) var(--gutter) var(--s6);
  max-width: var(--max-w);
  margin: 0 auto;
  width: 100%;
  color: var(--hsp-white);
}

.hero--center .hero__content { text-align: center; padding-bottom: var(--s7); }
.hero--center { align-items: center; }

.hero h1 {
  color: var(--hsp-white);
  text-shadow: 0 2px 20px rgba(0,0,0,0.4);
  font-weight: 700;
  margin-bottom: var(--s3);
}

.hero__subtitle {
  font-family: var(--hsp-sans);
  font-size: clamp(1rem, 2vw, 1.35rem);
  font-weight: 300;
  letter-spacing: 0.08em;
  opacity: 0.9;
  text-shadow: 0 1px 8px rgba(0,0,0,0.3);
  margin-bottom: var(--s5);
}

.hero--short { min-height: 40vh; max-height: 50vh; }
.hero--short .hero__content { padding-top: var(--s6); padding-bottom: var(--s5); }

/* Scroll indicator */
.hero__scroll {
  position: absolute;
  bottom: var(--s4);
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  animation: scroll-hint 2.5s ease-in-out infinite;
}

.hero__scroll::after {
  content: '';
  display: block;
  width: 20px;
  height: 20px;
  border-right: 1.5px solid rgba(255,255,255,0.5);
  border-bottom: 1.5px solid rgba(255,255,255,0.5);
  transform: rotate(45deg);
}

@keyframes scroll-hint {
  0%, 100% { opacity: 0.3; transform: translateX(-50%) translateY(0); }
  50% { opacity: 0.8; transform: translateX(-50%) translateY(10px); }
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 2rem;
  font-family: var(--hsp-sans);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all var(--duration) var(--ease);
  min-height: 48px;
}

.btn--primary {
  background: var(--hsp-terra);
  color: var(--hsp-white);
}
.btn--primary:hover {
  background: var(--hsp-terra-light);
  color: var(--hsp-white);
  transform: translateY(-1px);
}

.btn--outline {
  background: transparent;
  border: 1.5px solid var(--hsp-olive);
  color: var(--hsp-olive);
}
.btn--outline:hover {
  background: var(--hsp-olive);
  color: var(--hsp-white);
}

.btn--white {
  background: rgba(255,255,255,0.15);
  border: 1.5px solid rgba(255,255,255,0.5);
  color: var(--hsp-white);
  backdrop-filter: blur(4px);
}
.btn--white:hover {
  background: var(--hsp-white);
  color: var(--hsp-olive-dark);
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--hsp-white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  transition: transform var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}

@media (hover: hover) {
  .card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.1);
  }
  .card:hover .card__img img { transform: scale(1.04); }
}

.card__img {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
}

.card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}

.card__img::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 40%;
  background: linear-gradient(transparent, rgba(0,0,0,0.08));
  pointer-events: none;
}

.card__img--placeholder {
  background: linear-gradient(135deg, var(--hsp-cream) 0%, var(--hsp-stone-light) 100%);
  aspect-ratio: 16 / 10;
}

.card__body { padding: var(--s4) var(--s3) var(--s4); }

.card__tag {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--hsp-olive);
  background: rgba(92, 107, 60, 0.08);
  padding: 0.25rem 0.75rem;
  border-radius: 3px;
  margin-bottom: var(--s2);
}

.card__title {
  font-family: var(--hsp-serif);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: var(--s1);
  line-height: 1.3;
}

.card__title a { color: var(--hsp-black); }
.card__title a:hover { color: var(--hsp-terra); }

.card__meta {
  font-size: 0.875rem;
  color: var(--hsp-stone);
  line-height: 1.5;
}

/* ============================================================
   GRID
   ============================================================ */
.grid { display: grid; gap: var(--s5); }
.grid--2 { grid-template-columns: 1fr; }
.grid--3 { grid-template-columns: 1fr; }

@media (min-width: 640px) {
  .grid--2 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 960px) {
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
}

/* ============================================================
   PILLARS (Homepage five pillars)
   ============================================================ */
.pillars {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s4);
  text-align: center;
}

.pillar__icon {
  font-size: 2.5rem;
  margin-bottom: var(--s2);
}

.pillar h3 {
  font-size: 1.125rem;
  margin-bottom: var(--s1);
}

.section--olive .pillar h3 { color: var(--hsp-cream); }
.section--olive .pillar p { color: var(--hsp-stone-light); font-size: 0.9rem; }

@media (min-width: 640px) { .pillars { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 960px) { .pillars { grid-template-columns: repeat(5, 1fr); } }

/* ============================================================
   FILTER PILLS
   ============================================================ */
.filter-bar { display: flex; flex-wrap: wrap; gap: var(--s1); margin-bottom: var(--s5); }

.filter-pill {
  display: inline-block;
  padding: 0.5rem 1.125rem;
  border: 1px solid var(--hsp-stone);
  border-radius: 3px;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--hsp-charcoal);
  text-decoration: none;
  transition: all var(--duration) var(--ease);
}

.filter-pill:hover { background: var(--hsp-olive); color: var(--hsp-white); border-color: var(--hsp-olive); }
.filter-pill--active { background: var(--hsp-olive-dark); color: var(--hsp-white); border-color: var(--hsp-olive-dark); }

/* ============================================================
   PARTNER DETAIL
   ============================================================ */
.partner-detail { padding: var(--s6) 0; }

.partner-editorial {
  max-width: var(--max-w-narrow);
  margin: 0 auto var(--s6);
  text-align: center;
  padding-bottom: var(--s5);
  border-bottom: 1px solid var(--hsp-cream-dark);
}

.partner-editorial blockquote {
  border: none;
  padding: 0;
  margin: 0;
}

.partner-editorial blockquote p {
  font-family: var(--hsp-serif);
  font-size: clamp(1.125rem, 2vw, 1.5rem);
  font-style: italic;
  color: var(--hsp-olive-dark);
  line-height: 1.7;
  max-width: none;
}

.partner-editorial__attr {
  font-size: 0.8rem;
  color: var(--hsp-stone);
  margin-top: var(--s3);
  letter-spacing: 0.04em;
}

.partner-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s6);
}

@media (min-width: 768px) {
  .partner-grid { grid-template-columns: 1fr 340px; gap: var(--s7); }
}

.partner-section { margin-bottom: var(--s6); }
.partner-section h2 { font-size: 1.375rem; color: var(--hsp-olive-dark); margin-bottom: var(--s3); }
.partner-section .lead { font-size: 1.0625rem; line-height: 1.8; color: var(--hsp-charcoal); }

/* Contact card */
.contact-card {
  background: var(--hsp-white);
  border: 1px solid var(--hsp-cream-dark);
  border-radius: 8px;
  padding: var(--s4) var(--s4) var(--s3);
  position: sticky;
  top: calc(72px + var(--s4));
}

.contact-card__row {
  padding-bottom: var(--s2);
  margin-bottom: var(--s2);
  border-bottom: 1px solid var(--hsp-cream);
  font-size: 0.9rem;
}

.contact-card__row:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }

.contact-card__label {
  display: block;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--hsp-stone);
  margin-bottom: 0.25rem;
}

/* Social links */
.social-links { display: flex; gap: var(--s1); margin-top: var(--s3); }

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--hsp-cream-dark);
  border-radius: 4px;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--hsp-charcoal);
  text-decoration: none;
  transition: all var(--duration) var(--ease);
}

.social-link:hover { background: var(--hsp-olive); color: var(--hsp-white); border-color: var(--hsp-olive); }

/* Map */
.partner-map {
  margin-top: var(--s4);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

/* ============================================================
   IMPACT STAT
   ============================================================ */
.impact-stat {
  padding: var(--s2) var(--s3);
  background: var(--hsp-cream);
  border-radius: 6px;
  font-size: 0.875rem;
  color: var(--hsp-olive);
  font-weight: 500;
  margin-top: var(--s4);
}

/* ============================================================
   BREADCRUMB
   ============================================================ */
.breadcrumb {
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  margin-bottom: var(--s2);
  opacity: 0.8;
}

.breadcrumb a { color: var(--hsp-stone-light); text-decoration: underline; }
.breadcrumb__sep { margin: 0 0.5rem; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--hsp-olive-dark);
  color: var(--hsp-stone-light);
  padding: var(--s7) 0 var(--s4);
}

.site-footer__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s5);
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

@media (min-width: 768px) {
  .site-footer__inner { grid-template-columns: 2fr 1fr 1fr; }
}

.site-footer h4 {
  font-family: var(--hsp-serif);
  color: var(--hsp-cream);
  font-size: 1rem;
  margin-bottom: var(--s3);
}

.site-footer p { color: var(--hsp-stone); font-size: 0.875rem; max-width: none; }
.site-footer a { color: var(--hsp-stone-light); }
.site-footer a:hover { color: var(--hsp-terra-light); }

.site-footer__links { list-style: none; }
.site-footer__links li { margin-bottom: var(--s1); }
.site-footer__links a { font-size: 0.875rem; }

.site-footer__bottom {
  margin-top: var(--s6);
  padding-top: var(--s3);
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 0.75rem;
  color: var(--hsp-stone);
  text-align: center;
}

/* ============================================================
   DIVIDER
   ============================================================ */
.divider {
  width: 60px;
  height: 2px;
  background: var(--hsp-terra);
  margin: 0 auto;
  opacity: 0.4;
}

.divider--left { margin: 0; }

/* ============================================================
   SEASONAL TABLE
   ============================================================ */
.season-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.season-table th {
  text-align: left;
  font-family: var(--hsp-serif);
  font-weight: 600;
  padding: var(--s2) var(--s2);
  border-bottom: 2px solid var(--hsp-olive);
  color: var(--hsp-olive-dark);
}

.season-table td {
  padding: var(--s2);
  border-bottom: 1px solid var(--hsp-cream-dark);
  vertical-align: top;
}

.season-table td:first-child { font-weight: 600; color: var(--hsp-olive-dark); white-space: nowrap; }

/* ============================================================
   TEXT UTILITIES
   ============================================================ */
.text-center { text-align: center; }
.text-center p { margin-left: auto; margin-right: auto; }
.lead { font-size: 1.125rem; line-height: 1.8; color: var(--hsp-charcoal); }
.eyebrow {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--hsp-terra);
  margin-bottom: var(--s2);
  display: block;
}

/* ============================================================
   RESPONSIVE IMAGES
   ============================================================ */
.wp-post-image,
.attachment-large,
.attachment-full,
.attachment-medium_large {
  width: 100%;
  height: auto;
}
