/* =========================================================
   VARIABLES GLOBALES
   ========================================================= */
:root {
  --primary-green: #3C7A57;
  --primary-blue: #4C8C67;
  --light-green: #4C8C67;
  --light-blue: #A2C3A4;
  --dark-green: #2F6245;
  --dark-blue: #2B2B2B;
  --ocean-teal: #3C7A57;
  --light-bg: #F3EFE6;
  --dark-text: #2B2B2B;
  --white: #ffffff;
}

/* =========================================================
   RESET BÁSICO
   ========================================================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--dark-text);
  overflow-x: hidden;
}

/* =========================================================
   NAVBAR
   ========================================================= */
.navbar {
  background: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-blue) 100%);
  padding: 1rem 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.navbar-brand {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--white) !important;
  transition: transform 0.3s ease;
}

.navbar-brand:hover {
  transform: scale(1.05);
}

.nav-link {
  color: rgba(255, 255, 255, 0.9) !important;
  font-weight: 500;
  margin: 0 0.5rem;
  position: relative;
  transition: all 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--white) !important;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 50%;
  width: 0;
  height: 2px;
  background-color: var(--white);
  transform: translateX(-50%);
  transition: all 0.3s ease;
}

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

.navbar-toggler {
  border-color: rgba(255, 255, 255, 0.5);
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255,255,255,1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* =========================================================
   SECCIÓN HERO / PORTADA
   ========================================================= */
.hero {
  background: linear-gradient(0deg, #f3efe6 0 70px, rgba(30, 136, 229, 0) 400px 600px),
              url('https://images.pexels.com/photos/1134176/pexels-photo-1134176.jpeg?auto=compress&cs=tinysrgb&w=1600')
              center/cover no-repeat;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  position: relative;
  margin-top: 56px;
}

.hero-overlay {
  width: 100%;
  padding: 2rem 0;
}

.hero-content {
  text-align: center;
  animation: fadeInUp 1s ease;
}

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

.hero h1 {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero .lead {
  font-size: 1.5rem;
  margin-bottom: 2rem;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* =========================================================
   BOTONES
   ========================================================= */
.btn-primary {
  background: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-blue) 100%);
  border: none;
  padding: 0.75rem 2rem;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  background: linear-gradient(135deg, var(--dark-green) 0%, var(--dark-blue) 100%);
}

.btn-outline-primary {
  border: 2px solid var(--primary-green);
  color: var(--primary-green);
  padding: 0.75rem 2rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-outline-primary:hover {
  background: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-blue) 100%);
  border-color: transparent;
  color: var(--white);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* =========================================================
   TARJETAS GENERALES
   ========================================================= */
.card,
.amenity-card,
.service-card,
.location-info,
.contact-info-card,
.contact-form-wrapper {
  background: var(--white);
  border-radius: 15px;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.card:hover,
.amenity-card:hover,
.service-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

/* =========================================================
   PÁGINAS / SECCIONES
   ========================================================= */
.page-header {
  background: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-blue) 100%);
  color: var(--white);
  padding: 8rem 0 4rem;
  margin-top: 56px;
  text-align: center;
}

.page-header h1 {
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

/* =========================================================
   TARJETAS DE SERVICIOS Y AMENIDADES
   ========================================================= */
.amenity-card {
  padding: 2rem;
  text-align: center;
  height: 100%;
}

.amenity-card i {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.amenity-card h4 {
  color: var(--dark-green);
  margin-bottom: 1rem;
}

.service-card {
  padding: 2rem;
  height: 100%;
  border-left: 4px solid var(--primary-blue);
}

.service-card:hover {
  transform: translateX(10px);
  border-left-color: var(--light-green);
}

.service-icon i {
  font-size: 3rem;
}

.service-card h3 {
  color: var(--dark-green);
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

/* =========================================================
   GALERÍA
   ========================================================= */
.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 15px;
  cursor: pointer;
  height: 250px;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.3s ease;
}

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

.gallery-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.25);
  color: var(--white);
  border-radius: 0 0 10px 10px;
  padding: 0.5rem;
  transform: translateY(100%);
  transition: all 0.3s ease;
}

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

.gallery-overlay h5,
.gallery-item h5,
.gallery-item p {
  color: #fff !important;
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.6);
}

/* =========================================================
   CONTACTO / FORMULARIOS
   ========================================================= */
.contact-item {
  display: flex;
  align-items: start;
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #dee2e6;
}

.contact-item:last-child {
  border-bottom: none;
}

.contact-item i {
  font-size: 2rem;
  margin-right: 1.5rem;
  min-width: 40px;
}

.contact-item h5 {
  color: var(--dark-green);
  margin-bottom: 0.5rem;
}

.contact-item a {
  color: var(--primary-blue);
  text-decoration: none;
  transition: color 0.3s ease;
}

.contact-item a:hover {
  color: var(--dark-blue);
}

.form-control,
.form-select {
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  padding: 0.75rem;
  transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 0.2rem rgba(30, 136, 229, 0.25);
}

