/* ==========================================================================
   Tibiriçá — Styles
   ========================================================================== */

/* ---------- Custom Properties ---------- */
:root {
  --color-bg: #FAF8F5;
  --color-bg-alt: #F0EBE3;
  --color-text: #2C2C2C;
  --color-text-light: #6B6560;
  --color-sage: #7A8B6F;
  --color-sage-dark: #5F7053;
  --color-gold: #C4A35A;
  --color-gold-dark: #A8893E;
  --color-sand: #E8E0D5;
  --color-white: #FFFFFF;

  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', Arial, sans-serif;

  --max-width: 1200px;
  --section-padding: 100px 0;
  --section-padding-mobile: 60px 0;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

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

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

ul { list-style: none; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 400;
  line-height: 1.3;
}

h1 { font-size: 3.2rem; }
h2 { font-size: 2.4rem; }
h3 { font-size: 1.6rem; }
h4 { font-size: 1.2rem; }

p { margin-bottom: 1rem; }

/* ---------- Utility ---------- */
.container {
  width: 90%;
  max-width: var(--max-width);
  margin: 0 auto;
}

.text-center { text-align: center; }

.btn {
  display: inline-block;
  padding: 14px 36px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-primary {
  background-color: var(--color-sage);
  color: var(--color-white);
}

.btn-primary:hover {
  background-color: var(--color-sage-dark);
}

.btn-outline {
  background-color: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-text);
}

.btn-outline:hover {
  background-color: var(--color-text);
  color: var(--color-white);
}

.section-label {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--color-sage);
  margin-bottom: 1rem;
}

.section-divider {
  width: 60px;
  height: 1px;
  background-color: var(--color-gold);
  margin: 2rem auto;
}

/* ---------- Animations ---------- */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Header / Navigation ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: rgba(250, 248, 245, 0.95);
  backdrop-filter: blur(10px);
  transition: box-shadow 0.3s ease;
}

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

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
}

.logo {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 500;
  letter-spacing: 3px;
  color: var(--color-text);
}

.nav-links {
  display: flex;
  gap: 36px;
  align-items: center;
}

.nav-links a {
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--color-text-light);
  position: relative;
  transition: color 0.3s ease;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--color-gold);
  transition: width 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--color-text);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

/* Dropdown */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: -16px;
  padding-top: 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.nav-dropdown:hover .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
}

.nav-dropdown-menu-inner {
  background-color: var(--color-white);
  border: 1px solid var(--color-sand);
  padding: 12px 0;
  min-width: 200px;
}

.nav-dropdown-menu a {
  display: block;
  padding: 8px 24px;
  font-size: 0.8rem;
}

.nav-dropdown-menu a::after { display: none; }

.nav-dropdown-menu a:hover {
  background-color: var(--color-bg);
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 1.5px;
  background-color: var(--color-text);
  margin: 6px 0;
  transition: all 0.3s ease;
}

.nav-toggle.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ---------- Hero Section ---------- */
.hero {
  padding: 180px 0 120px;
  text-align: center;
  position: relative;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}

.hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.hero h1 {
  margin-bottom: 1.2rem;
  color: var(--color-white);
}

.hero .section-label {
  color: var(--color-sand);
}

.hero .subtitle {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.85);
  max-width: 560px;
  margin: 0 auto 2.5rem;
  line-height: 1.8;
}

.hero .btn {
  margin-top: 0.5rem;
}

/* Page hero (inner pages) */
.page-hero {
  padding: 160px 0 80px;
  text-align: center;
  background: linear-gradient(135deg, var(--color-bg) 0%, var(--color-sand) 50%, var(--color-bg-alt) 100%);
}

.page-hero h1 {
  margin-bottom: 1rem;
}

.page-hero .subtitle {
  font-size: 1.1rem;
  color: var(--color-text-light);
  max-width: 520px;
  margin: 0 auto;
}

/* ---------- Offerings Grid ---------- */
.offerings {
  padding: var(--section-padding);
}

.offerings .container {
  max-width: 1400px;
}

.offerings-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 3rem;
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
}

.offering-card {
  text-align: center;
  padding: 28px 18px;
  background-color: var(--color-white);
  border: 1px solid var(--color-sand);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.offering-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.06);
}

