/* CIM - Centro Integral de Medicina */
/* Stylesheet */

:root {
  /* CIM Brand Colors - Nueva paleta corporativa */
  --primary: #009640;
  --primary-foreground: #FFFFFF;
  --accent: #2D82C4;
  --accent-foreground: #FFFFFF;
  --background: #FFFFFF;
  --foreground: #4c5258;
  --muted: #F4F6F8;
  --muted-foreground: #4c5258;
  --border: #F4F6F8;
  --secondary: #F4F6F8;
  --secondary-foreground: #4c5258;
}

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

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--foreground);
  background-color: var(--background);
  line-height: 1.6;
}

h1,
h2,
h3 {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 700;
}

/* Smooth scroll */
html {
  scroll-behavior: smooth;
}

/* Header Styles */
.top-bar {
  background-color: var(--foreground);
  color: white;
  padding: 0.5rem 0;
  font-size: 0.875rem;
  transition: all 0.3s ease;
}

.top-bar.hidden {
  height: 0;
  padding: 0;
  opacity: 0;
  overflow: hidden;
}

.navbar {
  background-color: white !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

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

.nav-link {
  color: var(--foreground) !important;
  font-weight: 500;
  font-size: 0.875rem;
  padding: 0.5rem 1rem !important;
  transition: all 0.2s;
  border-radius: 0.375rem;
}

.nav-link:hover {
  color: var(--primary) !important;
  background-color: var(--secondary);
}

.btn-accent {
  background-color: var(--accent);
  color: var(--accent-foreground);
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  font-weight: 500;
  font-size: 0.875rem;
  transition: all 0.2s;
}

.btn-accent:hover {
  background-color: #1a6ba3;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(45, 130, 196, 0.3);
  color: white;
}

/* Botón de reserva en top-bar con verde institucional */
.top-bar .btn-accent {
  background-color: var(--primary);
  color: white;
}

.top-bar .btn-accent:hover {
  background-color: #007a33;
  box-shadow: 0 4px 12px rgba(0, 150, 64, 0.3);
}

/* Mejorar estilos del botón en hero section */
.hero-section .btn-accent {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 0.5rem;
  background-color: var(--accent);
  color: white;
  border: none;
  transition: all 0.3s ease;
}

.hero-section .btn-accent:hover {
  background-color: #1a6ba3;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(45, 130, 196, 0.4);
  color: white;
}

.hero-section .btn-accent svg {
  margin-right: 0.5rem;
}

.hero-section .btn-outline-light {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 0.5rem;
  background-color: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
  transition: all 0.3s ease;
}

.hero-section .btn-outline-light:hover {
  background-color: var(--primary);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 150, 64, 0.3);
}

/* Hero Section */
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background-image: url("../images/cim_hero.png");
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  color: var(--foreground);
  overflow: hidden;
}

.hero-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgb(255 255 255 / 61%) 0%, rgb(244 246 248 / 70%) 100%);
  z-index: 1;
}

.hero-section > * {
  position: relative;
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 10rem 1rem 8rem;
  animation: fadeIn 1s ease-in;
}

/* Contenedor glassmorphism para mejorar legibilidad sobre el fondo del edificio */
.hero-content-wrapper {
  background-color: rgb(255 255 255 / 0%);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.03);
  max-width: 900px;
  margin: 0 auto;
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 700;
  margin-bottom: 2rem;
  line-height: 1.1;
  color: var(--foreground);
}

.hero-accent {
  color: var(--accent);
}

.hero-subtitle {
  font-size: clamp(1.125rem, 2vw, 1.5rem);
  margin-bottom: 3rem;
  color: var(--foreground);
  max-width: 42rem;
  margin-left: auto;
  margin-right: auto;
}

/* Espaciado adicional para los botones del hero */
.hero-content .d-flex {
  margin-top: 30px;
}

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  animation: bounce 2s infinite;
}

