/* ===================================
   DESIGN SYSTEM - Jacques de Molay
   Masonic & Chivalric Theme
   =================================== */

:root {
  /* Color Palette - Masonic & Medieval */
  --color-primary: hsl(210, 100%, 12%);
  --color-primary-light: hsl(210, 80%, 20%);
  --color-secondary: hsl(45, 85%, 55%);
  --color-accent: hsl(0, 70%, 45%);
  --color-accent-light: hsl(0, 70%, 55%);

  /* Neutrals */
  --color-bg-dark: hsl(220, 20%, 8%);
  --color-bg-medium: hsl(220, 15%, 15%);
  --color-bg-light: hsl(220, 10%, 25%);
  --color-text-primary: hsl(45, 20%, 95%);
  --color-text-secondary: hsl(45, 15%, 75%);
  --color-text-muted: hsl(45, 10%, 60%);

  /* Gradients */
  --gradient-hero: linear-gradient(135deg,
      hsl(210, 100%, 12%) 0%,
      hsl(220, 50%, 15%) 50%,
      hsl(0, 40%, 20%) 100%);
  --gradient-gold: linear-gradient(135deg,
      hsl(45, 85%, 45%) 0%,
      hsl(45, 85%, 65%) 50%,
      hsl(45, 85%, 45%) 100%);
  --gradient-overlay: linear-gradient(180deg,
      rgba(0, 0, 0, 0.7) 0%,
      rgba(0, 0, 0, 0.3) 100%);

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 3rem;
  --space-xl: 5rem;
  --space-2xl: 8rem;

  /* Typography */
  --font-primary: 'Cinzel', serif;
  --font-secondary: 'Cormorant Garamond', serif;
  --font-body: 'Lato', sans-serif;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 20px rgba(218, 165, 32, 0.3);

  /* Borders */
  --border-radius-sm: 4px;
  --border-radius-md: 8px;
  --border-radius-lg: 16px;

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-medium: 0.4s ease;
  --transition-slow: 0.6s ease;
}

/* ===================================
   RESET & BASE STYLES
   =================================== */

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

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

body {
  font-family: var(--font-body);
  background: var(--color-bg-dark);
  color: var(--color-text-primary);
  line-height: 1.7;
  overflow-x: hidden;
}

/* ===================================
   TYPOGRAPHY
   =================================== */

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-primary);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--space-sm);
  color: var(--color-text-primary);
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  letter-spacing: 2px;
  text-transform: uppercase;
}

h2 {
  font-size: clamp(2rem, 4vw, 3.5rem);
  letter-spacing: 1.5px;
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  font-family: var(--font-secondary);
}

h4 {
  font-size: clamp(1.2rem, 2.5vw, 1.8rem);
  font-family: var(--font-secondary);
}

p {
  margin-bottom: var(--space-sm);
  color: var(--color-text-secondary);
  font-size: clamp(1rem, 1.5vw, 1.125rem);
}

.text-accent {
  color: var(--color-secondary);
  background: var(--gradient-gold);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===================================
   LAYOUT COMPONENTS
   =================================== */

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.section {
  padding: var(--space-2xl) 0;
  position: relative;
}

.section-dark {
  background: var(--color-bg-dark);
}

.section-medium {
  background: var(--color-bg-medium);
}

#historical-disclaimer {
  padding: var(--space-lg) 0;
}

#fuentes-creditos .card-text {
  margin-bottom: 0.7rem;
}

#fuentes-creditos .section-title {
  font-size: clamp(1.3rem, 2.5vw, 1.8rem);
}

/* ===================================
   HEADER & NAVIGATION
   =================================== */

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(218, 165, 32, 0.2);
  transition: var(--transition-medium);
}

.header.scrolled {
  box-shadow: var(--shadow-md);
  background: rgba(15, 23, 42, 0.98);
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-sm) 0;
}

.header-institutional-info {
  border-top: 1px solid rgba(218, 165, 32, 0.2);
  padding: 0.75rem 0 0.95rem;
  text-align: center;
}

.header-institutional-lodge {
  margin: 0 0 0.2rem;
  font-family: var(--font-primary);
  color: var(--color-text-primary);
  font-size: clamp(1rem, 1.6vw, 1.2rem);
}

