.rwz { --primary: #2E76D1; --accent: #FF7043; --error: #D32F2F; }
.rwz h3 { margin: 0 0 12px; font-weight: 600; color: var(--primary); }

.rwz-step { border: 1px solid #e3e7ef; border-radius: 8px; padding: 16px; margin-bottom: 16px; }
.rwz-field { display: grid; grid-template-rows: auto auto auto; gap: 6px; margin-bottom: 12px; }
.rwz-field label { font-size: 14px; color: #333; }
.rwz-field input, .rwz-field select { border: 1px solid #cfd6e4; border-radius: 6px; padding: 10px; font-size: 14px; width: 100%; }
.rwz-field input:focus, .rwz-field select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(46,118,209,.15); }

.rwz-error { color: var(--error); font-size: 12px; min-height: 16px; }
.rwz-field.error label { color: var(--error); }
.rwz-field.error input, .rwz-field.error select { border-color: var(--error); }

.rwz-actions { display: flex; gap: 10px; justify-content: flex-end; }
.rwz-actions .rwz-prev, .rwz-actions .rwz-next, .rwz-actions .rwz-confirm { background: var(--primary); color: #fff; border: none; border-radius: 6px; padding: 10px 16px; cursor: pointer; }
.rwz-back-main { background: transparent; color: var(--primary); border: 1px solid var(--primary); border-radius: 6px; padding: 9px 16px; text-decoration: none; }

.rwz-summary { background: #f7f9fc; border: 1px solid #e3e7ef; border-radius: 6px; padding: 12px; }

.rwz-readonly {
    background-color: #f5f5f5;
    color: #666;
    cursor: not-allowed;
}

.rwz-slots { display: flex; flex-wrap: wrap; gap: 8px; }
.rwz-slot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #ccc;
  border-radius: 10px;
  padding: 10px 14px;
  min-width: 80px;
  cursor: pointer;
  background: #fff;
  user-select: none;
}
.rwz-slot.disabled {
  background: #eee;
  color: #999;
  cursor: not-allowed;
}
.rwz-slot.selected {
  border-color: #2E76D1;
  background: #2E76D1;
  color: #fff;
}
.rwz-readonly {
  background-color: #f5f5f5;
  color: #666;
  cursor: not-allowed;
}
/* ============================
   Calendario mensual
============================ */

#rwz-calendar-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5em;
  font-weight: bold;
  color: #fff;
  background-color: #c62828;
  padding: 0.5em 1em;
  border-radius: 4px;
}

#rwz-calendar-nav button {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.2em;
  cursor: pointer;
}

#rwz-calendar-title {
  font-size: 1.1em;
  text-transform: capitalize;
}

#rwz-calendar-grid {
  width: 100%;
  border-collapse: collapse;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  font-size: 0.9em; 
}

#rwz-calendar-grid th {
  background-color: #f5f5f5;
  padding: 0.3em;
  text-align: center;
  font-weight: 600;
  border-bottom: 1px solid #ddd;
}

#rwz-calendar-grid td {
  width: 14.28%;
  height: 2.5em;
  padding: 0.2em;
  text-align: center;
  vertical-align: middle;
  cursor: default;
  border: 1px solid #eee;
  position: relative;
  font-weight: 500;
  color: #333;
  background-color: #fff;
}

#rwz-calendar-grid td.rwz-out {
  color: #bbb;
  background-color: #fafafa;
}

#rwz-calendar-grid td.rwz-enabled {
  background-color: #e3f2fd;
  cursor: pointer;
}

#rwz-calendar-grid td.rwz-enabled:hover {
  background-color: #bbdefb;
}

#rwz-calendar-grid td.rwz-disabled {
  color: #ccc;
  background-color: #f9f9f9;
  cursor: not-allowed;
}

#rwz-calendar-grid td.selected {
  background-color: #1976d2;
  color: #fff;
  font-weight: bold;
  box-shadow: inset 0 0 0 2px #fff;
}

#rwz-calendar-grid td:nth-child(7) {
  color: #c62828; /* Domingos en rojo */
}
.rwz-day.disabled {
  pointer-events: none;
  opacity: 0.4;
  cursor: not-allowed;
}
/* ============================
   Horarios disponibles
============================ */

