/* ==========================================================================
   RANCHO LOS CINCO MAGUEYES - ULTRA-PREMIUM DESIGN SYSTEM (OPTIMIZED)
   ========================================================================== */

:root {
  --color-agave-dark: #0e2019;
  --color-agave-medium: #173629;
  --color-agave-light: #265440;
  --color-terracotta: #c45d35;
  --color-terracotta-hover: #da6a3c;
  --color-gold: #d4af37;
  --color-gold-light: #f4d068;
  --color-sand: #f8f5ee;
  --color-sand-card: #f2ebd9;
  --color-charcoal: #1a1a1a;
  --color-text-dark: #222d28;
  --color-text-muted: #6b7c74;
  --color-glass-bg: rgba(14, 32, 25, 0.92);
  --color-glass-border: rgba(212, 175, 55, 0.25);
  
  --font-serif: 'Playfair Display', 'Cinzel', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  
  --transition-smooth: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-lux: 0 20px 40px rgba(0, 0, 0, 0.3);
  --radius-lg: 16px;
  --radius-md: 10px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  background-color: var(--color-sand);
  color: var(--color-text-dark);
  line-height: 1.6;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* Typography */
h1, h2, h3, h4, .font-serif {
  font-family: var(--font-serif);
  font-weight: 700;
}

/* Header & Navigation */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 0.5rem 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition-smooth);
  background: linear-gradient(180deg, rgba(14, 32, 25, 0.95) 0%, rgba(14, 32, 25, 0) 100%);
  will-change: transform, background;
}

.navbar.scrolled {
  background: var(--color-glass-bg);
  backdrop-filter: blur(12px);
  padding: 0.4rem 3rem;
  border-bottom: 1px solid var(--color-glass-border);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
}

.nav-brand-img-white {
  height: 105px;
  width: auto;
  max-width: 440px;
  object-fit: contain;
  filter: drop-shadow(0 4px 16px rgba(0, 0, 0, 0.7));
  transition: var(--transition-smooth);
}

.nav-brand:hover .nav-brand-img-white {
  transform: scale(1.04);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-link {
  color: #e5ddd0;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.5px;
  transition: var(--transition-smooth);
  position: relative;
}

.nav-link:hover, .nav-link.active {
  color: var(--color-gold);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--color-gold);
  transition: var(--transition-smooth);
}

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

.btn-cta-nav {
  background: linear-gradient(135deg, var(--color-terracotta), #a84722);
  color: #fff;
  padding: 0.6rem 1.4rem;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: var(--transition-smooth);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 15px rgba(196, 93, 53, 0.3);
}

.btn-cta-nav:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(196, 93, 53, 0.5);
  background: linear-gradient(135deg, var(--color-terracotta-hover), var(--color-terracotta));
}

/* Hero Section with User Photo Background */
.hero {
  position: relative;
  height: 100vh;
  min-height: 700px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: url('../assets/images/hero_bg.jpg') center/cover no-repeat;
  color: #fff;
  text-align: center;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(14, 32, 25, 0.65) 0%, rgba(14, 32, 25, 0.82) 100%);
}

.hero-content {
  position: relative;
  z-index: 10;
  max-width: 900px;
  padding: 0 2rem;
  margin-top: 3rem;
}

.hero-badge {
  display: inline-block;
  background: rgba(212, 175, 55, 0.15);
  border: 1px solid var(--color-gold);
  color: var(--color-gold-light);
  padding: 0.4rem 1.2rem;
  border-radius: 30px;
  font-size: 0.85rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  backdrop-filter: blur(5px);
}

.hero-title {
  font-size: 3.8rem;
  line-height: 1.15;
  margin-bottom: 1.5rem;
  color: #fff;
  text-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.hero-title span {
  color: var(--color-gold);
  font-style: italic;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: #e2d9ca;
  max-width: 700px;
  margin: 0 auto 2.5rem auto;
  font-weight: 300;
}

.hero-buttons {
  display: flex;
  gap: 1.2rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-terracotta), #a43e19);
  color: white;
  padding: 0.9rem 2.2rem;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: var(--transition-smooth);
  box-shadow: 0 10px 25px rgba(196, 93, 53, 0.4);
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 30px rgba(196, 93, 53, 0.6);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  color: white;
  padding: 0.9rem 2.2rem;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: var(--transition-smooth);
  border: 1px solid rgba(255, 255, 255, 0.3);
  cursor: pointer;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-3px);
  border-color: var(--color-gold);
}

/* Stats Counter Banner */
.stats-banner {
  position: relative;
  z-index: 20;
  margin-top: -60px;
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 1.5rem;
}

.stats-grid {
  background: var(--color-glass-bg);
  backdrop-filter: blur(15px);
  border: 1px solid var(--color-glass-border);
  border-radius: var(--radius-lg);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  padding: 1.8rem;
  box-shadow: var(--shadow-lux);
  text-align: center;
}

.stat-item {
  padding: 0.5rem 1rem;
  border-right: 1px solid rgba(212, 175, 55, 0.15);
}

.stat-item:last-child {
  border-right: none;
}

.stat-number {
  font-family: var(--font-serif);
  font-size: 2.4rem;
  color: var(--color-gold);
  font-weight: bold;
  display: block;
}

.stat-label {
  color: #cfc5b4;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Sections Global */
.section {
  padding: 6rem 2rem;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 4rem auto;
}

.section-tag {
  color: var(--color-terracotta);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.85rem;
  display: block;
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: 2.6rem;
  color: var(--color-agave-dark);
  line-height: 1.25;
  margin-bottom: 1rem;
}

.section-subtitle {
  color: var(--color-text-muted);
  font-size: 1.05rem;
}

/* History Section */
.history-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.history-image-wrap {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lux);
  height: 380px;
}