.header-institutional-location,
.header-institutional-auspice {
  margin: 0 0 0.2rem;
  color: var(--color-text-secondary);
  font-size: 0.95rem;
}

.header-institutional-link {
  margin: 0.5rem 0;
}

.logo {
  font-family: var(--font-primary);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-secondary);
  text-decoration: none;
  letter-spacing: 2px;
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  transition: var(--transition-fast);
}

.logo-mark {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 50%;
  opacity: 0.78;
  filter: drop-shadow(0 0 10px rgba(218, 165, 32, 0.35));
  transition: var(--transition-fast);
}

.logo:hover {
  transform: scale(1.05);
  filter: drop-shadow(var(--shadow-glow));
}

.logo:hover .logo-mark {
  opacity: 0.95;
}

.nav-links {
  display: flex;
  gap: var(--space-md);
  list-style: none;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(218, 165, 32, 0.35);
  border-radius: var(--border-radius-sm);
  background: rgba(15, 23, 42, 0.8);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  transition: var(--transition-fast);
}

.menu-toggle:hover {
  border-color: rgba(218, 165, 32, 0.7);
  box-shadow: 0 0 16px rgba(218, 165, 32, 0.25);
}

.menu-toggle span {
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--color-secondary);
}

.nav-link {
  color: var(--color-text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  position: relative;
  padding: var(--space-xs) 0;
  transition: var(--transition-fast);
  letter-spacing: 0.5px;
}

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

.nav-link:hover {
  color: var(--color-secondary);
}

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

/* ===================================
   HERO SECTION
   =================================== */

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: var(--gradient-hero);
  overflow: hidden;
  padding-top: 235px;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><path d="M50 10 L90 90 L10 90 Z" fill="none" stroke="rgba(218,165,32,0.05)" stroke-width="1"/></svg>');
  background-size: 100px 100px;
  opacity: 0.3;
  animation: patternMove 60s linear infinite;
}

@keyframes patternMove {
  0% {
    transform: translate(0, 0);
  }

  100% {
    transform: translate(100px, 100px);
  }
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 900px;
  animation: fadeInUp 1s ease-out;
}

.institutional-link {
  display: inline-block;
  margin-top: 0.35rem;
  padding: 0.35rem 0.75rem;
  border: 1px solid rgba(218, 165, 32, 0.45);
  border-radius: 999px;
  color: var(--color-text-primary);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.82rem;
  transition: var(--transition-fast);
}

.institutional-link:hover {
  background: rgba(218, 165, 32, 0.14);
  border-color: rgba(218, 165, 32, 0.85);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

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

.hero-title {
  margin-bottom: var(--space-md);
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  animation: fadeInUp 1s ease-out 0.2s both;
}

.hero-subtitle {
  font-family: var(--font-secondary);
  font-size: clamp(1.2rem, 2.5vw, 1.8rem);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-lg);
  font-style: italic;
  animation: fadeInUp 1s ease-out 0.4s both;
}

.hero-description {
  font-size: clamp(1rem, 1.8vw, 1.25rem);
  line-height: 1.8;
  margin-bottom: var(--space-lg);
  animation: fadeInUp 1s ease-out 0.6s both;
}

.cta-button {
  display: inline-block;
  padding: var(--space-sm) var(--space-lg);
  background: var(--gradient-gold);
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1rem;
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-md);
  transition: var(--transition-medium);
  letter-spacing: 1px;
  text-transform: uppercase;
  animation: fadeInUp 1s ease-out 0.8s both;
  border: none;
  cursor: pointer;
}

.cta-button:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.cta-button:active {
  transform: translateY(-1px) scale(1.02);
}

/* ===================================
   SECTION HEADERS
   =================================== */

.section-header {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.section-title {
  position: relative;
  display: inline-block;
  padding-bottom: var(--space-sm);
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 3px;
  background: var(--gradient-gold);
  border-radius: 2px;
}

.section-subtitle {
  font-family: var(--font-secondary);
  font-size: clamp(1rem, 1.5vw, 1.3rem);
  color: var(--color-text-muted);
  font-style: italic;
  margin-top: var(--space-sm);
}

/* ===================================
   CARD COMPONENTS
   =================================== */

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-lg);
  margin-top: var(--space-xl);
}