.scroll-indicator svg {
  fill: var(--foreground);
  opacity: 0.5;
}

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

@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateX(-50%) translateY(0);
  }
  40% {
    transform: translateX(-50%) translateY(-10px);
  }
  60% {
    transform: translateX(-50%) translateY(-5px);
  }
}

/* Section Styles */
.section {
  padding: 6rem 0;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-tag {
  display: inline-block;
  color: var(--accent);
  text-transform: uppercase;
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

.section-tag::after {
  content: "";
  display: block;
  width: 4rem;
  height: 0.25rem;
  background: var(--accent);
  margin: 0.5rem auto 0;
  border-radius: 2px;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--primary);
  margin-bottom: 2.5rem;
}

.section-description {
  font-size: 1.125rem;
  color: var(--muted-foreground);
  max-width: 42rem;
  margin: 0 auto;
}

/* Estilos específicos para la sección "Sobre Nosotros" */
#nosotros .section-header {
  margin-bottom: 3rem;
}

#nosotros .section-title {
  margin-bottom: 2.5rem;
}

/* Introducción destacada */
.about-intro {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 2rem;
}

.about-intro p {
  font-size: 20px;
  font-style: italic;
  line-height: 1.8;
  color: #5A626A;
  margin-bottom: 0;
}

/* Tarjetas de promesas clave */
.about-promise-card {
  text-align: center;
  padding: 2rem 1.5rem;
  border-radius: 0.75rem;
  background: rgba(247, 247, 247, 0.3);
  border: 1px solid rgba(0, 150, 64, 0.08);
  transition: all 0.3s ease;
  height: 100%;
}

.about-promise-card:hover {
  background: white;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  transform: translateY(-4px);
  border-color: rgba(0, 150, 64, 0.15);
}

.about-promise-card .icon-wrapper {
  width: 3.5rem;
  height: 3.5rem;
  margin-bottom: 1rem;
}

.about-promise-card h3 {
  font-size: 1rem;
  margin-bottom: 1rem;
  font-weight: 700;
}

.about-promise-card p {
  font-size: 17px;
  line-height: 1.8;
  color: #5A626A;
  margin-bottom: 0;
  text-align: center;
}

/* Cierre con mensaje de confianza */
.about-closing {
  text-align: center;
  max-width: 800px;
  margin: 2rem auto 0;
  padding-top: 2rem;
  border-top: 2px solid rgba(0, 150, 64, 0.1);
}

.about-closing p {
  font-size: 18px;
  line-height: 1.8;
  color: #5A626A;
  margin-bottom: 0;
}

/* Cards */
.info-card {
  background: white;
  border-radius: 0.75rem;
  padding: 2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.3s;
  border: none;
  height: 100%;
}

