/* =============================
   LAYOUT.CSS
   Header, Footer, Main layout
============================= */
.main-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  max-width: 100vw;
  z-index: 999;
  padding: 1rem 2rem;
  background-color: #fff8f2;
  border-bottom: 1px solid #e2d8ce;
  box-sizing: border-box;
}

body {
  padding-top: 80px; /* Match header height */
}

footer {
  padding: 1rem;
  text-align: center;
  background-color: #fdf7f1;
  position: relative;
}

.page-container {
  padding: 2rem;
}

.intro-text {
  padding: 2rem;
  text-align: center;
}

.hero-text {
  font-size: 2.2rem;
  font-weight: bold;
  color: #3e2c1c;
}

/* Center all titles, subtitles, and buttons */
h1, h2, h3, h4, h5, h6 {
  text-align: center;
}

/* Make Featured Cafés heading same size as map section heading */
#featured-cafes h3 {
  font-size: 1.5rem;
  font-weight: bold;
}

#map-section h2 {
  font-size: 1.5rem;
  font-weight: bold;
}

.centered {
  text-align: center;
}

/* Page title section for coffee shops page */
.page-title {
  text-align: center;
  padding: 3rem 2rem 2rem 2rem;
  background-color: transparent;
  margin-top: 1rem;
}

.page-title h1 {
  font-size: 2.5rem;
  color: #3e2c1c;
  margin-bottom: 0.5rem;
}

.page-title p {
  font-size: 1.1rem;
  color: #6b4f3b;
  margin: 0;
}

/* Featured cafes section - same spacing as map section */
#featured-cafes {
  margin-bottom: 1rem;
  padding: 0 1.5rem;
}

#featured-cafes h3 {
  margin-bottom: 1rem;
}

#top-cafes-container {
  margin-bottom: 1rem;
}

/* Show me more button closer to cards */
#featured-cafes .centered {
  margin-top: 1rem;
}

/* Apply consistent lateral margins to map section */
#map-section {
  padding: 0 1.5rem;
}

/* Ensure consistent height for cafe cards */
.cafe-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Center View Details buttons and align them at bottom */
.cafe-card .view-detail {
  margin-top: auto;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  width: fit-content;
}

/* Suggest cafe section styling */
.suggest-cafe-section {
  text-align: center;
  padding: 3rem 2rem 2rem 2rem;
  background-color: transparent;
  border-radius: 1rem;
  margin: 2rem auto;
  max-width: 600px;
  border: none;
}

.suggest-cafe-section h3 {
  font-size: 1.5rem;
  color: #3e2c1c;
  margin-bottom: 1rem;
}

.suggest-cafe-section p {
  color: #6b4f3b;
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

/* Reset footer margin to original size */
footer {
  margin-top: 1rem;
  text-align: center;
}

/* ========================================
   ENFOQUE FLUIDO UNIVERSAL PARA MÓVILES
   Escalable para todos los dispositivos
======================================== */
/* Samsung Galaxy S23 specific body adjustments */
@media (max-width: 430px) and (min-device-pixel-ratio: 3) {
  body {
    padding-top: 90px; /* Ajuste específico para Samsung S23 */
    font-size: 15px;
    line-height: 1.4;
  }
}

/* Mobile responsive styles */
@media (max-width: 768px) {
  body {
    padding-top: 85px; /* Para compensar el header fijo */
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
  }

  /* ===== TIPOGRAFÍA MOBILE ===== */
  .hero-text {
    font-size: 1.5rem;
    line-height: 1.3;
    margin-bottom: 0.8rem;
  }

  .page-title h1 {
    font-size: 1.8rem;
    line-height: 1.25;
  }

  .page-title p {
    font-size: 1rem;
    line-height: 1.4;
  }

  .intro-text h2 {
    font-size: clamp(1.1rem, 4vw, 1.4rem);
    margin-top: 0.5rem;
  }

  #map-section h2,
  #featured-cafes h3 {
    font-size: clamp(1.2rem, 4.5vw, 1.6rem);
    margin-bottom: clamp(0.8rem, 3vw, 1.2rem);
    line-height: 1.25;
  }

  /* ===== ESPACIADO MOBILE ===== */
  .intro-text {
    padding: 1rem;
    margin: 0;
  }

  .page-title {
    padding: 1.5rem 1rem;
    margin: 0;
  }

  #map-section,
  #featured-cafes {
    padding: 0 1rem;
    margin-bottom: 1.2rem;
  }

  .suggest-cafe-section {
    padding: clamp(1rem, 4vw, 2rem) clamp(0.8rem, 4vw, 1.5rem);
    margin: clamp(0.5rem, 2vw, 1rem);
  }

  .suggest-cafe-section h3 {
    font-size: clamp(1.2rem, 4.5vw, 1.5rem);
  }

  .suggest-cafe-section p {
    font-size: clamp(0.9rem, 3vw, 1.1rem);
  }

  /* ===== COMPONENTES FLUIDOS ===== */
  .map-container {
    height: clamp(200px, 40vh, 300px);
    margin: clamp(0.5rem, 2vw, 1rem) 0;
    border-radius: clamp(0.5rem, 2vw, 1rem);
    overflow: hidden;
  }

  .google-maps-btn {
    font-size: clamp(0.85rem, 3vw, 1rem);
    padding: clamp(0.6rem, 2vw, 0.8rem) clamp(0.8rem, 3vw, 1.2rem);
  }

  /* ===== ELEMENTOS COMUNES ===== */
  .centered {
    margin-top: clamp(0.8rem, 3vw, 1.2rem);
  }

  section {
    margin-bottom: clamp(1rem, 3vw, 1.5rem);
  }

  /* ===== SAFE AREA SUPPORT ===== */
  .main-header {
    padding: clamp(0.5rem, 2vw, 1rem) clamp(0.8rem, 4vw, 2rem);
    padding-left: max(clamp(0.8rem, 4vw, 2rem), env(safe-area-inset-left));
    padding-right: max(clamp(0.8rem, 4vw, 2rem), env(safe-area-inset-right));
  }

  /* ===== TIPOGRAFÍA GENERAL ===== */
  h1, h2, h3, h4, h5, h6 {
    line-height: 1.25;
  }

  main {
    margin: 0;
    padding: 0;
  }
}

/* Tablet responsive styles */
@media (max-width: 1024px) and (min-width: 769px) {
  .main-header {
    padding: 1rem 1.5rem;
  }

  .intro-text {
    padding: 1.5rem;
  }

  .hero-text {
    font-size: 2rem;
  }

  .page-title h1 {
    font-size: 2.2rem;
  }

  #map-section {
    padding: 0 1.5rem;
  }
}