.card {
  background: var(--color-bg-medium);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: var(--transition-medium);
  border: 1px solid rgba(218, 165, 32, 0.1);
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg), 0 0 30px rgba(218, 165, 32, 0.2);
  border-color: rgba(218, 165, 32, 0.3);
}

.card-image {
  width: 100%;
  height: 250px;
  object-fit: cover;
  transition: var(--transition-slow);
}

.card:hover .card-image {
  transform: scale(1.1);
}

.card-image-wrapper {
  overflow: hidden;
  position: relative;
}

.card-image-wrapper::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--gradient-overlay);
  opacity: 0;
  transition: var(--transition-medium);
}

.card:hover .card-image-wrapper::after {
  opacity: 1;
}

.card-content {
  padding: var(--space-md);
}

.card-title {
  color: var(--color-secondary);
  margin-bottom: var(--space-sm);
}

.card-text {
  color: var(--color-text-secondary);
  line-height: 1.7;
}

/* ===================================
   HISTORIA SECTION - ENHANCED
   =================================== */

#historia {
  position: relative;
  overflow: hidden;
}

#historia::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url('historia-background.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  opacity: 0.15;
  z-index: 0;
}

#historia::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg,
      rgba(15, 23, 42, 0.95) 0%,
      rgba(15, 23, 42, 0.85) 50%,
      rgba(15, 23, 42, 0.95) 100%);
  z-index: 0;
}

#historia .container {
  position: relative;
  z-index: 1;
}

/* ===================================
   TIMELINE COMPONENT
   =================================== */

.timeline {
  position: relative;
  max-width: 1000px;
  margin: var(--space-xl) auto;
  padding: var(--space-md) 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 100%;
  background: var(--gradient-gold);
  opacity: 0.3;
}

.timeline-item {
  position: relative;
  margin-bottom: var(--space-xl);
  display: flex;
  align-items: center;
}

.timeline-item:nth-child(odd) {
  flex-direction: row;
}

.timeline-item:nth-child(even) {
  flex-direction: row-reverse;
}

.timeline-content {
  flex: 1;
  background: rgba(28, 37, 54, 0.85);
  backdrop-filter: blur(10px);
  padding: var(--space-md);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-md), 0 0 40px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(218, 165, 32, 0.3);
  transition: var(--transition-medium);
  margin: 0 var(--space-lg);
}

.timeline-content:hover {
  transform: scale(1.03) translateY(-5px);
  box-shadow: var(--shadow-lg), 0 0 50px rgba(218, 165, 32, 0.25);
  border-color: rgba(218, 165, 32, 0.5);
  background: rgba(28, 37, 54, 0.95);
}

.timeline-date {
  font-family: var(--font-primary);
  color: var(--color-secondary);
  font-weight: 700;
  font-size: 1.2rem;
  margin-bottom: var(--space-xs);
  text-shadow: 0 2px 10px rgba(218, 165, 32, 0.5);
}