.info-card:hover {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

/* Mejorar alineación y espaciado de iconos en info-card */
.info-card .icon-wrapper {
  width: 3rem;
  height: 3rem;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.info-card .text-muted svg {
  flex-shrink: 0;
}

.info-card .d-flex.gap-2,
.info-card .d-flex.gap-3 {
  align-items: flex-start;
}

.icon-wrapper {
  width: 3rem;
  height: 3rem;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.icon-wrapper.primary {
  background-color: rgba(0, 150, 64, 0.1);
  color: var(--primary);
}

.icon-wrapper.accent {
  background-color: rgba(45, 130, 196, 0.1);
  color: var(--accent);
}

/* Team Cards - Estilizado moderno con nueva paleta CIM */
.team-card {
  background: #FFFFFF;
  border-radius: 0.75rem;
  padding: 1.5rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
  border: 1px solid rgba(0, 0, 0, 0.04);
  text-align: center;
  height: 100%;
}

.team-card:hover {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  transform: translateY(-4px);
  border-color: rgba(45, 130, 196, 0.2);
}

.team-photo {
  width: 10rem;
  height: 10rem;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 1.5rem;
  border: 4px solid white;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  position: relative;
  background-color: var(--muted);
}

.team-photo::before {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: rgba(45, 130, 196, 0.1);
  z-index: -1;
}

.team-name {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: #2D82C4;
}

.team-specialty {
  color: #5A626A;
  font-weight: 500;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.team-matricula {
  color: #8B9299;
  font-size: 0.8rem;
  margin-bottom: 1rem;
}

.social-links {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Botones de redes sociales en footer - Estilo Soft Light */
footer .social-btn {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  border: none;
  background-color: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  color: #FFFFFF;
  text-decoration: none;
}

footer .social-btn:hover {
  background-color: #009640;
  color: #FFFFFF;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 150, 64, 0.3);
}

/* Variante alternativa con azul sanitario */
footer .social-btn.accent-hover:hover {
  background-color: #2D82C4;
  box-shadow: 0 4px 12px rgba(45, 130, 196, 0.3);
}

/* Botones sociales en tarjetas de equipo */
.team-card .social-btn {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.375rem;
  border: none;
  background-color: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  color: #FFFFFF;
}

.team-card .social-btn:hover {
  background-color: #009640;
  color: #FFFFFF;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 150, 64, 0.3);
}

/* Botón de reserva/agenda - Estilo específico para evitar conflictos con botones sociales */
.social-btn.booking {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px !important; /* Espaciado interno tipo botón alargado */
  border-radius: 20px !important; /* Estilo píldora consistente */
  width: auto !important; /* Que no se fuerce a un cuadrado de red social */
  height: auto !important;
  white-space: nowrap; /* Evita que el texto se parta en dos renglones */
  font-weight: bold;
  background: var(--primary);
  color: white;
  border: none;
  border-color: var(--primary);
  transition: all 0.3s ease;
  text-decoration: none;
}

.social-btn.booking:hover {
  background: #007a33;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 150, 64, 0.3);
  color: white;
}

/* Botón de perfil/reserva minimalista con outline */
.btn-profile-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 0.375rem;
  background-color: transparent;
  color: #2D82C4;
  border: 1.5px solid #2D82C4;
  transition: all 0.3s ease;
  text-decoration: none;
  margin-top: 0.5rem;
}

.btn-profile-outline:hover {
  background-color: #2D82C4;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(45, 130, 196, 0.25);
}

.btn-profile-outline.green {
  color: #009640;
  border-color: #009640;
}

.btn-profile-outline.green:hover {
  background-color: #009640;
  color: white;
  box-shadow: 0 4px 12px rgba(0, 150, 64, 0.25);
}

/* Responsive para tarjetas de equipo */
@media (max-width: 1200px) {
  #equipo .row > div {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
  }
}

@media (max-width: 992px) {
  #equipo .row > div {
    flex: 0 0 50%;
    max-width: 50%;
  }
  
  .team-photo {
    width: 8rem;
    height: 8rem;
  }
}

@media (max-width: 576px) {
  #equipo .row > div {
    flex: 0 0 100%;
    max-width: 100%;
  }
  
  .team-card {
    padding: 1.25rem;
  }
  
  .team-photo {
    width: 9rem;
    height: 9rem;
  }
}

/* Estilos para la sección unificada de Contacto y Ubicación */
.contact-data-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  height: 100%;
}

