/* ===== VARIABLES ACTUALIZADAS ===== */
:root {
  --primary: #e63946;
  --primary-dark: #c1121f;
  --secondary: #1d3557;
  --accent: #457b9d;
  --light: #f8f9fa;
  --dark: #212529;
  --gray: #6c757d;
  --light-gray: #e9ecef;
  --white: #ffffff;
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.12);
  --radius: 8px;
  --transition: all 0.3s ease;
  
  --success: #28a745;
  --warning: #ffc107;
  --info: #17a2b8;
  
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  
  --font-heading: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-body: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* ===== RESET Y BASE ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

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

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul {
  list-style: none;
}

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

/* ===== TOPBAR ===== */
.topbar {
  background-color: var(--secondary);
  color: var(--white);
  padding: 8px 0;
  font-size: 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.topbar-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.topbar-phone, .topbar-social {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-phone a {
  color: #f1faee;
  transition: var(--transition);
  font-size: 0.9rem;
  font-weight: 500;
}

.topbar-phone a:hover {
  color: var(--primary);
  transform: translateY(-1px);
}

.topbar-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
  transition: var(--transition);
  font-size: 0.8rem;
}

.topbar-social a:hover {
  background-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* ===== HEADER ===== */
.header {
  background-color: var(--white);
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: var(--transition);
}

.header.scrolled {
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  position: relative;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--light-gray);
  transition: var(--transition);
}

.logo:hover img {
  border-color: var(--primary);
}

.logo-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.logo-name {
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--secondary);
  line-height: 1;
  letter-spacing: -0.5px;
}

.logo-tagline {
  font-size: 0.75rem;
  color: var(--gray);
  line-height: 1;
  font-weight: 500;
}

/* ===== NAVEGACIÓN ===== */
.nav {
  transition: var(--transition);
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 25px;
}

.nav-link {
  font-weight: 600;
  position: relative;
  padding: 8px 0;
  font-size: 0.95rem;
  color: var(--dark);
}

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

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

.nav-link.active {
  color: var(--primary);
}

.nav-cta {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--white);
  padding: 10px 20px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 700;
  transition: var(--transition);
  box-shadow: 0 4px 12px rgba(230, 57, 70, 0.3);
}

.nav-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(230, 57, 70, 0.4);
}

/* ===== MENÚ HAMBURGUESA ===== */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 21px;
  cursor: pointer;
  z-index: 1001;
  position: relative;
}

.menu-toggle span {
  display: block;
  height: 3px;
  width: 100%;
  background-color: var(--dark);
  border-radius: 3px;
  transition: var(--transition);
  transform-origin: center;
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* ===== BOTONES ===== */
.btn-primary, .btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-weight: 700;
  text-align: center;
  transition: var(--transition);
  cursor: pointer;
  font-size: 1rem;
  border: none;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--white);
  box-shadow: 0 4px 15px rgba(230, 57, 70, 0.3);
}

.btn-primary:hover,
.btn-primary:focus {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(230, 57, 70, 0.4);
}

.btn-secondary {
  background-color: transparent;
  color: var(--secondary);
  border: 2px solid var(--secondary);
}

.btn-secondary:hover,
.btn-secondary:focus {
  background-color: var(--secondary);
  color: var(--white);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(29, 53, 87, 0.2);
}

/* ===== CONTENIDO PRINCIPAL ===== */
.main-content {
  flex: 1;
  padding: 0px 0;
  background: linear-gradient(135deg, var(--light-gray) 0%, var(--white) 100%);
}

/* ===== ENCABEZADO DE PÁGINA ===== */
.page-header {
  text-align: center;
  padding: 80px 0;
  background: linear-gradient(135deg, var(--secondary) 0%, #2a4a7a 50%, var(--accent) 100%);
  color: var(--white);
  margin-bottom: 60px;
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 80%, rgba(255,255,255,0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255,255,255,0.05) 0%, transparent 50%);
  z-index: 1;
}

.page-header .container {
  position: relative;
  z-index: 2;
}

