/* ==========================================================================
   SERVICES PAGE STYLES
   ========================================================================== */

/* ---------- 1. Services Hero ---------- */
.services-hero {
  position: relative;
  background: url('images/service-center.png') center/cover no-repeat;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.services-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(5, 5, 5, 0.75);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.services-hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  padding: 40px 20px;
}

.services-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  margin-bottom: 20px;
  color: #ffffff; /* Blanco Mate */
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
}

.services-hero p {
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  color: #e0e0e0;
  line-height: 1.6;
}

/* ---------- 2. Services Overview Grid ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.service-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 40px 30px;
  text-align: center;
  transition: var(--transition);
}

.service-card:hover {
  transform: translateY(-5px);
  border-color: var(--gold);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.service-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gold-glow);
  border-radius: 50%;
}

.service-icon svg {
  width: 30px;
  height: 30px;
  fill: var(--gold);
}

.service-card h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin-bottom: 15px;
  color: var(--text-primary);
}

.service-card p {
  color: var(--text-secondary);
  line-height: 1.6;
  font-size: 0.95rem;
}

/* ---------- 3. Booking Plugin UI Adaptation ---------- */
.booking-section {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
}

.booking-container-inner {
  max-width: 1100px;
  margin: 0 auto;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 50px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

.dbp-header {
  text-align: center;
  margin-bottom: 40px;
}

.dbp-header h2 {
  font-family: var(--font-display);
  font-size: 2.2rem;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.dbp-subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
}

.dbp-step-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--border);
}

.dbp-step-number {
  width: 32px;
  height: 32px;
  background: var(--gold);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
}

.dbp-step-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* Calendar styling */
.dbp-calendar-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.dbp-nav-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  transition: var(--transition);
}

.dbp-nav-btn:hover {
  background: var(--bg-secondary);
  border-color: var(--text-muted);
}

.dbp-current-month {
  font-weight: 600;
  font-size: 1.2rem;
}

.dbp-calendar {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.dbp-calendar-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  text-align: center;
  padding: 10px 0;
  font-weight: 600;
  color: var(--text-muted);
}

.dbp-calendar-body {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}

.dbp-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  font-size: 1.1rem;
  color: var(--text-muted);
  cursor: default;
}

.dbp-day:nth-child(7n) {
  border-right: none;
}

.dbp-day.empty {
  background: rgba(255,255,255,0.02);
}

