/* ===== VARIABLES & RESET ===== */
:root {
  --primary: #3bb4d9;
  --primary-dark: #1a3a5c;
  --primary-darker: #0f2a45;
  --accent-red: #e74c3c;
  --accent-yellow: #f1c40f;
  --accent-green: #27ae60;
  --accent-orange: #e67e22;
  --accent-blue: #3498db;
  --accent-purple: #8e44ad;
  --bg-light: #f0f4f8;
  --text-dark: #1a1a2e;
  --text-muted: #6b7280;
  --white: #ffffff;
  --shadow: 0 2px 12px rgba(0,0,0,0.12);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.18);
  --radius: 12px;
  --radius-sm: 8px;
}

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

body {
  font-family: 'Segoe UI', 'Roboto', Arial, sans-serif;
  background: var(--bg-light);
  color: var(--text-dark);
  line-height: 1.6;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; }

/* ===== HEADER / HERO ===== */
.hero {
  position: relative;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  min-height: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
}

.hero-map-bg {
  position: absolute;
  top: 0; right: 0;
  width: 45%;
  height: 100%;
  background: url('https://maps.googleapis.com/maps/api/staticmap?center=San+Antonio,Chile&zoom=14&size=600x400&maptype=roadmap') center/cover no-repeat;
  opacity: 0.25;
  pointer-events: none;
}

.hero-map-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, var(--primary-dark) 0%, transparent 100%);
}

.hero-top {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1200px;
  padding: 20px 30px;
}

.logo-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.logo-badge {
  position: relative;
  width: 220px;
  height: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.logo-pins {
  display: flex;
  gap: 8px;
  margin-bottom: 4px;
}

.pin {
  width: 28px;
  height: 36px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.pin-red { background: var(--accent-red); }
.pin-yellow { background: var(--accent-yellow); }
.pin-green { background: var(--accent-green); }

.pin-inner {
  width: 12px;
  height: 12px;
  background: white;
  border-radius: 50%;
  transform: rotate(45deg);
}

.logo-oval {
  background: rgba(173, 216, 255, 0.85);
  border: 3px solid white;
  border-radius: 50%;
  padding: 10px 30px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  width: 240px;
  height: 90px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.logo-title {
  font-family: 'Brush Script MT', 'Segoe Script', cursive;
  font-size: 28px;
  color: var(--text-dark);
  line-height: 1;
  text-shadow: 1px 1px 2px rgba(255,255,255,0.5);
}

.logo-subtitle {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--primary-dark);
  margin-top: 2px;
}

.hero-search {
  display: flex;
  align-items: center;
  gap: 10px;
  background: white;
  border-radius: 30px;
  padding: 8px 20px;
  box-shadow: var(--shadow);
  min-width: 280px;
}

.hero-search input {
  border: none;
  outline: none;
  font-size: 15px;
  width: 100%;
  padding: 6px 0;
  color: var(--text-dark);
}

.hero-search .search-icon {
  font-size: 20px;
  color: var(--text-muted);
}

/* Phone banner */
.phone-banner {
  position: relative;
  z-index: 2;
  background: var(--white);
  border-radius: 40px;
  padding: 10px 30px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-lg);
  margin: 10px 0 20px;
}

.phone-icon {
  width: 42px;
  height: 42px;
  background: var(--accent-blue);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
}

.phone-number {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-dark);
  letter-spacing: 2px;
}

/* ===== HAMBURGER MENU ===== */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  z-index: 100;
  padding: 10px;
}

.hamburger span {
  width: 28px;
  height: 3px;
  background: white;
  border-radius: 3px;
  transition: 0.3s;
}

/* ===== CATEGORIES GRID ===== */
.categories-section {
  max-width: 1200px;
  margin: -30px auto 40px;
  padding: 0 20px;
  position: relative;
  z-index: 3;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  background: var(--primary-darker);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-lg);
}

.category-card {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-sm);
  padding: 16px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  color: white;
}