.timeline-content h4 {
  color: var(--color-text-primary);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.timeline-marker {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 20px;
  background: var(--gradient-gold);
  border-radius: 50%;
  box-shadow: 0 0 0 4px var(--color-bg-dark),
    0 0 20px rgba(218, 165, 32, 0.6),
    0 0 40px rgba(218, 165, 32, 0.3);
  z-index: 10;
  animation: pulseGlow 3s ease-in-out infinite;
}

@keyframes pulseGlow {

  0%,
  100% {
    box-shadow: 0 0 0 4px var(--color-bg-dark),
      0 0 20px rgba(218, 165, 32, 0.6),
      0 0 40px rgba(218, 165, 32, 0.3);
  }

  50% {
    box-shadow: 0 0 0 4px var(--color-bg-dark),
      0 0 30px rgba(218, 165, 32, 0.8),
      0 0 60px rgba(218, 165, 32, 0.4);
  }
}

/* ===================================
   QUOTE COMPONENT
   =================================== */

.quote-section {
  background: rgba(28, 37, 54, 0.85);
  backdrop-filter: blur(10px);
  padding: var(--space-xl);
  border-left: 4px solid var(--color-secondary);
  border-radius: var(--border-radius-md);
  margin: var(--space-xl) 0;
  position: relative;
  box-shadow: var(--shadow-md), 0 0 40px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(218, 165, 32, 0.3);
  border-left: 4px solid var(--color-secondary);
}

.quote-section::before {
  content: '"';
  position: absolute;
  top: -20px;
  left: 20px;
  font-size: 6rem;
  font-family: var(--font-primary);
  color: var(--color-secondary);
  opacity: 0.2;
  line-height: 1;
  text-shadow: 0 0 20px rgba(218, 165, 32, 0.4);
}

.quote-text {
  font-family: var(--font-secondary);
  font-size: clamp(1.2rem, 2vw, 1.6rem);
  font-style: italic;
  color: var(--color-text-primary);
  margin-bottom: var(--space-sm);
  line-height: 1.8;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.quote-author {
  text-align: right;
  color: var(--color-secondary);
  font-weight: 700;
  font-size: 1.1rem;
  text-shadow: 0 2px 10px rgba(218, 165, 32, 0.5);
}

/* ===================================
   FOOTER
   =================================== */

.footer {
  background: var(--color-primary);
  padding: 0;
  border-top: 2px solid var(--color-secondary);
}

.footer .container {
  width: 100%;
  max-width: none;
  padding: 0;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
  padding: 0 clamp(1rem, 4vw, 4rem);
}

.footer-section h4 {
  color: var(--color-secondary);
  margin-bottom: var(--space-sm);
}

.footer-section p,
.footer-section a {
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: var(--transition-fast);
  display: block;
  margin-bottom: var(--space-xs);
}

.footer-section a:hover {
  color: var(--color-secondary);
  padding-left: var(--space-xs);
}

.footer-obedience {
  margin: 0;
  padding: 0.85rem clamp(1rem, 2.4vw, 2.2rem);
  border-top: 1px solid rgba(218, 165, 32, 0.35);
  border-bottom: 1px solid rgba(218, 165, 32, 0.35);
  border-radius: 0;
  background: linear-gradient(90deg,
      rgba(15, 23, 42, 0.35) 0%,
      rgba(15, 23, 42, 0.7) 15%,
      rgba(15, 23, 42, 0.85) 50%,
      rgba(15, 23, 42, 0.7) 85%,
      rgba(15, 23, 42, 0.35) 100%);
  display: grid;
  grid-template-columns: auto minmax(360px, 760px) auto;
  justify-content: center;
  column-gap: 0.35rem;
  align-items: center;
}

.footer-obedience-logo {
  display: flex;
  align-items: center;
}

.footer-obedience-logo-left {
  justify-content: flex-end;
  padding-right: 0;
}

.footer-obedience-logo-right {
  justify-content: flex-start;
  padding-left: 0;
}

.footer-logo-gla {
  width: 190px;
  height: 190px;
  max-width: 100%;
  object-fit: contain;
  margin-right: 0;
  filter: drop-shadow(0 0 12px rgba(218, 165, 32, 0.2));
}

.footer-logo-jacobo {
  width: 84px;
  height: 84px;
  max-width: 100%;
  object-fit: cover;
  border-radius: 50%;
  margin-left: 0;
  filter: drop-shadow(0 0 12px rgba(218, 165, 32, 0.2));
}

@media (max-width: 1240px) {
  .footer-obedience {
    grid-template-columns: auto minmax(290px, 560px) auto;
  }

  .footer-logo-gla {
    width: 160px;
    height: 160px;
    margin-right: 0;
  }

  .footer-logo-jacobo {
    width: 74px;
    height: 74px;
    margin-left: 0;
  }
}

.footer-obedience-content {
  text-align: center;
  padding: 0 0.25rem;
  max-width: 760px;
}

.footer-institutional-link {
  margin: 0.5rem 0;
}

.institutional-contact-channel,
.institutional-email,
.footer-copyright,
.footer-motto {
  color: var(--color-text-secondary);
  margin-bottom: 0.45rem;
}

.institutional-email a {
  color: #ffd700;
}

.institutional-notice {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(218, 165, 32, 0.22);
}

.institutional-notice h4 {
  color: var(--color-secondary);
  margin-bottom: 0.35rem;
  font-size: 0.95rem;
}

.institutional-notice p {
  color: var(--color-text-secondary);
  margin-bottom: 0.25rem;
  font-size: 0.78rem;
  line-height: 1.5;
}

.obedience-title {
  color: var(--color-secondary);
  font-family: var(--font-primary);
  font-size: 1.575rem;
  margin-bottom: var(--space-xs);
}

.obedience-text {
  color: var(--color-text-primary);
  margin-bottom: var(--space-sm);
}

.whatsapp-float {
  position: fixed;
  right: 22px;
  bottom: 96px;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: #25d366;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(37, 211, 102, 0.38);
  z-index: 1200;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}

.whatsapp-float:hover {
  transform: translateY(-3px) scale(1.04);
  background: #1ebe5d;
  box-shadow: 0 14px 30px rgba(37, 211, 102, 0.45);
}

.whatsapp-float svg {
  width: 30px;
  height: 30px;
  fill: currentColor;
}

.footer-bottom {
  text-align: center;
  padding-top: var(--space-md);
  padding-left: clamp(1rem, 4vw, 4rem);
  padding-right: clamp(1rem, 4vw, 4rem);
  border-top: 1px solid rgba(218, 165, 32, 0.2);
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

/* ===================================
   DECORATIVE ELEMENTS
   =================================== */

.ornament {
  display: inline-block;
  color: var(--color-secondary);
  margin: 0 var(--space-sm);
  font-size: 1.5rem;
}

.divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg,
      transparent 0%,
      var(--color-secondary) 50%,
      transparent 100%);
  margin: var(--space-lg) 0;
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */

@media (max-width: 768px) {
  .nav {
    position: relative;
  }

  .logo {
    font-size: 1rem;
    letter-spacing: 1px;
    max-width: calc(100% - 56px);
  }

  .logo-mark {
    width: 48px;
    height: 48px;
  }

  .header-institutional-info {
    padding: 0.6rem 0 0.75rem;
  }

  .header-institutional-lodge {
    font-size: 0.95rem;
  }

  .header-institutional-location,
  .header-institutional-auspice {
    font-size: 0.83rem;
  }

  .institutional-link {
    width: 100%;
    text-align: center;
    font-size: 0.92rem;
  }

  .hero {
    padding-top: 255px;
  }

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

  .nav-links {
    display: flex;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: min(280px, calc(100vw - 2rem));
    padding: 1rem;
    border: 1px solid rgba(218, 165, 32, 0.3);
    border-radius: var(--border-radius-md);
    background: rgba(15, 23, 42, 0.98);
    backdrop-filter: blur(10px);
    flex-direction: column;
    gap: 0.4rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    pointer-events: none;
    transition: var(--transition-fast);
  }

  .nav-links.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
  }

  .nav-link {
    display: block;
    padding: 0.6rem 0.3rem;
  }

  .timeline::before {
    left: 30px;
  }

  .timeline-item,
  .timeline-item:nth-child(even) {
    flex-direction: row;
  }

  .timeline-content {
    margin-left: 60px;
    margin-right: 0;
  }

  .timeline-marker {
    left: 30px;
  }

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

  .footer-content {
    grid-template-columns: 1fr;
  }

  .footer-obedience {
    margin-left: 0;
    margin-right: 0;
    border-radius: 0;
    grid-template-columns: 1fr;
    text-align: center;
    gap: var(--space-sm);
  }

  .footer-obedience-logo-left,
  .footer-obedience-logo-right {
    justify-content: center;
  }

  .footer-logo-gla {
    width: 252px;
    height: 252px;
    margin-right: 0;
  }

  .footer-logo-jacobo {
    width: 84px;
    height: 84px;
    margin-left: 0;
  }

  .whatsapp-float {
    width: 56px;
    height: 56px;
    right: 16px;
    bottom: 72px;
  }

  .whatsapp-float svg {
    width: 28px;
    height: 28px;
  }
}

/* ===================================
   ANIMATIONS & EFFECTS
   =================================== */

@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }

  100% {
    background-position: 1000px 0;
  }
}