.dbp-day.available {
  color: var(--text-primary);
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.dbp-day.available:hover {
  background: rgba(255,255,255,0.05);
}

.dbp-day.selected {
  background: var(--gold);
  color: #000;
  font-weight: 700;
}

/* Time Slots */
.dbp-time-slots {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.dbp-slot-btn {
  padding: 12px 24px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.dbp-slot-btn.available:hover {
  border-color: var(--text-muted);
  background: rgba(255,255,255,0.05);
}

.dbp-slot-btn.selected {
  background: var(--gold);
  border-color: var(--gold);
  color: #000;
}

.dbp-slot-btn.blocked {
  opacity: 0.5;
  cursor: not-allowed;
  text-decoration: line-through;
}

.dbp-legend {
  display: flex;
  gap: 20px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.dbp-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dbp-legend-color {
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

.dbp-legend-color.dbp-available { background: var(--bg-secondary); border: 1px solid var(--border); }
.dbp-legend-color.dbp-pending { background: var(--gold); }
.dbp-legend-color.dbp-blocked { background: rgba(255,255,255,0.1); border: 1px dashed var(--border); }

/* Form Styles */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.dbp-form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dbp-form-group label {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.dbp-form-group input {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 12px 15px;
  border-radius: var(--radius-sm);
  font-size: 1rem;
}

.dbp-form-group input:focus {
  outline: none;
  border-color: var(--gold);
}

.dbp-service-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

/* Dynamic Categorized Services Layout */
.dbp-categories-grid {
  column-count: 3;
  column-gap: 25px;
  width: 100%;
  margin-top: 15px;
  margin-bottom: 25px;
}

.dbp-category-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius-md, 8px);
  padding: 24px;
  display: block;
  width: 100%;
  break-inside: avoid;
  page-break-inside: avoid;
  -webkit-column-break-inside: avoid;
  transform: translateZ(0); /* Fixes column gaps bug in Chrome */
  margin-bottom: 25px;
  transition: transform 0.2s, border-color 0.2s;
}

.dbp-category-card:hover {
  border-color: rgba(201, 169, 110, 0.3);
  transform: translateY(-2px) translateZ(0);
}

.dbp-category-title {
  font-family: var(--font-display, inherit);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--gold, #c9a96e);
  margin-top: 0;
  margin-bottom: 15px;
  padding-bottom: 8px;
  border-bottom: 1.5px solid rgba(201, 169, 110, 0.15);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
}

.dbp-category-services {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dbp-category-services .dbp-service-checkbox {
  break-inside: avoid;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 0 !important;
}

.dbp-category-services .dbp-service-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-width: 18px;
  accent-color: var(--gold);
  margin-top: 2px;
}

.dbp-category-services .dbp-service-checkbox label {
  color: var(--text-primary, #333333);
  font-size: 0.95rem;
  line-height: 1.35;
  cursor: pointer;
}

/* Routine Maintenance Promo Elements */
.dbp-promo-tag {
  font-size: 0.75rem;
  font-weight: 700;
  color: #ffffff;
  background: var(--gold, #c9a96e);
  padding: 4px 8px;
  border-radius: 4px;
  align-self: flex-start;
  margin-bottom: 15px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  animation: pulse 2s infinite;
}

.dbp-routine-promo-box {
  background: rgba(201, 169, 110, 0.05);
  border: 1.5px dashed var(--gold, #c9a96e);
  border-radius: var(--radius-md, 8px);
  padding: 25px;
  margin-top: 20px;
  margin-bottom: 25px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  animation: slideDown 0.3s ease-out;
}

.dbp-routine-promo-box h5 {
  color: var(--gold, #c9a96e);
  font-size: 1.2rem;
  margin-top: 0;
  margin-bottom: 10px;
  font-weight: 700;
}

.dbp-routine-promo-box p {
  color: var(--text-secondary, #cccccc);
  font-size: 0.95rem;
  margin-bottom: 15px;
  line-height: 1.4;
}

.promo-inspections-list {
  list-style: none;
  padding-left: 0;
  margin-bottom: 15px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
}

.promo-inspections-list li {
  color: var(--text-primary, #ffffff);
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.promo-inspections-list li::before {
  content: '✓';
  color: #28a745;
  font-weight: bold;
}

.promo-footer {
  font-size: 0.85rem;
  color: var(--text-muted, #888888);
  font-style: italic;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 10px;
}

/* Animations */
@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.03); }
  100% { transform: scale(1); }
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 992px) {
  .dbp-categories-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .dbp-categories-grid {
    grid-template-columns: 1fr;
  }
  .promo-inspections-list {
    grid-template-columns: 1fr;
  }
}

.dbp-service-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dbp-service-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--gold);
}

.dbp-service-checkbox label {
  color: var(--text-primary);
  cursor: pointer;
}

/* Responsive */
@media (max-width: 768px) {
  .booking-container-inner {
    padding: 30px 20px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .dbp-calendar-header, .dbp-calendar-body {
    font-size: 0.9rem;
  }
  .dbp-day {
    font-size: 0.95rem;
  }
}

/* Custom Success Modal (Booking Service Confirmation) */
.success-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s var(--ease, ease);
  padding: 20px;
}

.success-modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.success-modal-card {
  background: var(--bg-card, #111111);
  border: 1px solid var(--border-accent, rgba(201, 169, 110, 0.3));
  max-width: 500px;
  width: 100%;
  border-radius: var(--radius-lg, 12px);
  padding: 40px 30px;
  text-align: center;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8);
  transform: scale(0.9) translateY(20px);
  transition: transform 0.4s var(--ease, ease);
  color: var(--text-primary, #ffffff);
}

.success-modal-overlay.active .success-modal-card {
  transform: scale(1) translateY(0);
}

.success-modal-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  background: rgba(40, 167, 69, 0.1);
  border: 2px solid #28a745;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: scaleUp 0.5s ease-out;
}

.success-modal-icon svg {
  width: 45px;
  height: 45px;
  fill: #28a745;
}

.success-modal-card h2 {
  font-family: var(--font-display, inherit);
  font-size: 1.8rem;
  margin-bottom: 15px;
  color: #ffffff;
}

.success-modal-card p {
  color: var(--text-secondary, #cccccc);
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 20px;
}

.success-modal-details {
  background: var(--bg-secondary, #161616);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.05));
  border-radius: var(--radius-md, 8px);
  padding: 15px 20px;
  margin-bottom: 20px;
  text-align: left;
}

.success-modal-details .detail-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 0.95rem;
}

.success-modal-details .detail-row:not(:last-child) {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.success-modal-details .detail-row span {
  color: var(--text-muted, #888888);
}

.success-modal-details .detail-row strong {
  color: var(--gold, #c9a96e);
}

.success-note {
  font-size: 0.85rem !important;
  color: var(--text-muted, #888888) !important;
  margin-bottom: 25px !important;
}

.success-modal-card .btn-solid {
  width: 100%;
  padding: 12px;
  font-size: 1rem;
  font-weight: 600;
  background: var(--gold, #c9a96e);
  color: #000000;
  border: none;
  border-radius: var(--radius-sm, 4px);
  cursor: pointer;
  transition: var(--transition, all 0.3s);
}

.success-modal-card .btn-solid:hover {
  background: var(--gold-light, #eadd8c);
}

@keyframes scaleUp {
  0% { transform: scale(0.5); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
