/*
Theme Name: Casa Poggio Maldonado
Theme URI: https://example.com/casa-poggio-maldonado
Author: Casa Poggio Team
Author URI: https://example.com
Description: A bespoke WordPress theme for Casa Poggio Maldonado featuring a video hero with booking overlay and fully customizable page sections.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: casa-poggio
Tags: custom-background, custom-logo, custom-menu, featured-images, translation-ready
*/

:root {
  --casa-gold: #9d7a42;
  --casa-cream: #f5f1e7;
  --casa-dark: #2b2a29;
  --casa-light: #ffffff;
  --casa-muted: rgba(43, 42, 41, 0.7);
  font-size: 16px;
}

body {
  font-family: "Playfair Display", "Georgia", serif;
  color: var(--casa-dark);
  background-color: var(--casa-cream);
  line-height: 1.6;
  margin: 0;
}

.section {
  padding: clamp(3.5rem, 6vw, 5rem) 1.5rem;
}

.section-inner {
  width: min(1040px, 100%);
  margin: 0 auto;
}

.section-title {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 600;
  letter-spacing: 0.02em;
  margin: 0 0 1.25rem;
  text-transform: uppercase;
}

.section-text {
  display: grid;
  gap: 1.25rem;
  font-size: 1.05rem;
}

.section-text ul {
  margin: 0;
  padding-left: 1.25rem;
  display: grid;
  gap: 0.75rem;
}

.section-text li {
  list-style: disc;
}

.section-lead {
  font-size: clamp(1.125rem, 2.8vw, 1.5rem);
  max-width: 52ch;
  margin: 0 auto;
  text-align: center;
  font-family: inherit;
}

.section--estate-intro .section-inner {
  text-align: center;
}

a {
  color: var(--casa-gold);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.site-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  justify-content: center;
  padding: 1.25rem 1.75rem;
  background: transparent;
}

.site-header__inner {
  width: min(1180px, 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  gap: 1.5rem;
}

.site-header a {
  color: var(--casa-light);
}

.site-header__mobile-brand {
  display: none;
  font-family: "Great Vibes", "Playfair Display", "Georgia", serif;
  font-size: 1.75rem;
  color: var(--casa-light);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.site-header__controls {
  display: none;
  align-items: center;
  gap: 1.25rem;
}

.language-switcher {
  display: none;
  align-items: center;
  gap: 0.5rem;
  color: var(--casa-light);
  flex-shrink: 0;
}

.language-switcher__icon {
  display: block;
}

.language-switcher__select-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.language-switcher__select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  font-family: inherit;
  background: none;
  border: none;
  color: var(--casa-light);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.85rem;
  width: auto;
  padding: 0 1.2rem 0 0;
  cursor: pointer;
}

.language-switcher__select:focus {
  outline: none;
}

.language-switcher__select:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.8);
  outline-offset: 2px;
}

.language-switcher__select::-ms-expand {
  display: none;
}

.language-switcher__select-wrapper::after {
  content: "";
  position: absolute;
  right: 0.2rem;
  width: 0.45rem;
  height: 0.45rem;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  pointer-events: none;
}

.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  color: var(--casa-light);
}

.menu-toggle:hover,
.menu-toggle:focus {
  color: rgba(255, 255, 255, 0.85);
}

.menu-toggle__box {
  display: grid;
  gap: 4px;
}

.menu-toggle__line {
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  display: block;
}

.menu-close {
  display: none;
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 44px;
  height: 44px;
  border: none;
  background: none;
  color: var(--casa-light);
  cursor: pointer;
}

.menu-close::before,
.menu-close::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 24px;
  height: 2px;
  background: currentColor;
  transform-origin: center;
}

.menu-close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.menu-close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.primary-navigation {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

.primary-navigation .menu,
.primary-navigation ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.primary-navigation a {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--casa-light);
  transition: color 0.3s ease;
}

.primary-navigation a:hover,
.primary-navigation a:focus {
  color: rgba(255, 255, 255, 0.8);
}