.page-header h1 {
  font-size: 3rem;
  margin-bottom: 20px;
  font-weight: 800;
  line-height: 1.1;
  text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  letter-spacing: -1px;
  background: linear-gradient(135deg, #ffffff 0%, #f1faee 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.page-header p {
  font-size: 1.3rem;
  opacity: 0.95;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ===== GALERÍA ===== */
.gallery-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.gallery-description {
  text-align: center;
  color: var(--gray);
  font-size: 1.15rem;
  margin-bottom: 50px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
}

/* ===== FILTROS DE GALERÍA ===== */
.gallery-filters {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 50px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 12px 28px;
  background: var(--white);
  border: 2px solid var(--primary);
  color: var(--primary);
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 700;
  transition: var(--transition);
  font-size: 1rem;
  box-shadow: var(--shadow);
}

.filter-btn.active, .filter-btn:hover {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--white);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

/* ===== GRID DE GALERÍA ===== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
  padding: 20px 0;
}

.gallery-item {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  cursor: pointer;
  background: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.8);
}

.gallery-item:hover {
  transform: translateY(-12px);
  box-shadow: 
    0 20px 40px rgba(0, 0, 0, 0.15),
    0 0 0 1px rgba(255, 255, 255, 0.9);
}

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

.gallery-item:hover img, .gallery-item:hover video {
  transform: scale(1.05);
}

.gallery-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary-dark) 50%, var(--primary) 100%);
  background-size: 200% 100%;
  animation: shimmer 3s infinite linear;
  z-index: 2;
}

.gallery-item-type {
  position: absolute;
  top: 15px;
  right: 15px;
  background: var(--primary);
  color: var(--white);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  z-index: 2;
  opacity: 0;
  transition: var(--transition);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

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

.gallery-item-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 25px;
  background: linear-gradient(transparent, rgba(0,0,0,0.9));
  color: var(--white);
  transform: translateY(100%);
  transition: var(--transition);
  z-index: 2;
}

.gallery-item:hover .gallery-item-overlay {
  transform: translateY(0);
}

.overlay-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.overlay-description {
  font-size: 0.95rem;
  opacity: 0.9;
  line-height: 1.5;
}

/* ===== MODAL PARA IMÁGENES/VIDEOS ===== */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: 2000;
  justify-content: center;
  align-items: center;
  padding: 40px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal.active {
  display: flex;
  opacity: 1;
}

.modal-content {
  max-width: 90%;
  max-height: 90%;
  border-radius: var(--radius-lg);
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.8);
  object-fit: contain;
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.modal.active .modal-content {
  transform: scale(1);
}

.modal-close {
  position: absolute;
  top: 30px;
  right: 35px;
  color: var(--white);
  font-size: 2.5rem;
  cursor: pointer;
  background: none;
  border: none;
  z-index: 2001;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: var(--transition);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(90deg) scale(1.1);
}

.modal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.2);
  color: var(--white);
  border: none;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  font-size: 1.8rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  z-index: 2001;
  backdrop-filter: blur(10px);
}

.modal-nav:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-50%) scale(1.1);
}

.modal-prev {
  left: 35px;
}

.modal-next {
  right: 35px;
}

.modal-caption {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--white);
  text-align: center;
  background: rgba(0, 0, 0, 0.8);
  padding: 20px 35px;
  border-radius: var(--radius-lg);
  max-width: 80%;
  opacity: 0;
  transition: var(--transition);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal.active .modal-caption {
  opacity: 1;
}

/* ===== CTA SECTION ===== */
.cta-section {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--white);
  padding: 70px 50px;
  border-radius: var(--radius-lg);
  margin-top: 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"><path d="M0,0 L100,0 L100,100 Z" fill="rgba(255,255,255,0.1)"/></svg>');
  background-size: cover;
}

.cta-section .container {
  position: relative;
  z-index: 2;
}

.cta-section h2 {
  font-size: 2.5rem;
  margin-bottom: 20px;
  font-weight: 800;
}

.cta-section p {
  font-size: 1.2rem;
  margin-bottom: 35px;
  opacity: 0.95;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

.cta-buttons {
  display: flex;
  gap: 25px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== FOOTER ===== */
.footer {
  background: linear-gradient(135deg, var(--secondary) 0%, #1a2d4a 100%);
  color: var(--light);
  padding: 80px 0 30px;
  position: relative;
  overflow: hidden;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(230, 57, 70, 0.05) 0%, transparent 50%);
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 50px;
  margin-bottom: 50px;
  align-items: start;
  position: relative;
  z-index: 2;
}

.footer-section:first-child {
  max-width: 400px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 25px;
}

.footer-logo img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.2);
  transition: var(--transition);
}

.footer-logo:hover img {
  border-color: var(--primary);
  transform: rotate(5deg);
}