.category-card:hover {
  background: rgba(255,255,255,0.18);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.category-icon-left {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.category-name {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1.3;
  flex: 1;
}

.category-icon-right {
  width: 48px;
  height: 48px;
  background: rgba(255,255,255,0.12);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

/* Category pin colors */
.cat-salud .category-icon-left { background: var(--accent-red); }
.cat-alimentos .category-icon-left { background: var(--accent-orange); }
.cat-transporte .category-icon-left { background: var(--accent-yellow); color: #333; }
.cat-cultura .category-icon-left { background: var(--accent-blue); }
.cat-turismo .category-icon-left { background: var(--accent-red); }
.cat-bancos .category-icon-left { background: var(--accent-orange); }
.cat-construccion .category-icon-left { background: var(--accent-yellow); color: #333; }
.cat-hogar .category-icon-left { background: var(--accent-blue); }
.cat-bienes .category-icon-left { background: var(--accent-purple); }
.cat-educacion .category-icon-left { background: var(--accent-red); }
.cat-ecologia .category-icon-left { background: var(--accent-green); }
.cat-vestuario .category-icon-left { background: var(--accent-orange); }
.cat-belleza .category-icon-left { background: var(--accent-red); }
.cat-comida .category-icon-left { background: var(--accent-yellow); color: #333; }
.cat-agenda .category-icon-left { background: var(--accent-blue); }
.cat-religion .category-icon-left { background: var(--accent-purple); }

/* ===== FEATURED SECTION ===== */
.featured-section {
  max-width: 1200px;
  margin: 0 auto 40px;
  padding: 0 20px;
}

.section-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--primary-dark);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title::before {
  content: '';
  width: 5px;
  height: 28px;
  background: var(--primary);
  border-radius: 3px;
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.featured-card {
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.3s;
}

.featured-card:hover {
  transform: translateY(-4px);
}

.featured-img {
  height: 180px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  color: white;
  position: relative;
}

.featured-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: white;
}

.badge-salud { background: var(--accent-red); }
.badge-comercio { background: var(--accent-orange); }
.badge-turismo { background: var(--accent-green); }

.featured-info {
  padding: 16px;
}

.featured-name {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
}

.featured-category {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.featured-phone {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--accent-blue);
  font-weight: 600;
  font-size: 14px;
}

/* ===== QUICK CATEGORIES (MOBILE STYLE PINS) ===== */
.quick-categories {
  max-width: 1200px;
  margin: 0 auto 40px;
  padding: 0 20px;
}

.quick-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: center;
}

.quick-pin {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: transform 0.3s;
}

.quick-pin:hover { transform: scale(1.1); }

.quick-pin-marker {
  width: 56px;
  height: 70px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.quick-pin-letter {
  transform: rotate(45deg);
  font-size: 24px;
  font-weight: 900;
  color: white;
}

.quick-pin-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dark);
  text-align: center;
}

.qp-a { background: var(--accent-red); }
.qp-b { background: var(--accent-orange); }
.qp-c { background: var(--accent-yellow); }
.qp-d { background: var(--accent-green); }
.qp-e { background: var(--accent-blue); }
.qp-f { background: var(--accent-purple); }

/* ===== OFFERS SECTION ===== */
.offers-section {
  max-width: 1200px;
  margin: 0 auto 40px;
  padding: 0 20px;
}

.offers-banner {
  background: linear-gradient(135deg, var(--accent-orange), var(--accent-red));
  border-radius: var(--radius);
  padding: 30px 40px;
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-lg);
}

.offers-text h2 {
  font-size: 32px;
  font-weight: 900;
}

.offers-text p {
  font-size: 16px;
  opacity: 0.9;
}

.offers-percentage {
  font-size: 72px;
  font-weight: 900;
  text-shadow: 2px 2px 10px rgba(0,0,0,0.3);
}

/* ===== FOOTER ===== */
.footer {
  background: var(--primary-darker);
  color: white;
  text-align: center;
  padding: 20px 30px;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-text {
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  opacity: 0.8;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 16px;
}

.footer-links a {
  color: white;
  font-size: 14px;
  opacity: 0.8;
  transition: opacity 0.3s;
}

.footer-links a:hover { opacity: 1; }

.footer-social {
  display: flex;
  gap: 12px;
}

.social-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: white;
  transition: background 0.3s;
}

.social-icon:hover { background: rgba(255,255,255,0.3); }

.footer-bottom {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.15);
  font-size: 11px;
  opacity: 0.6;
}

/* ===== MODAL ===== */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal-overlay.active { display: flex; }

.modal {
  background: white;
  border-radius: var(--radius);
  width: 90%;
  max-width: 700px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h2 {
  font-size: 20px;
  font-weight: 700;
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--bg-light);
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s;
}

.modal-close:hover { background: #ddd; }

.modal-body {
  padding: 24px;
}

.modal-businesses {
  display: grid;
  gap: 12px;
}

.modal-biz-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px;
  background: var(--bg-light);
  border-radius: var(--radius-sm);
  transition: background 0.3s;
}

.modal-biz-card:hover { background: #e2e8f0; }

.modal-biz-icon {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-sm);
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: white;
  flex-shrink: 0;
}

.modal-biz-info { flex: 1; }
.modal-biz-info h4 { font-size: 15px; font-weight: 600; }
.modal-biz-info p { font-size: 13px; color: var(--text-muted); }

.modal-biz-phone {
  color: var(--accent-blue);
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {
  .categories-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .featured-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .hero-top {
    flex-direction: column;
    gap: 16px;
    padding: 16px;
  }

  .hero-search { min-width: 100%; }

  .hero-map-bg { width: 100%; opacity: 0.15; }

  .phone-number { font-size: 22px; }

  .categories-grid {
    grid-template-columns: repeat(2, 1fr);
    padding: 16px;
    gap: 10px;
  }

  .category-card { padding: 12px 10px; }
  .category-name { font-size: 11px; }
  .category-icon-right { width: 38px; height: 38px; font-size: 18px; }

  .featured-grid {
    grid-template-columns: 1fr;
  }

  .offers-banner {
    flex-direction: column;
    text-align: center;
    gap: 16px;
    padding: 24px;
  }

  .offers-percentage { font-size: 48px; }

  .hamburger { display: flex; }

  .footer-content {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .categories-grid {
    grid-template-columns: 1fr;
  }

  .logo-oval { width: 200px; height: 76px; }
  .logo-title { font-size: 22px; }

  .quick-grid { gap: 16px; }
  .quick-pin-marker { width: 46px; height: 58px; }
  .quick-pin-letter { font-size: 20px; }
}