.contact-info-item {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  padding: 1.25rem;
  border-radius: 0.75rem;
  background: white;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.contact-info-item:hover {
  background-color: white;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.contact-info-item .icon-wrapper {
  flex-shrink: 0;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background-color: rgba(45, 130, 196, 0.08);
  color: var(--accent);
  transition: all 0.3s ease;
}

.contact-info-item .icon-wrapper.primary {
  background-color: rgba(0, 150, 64, 0.08);
  color: var(--primary);
}

.contact-info-item:hover .icon-wrapper {
  transform: scale(1.05);
}

.contact-info-item > div:last-child {
  flex: 1;
}

.contact-info-item .small {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  color: #8B9299;
}

.contact-info-item .fw-semibold {
  font-size: 17px;
  font-weight: 600;
  color: #5A626A;
  line-height: 1.5;
}

/* Estilos para el mapa responsive */
.map-responsive {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 450px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.map-responsive iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Responsive para la sección de contacto */
@media (max-width: 991px) {
  .contact-data-wrapper {
    margin-bottom: 2rem;
  }
  
  .map-responsive {
    min-height: 400px;
  }
}

@media (max-width: 767px) {
  .contact-info-item {
    padding: 1rem;
    gap: 1rem;
  }
  
  .contact-info-item .icon-wrapper {
    width: 3rem;
    height: 3rem;
  }
  
  .map-responsive {
    min-height: 350px;
  }
}

/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.gallery-item {
  position: relative;
  border-radius: 0.75rem;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 1;
}

.gallery-item.large {
  grid-column: span 2;
  grid-row: span 2;
}

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

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

.gallery-item .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.6) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.3s;
  display: flex;
  align-items: flex-end;
  padding: 1.5rem;
}

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

.gallery-caption {
  color: white;
  font-weight: 500;
  font-size: 0.875rem;
}

/* CTA Section */
.cta-section {
  position: relative;
  padding: 6rem 0;
  background: #009640;
  color: white;
  overflow: hidden;
  margin-bottom: 0;
}

/* Igualar el botón del CTA con el del hero */
.cta-section .btn-accent {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 0.5rem;
}

.cta-section .btn-accent svg {
  margin-right: 0.5rem;
}

/* Estilos para el buscador de profesionales */
.search-container {
  max-width: 600px;
  margin: 0 auto 3rem;
}

.search-container .input-group-text {
  border-color: var(--border);
  padding: 0.75rem 1rem;
}

.search-container .form-control {
  border-color: var(--border);
  padding: 0.75rem 1rem;
  font-size: 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: all 0.3s;
}

.search-container .form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 4px 16px rgba(0, 150, 64, 0.15);
}

.search-container .input-group {
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

/* Footer */
footer {
  background-color: #5A626A;
  color: #FFFFFF;
  padding: 3rem 0 2rem;
  margin-top: 0;
}

footer h5,
footer h6 {
  color: #FFFFFF;
}

footer p,
footer span {
  color: rgba(255, 255, 255, 0.9);
}

footer a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: color 0.2s;
}

footer a:hover {
  color: white;
}

/* Isotipo/Favicon del footer - Agrandado y con margen */
.footer-logo-isotipo {
  width: 40px;
  height: 40px;
  margin-right: 12px;
  border-radius: 50%;
  object-fit: contain;
  vertical-align: middle;
}

/* Modal */
.modal-backdrop {
  background-color: rgba(0, 0, 0, 0.9);
}

.modal-content {
  background-color: transparent;
  border: none;
}

/* Agregando estilos modernos para galería con Fancybox */
/* Modern Gallery Styles */
.modern-gallery {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: repeat(3, 200px);
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.modern-gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 0.75rem;
  cursor: zoom-in;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.modern-gallery-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.modern-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

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

/* Grid layout - imagen grande a la izquierda */
.modern-gallery-item:nth-child(1) {
  grid-column: 1 / 4;
  grid-row: 1 / 4;
}

/* Imágenes pequeñas a la derecha - columna 1 */
.modern-gallery-item:nth-child(2) {
  grid-column: 4 / 6;
  grid-row: 1 / 2;
}

.modern-gallery-item:nth-child(3) {
  grid-column: 4 / 6;
  grid-row: 2 / 3;
}

.modern-gallery-item:nth-child(4) {
  grid-column: 4 / 6;
  grid-row: 3 / 4;
}

/* Imágenes medianas - columna 2 */
.modern-gallery-item:nth-child(5) {
  grid-column: 6 / 7;
  grid-row: 1 / 3;
}

.modern-gallery-item:nth-child(6) {
  grid-column: 6 / 7;
  grid-row: 3 / 4;
}

/* Overlay con gradiente */
.modern-gallery-item::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.6) 0%, transparent 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.modern-gallery-item:hover::after {
  opacity: 1;
}