.rwz-slot {
  padding: 0.5em 1em;
  margin: 0.3em;
  border: 1px solid #ccc;
  border-radius: 4px;
  display: inline-block;
  cursor: pointer;
  background-color: #f1f8e9;
  color: #33691e;
  font-weight: 500;
}

.rwz-slot:hover {
  background-color: #dcedc8;
}

.rwz-slot.selected {
  background-color: #8bc34a;
  color: #fff;
  border-color: #689f38;
}

.rwz-slot.disabled {
  background-color: #eee;
  color: #999;
  cursor: not-allowed;
  border-color: #ddd;
}
#rwz-calendar-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #c62828;
  color: #fff;
  padding: 0.5em 1em;
  border-radius: 4px;
  margin-bottom: 0.5em;
  flex-wrap: wrap;
  gap: 0.5em;
}

#rwz-calendar-nav button {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  font-size: 1.1em;       
  padding: 0.1em 0.3em;
}
#rwz-calendar-title {
  font-size: 1em;
  font-weight: 600;
  flex-grow: 1;
  text-align: center;
  text-transform: capitalize;
}
.reserva-calendario { margin-top: 25px; }
.cal-controls { margin-bottom: 10px; display: flex; gap: 12px; }
.cal-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.range-label { font-weight: bold; }