.offering-card-image {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, var(--color-sand), var(--color-bg-alt));
  margin-bottom: 2rem;
  object-fit: cover;
}

.offering-card h3 {
  margin-bottom: 1rem;
}

.offering-card p {
  color: var(--color-text-light);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.offering-card .card-link {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--color-sage);
  border-bottom: 1px solid var(--color-sage);
  padding-bottom: 2px;
  transition: color 0.3s ease, border-color 0.3s ease;
}

.offering-card .card-link:hover {
  color: var(--color-sage-dark);
  border-color: var(--color-sage-dark);
}

/* ---------- Philosophy / Intro Section ---------- */
.philosophy {
  padding: var(--section-padding);
  background-color: var(--color-white);
}

.philosophy-content {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}

.philosophy-content h2 {
  margin-bottom: 1.5rem;
}

.philosophy-content p {
  color: var(--color-text-light);
  font-size: 1.05rem;
}

/* ---------- CTA Section ---------- */
.cta-section {
  padding: var(--section-padding);
  text-align: center;
  background: linear-gradient(135deg, var(--color-sand) 0%, var(--color-bg-alt) 100%);
}

.cta-section h2 {
  margin-bottom: 1rem;
}

.cta-section p {
  color: var(--color-text-light);
  max-width: 500px;
  margin: 0 auto 2rem;
}

/* ---------- Content Sections (inner pages) ---------- */
.content-section {
  padding: var(--section-padding);
}

.content-section.alt {
  background-color: var(--color-white);
}

.content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.content-grid.reverse {
  direction: rtl;
}

.content-grid.reverse > * {
  direction: ltr;
}

.content-image-placeholder {
  width: 100%;
  height: 400px;
  background: linear-gradient(135deg, var(--color-sand), var(--color-bg-alt));
  object-fit: cover;
  overflow: hidden;
}

.content-video-wrapper {
  width: 100%;
  height: 550px;
  overflow: hidden;
  position: relative;
}

.content-video-wrapper video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.content-video-portrait {
  height: auto;
}

.content-video-portrait video {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.content-text h2 {
  margin-bottom: 1rem;
}

.content-text h3 {
  margin-bottom: 0.8rem;
  color: var(--color-sage);
}

.content-text p {
  color: var(--color-text-light);
  margin-bottom: 1.2rem;
}

.content-text ul {
  margin-bottom: 1.5rem;
}

.content-text ul li {
  color: var(--color-text-light);
  padding: 6px 0;
  list-style: none;
}

/* Centered content layout */
.content-centered {
  max-width: 720px;
  margin: 0 auto;
}

.content-centered h2 {
  margin-bottom: 1.5rem;
}

.content-centered p {
  color: var(--color-text-light);
  font-size: 1.05rem;
}

/* ---------- Features / Benefit List ---------- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
  margin-top: 3rem;
}

.feature-item {
  padding: 32px;
  background-color: var(--color-white);
  border: 1px solid var(--color-sand);
}

.feature-item h4 {
  margin-bottom: 0.6rem;
  color: var(--color-text);
}

.feature-item p {
  color: var(--color-text-light);
  font-size: 0.95rem;
}

/* ---------- Contact Form ---------- */
.contact-section {
  padding: var(--section-padding);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
}

.contact-info h2 {
  margin-bottom: 1.5rem;
}

.contact-info p {
  color: var(--color-text-light);
  margin-bottom: 2rem;
}

.contact-detail {
  margin-bottom: 1.5rem;
}

.contact-detail h4 {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--color-sage);
  margin-bottom: 0.4rem;
}

.contact-detail p {
  color: var(--color-text);
  margin-bottom: 0;
}

.contact-icon {
  width: 18px;
  height: 18px;
  vertical-align: middle;
  margin-right: 6px;
  color: var(--color-sage);
}

.contact-icon-link {
  display: inline-flex;
  align-items: center;
  color: var(--color-text);
  transition: color 0.3s ease;
}

.contact-icon-link:hover {
  color: var(--color-sage);
}

.contact-form .form-group {
  margin-bottom: 1.5rem;
}

.contact-form label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--color-text-light);
  margin-bottom: 0.5rem;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  padding: 14px 16px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--color-text);
  background-color: var(--color-white);
  border: 1px solid var(--color-sand);
  outline: none;
  transition: border-color 0.3s ease;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  border-color: var(--color-sage);
}