.shimmer {
  animation: shimmer 3s infinite;
  background: linear-gradient(90deg,
      transparent 0%,
      rgba(218, 165, 32, 0.1) 50%,
      transparent 100%);
  background-size: 1000px 100%;
}

/* Scroll reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease-out;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* ===================================
   ENHANCED HERO MASONIC STYLES
   =================================== */

/* Background images layer */
.hero-images-layer {
  position: absolute;
  top: 220px;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  overflow: hidden;
}

.hero-image {
  position: absolute;
  width: 50%;
  height: 100%;
  overflow: hidden;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  opacity: 0.15;
  filter: grayscale(30%);
  transition: var(--transition-slow);
}

.hero-image-left {
  left: 0;
}

.hero-image-right {
  right: 0;
}

.hero-image-left img {
  object-position: center 50%;
}

.hero-image-right img {
  object-position: center 60%;
}

.hero:hover .hero-image img {
  opacity: 0.2;
  transform: scale(1.05);
}

/* Symbols layer */
.symbols-layer {
  position: absolute;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

.symbol-float {
  position: absolute;
  color: #daa520;
  font-size: 4rem;
  animation: float 20s ease-in-out infinite;
  opacity: 0.1;
}

.symbol-float:nth-child(1) {
  top: 10%;
  left: 10%;
  animation-delay: 0s;
}

.symbol-float:nth-child(2) {
  top: 20%;
  right: 15%;
  animation-delay: 2s;
}

.symbol-float:nth-child(3) {
  bottom: 15%;
  left: 20%;
  animation-delay: 4s;
}

.symbol-float:nth-child(4) {
  bottom: 25%;
  right: 10%;
  animation-delay: 6s;
}

.symbol-float:nth-child(5) {
  top: 50%;
  left: 5%;
  animation-delay: 8s;
}

.symbol-float:nth-child(6) {
  top: 40%;
  right: 5%;
  animation-delay: 10s;
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0) rotate(0deg);
    opacity: 0.1;
  }

  50% {
    transform: translateY(-30px) rotate(5deg);
    opacity: 0.15;
  }
}