/* Caption overlay */
.gallery-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem;
  color: white;
  font-size: 0.875rem;
  font-weight: 500;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
  z-index: 2;
}

.modern-gallery-item:hover .gallery-caption {
  opacity: 1;
  transform: translateY(0);
}

/* Fancybox custom styles */
.fancybox__container {
  --fancybox-bg: rgba(0, 150, 64, 0.95);
}

.fancybox__content {
  box-sizing: content-box;
  padding: 1.5rem;
  background: #fff;
  border-radius: 0.75rem;
  color: #374151;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.fancybox__caption {
  max-width: 80%;
  --fancybox-opacity: 1;
  text-align: center;
  padding: 1rem;
  color: white;
}

/* Responsive para galería */
@media (max-width: 992px) {
  .modern-gallery {
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(4, 180px);
  }

  .modern-gallery-item:nth-child(1) {
    grid-column: 1 / 3;
    grid-row: 1 / 3;
  }

  .modern-gallery-item:nth-child(2) {
    grid-column: 3 / 5;
    grid-row: 1 / 2;
  }

  .modern-gallery-item:nth-child(3) {
    grid-column: 3 / 5;
    grid-row: 2 / 3;
  }

  .modern-gallery-item:nth-child(4) {
    grid-column: 1 / 3;
    grid-row: 3 / 4;
  }

  .modern-gallery-item:nth-child(5) {
    grid-column: 3 / 5;
    grid-row: 3 / 4;
  }

  .modern-gallery-item:nth-child(6) {
    grid-column: 1 / 5;
    grid-row: 4 / 5;
  }
}

@media (max-width: 768px) {
  .modern-gallery {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(6, 160px);
    gap: 0.5rem;
  }

  .modern-gallery-item:nth-child(1) {
    grid-column: 1 / 3;
    grid-row: 1 / 3;
  }

  .modern-gallery-item:nth-child(2),
  .modern-gallery-item:nth-child(3),
  .modern-gallery-item:nth-child(4),
  .modern-gallery-item:nth-child(5),
  .modern-gallery-item:nth-child(6) {
    grid-column: span 1;
    grid-row: span 1;
  }

  .modern-gallery-item:nth-child(2) {
    grid-row: 3 / 4;
  }

  .modern-gallery-item:nth-child(3) {
    grid-row: 3 / 4;
  }

  .modern-gallery-item:nth-child(4) {
    grid-row: 4 / 5;
  }

  .modern-gallery-item:nth-child(5) {
    grid-row: 4 / 5;
  }

  .modern-gallery-item:nth-child(6) {
    grid-column: 1 / 3;
    grid-row: 5 / 6;
  }
}

/* Agregando estilos para botones flotantes de WhatsApp y scroll to top */
/* Floating Buttons */
.floating-buttons {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  z-index: 1000;
}

.floating-btn {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  text-decoration: none;
}

.floating-btn:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.whatsapp-btn {
  background-color: #25d366;
  color: white;
}

.whatsapp-btn:hover {
  background-color: #128c7e;
}

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

.scroll-top-btn:hover {
  background-color: #007a33;
}

/* Animación de entrada para scroll top button */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.floating-btn.show {
  animation: fadeInUp 0.3s ease;
}

/* Responsive para botones flotantes */
@media (max-width: 768px) {
  .floating-buttons {
    bottom: 1.5rem;
    right: 1.5rem;
    gap: 0.75rem;
  }

  .floating-btn {
    width: 3rem;
    height: 3rem;
  }

  .floating-btn svg {
    width: 20px;
    height: 20px;
  }
}

/* Responsive */
@media (max-width: 768px) {
  .gallery-item.large {
    grid-column: span 1;
    grid-row: span 1;
  }
}