.history-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: var(--transition-smooth);
}

.history-image-wrap:hover img {
  transform: scale(1.03);
}

.history-content h3 {
  font-size: 2rem;
  color: var(--color-agave-dark);
  margin-bottom: 1.2rem;
}

.history-content p {
  color: #4a5a52;
  margin-bottom: 1.5rem;
  font-size: 1.05rem;
}

/* Experiences Grid */
.experiences-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  content-visibility: auto;
  contain-intrinsic-size: 400px;
}

.experience-card {
  background: #fff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0,0,0,0.06);
  transition: var(--transition-smooth);
  border: 1px solid rgba(0,0,0,0.05);
}

.experience-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 35px rgba(0,0,0,0.12);
}

.experience-thumb {
  height: 220px;
  position: relative;
  overflow: hidden;
}

.experience-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-smooth);
}

.experience-card:hover .experience-thumb img {
  transform: scale(1.08);
}

.experience-tag {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(18, 42, 33, 0.85);
  color: var(--color-gold);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  backdrop-filter: blur(5px);
}

.experience-body {
  padding: 1.8rem;
}

.experience-body h4 {
  font-size: 1.35rem;
  color: var(--color-agave-dark);
  margin-bottom: 0.6rem;
}

.experience-body p {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.2rem;
}

/* USER PHOTO GALLERY SECTION */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  content-visibility: auto;
  contain-intrinsic-size: 600px;
}

.gallery-item {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  height: 240px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-smooth);
}

.gallery-item:hover img {
  transform: scale(1.08);
}

.gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(14, 32, 25, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition-smooth);
  color: var(--color-gold);
  font-size: 2rem;
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

/* VIDEOS SECTION / PAGE */
.videos-section {
  background: var(--color-agave-dark);
  color: #fff;
  padding: 6rem 2rem;
  position: relative;
}

.videos-header .section-title {
  color: #fff;
}

.videos-header .section-subtitle {
  color: #b0c4ba;
}

.videos-notice-box {
  background: rgba(212, 175, 55, 0.1);
  border: 1px dashed var(--color-gold);
  padding: 1.2rem 2rem;
  border-radius: var(--radius-md);
  max-width: 800px;
  margin: 0 auto 3rem auto;
  text-align: center;
  color: var(--color-gold-light);
  font-size: 0.95rem;
}

.videos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  content-visibility: auto;
  contain-intrinsic-size: 500px;
}

.video-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  overflow: hidden;
  backdrop-filter: blur(10px);
  transition: var(--transition-smooth);
  cursor: pointer;
}

.video-card:hover {
  transform: translateY(-6px);
  border-color: var(--color-gold);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
}

.video-thumb-container {
  height: 220px;
  position: relative;
  background: #000;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-thumb-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.65;
  transition: var(--transition-smooth);
}

.video-card:hover .video-thumb-container img {
  opacity: 0.85;
  transform: scale(1.05);
}

.play-btn-overlay {
  position: absolute;
  width: 60px;
  height: 60px;
  background: var(--color-terracotta);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
  box-shadow: 0 0 25px rgba(196, 93, 53, 0.8);
  transition: var(--transition-smooth);
}

.video-card:hover .play-btn-overlay {
  transform: scale(1.15);
  background: var(--color-gold);
  color: var(--color-agave-dark);
}

.video-badge-pending {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.video-info {
  padding: 1.5rem;
}

.video-info h4 {
  font-size: 1.2rem;
  color: #fff;
  margin-bottom: 0.4rem;
}

.video-info p {
  color: #a3b8ad;
  font-size: 0.9rem;
}

/* Event Quote Calculator */
.calculator-box {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 3rem;
  box-shadow: var(--shadow-lux);
  border: 1px solid rgba(0,0,0,0.06);
}

.calc-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-agave-dark);
}

.form-control {
  padding: 0.8rem 1rem;
  border: 1px solid #d4ded8;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  transition: var(--transition-smooth);
}

.form-control:focus {
  outline: none;
  border-color: var(--color-terracotta);
  box-shadow: 0 0 0 3px rgba(196, 93, 53, 0.15);
}

.calc-result-box {
  background: var(--color-sand);
  border-left: 4px solid var(--color-terracotta);
  padding: 1.5rem;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.calc-total-label {
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.calc-total-price {
  font-family: var(--font-serif);
  font-size: 2rem;
  color: var(--color-terracotta);
  font-weight: bold;
}

/* Modal & Lightbox Styles */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition-smooth);
}

.modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: #fff;
  width: 90%;
  max-width: 650px;
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  position: relative;
  box-shadow: 0 25px 50px rgba(0,0,0,0.5);
  transform: translateY(20px);
  transition: var(--transition-smooth);
}

.modal-backdrop.active .modal-content {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  font-size: 1.8rem;
  cursor: pointer;
  color: #888;
}

/* Footer */
.footer {
  background: #081410;
  color: #8a9e94;
  padding: 4rem 2rem 2rem 2rem;
  border-top: 1px solid rgba(212, 175, 55, 0.15);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-col h5 {
  color: #fff;
  font-size: 1.1rem;
  margin-bottom: 1.2rem;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.6rem;
}

.footer-links a {
  color: #8a9e94;
  text-decoration: none;
  transition: var(--transition-smooth);
}

.footer-links a:hover {
  color: var(--color-gold);
}

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

/* Responsive Utilities */
@media (max-width: 900px) {
  .hero-title {
    font-size: 2.6rem;
  }
  .history-grid {
    grid-template-columns: 1fr;
  }
  .navbar {
    padding: 1rem 1.5rem;
  }
  .nav-links {
    display: none;
  }
}