/* Central masonic emblem */
.central-emblem {
  position: absolute;
  width: 600px;
  height: 600px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.08;
  z-index: 2;
  pointer-events: none;
}

.square-compass {
  position: absolute;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.square-compass svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 40px rgba(218, 165, 32, 0.3));
  /* animation removed - emblem stays fixed */
}

/* Light rays */
.light-rays {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}

.ray {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 2px;
  height: 50%;
  background: linear-gradient(to bottom, rgba(218, 165, 32, 0.3), transparent);
  transform-origin: top center;
  animation: rayRotate 20s linear infinite;
}

.ray:nth-child(1) {
  transform: rotate(0deg);
  animation-delay: 0s;
}

.ray:nth-child(2) {
  transform: rotate(45deg);
  animation-delay: 2.5s;
}

.ray:nth-child(3) {
  transform: rotate(90deg);
  animation-delay: 5s;
}

.ray:nth-child(4) {
  transform: rotate(135deg);
  animation-delay: 7.5s;
}

.ray:nth-child(5) {
  transform: rotate(180deg);
  animation-delay: 10s;
}

.ray:nth-child(6) {
  transform: rotate(225deg);
  animation-delay: 12.5s;
}

.ray:nth-child(7) {
  transform: rotate(270deg);
  animation-delay: 15s;
}

.ray:nth-child(8) {
  transform: rotate(315deg);
  animation-delay: 17.5s;
}

@keyframes rayRotate {
  from {
    opacity: 0.1;
  }

  50% {
    opacity: 0.3;
  }

  to {
    opacity: 0.1;
  }
}

