/* =============================================
   CONTACTO PAGE — Pixel-perfect Figma match
   Figma node: 22889:72375
   ============================================= */

/* Hide Drupal's auto-injected page-title block — the title lives in the Hero */
#block-icac-theme-page-title {
  display: none !important;
}

/* ---- HERO ---- */
.contacto-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #0f172a;
  color: white;
  height: 454px;
  overflow: hidden;
}

.contacto-hero__content {
  padding: 0 48px 0 128px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  z-index: 2;
}

/* /// top-left decorator */
.contacto-hero__decor-top {
  position: absolute;
  top: -120px;
  left: 0;
  width: 234px;
  height: 178px;
  opacity: 1; /* Not faded in figma, it's white */
  pointer-events: none;
}

/* /// bottom-center decorator */
.contacto-hero__decor-bottom {
  position: absolute;
  bottom: -110px;
  left: 532px; /* Positioned near right edge of the blue */
  width: 234px;
  height: 178px;
  opacity: 1;
  pointer-events: none;
}

.contacto-hero__title {
  font-family: 'Inter', sans-serif;
  font-size: 40px;
  font-weight: 700;
  margin: 0 0 24px 0;
  line-height: 1.15;
  color: #ffffff;
}

.contacto-hero__desc {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  line-height: 1.65;
  margin: 0 0 32px 0;
  color: #94a3b8;
  max-width: 440px;
}

.contacto-hero__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #dc2626;
  color: white;
  padding: 10px 20px;
  border-radius: 6px;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  width: fit-content;
  transition: background 0.2s;
}
.contacto-hero__btn:hover { background: #b91c1c; }

/* Right side — photo */
.contacto-hero__photo-wrap {
  position: relative;
  overflow: hidden;
}
.contacto-hero__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

/* ---- CHANNEL CARDS SECTION ---- */
/* Fondo blanco, sin overlap. Padding generoso arriba/abajo */
.contacto-channels {
  background: #ffffff;
  padding: 80px 0;
}

.contacto-channels__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 128px;
}

.contacto-channels-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: start;
}

/* individual channel card */
.channel-card {
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  border: 1px solid #e2e8f0;
  padding: 12px;
}

.channel-card--light {
  background: #ffffff;
}

.channel-card--dark {
  background: #0f172a;
  color: white;
  border-color: #0f172a;
}

/* Image + badge area */
.channel-card__header {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.channel-card__badge {
  background: #0f172a;
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  width: fit-content;
}

.channel-card__img-wrap {
  position: relative;
  height: 160px;
  border-radius: 8px;
  overflow: hidden;
}

.channel-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}

/* Card body */
.channel-card__body {
  padding: 16px 8px 8px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 12px;
}

.channel-card__title {
  font-family: 'Inter', sans-serif;
  font-size: 18px;
  font-weight: 700;
  margin: 0;
  line-height: 1.3;
  color: #0f172a;
}
.channel-card--dark .channel-card__title {
  color: #ffffff;
}

.channel-card__desc {
  font-family: 'Inter', sans-serif;
  font-size: 13.5px;
  line-height: 1.6;
  color: #64748b;
  margin: 0;
  flex: 1;
}
.channel-card--dark .channel-card__desc { color: #94a3b8; }

.channel-card__btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 1px solid #e2e8f0;
  color: #0f172a;
  padding: 8px 16px;
  border-radius: 6px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  width: fit-content;
  margin-top: auto;
  transition: all 0.2s;
}
.channel-card__btn-outline:hover { 
  background: #f8fafc;
}

/* Dark card: icon box on top, phone, map */
.channel-card__icon-box {
  width: 40px;
  height: 40px;
  /* Figma: linear-gradient white 95% overlay on red */
  background: linear-gradient(90deg, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.95) 100%),
              linear-gradient(90deg, #b91c1c 0%, #b91c1c 100%);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-bottom: 4px;
}