.form-label {
  font-weight: 600;
  color: var(--dark-green);
}

/* =========================================================
   IMÁGENES / EFECTOS / UTILIDADES
   ========================================================= */
.img-fluid {
  transition: transform 0.3s ease;
}

.img-fluid:hover {
  transform: scale(1.02);
}

section {
  position: relative;
  z-index: 1;
}

.bg-light {
  background-color: var(--light-bg) !important;
}

h2, h3, h4, h5 {
  color: var(--dark-green);
}

.text-primary { color: var(--primary-blue) !important; }
.text-success { color: var(--light-green) !important; }

.shadow-sm { box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1) !important; }
.shadow { box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.15) !important; }

footer { margin-top: auto; }

/* =========================================================
   MAPA
   ========================================================= */
.map-card {
  margin-left: 30px;
}

.map-card,
.map-card .card-body,
.map-card iframe {
  height: 100%;
}

/* =========================================================
   VISOR DE IMÁGENES (gallery.js)
   ========================================================= */
.image-viewer {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  transition: opacity 0.3s ease-in-out;
}

.image-viewer.active {
  display: flex;
  animation: fadeIn 0.3s ease forwards;
}

.image-viewer img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 12px;
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.9);
  transform: scale(0.95);
  transition: transform 0.25s ease;
}

.image-viewer.active img {
  transform: scale(1);
}

.image-viewer .close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  background: #222;
  color: #fff;
  border: none;
  font-size: 1.8rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease-in-out;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.6);
}

.image-viewer .close-btn:hover {
  background: #ff3b3b;
  transform: scale(1.1);
}

/* =========================================================
   FIX CONTACTO (Overflow / Navbar)
   ========================================================= */
body.contacto-fix { overflow-x: hidden; }
body.contacto-fix .navbar-toggler { margin-right: 0.5rem; }

/* =========================================================
   MEDIA QUERIES
   ========================================================= */

/* Móviles grandes / Tablets pequeñas */
@media (max-width: 991.98px) {
  .map-card {
    margin-left: 0;
    margin-top: 20px;
  }

  .navbar-collapse .nav-link::after {
    display: none !important;
  }

  .navbar-collapse.show .nav-link.active {
    background-color: rgba(255,255,255,0.2);
    border-radius: 8px;
    padding: 0.5rem 1rem;
    color: #fff !important;
  }

  .navbar-collapse.show .nav-link:hover {
    background-color: rgba(255,255,255,0.15);
    border-radius: 8px;
  }
}

/* Escritorio */
@media (min-width: 992px) {
  .nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: var(--white);
    transform: translateX(-50%);
    transition: all 0.3s ease;
  }

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

/* Tablets y móviles */
@media (max-width: 768px) {
  .hero h1 { font-size: 2.5rem; }
  .hero .lead { font-size: 1.2rem; }
  .page-header { padding: 6rem 0 3rem; }
  .page-header h1 { font-size: 2.5rem; }
  .nav-link { margin: 0.5rem 0; }
  .nav-link::after { display: none; }
  .gallery-item { height: 200px; }
}

/* Móviles pequeños */
@media (max-width: 576px) {
  .hero h1 { font-size: 2rem; }
  .hero .lead { font-size: 1rem; }
  .btn-lg { padding: 0.5rem 1.5rem; font-size: 1rem; }
}

/* === Restaurar diseño original de la sección de contacto === */
body.contacto-fix .contact-info-card {
  background: var(--light-bg);
  padding: 2.5rem 3rem;
  border-radius: 20px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  margin-top: 1rem;
}

body.contacto-fix .contact-item {
  display: flex;
  align-items: flex-start;
  padding: 1.5rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  margin-bottom: 0.5rem;
}

body.contacto-fix .contact-item:last-child {
  border-bottom: none;
}

body.contacto-fix .contact-item i {
  font-size: 1.8rem;
  color: var(--primary-green);
  margin-right: 1.2rem;
  min-width: 35px;
  text-align: center;
}

body.contacto-fix .contact-item h5 {
  color: var(--dark-green);
  font-weight: 600;
  margin-bottom: 0.3rem;
}

body.contacto-fix .contact-item p,
body.contacto-fix .contact-item a {
  margin: 0;
  font-size: 1rem;
  color: var(--dark-text);
  text-decoration: none;
  transition: color 0.3s ease;
}

body.contacto-fix .contact-item a:hover {
  color: var(--primary-blue);
}

body.contacto-fix .contact-info-card .social-links {
  margin-top: 2rem;
  text-align: center;
}

body.contacto-fix .contact-info-card .social-links a {
  width: 45px;
  height: 45px;
  line-height: 45px;
  border: 2px solid var(--primary-green);
  color: var(--primary-green);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 0.5rem;
  transition: all 0.3s ease;
}

body.contacto-fix .contact-info-card .social-links a:hover {
  background: var(--primary-green);
  color: var(--white);
  transform: scale(1.1);
}

.tagembed-widget {
  margin-bottom: 4rem !important;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  display: block;
}