/* Decorative border */
.decorative-border {
  width: 300px;
  height: 3px;
  background: linear-gradient(90deg, transparent, #daa520, transparent);
  margin: 0 auto 2rem;
  animation: shimmerGlow 3s ease-in-out infinite;
}

@keyframes shimmerGlow {

  0%,
  100% {
    opacity: 0.5;
  }

  50% {
    opacity: 1;
  }
}

/* Lodge number */
.lodge-number {
  font-size: 1.5rem;
  color: #daa520;
  letter-spacing: 8px;
  font-weight: 300;
  margin-bottom: 1rem;
  text-shadow: 0 0 20px rgba(218, 165, 32, 0.5);
  animation: fadeInUp 1.5s ease-out 0.3s both;
}

/* Cross decoration */
.cross-decoration {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  margin: 2rem 0;
  animation: fadeInUp 1.5s ease-out 1.5s both;
}

.cross-symbol {
  color: #c41e3a;
  font-size: 2.5rem;
  filter: drop-shadow(0 0 10px rgba(196, 30, 58, 0.5));
  animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {

  0%,
  100% {
    transform: scale(1);
    opacity: 0.8;
  }

  50% {
    transform: scale(1.1);
    opacity: 1;
  }
}

.fleur {
  color: #daa520;
  font-size: 2rem;
  filter: drop-shadow(0 0 10px rgba(218, 165, 32, 0.5));
}

/* Masonic motto */
.masonic-motto {
  font-size: clamp(1rem, 2vw, 1.3rem);
  color: #a0a0a0;
  margin-bottom: 3rem;
  letter-spacing: 3px;
  font-family: 'Times New Roman', serif;
  animation: fadeInUp 1.5s ease-out 1.2s both;
}

/* Hero values */
.hero-values {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin-top: 3rem;
  flex-wrap: wrap;
  animation: fadeInUp 1.5s ease-out 1.8s both;
}

.value-item {
  text-align: center;
  color: #daa520;
  font-size: 1.1rem;
  letter-spacing: 2px;
  position: relative;
  padding: 1rem 2rem;
  border: 1px solid rgba(218, 165, 32, 0.3);
  border-radius: 4px;
  background: rgba(218, 165, 32, 0.05);
  transition: all 0.3s ease;
  font-weight: 600;
}

.value-item:hover {
  background: rgba(218, 165, 32, 0.15);
  border-color: rgba(218, 165, 32, 0.6);
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(218, 165, 32, 0.2);
}

/* Bottom ornament */
.bottom-ornament {
  margin-top: 3rem;
  animation: fadeInUp 1.5s ease-out 2.1s both;
}

.ornament-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  color: #daa520;
  font-size: 1.5rem;
}

.ornament-line::before,
.ornament-line::after {
  content: '';
  width: 100px;
  height: 1px;
  background: linear-gradient(90deg, transparent, #daa520, transparent);
}

/* Enhanced hero title */
.hero-title .text-accent {
  animation: goldShine 4s ease-in-out infinite;
}

@keyframes goldShine {

  0%,
  100% {
    filter: brightness(1);
  }

  50% {
    filter: brightness(1.3);
  }
}

/* Responsive adjustments for hero */
@media (max-width: 768px) {
  .hero-values {
    gap: 1rem;
  }

  .value-item {
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
  }

  .cross-decoration {
    gap: 1rem;
  }

  .central-emblem {
    width: 400px;
    height: 400px;
  }

  .hero-image {
    width: 100%;
  }

  .hero-image-left img,
  .hero-image-right img {
    object-position: center center;
  }

  .symbol-float {
    font-size: 2.5rem;
  }

  .lodge-number {
    font-size: 1.2rem;
    letter-spacing: 4px;
  }
}

/* ===================================
   CONTACT FORM STYLES
   =================================== */

.contact-container {
  max-width: 1000px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: var(--space-xl);
  align-items: start;
}

/* Contact intro */
.contact-intro {
  background: var(--color-bg-medium);
  padding: var(--space-lg);
  border-radius: var(--border-radius-lg);
  border: 1px solid rgba(218, 165, 32, 0.2);
  position: sticky;
  top: 100px;
}

.contact-icon {
  font-size: 4rem;
  color: var(--color-secondary);
  text-align: center;
  margin-bottom: var(--space-md);
  filter: drop-shadow(0 0 20px rgba(218, 165, 32, 0.3));
  animation: pulse 3s ease-in-out infinite;
}

.contact-intro h3 {
  color: var(--color-secondary);
  font-family: var(--font-primary);
  font-size: 1.5rem;
  margin-bottom: var(--space-sm);
  text-align: center;
}

.contact-intro p {
  text-align: center;
  line-height: 1.8;
  margin-bottom: var(--space-md);
}

.contact-requirements {
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid rgba(218, 165, 32, 0.2);
}

.requirement-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
  color: var(--color-text-secondary);
}

.req-icon {
  color: var(--color-secondary);
  font-weight: 700;
  font-size: 1.2rem;
}

/* Contact form */
.contact-form {
  background: var(--color-bg-medium);
  padding: var(--space-lg);
  border-radius: var(--border-radius-lg);
  border: 1px solid rgba(218, 165, 32, 0.2);
  box-shadow: var(--shadow-md);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

.form-group {
  margin-bottom: var(--space-md);
}

.form-group label {
  display: block;
  color: var(--color-secondary);
  font-weight: 600;
  margin-bottom: var(--space-xs);
  font-size: 0.95rem;
  letter-spacing: 0.5px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: var(--space-sm);
  background: var(--color-bg-dark);
  border: 1px solid rgba(218, 165, 32, 0.3);
  border-radius: var(--border-radius-sm);
  color: var(--color-text-primary);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: var(--transition-medium);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-secondary);
  box-shadow: 0 0 0 3px rgba(218, 165, 32, 0.1);
  background: var(--color-bg-light);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--color-text-muted);
  opacity: 0.6;
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.6;
}