/* Dark card body — full-height flex col so map expands */
.channel-card__body--dark {
  padding: 12px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 8px;
  min-height: 340px;
}

/* Phone title + desc block */
.channel-card__phone-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.channel-card__title--white {
  color: #ffffff !important;
  font-size: 16px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.channel-card__phone-desc {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: #f5f5f5;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Map wrapper fills remaining height */
.channel-card__map-wrap {
  flex: 1;
  min-height: 120px;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.channel-card__map {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  border-radius: 10px;
  display: block;
  margin: 0;
}

/* ---- SUBJECTS SECTION ---- */
.contacto-subjects {
  background: #f1f5f9;
  padding: 64px 0;
}

.contacto-subjects__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 128px;
}

.contacto-subjects__header {
  text-align: center;
  margin-bottom: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.contacto-subjects__pretitle {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 400;
  color: #b91c1c;
  margin: 0;
  line-height: 24px;
}

.contacto-subjects__title {
  font-family: 'Inter', sans-serif;
  font-size: 36px;
  font-weight: 700;
  color: #0a0a0a;
  margin: 0;
  line-height: 40px;
}

.contacto-subjects__desc {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  color: #525252;
  line-height: 24px;
  max-width: 772px;
  margin: 0;
  text-align: center;
}

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

/* Subject card */
.subject-card {
  background: #ffffff;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-decoration: none;
  box-shadow: 0px 1px 0px 0px rgba(0,0,0,0.05);
  transition: box-shadow 0.2s, border-color 0.2s;
}
.subject-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  border-color: #cbd5e1;
}

.subject-card__icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background-image: linear-gradient(90deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.95) 100%), linear-gradient(90deg, rgb(185, 28, 28) 0%, rgb(185, 28, 28) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.subject-card__title {
  font-family: 'Inter', sans-serif;
  font-size: 20px;
  font-weight: 600;
  color: #0a0a0a;
  margin: 0;
  line-height: 28px;
}

.subject-card__link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #b91c1c;
  text-decoration: none;
}
.subject-card__link:hover { text-decoration: underline; }

/* ---- RESPONSIVE ---- */
@media (max-width: 1200px) {
  .contacto-hero__content { padding: 0 40px 0 64px; }
  .contacto-channels__inner,
  .contacto-subjects__inner { padding: 0 48px; }
}

@media (max-width: 1024px) {
  .contacto-hero {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 400px;
  }
  .contacto-hero__content { padding: 56px 40px; }
  .contacto-hero__photo-wrap { height: 280px; }
  .contacto-channels-grid,
  .contacto-subjects__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  /* Push title below the /// slashes on mobile */
  .contacto-hero__content { padding: 90px 20px 40px; }
  .contacto-hero__title { font-size: 28px; }
  .contacto-hero__decor-bottom { display: none; }
  .contacto-channels__inner,
  .contacto-subjects__inner { padding: 0 16px; }
  .contacto-channels-grid { grid-template-columns: 1fr; }

  /* ── Subject cards: horizontal scroll-snap carousel ── */
  .contacto-subjects__grid {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 12px;
    padding-bottom: 4px;
    /* hide scrollbar */
    scrollbar-width: none;
  }
  .contacto-subjects__grid::-webkit-scrollbar { display: none; }

  .subject-card {
    flex: 0 0 78%;
    scroll-snap-align: start;
    min-width: 0;
  }
}

/* ── Carousel dots — mobile only ── */
.contacto-subjects-dots {
  display: none;
}

@media (max-width: 640px) {
  .contacto-subjects-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
  }

  .contacto-subjects-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #d1d5db;
    transition: background 0.25s ease, transform 0.25s ease;
    cursor: pointer;
    border: none;
    padding: 0;
    flex-shrink: 0;
  }

  .contacto-subjects-dot--active {
    background: #b91c1c;
    transform: scale(1.3);
  }
}