.cal-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}
.cal-day-header { background: #eef3f7; border-radius: 6px; padding: 8px; text-align: center; font-weight: 600; }

/* Grillas */
.cal-grid.semanal { display: grid; grid-template-rows: auto 1fr; gap: 8px; justify-items: center;}
.cal-body { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }

/* Calendario mensual: estructura base */
.cal-grid.mensual {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 8px;
  justify-items: center
}
.cal-grid.mensual .cal-body { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }

.cal-day {
  position: relative;
  background: #f9f9f9;
  border-radius: 8px;
  padding: 8px;
  min-height: 120px;
  max-height: 160px; /* límite visual */
  overflow-y: auto;  /* scroll vertical */
}
.cal-day h3 { margin: 0 0 6px; font-size: 13px; border-bottom: 1px solid #ddd; padding-bottom: 4px; }
.cal-day::-webkit-scrollbar {
  width: 6px;
}
.cal-day::-webkit-scrollbar-thumb {
  background-color: rgba(0,0,0,0.2);
  border-radius: 4px;
}
/* Indicador de más contenido (sombreado inferior) */
.cal-day::after {
  content: "";
  position: sticky;
  bottom: 0;
  left: 0;
  right: 0;
  height: 16px;
  background: linear-gradient(to top, rgba(0,0,0,0.15), transparent);
  pointer-events: none; /* no bloquea scroll */
  border-radius: 0 0 8px 8px;
}
.no-reservas {
  font-size: 12px;
  color: #999;
}
.reserva-card { background: #fff; border: 2px solid #3498db; border-radius: 6px; padding: 6px; margin-top: 6px; cursor: pointer; transition: transform 0.2s ease, box-shadow 0.2s ease; }
.reserva-card:hover { transform: translateY(-2px); box-shadow: 0 2px 6px rgba(0,0,0,0.15); }

/* Semanal: vertical (hora arriba, nombre abajo) */
.cal-grid.semanal .reserva-card { display: flex; flex-direction: column; align-items: flex-start; }
.cal-grid.semanal .reserva-card .hora { font-weight: bold; font-size: 13px; margin-bottom: 2px; }
.cal-grid.semanal .reserva-card .nombre { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Mensual: horizontal (hora izquierda, nombre derecha) */
.cal-grid.mensual .reserva-card { display: flex; flex-direction: row; align-items: center; gap: 6px; padding: 4px; }
.cal-grid.mensual .reserva-card .hora { font-weight: 700; font-size: 12px; color: #000; }
.cal-grid.mensual .reserva-card .nombre { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.no-reservas { font-size: 12px; color: #999; }

/* Estados */
.status-pendiente { border-color: #f1c40f; }
.status-cancelada { border-color: #e74c3c; }
.status-confirmada { border-color: #2ecc71; }

/* Modal */
.modal { 
  display: none; 
  position: fixed; 
  inset: 0; 
  background: rgba(0,0,0,0.6); 
  align-items: center !important;       
  justify-content: center !important;  
  z-index: 9999;
}
.modal-content { 
  background: #fff; 
  margin: 6% auto !important;
  padding: 20px; 
  border-radius: 8px; 
  width: 520px; 
  max-height: 90vh; 
  overflow-y: auto; 
  position: relative; 
}
.modal-close { position: absolute; top: 10px; right: 12px; cursor: pointer; font-weight: bold; font-size: 18px; }
.modal-close:hover { color: #e74c3c; }
/* Día vacío (antes del 1 del mes) */
.cal-day.empty {
  background: #f0f0f0;
  border-radius: 8px;
  min-height: 120px;
}
/* Encabezado del popup */
.modal-header {
  display: flex;
  flex-direction: column;   /* apila día/fecha y hora */
  align-items: center;      /* centrado horizontal */
  border-bottom: 1px solid #eee;
  padding-bottom: 8px;
  margin-bottom: 10px;
}

.modal-dia-fecha {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
}
.modal-hora {
  font-size: 16px;
  font-weight: 600;
}

#modal-body p { margin: 4px 0; font-size: 14px;}
#modal-body strong {
  min-width: 80px; /* Asegura que la etiqueta "RUT:", "Email:", etc. se alinee bien */
  display: inline-block;
}
/* Botones centrados, uno al lado del otro */
.modal-actions { display: flex; justify-content: center; gap: 12px; margin-top: 16px; }

.btn-cancelar-cita {
  background: #e74c3c !important; 
  border-color: #e74c3c !important;
  color: #fff !important;
}
.btn-cancelar-cita::before {
  content: "✖ ";
  font-weight: bold;
}

.btn-confirmar-cita {
  background: #2ecc71 !important;
  border-color: #2ecc71 !important;
  color: #fff !important;
}
.btn-confirmar-cita::before {
  content: "✔ ";
  font-weight: bold;
}

.btn-cancelar-cita:hover,
.btn-confirmar-cita:hover { filter: brightness(0.95); }

.estado-confirmada {
  background: #2ecc71;
  border: 1px solid #2ecc71;
  color: #fff;
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: bold;
  text-align: center;
}

.estado-cancelada {
  background: #e74c3c;
  border: 1px solid #e74c3c;
  color: #fff;
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: bold;
  text-align: center;
}

.spec-name {
  font-size: 18px;
  font-weight: 700;
  margin-top: 25px;
  color: #2c3e50;
}

.rwz-selector {
  margin-bottom: 16px;
}
.rwz-vista-calendario {
  margin-bottom: 16px;
}
.vista-label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
}
.cal-controls {
  display: flex;
  gap: 12px;
}
.rwz-especialista-info {
  margin-bottom: 16px;
}
.rwz-especialista-info .spec-name {
  /* Nombre más grande y principal */
  font-size: 24px;         /* Aumentamos de 20px a 24px */
  font-weight: 800;        /* Más negrita que 700 */
  margin-top: 6px;
  margin-bottom: 2px;      /* Reducimos el margen inferior para acercarlo al RUT */
  color: #2c3e50;
  line-height: 1.2;
}
.rwz-especialista-info .spec-rut {
  /* RUT como subtítulo más pequeño */
  font-size: 13px;         /* Reducimos de 14px a 13px */
  color: #555;
  font-weight: 500;        /* Quitamos negrita */
}
.rwz-modal {
  position: fixed;
  top:0; left:0; right:0; bottom:0;
  background: rgba(0,0,0,0.5);
  display:flex;
  align-items:center;
  justify-content:center;
  z-index:9999;
}
.rwz-modal-content {
  background:#fff;
  padding:20px;
  border-radius:8px;
  max-width:400px;
  text-align:center;
}
.rwz-modal-content h2 {
  margin-top:0;
}
.rwz-modal-content button {
  margin: 10px;
}
/* Centrar iconos en la columna Acciones */
.rwz-spec-actions {
  text-align: center;
}
.rwz-spec-actions a {
  display: inline-block;
  margin: 0 8px;
  text-decoration: none;
}
.rwz-spec-actions .dashicons {
  font-size: 18px;
  vertical-align: middle;
}

/* Modal */
#rwz-edit-modal {
  position: fixed;       /* se fija sobre toda la ventana */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5); /* fondo oscuro */
  z-index: 9999;         /* sobre todo */
}
.rwz-edit-modal-content {
  background: #fff;
  max-width: 500px;
  margin: 6% auto;    /* centra horizontal y da espacio arriba */
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  text-align: center;
  position: relative;
}

/* 1. Contenedor de Acciones (Botón) */
.rwz-step[data-step="4"] .rwz-actions {
  /* Centrar el botón "Confirmar" */
  justify-content: center !important; 
  /* Espacio entre el resumen (arriba) y el botón */
  margin-top: 25px !important;       
  /* Espacio entre el botón y el mensaje de confirmación (abajo) */
  margin-bottom: 15px !important;    
}

/* 2. Mensaje de Confirmación */
#confirmMessage {
  /* Centrar el texto del mensaje de confirmación */
  text-align: center !important;
  /* Aseguramos que ocupe todo el ancho para centrar correctamente */
  width: 100% !important; 
}

.cal-grid {
  overflow-x: auto; /* Habilitar scroll horizontal solo si es necesario */
  padding-bottom: 15px; /* Evita que la barra de scroll se pegue al fondo */
  margin-bottom: -15px; /* Compensar el padding si no hay scroll */
}

/* 2. Mantener el ancho de los días en la vista Semanal */
.cal-grid.semanal .cal-header,
.cal-grid.semanal .cal-body {
  min-width: 980px; 
  width: max-content; /* Permite que el ancho sea dictado por el contenido mínimo */
}

/* 3. Asegurar el ancho de cada tarjeta de día en la vista Semanal */
.cal-grid.semanal .cal-day-header,
.cal-grid.semanal .cal-body > div {
  /* Establecer un ancho mínimo para cada día */
  min-width: 140px; 
}
.cal-grid.mensual .cal-header,
.cal-grid.mensual .cal-body {
  min-width: 980px;
  width: max-content;
}
.cal-grid.mensual .cal-day-header,
.cal-grid.mensual .cal-body > div {
  min-width: 140px; 
}
.cal-day {
  max-height: 140px; 
  min-height: 100px;
}
/* ============================
   ESTILOS GENERALES Y WIZARD
============================ */
.rwz { --primary: #2E76D1; --accent: #FF7043; --error: #D32F2F; }
.rwz h3 { margin: 0 0 12px; font-weight: 600; color: var(--primary); }

.rwz-step { border: 1px solid #e3e7ef; border-radius: 8px; padding: 16px; margin-bottom: 16px; }
.rwz-field { display: grid; grid-template-rows: auto auto auto; gap: 6px; margin-bottom: 12px; }
.rwz-field label { font-size: 14px; color: #333; }
.rwz-field input, .rwz-field select { border: 1px solid #cfd6e4; border-radius: 6px; padding: 10px; font-size: 14px; width: 100%; }
.rwz-field input:focus, .rwz-field select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(46,118,209,.15); }

.rwz-error { color: var(--error); font-size: 12px; min-height: 16px; }
.rwz-field.error label { color: var(--error); }
.rwz-field.error input, .rwz-field.error select { border-color: var(--error); }

.rwz-actions { display: flex; gap: 10px; justify-content: flex-end; }
.rwz-actions .rwz-prev, .rwz-actions .rwz-next, .rwz-actions .rwz-confirm { background: var(--primary); color: #fff; border: none; border-radius: 6px; padding: 10px 16px; cursor: pointer; }
.rwz-back-main { background: transparent; color: var(--primary); border: 1px solid var(--primary); border-radius: 6px; padding: 9px 16px; text-decoration: none; }

.rwz-summary { background: #f7f9fc; border: 1px solid #e3e7ef; border-radius: 6px; padding: 12px; }

.rwz-readonly {
    background-color: #f5f5f5;
    color: #666;
    cursor: not-allowed;
}

/* --- AJUSTES DE FORMATO PASO 4 (Centrado y Espacio) --- */

.rwz-step[data-step="4"] .rwz-actions {
  justify-content: center !important; 
  margin-top: 25px !important;       
  margin-bottom: 15px !important;    
}

#confirmMessage {
  text-align: center !important;
  width: 100% !important; 
}


/* ============================
   ESTILOS DE CALENDARIO Y AGENDA
============================ */

.reserva-calendario { margin-top: 25px; }
.cal-controls { margin-bottom: 10px; display: flex; gap: 12px; }
.cal-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.range-label { font-weight: bold; }

/* Cabecera de días (Lunes a Domingo) */
.cal-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}
.cal-day-header { background: #eef3f7; border-radius: 6px; padding: 8px; text-align: center; font-weight: 600; }

/* Grillas */
.cal-grid {
  overflow-x: auto; /* Habilitar scroll horizontal solo si es necesario */
  padding-bottom: 15px; 
  margin-bottom: -15px; 
}
.cal-body { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }

/* Forzar ancho mínimo para scroll horizontal */
.cal-grid.semanal .cal-header,
.cal-grid.semanal .cal-body,
.cal-grid.mensual .cal-header,
.cal-grid.mensual .cal-body {
  min-width: 980px; 
  width: max-content; 
}
.cal-grid.semanal .cal-day-header,
.cal-grid.semanal .cal-body > div,
.cal-grid.mensual .cal-day-header,
.cal-grid.mensual .cal-body > div {
  min-width: 140px; 
}


.cal-day {
  position: relative;
  background: #f9f9f9;
  border-radius: 8px;
  padding: 8px;
  min-height: 100px;
  max-height: 140px; 
  overflow-y: auto;  
}
.cal-day h3 { margin: 0 0 6px; font-size: 13px; border-bottom: 1px solid #ddd; padding-bottom: 4px; }

/* Estilos de Scrollbar */
.cal-day::-webkit-scrollbar { width: 6px; }
.cal-day::-webkit-scrollbar-thumb { background-color: rgba(0,0,0,0.2); border-radius: 4px; }

/* Indicador de más contenido (sombreado inferior) */
.cal-day::after {
  content: "";
  position: sticky;
  bottom: 0;
  left: 0;
  right: 0;
  height: 16px;
  background: linear-gradient(to top, rgba(0,0,0,0.15), transparent);
  pointer-events: none; 
  border-radius: 0 0 8px 8px;
}
.no-reservas { font-size: 12px; color: #999; }

/* Tarjetas de Reserva */
.reserva-card { background: #fff; border: 2px solid #3498db; border-radius: 6px; padding: 6px; margin-top: 6px; cursor: pointer; transition: transform 0.2s ease, box-shadow 0.2s ease; }
.reserva-card:hover { transform: translateY(-2px); box-shadow: 0 2px 6px rgba(0,0,0,0.15); }

/* Semanal */
.cal-grid.semanal .reserva-card { display: flex; flex-direction: column; align-items: flex-start; }
.cal-grid.semanal .reserva-card .hora { font-weight: bold; font-size: 13px; margin-bottom: 2px; }
.cal-grid.semanal .reserva-card .nombre { font-size: 12px; flex-grow: 1; margin: 0 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Mensual */
.cal-grid.mensual .reserva-card { display: flex; flex-direction: row; align-items: center; gap: 6px; padding: 4px; }
.cal-grid.mensual .reserva-card .hora { font-weight: 700; font-size: 12px; color: #000; }
.cal-grid.mensual .reserva-card .nombre { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Estados */
.status-pendiente { border-color: #f1c40f; }
.status-cancelada { border-color: #e74c3c; }
.status-confirmada { border-color: #2ecc71; }

.cal-grid .reserva-card .reserva-id {
  font-size: 10px; /* Tamaño pequeño */
  color: #999; /* Color gris suave */
  font-weight: normal;
  text-align: right;
  flex-shrink: 0; /* Evita que se encoja */
}
/* ============================
   ESTILOS DE MODAL (PC y Responsive)
============================ */

.modal { 
  display: none; 
  position: fixed; 
  inset: 0; 
  background: rgba(0,0,0,0.6); 
  align-items: center !important; /* Centrado vertical con Flexbox */      
  justify-content: center !important; /* Centrado horizontal con Flexbox */ 
  z-index: 9999;
}
.modal-content { 
  background: #fff; 
  margin: 6% auto !important; /* Margen superior para PC (Respaldo si Flexbox falla) */
  padding: 20px; 
  border-radius: 8px; 
  width: 520px; 
  max-height: 90vh; 
  overflow-y: auto; 
  position: relative; 
}
.modal-close { 
  position: absolute; top: 10px; right: 12px; cursor: pointer; font-weight: bold; font-size: 18px; 
}
.modal-close:hover { color: #e74c3c; }

.modal-header {
  display: flex;
  flex-direction: column;   
  align-items: center;      
  border-bottom: 1px solid #eee;
  padding-bottom: 8px;
  margin-bottom: 10px;
}
.modal-dia-fecha { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.modal-hora { font-size: 16px; font-weight: 600; }

#modal-body p { margin: 4px 0; font-size: 14px;}
#modal-body strong { min-width: 80px; display: inline-block; }

/* Botones centrados */
.modal-actions { display: flex; justify-content: center; gap: 12px; margin-top: 16px; }

/* ============================
   ESTILOS DE TARJETAS DE CONTACTO (VERSIÓN FINAL CON AJUSTES FINOS DE ÍCONO Y TEXTO DE FRANJA)
============================ */

.contact-section {
  padding: 40px 0;
  text-align: center;
}
.contact-section h2 {
  font-size: 36px;
  margin-bottom: 40px;
  color: #5F4B8B; 
  text-transform: uppercase;
  font-weight: 800;
}

.contact-cards-grid {
  display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); 
    gap: 20px; 
    max-width: 1200px; 
    margin: 0 auto;
    padding: 0 15px;
}

.contact-card {
  display: block; 
  width: auto; 
  height: 320px; 
  /* text-decoration: none;
  color: #fff;  */
  position: relative; 
  z-index: 1; 
  
  background-size: cover;
  background-position: center;
  border-radius: 8px; 
  overflow: hidden; 
  box-shadow: 0 4px 12px rgba(0,0,0,0.1); 
  transition: all 0.4s ease; 
}

/* --- ENLACE DE IMÁGENES DINÁMICAS --- */
.email-card { background-image: var(--bg-email); }
.phone-card { background-image: var(--bg-phone); }
.instagram-card { background-image: var(--bg-instagram); }
.facebook-card { background-image: var(--bg-facebook); }


/* --- ÍCONO (CENTRO DE LA MITAD SUPERIOR - SIN CORTES) --- */
.contact-card .icon-svg { 
  position: absolute;
  top: 25%; 
  left: 50%;
  transform: translate(-50%, -50%); 
  /* ¡AJUSTE CLAVE! Tamaño del SVG a 64px */
  width: 64px; 
  height: auto; 
  fill: #fff; 
  z-index: 4; 
  transition: fill 0.4s ease;
}

/* --- FRANJA SÓLIDA DE CONTENIDO (CENTRO DE LA MITAD INFERIOR) --- */
.contact-card-content-strip {
  position: absolute;
  bottom: 20%; 
  left: 0;
  width: 100%; 
  height: auto; 
  min-height: 50px; 
  
  background-color: rgba(0,0,0,0.6); 
  padding: 10px 0px; 
  display: flex;
  /* flex-direction: column; */
  align-items: center;
  justify-content: center;
  z-index: 4; 
  transition: background-color 0.4s ease; 
  box-sizing: border-box; 
}

/* --- ESTILOS PARA TEXTO (DENTRO DE LA FRANJA - EN UNA SOLA LÍNEA) --- */
.contact-card-content-strip .info {
  font-size: 13px; /* ¡AJUSTE CLAVE! Reducido para intentar caber en una línea */
  font-weight: 500;
  text-align: center;
  color: #fff; 
  padding: 0; 
  
  /* ¡AJUSTES CLAVE PARA UNA SOLA LÍNEA CON PUNTOS SUSPENSIVOS! */
  white-space: nowrap; /* Fuerza que el texto no salte de línea */
  overflow: hidden;    /* Oculta lo que se desborde */
  text-overflow: ellipsis; /* Añade "..." al final si el texto es demasiado largo */
  max-width: 90%;     /* Asegura que el texto respete el ancho de la franja */
  
  transition: color 0.4s ease; 
}


/* --- HOVER Y EFECTOS --- */
.overlay {
  position: absolute;
  inset: 0;
  z-index: 3; 
  transform: translateY(100%); 
  background-color: transparent; 
  transition: transform 0.4s ease-in-out, background-color 0.4s ease; 
}
.contact-card:hover {
  transform: translateY(-5px) scale(1.02); 
  box-shadow: 0 15px 25px rgba(0,0,0,0.2); 
  z-index: 5; 
}
.contact-card:hover .overlay {
  transform: translateY(0); 
  background-color: rgba(95, 75, 139, 0.9); 
}
.contact-card:hover .contact-card-content-strip {
  background-color: rgba(95, 75, 139, 0.9); 
}
.contact-card:hover .icon-svg { /* Cambiado a .icon-svg para el hover */
  fill: #fff; 
}
.contact-card:hover .contact-card-content-strip .info {
  color: #fff; 
}
/* ============================
   MEDIA QUERIES (Responsive)
============================ */

@media screen and (max-width: 768px) {
  #rwz-calendar-grid {
    font-size: 0.85em;
  }

  #rwz-calendar-grid td {
    height: 2.5em;
    padding: 0.2em;
  }

  #rwz-calendar-nav {
    flex-direction: column;
    gap: 0.5em;
    text-align: center;
  }

  #rwz-calendar-title {
    font-size: 1em;
  }

  .rwz-slot {
    font-size: 0.9em;
    padding: 0.4em 0.8em;
  }
  .contact-section {
    padding: 40px 0;
    text-align: center;
  }
.contact-cards-grid {
    /* Permite que la grilla ocupe el 95% del ancho de la pantalla */
    max-width: 95%; 
    /* FORZAR 2 COLUMNAS, manteniendo un ancho mínimo adaptativo de 40vw */
    grid-template-columns: repeat(2, minmax(40vw, 1fr)) !important; 
    gap: 15px;
    padding: 0; /* Quitamos el padding si ya usamos max-width */
    margin-left: auto;
    margin-right: auto;
}

.contact-card {
    height: 260px; 
}

.contact-card .icon-svg { 
    top: 28%; 
    width: 50px; 
    height: 50px; 
}
.contact-card-content-strip { 
    bottom: 15%; 
    min-height: 60px; 
} 
.contact-card-content-strip .info { 
    font-size: 13px; 
}
    
  .contact-card {
    height: 260px; /* Altura ajustada para tablet */
  }
  
  /* Ajustes específicos para íconos y franjas en tablet */
  .contact-card .icon-svg { 
    width: 50px; 
    height: 50px; 
    top: 28%; /* Posición ajustada */
  }
  .contact-card-content-strip { 
    bottom: 15%; 
    min-height: 60px; 
  } 
  .contact-card-content-strip .info { 
    font-size: 13px; 
  }

}
@media screen and (max-width: 600px) {
  .modal-content {
    width: 95%; 
    max-width: 95%;
    padding: 15px; 
  }

  .modal-close {
    position: absolute !important; 
    top: 5px !important;         
    right: 10px !important;       
    font-size: 24px !important;    
    padding: 8px !important;       
    display: block !important;     
    background: rgba(255, 255, 255, 0.7); 
    border-radius: 50%; 
    line-height: 1;
  }

  .modal-actions {
      flex-direction: column; 
      gap: 8px;
  }
  .modal-actions button {
      width: 100%; 
  }

  .modal-header {
      padding-top: 15px; 
  }
}
@media screen and (max-width: 480px) {
  #rwz-calendar-grid th,
  #rwz-calendar-grid td {
    padding: 0.2em;
    font-size: 0.75em;
  }

  .rwz-slot {
    display: block;
    width: 100%;
    margin: 0.3em 0;
    text-align: center;
  }
  #rwz-calendar-nav {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  #rwz-calendar-title {
    font-size: 1em;
  }

  #rwz-calendar-nav button {
    font-size: 1.2em;
  }
  .contact-cards-grid {
    /* AJUSTE PARA MÓVIL: Forzar 1 columna. Bajamos el minmax a 180px por si acaso */
    max-width: 100%;
    grid-template-columns: minmax(80vw, 1fr) !important; 
    gap: 10px;
    padding: 0 10px;  
    margin-left: auto !important; 
    margin-right: auto !important;
}

  .contact-card {
      height: 230px; 
  }

  .contact-card .icon-svg { 
      top: 25%; 
      width: 40px; 
      height: 40px; 
  }
  .contact-card-content-strip { 
      bottom: 10%; 
      min-height: 50px; 
  } 
  .contact-card-content-strip .info { 
    max-width: 95%;
      font-size: 12px; 
  }
}
