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

body {
  font-family: Arial, sans-serif;
  font-size: 0.9rem;
}

.breadcrumb {
  padding: 1rem;
  background: #fff;
  border-bottom: 1px solid #eee;
}

.page-container {
  display: grid;
  grid-template-rows: auto 1fr auto; /* Header, Main content, Footer */
  min-height: 100vh;
}

footer {
  background-color: #e8f5e9; /* Very light green */
  color: #333; /* Dark text */
  padding: 1rem;
  text-align: center;
}

.breadcrumb a {
    color: #666;
    text-decoration: none;
}


.header {
    padding: 1rem;
    background: #fff;
}

.header h1 {
    font-size: 1.5rem;
    color: #333;
}

.filters {
    padding: 1rem;
    background: #fff;
    border-bottom: 1px solid #eee;
}

.filter-buttons {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.5rem;
}

.filter-buttons button {
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    border-radius: 20px;
    background: #fff;
    color: #333;
    cursor: pointer;
    white-space: nowrap;
}

.filter-buttons button.active {
    background: #333;
    color: white;
}

.filter-dropdowns {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

@media (max-width: 767px) {
    .filter-dropdowns select,
    .filter-dropdowns .add-button {
        flex: 1 1 calc(50% - 0.25rem);
        min-width: 120px;
    }
}

.filter-dropdowns select {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
}

.add-button {
    padding: 0.5rem 1rem;
    background: #4CAF50;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    display: inline-block;
}

.add-button:hover {
    background: #45a049;
}

.top-auth {
    position: absolute;
    top: 10px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 1000;
}

@media (max-width: 767px) {
    .top-auth {
        position: relative;
        top: 0;
        right: 0;
        justify-content: flex-end;
        padding: 10px;
        background: #fff;
        border-bottom: 1px solid #eee;
    }
}

.auth-buttons {
    display: flex;
    gap: 10px;
}

.auth-button {
    padding: 0.5rem 1rem;
    background: #666;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    border: none;
    cursor: pointer;
}

.auth-button:hover {
    background: #555;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 10px;
}

#user-email {
    color: #666;
    margin-right: 10px;
}

@media (max-width: 767px) {
    #user-email {
        display: none;
    }
}

.map-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 150px);
}

@media (max-width: 767px) {
    .map-container {
        flex-direction: column;
        height: auto !important;
        min-height: calc(100vh - 200px);
        position: relative;
    }
    
    #places-container {
        height: auto !important;
        overflow-y: visible !important;
        margin-bottom: 20px;
        position: relative;
        z-index: 1;
    }
    
    #map {
        order: -1;
        height: 40vh !important;
        min-height: 300px;
        width: 100% !important;
        position: relative;
        z-index: 2;
    }

    .page-container {
        min-height: 100vh;
        display: flex;
        flex-direction: column;
    }

    main {
        flex: 1;
        position: relative;
    }

    footer {
        margin-top: auto;
        position: relative;
        z-index: 1;
    }

    .leaflet-popup {
        z-index: 1000;
    }

    /* Mejorar la interactividad táctil en móvil */
    .leaflet-marker-icon,
    .leaflet-marker-shadow {
        pointer-events: auto !important;
        touch-action: none !important;
    }

    .leaflet-marker-pane {
        z-index: 1000 !important;
    }

    .leaflet-popup-pane {
        z-index: 1001 !important;
    }
}

@media (min-width: 768px) {
    .map-container {
        flex-direction: row;
    }
}

.places-sidebar {
    width: 100%;
    height: auto;
    min-height: 40vh;
    overflow-y: visible;
    border-top: 1px solid #ddd;
    background: white;
    order: 2;
}

@media (min-width: 768px) {
    .places-sidebar {
        width: 400px;
        height: 100%;
        border-right: 1px solid #ddd;
        border-top: none;
        order: 1;
    }
}

#places-container {
    padding: 10px;
}

.loading-indicator {
    display: none;
    justify-content: center;
    align-items: center;
    padding: 20px;
    color: #666;
}

.loading-indicator.visible {
    display: flex;
}

.loading-indicator::after {
    content: "";
    width: 20px;
    height: 20px;
    margin-left: 10px;
    border: 2px solid #ddd;
    border-top: 2px solid #666;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.place-card {
    padding: 15px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    display: flex;
    gap: 15px;
}

.place-card:hover {
    background: #f9f9f9;
}

.place-card.active {
    background: #e9e9e9;
}

.place-image {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
}

.place-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.place-info {
    flex-grow: 1;
}

.place-name {
    font-weight: bold;
    margin-bottom: 4px;
    color: #333;
}

.place-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 4px;
}

.place-rating .stars {
    color: #00b67a;
}

.place-rating .count {
    color: #666;
    font-size: 0.9em;
}

.place-type {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 8px;
}

.place-tags {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.place-tag {
    background: #f0f0f0;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.9em;
    color: #666;
}

.place-deals {
    margin-top: 8px;
}

.place-deal {
    color: #e91e63;
    font-size: 0.9em;
    font-weight: 500;
}

#map {
    flex: 1;
    height: 60vh;
    order: 1;
    position: relative;
    z-index: 1;
}

.location-button {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1000;
    background: white;
    border: 2px solid rgba(0,0,0,0.2);
    border-radius: 4px;
    padding: 5px;
    cursor: pointer;
    box-shadow: 0 1px 5px rgba(0,0,0,0.65);
}

.location-button:hover {
    background: #f4f4f4;
}

@media (min-width: 768px) {
    #map {
        height: 100%;
        order: 2;
    }
}

.language-selector {
  margin-top: 1rem;
}

.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: #333;
  color: white;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 2000;
}

.cookie-banner a {
  color: white;
  text-decoration: underline;
}

.cookie-banner button {
  background-color: #4CAF50;
  color: white;
  border: none;
  padding: 0.75rem 1.25rem;
  cursor: pointer;
  border-radius: 4px;
  font-size: 1rem;
}

.cookie-banner button:hover {
  background-color: #367c39;
}

footer {
  background-color: #fafafa; /* Even lighter gray */
  color: #333; /* Dark text */
  padding: 1rem;
  text-align: center;
}

footer a {
    color: #333;
    text-decoration: none;
}

footer .footer-links {
  margin-top: 10px;
}

terms-and-conditions.html h1 {
  font-size: 2rem;
  color: #333;
  text-align: center;
  margin-bottom: 20px;
}

.marker-popup {
  padding: 10px;
  cursor: pointer;
}

.marker-popup:hover {
    background-color: #f5f5f5;
}

.marker-popup h3 {
    margin-bottom: 8px;
    color: #333;
}

.marker-popup p {
    margin: 4px 0;
    color: #666;
}