.primary-navigation.is-open a,
.primary-navigation.is-open a:hover,
.primary-navigation.is-open a:focus {
  color: var(--casa-light);
}

body.has-mobile-menu {
  overflow: hidden;
}

body:not(.home) .site-header {
  position: static;
  background: var(--casa-cream);
}

body:not(.home) .site-header a,
body:not(.home) .primary-navigation a {
  color: var(--casa-dark);
}

body:not(.home) .site-header__mobile-brand {
  color: var(--casa-light);
}

body:not(.home) .primary-navigation.is-open a,
body:not(.home) .primary-navigation.is-open a:hover,
body:not(.home) .primary-navigation.is-open a:focus {
  color: var(--casa-light);
}

body:not(.home) .menu-toggle {
  color: var(--casa-dark);
}

body:not(.home) .menu-toggle:hover,
body:not(.home) .menu-toggle:focus {
  color: rgba(43, 42, 41, 0.7);
}

@media (max-width: 900px) {
  .site-header {
    padding: 1.25rem 1.25rem;
  }

  .primary-navigation {
    margin: 0 auto;
  }
}

@media (max-width: 768px) {
  .site-header {
    padding: 1rem 1.25rem;
    background: rgba(43, 42, 41, 0.5);
  }

  .site-header__inner {
    justify-content: space-between;
    gap: 0.75rem;
    width: 100%;
  }

  .site-header__mobile-brand {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .menu-toggle__line {
    width: 22px;
  }

  .site-header__controls {
    display: flex;
    flex: 1;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
  }

  .language-switcher {
    display: inline-flex;
    margin-right: auto;
  }

  .language-switcher__icon {
    display: none;
  }

  .menu-close {
    display: block;
  }

  .primary-navigation {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3.5rem 2rem;
    background: radial-gradient(circle at top, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0))
        rgba(20, 20, 20, 0.5);
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.4s ease, opacity 0.4s ease;
    z-index: 999;
  }

  .primary-navigation.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .primary-navigation .menu,
  .primary-navigation ul {
    flex-direction: column;
    gap: 1.75rem;
  }

  .primary-navigation .menu li,
  .primary-navigation ul li {
    opacity: 0;
    transform: translateY(18px);
  }

  .primary-navigation.is-open .menu li,
  .primary-navigation.is-open ul li {
    animation: menuReveal 0.5s ease forwards;
  }

  .primary-navigation.is-open .menu li:nth-child(2),
  .primary-navigation.is-open ul li:nth-child(2) {
    animation-delay: 0.05s;
  }

  .primary-navigation.is-open .menu li:nth-child(3),
  .primary-navigation.is-open ul li:nth-child(3) {
    animation-delay: 0.1s;
  }

  .primary-navigation.is-open .menu li:nth-child(4),
  .primary-navigation.is-open ul li:nth-child(4) {
    animation-delay: 0.15s;
  }

  .primary-navigation.is-open .menu li:nth-child(n + 5),
  .primary-navigation.is-open ul li:nth-child(n + 5) {
    animation-delay: 0.2s;
  }

  .primary-navigation a {
    font-size: 1.25rem;
    letter-spacing: 0.12em;
  }
}

@media (max-width: 768px) {
  body:not(.home) .site-header {
    background: none;
  }

  body:not(.home) .menu-toggle {
    color: var(--casa-light);
  }
}

@keyframes menuReveal {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.estate-experiences {
  display: flex;
  flex-direction: column;
  gap: clamp(2.5rem, 6vw, 4.75rem);
  padding: clamp(3rem, 6vw, 5rem) 0 clamp(5rem, 10vw, 7rem);
}

.estate-experience {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "media"
    "content";
  overflow: hidden;
  background: none;
  box-shadow: none;
  color: var(--casa-dark);
}

.estate-experience__media {
  grid-area: media;
  position: relative;
  overflow: hidden;
  min-height: clamp(280px, 55vh, 520px);
  margin: 0;
}

.estate-experience__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(29, 23, 16, 0.08) 0%, rgba(29, 23, 16, 0) 65%);
  pointer-events: none;
  opacity: 0.65;
  transition: opacity 0.5s ease;
}