.contact-form textarea {
  min-height: 140px;
  resize: vertical;
}

.contact-form .btn {
  width: 100%;
}

.form-message {
  display: none;
  padding: 14px;
  margin-top: 1rem;
  text-align: center;
  font-size: 0.9rem;
}

.form-message.success {
  display: block;
  background-color: rgba(122, 139, 111, 0.1);
  color: var(--color-sage-dark);
  border: 1px solid var(--color-sage);
}

.form-message.error {
  display: block;
  background-color: rgba(196, 80, 80, 0.1);
  color: #a04040;
  border: 1px solid #c45050;
}

/* ---------- Footer ---------- */
.site-footer {
  padding: 60px 0 30px;
  background-color: var(--color-text);
  color: rgba(255, 255, 255, 0.6);
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 60px;
  margin-bottom: 40px;
}

.footer-brand .logo {
  color: var(--color-white);
  margin-bottom: 1rem;
}

.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.7;
}

.footer-nav h4,
.footer-contact h4 {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--color-white);
  margin-bottom: 1.2rem;
}

.footer-nav a {
  display: block;
  font-size: 0.9rem;
  padding: 4px 0;
  transition: color 0.3s ease;
}

.footer-nav a:hover {
  color: var(--color-white);
}

.footer-contact p {
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
}

.footer-icon {
  width: 16px;
  height: 16px;
  vertical-align: middle;
  margin-right: 5px;
  color: rgba(255, 255, 255, 0.6);
}

.footer-icon-link {
  display: inline-flex;
  align-items: center;
  color: rgba(255, 255, 255, 0.6);
  transition: color 0.3s ease;
}

.footer-icon-link:hover {
  color: var(--color-white);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 24px;
  text-align: center;
  font-size: 0.8rem;
}

/* ---------- Upcoming Event ---------- */
.event-featured {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.event-image-placeholder {
  width: 100%;
  height: 400px;
  background: linear-gradient(135deg, var(--color-sand), var(--color-bg-alt));
}

.event-video {
  height: auto;
  overflow: visible;
}

.event-video video {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.event-date {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--color-sage);
  margin-bottom: 0.8rem;
}

.event-location {
  color: var(--color-text-light);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.event-details h2 {
  margin-bottom: 0.5rem;
}

.event-details p {
  margin-bottom: 1rem;
}

.event-info {
  display: flex;
  gap: 40px;
  margin: 2rem 0;
  padding: 1.5rem 0;
  border-top: 1px solid var(--color-sand);
  border-bottom: 1px solid var(--color-sand);
}

.event-info-item h4 {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--color-text-light);
  margin-bottom: 0.4rem;
}

.event-info-item p {
  font-size: 1rem;
  color: var(--color-text);
  margin-bottom: 0;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  h1 { font-size: 2.6rem; }
  h2 { font-size: 2rem; }

  .offerings-grid {
    grid-template-columns: repeat(2, 1fr);
    max-width: none;
  }

  .event-featured {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .event-info {
    gap: 24px;
  }

  .content-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .content-grid.reverse {
    direction: ltr;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 50px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }

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

@media (max-width: 768px) {
  :root {
    --section-padding: 60px 0;
  }

  h1 { font-size: 2.2rem; }
  h2 { font-size: 1.7rem; }
  h3 { font-size: 1.3rem; }

  .offerings-grid {
    grid-template-columns: 1fr;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
  }

  .hero {
    padding: 140px 0 80px;
  }

  .page-hero {
    padding: 130px 0 60px;
  }

  /* Mobile nav */
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    flex-direction: column;
    align-items: flex-start;
    background-color: var(--color-white);
    padding: 100px 40px 40px;
    gap: 24px;
    transition: right 0.4s ease;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.08);
  }

  .nav-links.open {
    right: 0;
  }

  .nav-toggle {
    display: block;
    z-index: 1001;
  }

  .nav-dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    padding-top: 8px;
  }

  .nav-dropdown-menu-inner {
    border: none;
    padding: 0;
    background: none;
  }

  .nav-dropdown-menu a {
    padding: 6px 0;
    color: var(--color-text-light);
  }
}