/* Checkbox group */
.checkbox-group {
  margin-top: var(--space-md);
}

.form-disclaimer {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(218, 165, 32, 0.2);
  border-radius: var(--border-radius-sm);
  padding: 0.75rem;
  margin-bottom: var(--space-sm);
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  cursor: pointer;
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
}

.checkbox-label input[type="checkbox"] {
  width: auto;
  margin-top: 4px;
  cursor: pointer;
  accent-color: var(--color-secondary);
}

.checkbox-label span {
  flex: 1;
}

/* Form actions */
.form-actions {
  margin-top: var(--space-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
}

.submit-button {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-xl);
  background: var(--gradient-gold);
  color: var(--color-primary);
  border: none;
  border-radius: var(--border-radius-md);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: var(--transition-medium);
}

.submit-button:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.submit-button:active {
  transform: translateY(-1px) scale(1.02);
}

.submit-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.button-icon {
  font-size: 1.3rem;
}

.form-note {
  color: var(--color-text-muted);
  font-size: 0.85rem;
  font-style: italic;
  margin: 0;
}

/* Form message */
.form-message {
  margin-top: var(--space-md);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--border-radius-sm);
  text-align: center;
  font-weight: 600;
  display: none;
}

.form-message.success {
  display: block;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: rgb(34, 197, 94);
}

.form-message.error {
  display: block;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: rgb(239, 68, 68);
}

/* Contact footer */
#contacto {
  padding-bottom: 0;
}

.contact-footer {
  margin-top: var(--space-xl);
  text-align: center;
}

.contact-quote {
  padding: var(--space-lg);
  border-top: 1px solid rgba(218, 165, 32, 0.2);
}

.contact-quote .quote-text {
  font-family: var(--font-secondary);
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  font-style: italic;
  color: var(--color-secondary);
  margin: 0;
}

/* Validation styles */
.form-group input:invalid:not(:placeholder-shown),
.form-group textarea:invalid:not(:placeholder-shown) {
  border-color: rgba(239, 68, 68, 0.5);
}

.form-group input:valid:not(:placeholder-shown),
.form-group textarea:valid:not(:placeholder-shown) {
  border-color: rgba(34, 197, 94, 0.5);
}

/* Responsive contact form */
@media (max-width: 968px) {
  .contact-container {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .contact-intro {
    position: static;
  }
}

@media (max-width: 768px) {
  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .contact-form {
    padding: var(--space-md);
  }

  .contact-intro {
    padding: var(--space-md);
  }

  .submit-button {
    width: 100%;
    justify-content: center;
  }
}