.estate-experience__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(1.02);
  transform: scale(1.04);
  transition: transform 0.8s ease;
}

.estate-experience__content {
  grid-area: content;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(2.5rem, 6vw, 4.75rem);
  background: var(--casa-light);
  border: 1px solid rgba(157, 122, 66, 0.3);
}

.estate-experience__body {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: clamp(1rem, 2.6vw, 1.85rem);
  width: min(540px, 100%);
  padding: clamp(2.25rem, 6vw, 3.5rem);
  background: none;
  border-radius: 0;
  box-shadow: none;
}

.estate-experience__body::before {
  content: none;
}

.estate-experience__eyebrow {
  font-family: inherit;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.32em;
  color: rgba(43, 42, 41, 0.65);
}

.estate-experience__title {
  font-family: "Playfair Display", "Georgia", serif;
  font-size: clamp(2.3rem, 4vw, 3.3rem);
  font-weight: 600;
  letter-spacing: 0.015em;
  margin: 0;
}

.estate-experience__description {
  font-family: inherit;
  font-size: clamp(1.05rem, 2.4vw, 1.35rem);
  line-height: 1.75;
  margin: 0;
  color: rgba(43, 42, 41, 0.78);
  max-width: 58ch;
}

.estate-experience__description--secondary {
  color: rgba(43, 42, 41, 0.7);
  max-width: 54ch;
}

.estate-experience__button {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 0.85rem 2rem;
  border-radius: 0;
  background: linear-gradient(135deg, #9d7a42, #c09a5c);
  color: var(--casa-light);
  font-family: inherit;
  font-size: 0.88rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  font-weight: 600;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.2);
}

.estate-experience__button:hover,
.estate-experience__button:focus {
  transform: translateY(-2px);
  box-shadow: 0 26px 48px rgba(0, 0, 0, 0.24);
  text-decoration: none;
}

.estate-experience:hover .estate-experience__image,
.estate-experience:focus-within .estate-experience__image {
  transform: scale(1.09);
}

.estate-experience:hover .estate-experience__media::after,
.estate-experience:focus-within .estate-experience__media::after {
  opacity: 0.85;
}

.estate-experience--reverse .estate-experience__content {
  justify-content: center;
}

.estate-experience--reverse .estate-experience__body {
  margin-left: auto;
  text-align: right;
  align-items: flex-end;
}

.estate-experience--reverse .estate-experience__button {
  align-self: flex-end;
}

@media (min-width: 900px) {
  .estate-experience {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    grid-template-areas: "media content";
  }

  .estate-experience--reverse {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    grid-template-areas: "content media";
  }
}

@media (max-width: 1024px) {
  .estate-experience__body {
    width: min(520px, 100%);
  }
}

@media (max-width: 899px) {
  .estate-experience {
    box-shadow: 0 26px 62px rgba(22, 19, 12, 0.16);
  }

  .estate-experience__content {
    padding: clamp(2rem, 8vw, 3rem);
  }

  .estate-experience__body {
    padding: clamp(1.75rem, 7vw, 2.75rem);
  }

  .estate-experience--reverse .estate-experience__body {
    margin-left: 0;
    align-items: flex-start;
    text-align: left;
  }
}

.container {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.hero-section {
  position: relative;
  min-height: 80vh;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
  color: var(--casa-light);
}

.hero-section video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.hero-overlay {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 3rem 1rem 6rem;
  background: none;
  text-align: center;
}

.hero-content {
  max-width: 960px;
  margin: 0 auto 2.5rem;
}

.hero-title {
  font-family: "Great Vibes", "Playfair Display", "Georgia", serif;
  font-weight: 400;
  font-size: clamp(3rem, 6vw, 4.75rem);
  letter-spacing: 0.02em;
  margin-bottom: 1rem;
}

.hero-description {
  font-size: clamp(1.125rem, 2.4vw, 1.5rem);
  font-weight: 400;
}

.hero-title,
.hero-description {
  text-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.booking-bar {
  max-width: 860px;
  margin: 0 auto;
  background-color: rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0.75rem 0.75rem 2rem;
}

.booking-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--casa-dark);
  flex: 1;
}

