/* =================================================================
   GLOBALS.CSS - CARAVANING BENICARLÓ  
   Versión corregida - SVG con dimensiones fijas
   ================================================================= */

/* Fuente principal del sitio */
body {
  font-family: Arial, Helvetica, sans-serif;
}

/* =================================================================
   FIX CRÍTICO: CONTROLAR DIMENSIONES DE SVG
   Los SVG estaban expandiéndose y ocupando toda la pantalla
   ================================================================= */

/* FORZAR que todos los SVG tengan dimensiones controladas */
svg {
  display: inline-block !important;
  vertical-align: middle;
  flex-shrink: 0;
  /* Tamaño por defecto: 24px x 24px */
  width: 1.5rem;
  height: 1.5rem;
  /* Evitar que se expandan */
  max-width: 100%;
  max-height: 100%;
}

/* Clases de Tailwind que sí queremos que funcionen */
svg.w-3,
svg.h-3 { width: 0.75rem; height: 0.75rem; }

svg.w-4,
svg.h-4 { width: 1rem; height: 1rem; }

svg.w-5,
svg.h-5 { width: 1.25rem; height: 1.25rem; }

svg.w-6,
svg.h-6 { width: 1.5rem; height: 1.5rem; }

svg.w-8,
svg.h-8 { width: 2rem; height: 2rem; }

svg.w-10,
svg.h-10 { width: 2.5rem; height: 2.5rem; }

svg.w-12,
svg.h-12 { width: 3rem; height: 3rem; }

svg.w-16,
svg.h-16 { width: 4rem; height: 4rem; }

/* Utilidad para balance de texto */
.text-balance {
  text-wrap: balance;
}

/* =================================================================
   LIGHTBOX / MODAL DE IMÁGENES
   ================================================================= */
#image-modal.is-open {
  display: flex;
  opacity: 1;
}

body.modal-open {
  overflow: hidden;
}

/* =================================================================
   BANNER DE COOKIES (RGPD)
   ================================================================= */
.cookies-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  border-top: 1px solid #e0e0e0;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
  z-index: 10000;
  padding: 20px;
  animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

.cookies-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.cookies-text {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.cookies-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.cookies-text p {
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
  color: #444;
}

.cookies-text a {
  color: #436092;
  text-decoration: underline;
}

.cookies-buttons {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.cookies-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cookies-accept {
  background: #436092;
  color: white;
}

.cookies-accept:hover {
  background: #364a7a;
}

.cookies-reject {
  background: #f5f5f5;
  color: #666;
  border: 1px solid #ddd;
}

.cookies-reject:hover {
  background: #e8e8e8;
}

/* =================================================================
   BUSCADOR ALGOLIA
   ================================================================= */
#search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  max-height: 400px;
  overflow-y: auto;
  z-index: 1000;
}

.search-result-item {
  padding: 12px 16px;
  border-bottom: 1px solid #eee;
  cursor: pointer;
  transition: background-color 0.2s;
}

.search-result-item:hover {
  background-color: #f8f9fa;
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-title {
  font-weight: 600;
  color: #436092;
  margin-bottom: 4px;
}

.search-result-description {
  color: #666;
  font-size: 0.9rem;
  line-height: 1.4;
}

.search-result-meta {
  margin-top: 6px;
  display: flex;
  gap: 8px;
}

.search-result-category,
.search-result-type {
  font-size: 0.75rem;
  padding: 2px 6px;
  border-radius: 4px;
  background: #f39200;
  color: white;
}

.search-no-results,
.search-error {
  padding: 16px;
  text-align: center;
  color: #666;
}

.search-result-title em,
.search-result-description em {
  background: #fff3cd;
  font-style: normal;
  padding: 1px 2px;
  border-radius: 2px;
}

/* =================================================================
   RESPONSIVE - MOBILE
   ================================================================= */
@media (max-width: 768px) {
  .cookies-content {
    flex-direction: column;
    text-align: center;
    gap: 15px;
  }

  .cookies-text {
    flex-direction: column;
    gap: 8px;
  }

  .cookies-buttons {
    width: 100%;
  }

  .cookies-btn {
    flex: 1;
    padding: 12px;
  }
}