.footer-logo span {
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--white);
  background: linear-gradient(135deg, #ffffff 0%, #a8dadc 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.footer-section p {
  margin-bottom: 25px;
  line-height: 1.7;
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.8);
}

.footer-social {
  display: flex;
  gap: 15px;
}

.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  font-size: 1.1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-social a:hover {
  background: var(--primary);
  transform: translateY(-3px) scale(1.1);
  box-shadow: 0 8px 20px rgba(230, 57, 70, 0.3);
}

.footer-section h3 {
  color: var(--white);
  margin-bottom: 25px;
  font-size: 1.3rem;
  font-weight: 700;
  position: relative;
  display: inline-block;
}

.footer-section h3::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 40px;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
}

.footer-contact p {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 15px;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.8);
  transition: var(--transition);
}

.footer-contact p:hover {
  color: var(--white);
  transform: translateX(5px);
}

.footer-contact a {
  color: #e2e8f0;
  transition: var(--transition);
}

.footer-contact a:hover {
  color: var(--primary);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 30px;
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.95rem;
  position: relative;
  z-index: 2;
}

/* ===== WHATSAPP BUTTON ===== */
.whatsapp-btn {
  position: fixed;
  bottom: 25px;
  right: 25px;
  width: 65px;
  height: 65px;
  background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
  z-index: 1000;
  transition: var(--transition);
  animation: pulse 2s infinite;
}

.whatsapp-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 25px rgba(37, 211, 102, 0.6);
}

/* ===== ANIMACIONES ===== */
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
  }
  70% {
    box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 992px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .footer-content {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }
  
  .footer-section:first-child {
    grid-column: 1 / -1;
    text-align: center;
    max-width: none;
  }
  
  .footer-logo {
    justify-content: center;
  }
  
  .footer-social {
    justify-content: center;
  }
}

/* ===== MÓVILES (768px) ===== */
@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }

  .nav {
    position: fixed;
    top: 0;
    right: 100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background-color: var(--white);
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    padding: 100px 30px 30px;
    transition: right 0.3s ease;
    z-index: 999;
  }
  
  .nav.active {
    right: 0;
  }
  
  .nav-list {
    flex-direction: column;
    gap: 0;
    width: 100%;
  }
  
  .nav-link {
    display: block;
    padding: 15px 0;
    border-bottom: 1px solid var(--light-gray);
    font-size: 1.1rem;
    width: 100%;
  }
  
  .nav-link.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
  }
  
  .nav-cta {
    margin-top: 20px;
    text-align: center;
    padding: 12px 20px !important;
    display: block;
    width: 100%;
  }

  .page-header {
    padding: 60px 0;
  }
  
  .page-header h1 {
    font-size: 2.2rem;
  }
  
  .page-header p {
    font-size: 1.1rem;
  }
  
  .gallery-section {
    padding: 0 15px;
  }
  
  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .gallery-item img, .gallery-item video {
    height: 250px;
  }
  
  .gallery-filters {
    gap: 10px;
  }
  
  .filter-btn {
    padding: 10px 20px;
    font-size: 0.9rem;
  }
  
  .modal {
    padding: 20px;
  }
  
  .modal-nav {
    width: 50px;
    height: 50px;
    font-size: 1.3rem;
  }
  
  .modal-prev {
    left: 20px;
  }
  
  .modal-next {
    right: 20px;
  }
  
  .modal-close {
    top: 20px;
    right: 25px;
    font-size: 2rem;
    width: 50px;
    height: 50px;
  }
  
  .cta-section {
    padding: 50px 30px;
    margin: 60px 15px 0;
  }
  
  .cta-section h2 {
    font-size: 2rem;
  }
  
  .cta-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .btn-primary, .btn-secondary {
    width: 100%;
    justify-content: center;
    padding: 12px 20px;
  }
}

/* ===== MÓVILES PEQUEÑOS (576px) ===== */
@media (max-width: 576px) {
  .page-header h1 {
    font-size: 1.8rem;
  }
  
  .page-header p {
    font-size: 1rem;
  }
  
  .gallery-item img, .gallery-item video {
    height: 220px;
  }
  
  .cta-section {
    padding: 40px 20px;
  }
  
  .cta-section h2 {
    font-size: 1.7rem;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .footer-section h3::after {
    left: 50%;
    transform: translateX(-50%);
  }
  
  .footer-contact p {
    justify-content: center;
  }
}

/* ===== REDUCCIÓN DE MOVIMIENTO ===== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  
  .gallery-item,
  .filter-btn {
    animation: none !important;
  }
}