.booking-group + .booking-group {
  border-left: 1px solid rgba(43, 42, 41, 0.12);
  padding-left: 2rem;
}

.booking-icon {
  font-size: 1.5rem;
  color: var(--casa-gold);
}

.booking-field {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
}

.booking-label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(43, 42, 41, 0.6);
}

.booking-input {
  background: transparent;
  border: none;
  font-size: 1rem;
  font-family: "Source Sans Pro", "Helvetica Neue", Arial, sans-serif;
  color: var(--casa-dark);
  width: 100%;
}

.booking-input:focus {
  outline: none;
}

.booking-submit {
  background-color: var(--casa-gold);
  color: var(--casa-light);
  font-weight: 600;
  border: none;
  border-radius: 999px;
  padding: 0.9rem 2.5rem;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.booking-submit:hover,
.booking-submit:focus {
  background-color: #816332;
  transform: translateY(-2px);
}

.main-content {
  background-color: var(--casa-light);
  margin-top: -3rem;
  position: relative;
  z-index: 5;
  padding: 3rem 1.5rem 4rem;
  box-shadow: 0 -6px 40px rgba(0, 0, 0, 0.1);
}

.main-content .entry-content {
  max-width: 960px;
  margin: 0 auto;
  font-family: inherit;
}

.section {
  padding: 3rem 1.5rem;
}

.section:nth-of-type(even) {
  background-color: var(--casa-cream);
}

.section--history {
  background-color: var(--casa-cream);
}

.section-inner {
  width: min(1080px, 100%);
  margin: 0 auto;
  display: grid;
  gap: 1rem;
}

.section-title {
  font-size: clamp(2rem, 3vw, 2.75rem);
  margin-bottom: 0.75rem;
}

.section-text {
  font-size: 1.05rem;
  color: var(--casa-dark);
  font-family: inherit;
}

.section-text ul {
  padding-left: 1.5rem;
  margin: 1rem 0 0;
  list-style-type: disc;
}

.section-text li {
  margin-bottom: 0.5rem;
}

.main-content h2,
.main-content h3 {
  font-family: "Playfair Display", "Georgia", serif;
  color: var(--casa-dark);
}

.footer-widgets {
  background-color: var(--casa-dark);
  color: var(--casa-light);
  padding: 3rem 1.5rem;
}

.site-footer {
  background-color: #1a1918;
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
  padding: 1.5rem;
  font-family: inherit;
}

@media (max-width: 768px) {
  .site-header {
    position: absolute;
    padding: 1rem 1.5rem;
    background: rgba(43, 42, 41, 0.5);
  }

  .site-header__inner {
    width: 100%;
  }

  .site-header__controls {
    flex: 1;
  }

  .site-header a,
  .primary-navigation a {
    color: var(--casa-light);
  }

  .estate-experience__content {
    align-items: stretch;
    padding: clamp(1.75rem, 7vw, 2.5rem);
  }

  .estate-experience__body {
    width: 100%;
    align-items: flex-start;
    text-align: left;
    gap: clamp(0.85rem, 6vw, 1.5rem);
  }

  .estate-experience__button {
    align-self: stretch;
    justify-content: center;
  }

  .booking-bar {
    flex-direction: column;
    border-radius: 1.5rem;
    padding: 1.5rem;
    align-items: stretch;
  }

  .booking-group {
    width: 100%;
    align-items: flex-start;
  }

  .booking-group + .booking-group {
    border-left: none;
    padding-left: 0;
    border-top: 1px solid rgba(43, 42, 41, 0.12);
    padding-top: 1rem;
    width: 100%;
  }

  .booking-submit {
    width: 100%;
  }
}
