/* Talma Instagram feed — glass collage + lightbox (talmamadrid.es/social) */

.u-section-2 .u-shortcode-1 {
  max-width: 1120px !important;
  margin: 0 auto !important;
  padding: 0 !important;
}

.u-section-2 .u-shortcode-1 .cff-wrapper {
  display: none !important;
}

.talma-ig {
  --ig-gap: 8px;
  --ig-radius: 22px;
  --ig-gold: var(--talma-gold, #cba247);
  --ig-gold-soft: rgba(203, 162, 71, 0.34);
  color: var(--talma-text, #fff8df);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.talma-ig__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.talma-ig__brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.talma-ig__logo {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(255,255,255,0.12), rgba(255,255,255,0.03));
  border: 1px solid var(--ig-gold-soft);
  display: grid;
  place-items: center;
  box-shadow: 0 12px 40px -18px rgba(203, 162, 71, 0.55);
}

.talma-ig__logo svg {
  width: 26px;
  height: 26px;
}

.talma-ig__title {
  margin: 0;
  font-size: clamp(1.15rem, 2.4vw, 1.55rem);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.talma-ig__subtitle {
  margin: 4px 0 0;
  font-size: 0.88rem;
  color: var(--talma-muted, rgba(255,248,223,0.72));
}

.talma-ig__follow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 999px;
  border: 1px solid var(--ig-gold-soft);
  background: linear-gradient(135deg, rgba(203,162,71,0.22), rgba(255,255,255,0.04));
  color: var(--talma-gold-3, #f1d58c);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.88rem;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.talma-ig__follow:hover {
  transform: translateY(-1px);
  border-color: rgba(241, 213, 140, 0.55);
  box-shadow: 0 14px 36px -16px rgba(203, 162, 71, 0.65);
  color: #fff8df;
}

/* Glass collage shell */
.talma-ig__collage-wrap {
  position: relative;
  border-radius: var(--ig-radius);
  padding: var(--ig-gap);
  background: linear-gradient(145deg, rgba(255,255,255,0.09), rgba(255,255,255,0.02));
  border: 1px solid var(--ig-gold-soft);
  box-shadow:
    0 28px 80px -40px rgba(0,0,0,0.85),
    inset 0 1px 0 rgba(255,255,255,0.12);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  overflow: hidden;
}

.talma-ig__collage-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 18% 0%, rgba(241,213,140,0.14), transparent 42%);
}

.talma-ig__collage {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3.1;
  min-height: 280px;
}

@media (min-width: 720px) {
  .talma-ig__collage {
    aspect-ratio: 21 / 9;
    min-height: 320px;
  }
}

.talma-ig__tile {
  position: absolute;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  overflow: hidden;
  background: rgba(0,0,0,0.35);
  border-radius: 14px;
  box-shadow: 0 8px 28px -12px rgba(0,0,0,0.75);
  transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
}

.talma-ig__tile--hero {
  border-radius: 18px;
}

.talma-ig__tile:hover {
  transform: scale(1.02);
  z-index: 2;
  box-shadow: 0 16px 40px -14px rgba(203,162,71,0.45);
  filter: brightness(1.06);
}

.talma-ig__tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.talma-ig__tile-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(0,0,0,0.72) 100%);
  opacity: 0;
  transition: opacity 0.22s ease;
}

.talma-ig__tile:hover .talma-ig__tile-overlay {
  opacity: 1;
}

.talma-ig__caption-glass {
  position: absolute;
  left: calc(var(--ig-gap) + 6px);
  right: calc(var(--ig-gap) + 6px);
  bottom: calc(var(--ig-gap) + 6px);
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(8, 8, 8, 0.55);
  border: 1px solid rgba(255,255,255,0.14);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  pointer-events: none;
}

.talma-ig__caption-glass p {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: rgba(255,248,223,0.92);
}

.talma-ig__caption-glass time {
  display: block;
  margin-top: 6px;
  font-size: 0.72rem;
  color: var(--talma-gold-2, #d2ae5f);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.talma-ig__actions {
  display: flex;
  justify-content: center;
  margin-top: 18px;
}

.talma-ig__toggle {
  appearance: none;
  border: 1px solid var(--ig-gold-soft);
  background: linear-gradient(135deg, rgba(203,162,71,0.18), rgba(255,255,255,0.03));
  color: var(--talma-gold-3, #f1d58c);
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 650;
  font-size: 0.9rem;
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.talma-ig__toggle:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 32px -18px rgba(203,162,71,0.55);
}

/* Full grid */
.talma-ig__grid {
  display: none;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.talma-ig__grid.is-open {
  display: grid;
}

@media (min-width: 640px) {
  .talma-ig__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 960px) {
  .talma-ig__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.talma-ig__card {
  position: relative;
  border: none;
  padding: 0;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 1;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.talma-ig__card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 40px -22px rgba(203,162,71,0.5);
}

.talma-ig__card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.talma-ig__card-meta {
  position: absolute;
  inset: auto 0 0 0;
  padding: 10px;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,0.78));
  font-size: 0.72rem;
  text-align: left;
  color: rgba(255,248,223,0.9);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.talma-ig__card:hover .talma-ig__card-meta {
  opacity: 1;
}

/* Loading / error */
.talma-ig__state {
  text-align: center;
  padding: 48px 20px;
  border-radius: var(--ig-radius);
  border: 1px dashed var(--ig-gold-soft);
  background: rgba(255,255,255,0.03);
}

.talma-ig__spinner {
  width: 42px;
  height: 42px;
  margin: 0 auto 16px;
  border-radius: 50%;
  border: 3px solid rgba(203,162,71,0.25);
  border-top-color: var(--ig-gold);
  animation: talma-ig-spin 0.85s linear infinite;
}

@keyframes talma-ig-spin {
  to { transform: rotate(360deg); }
}

.talma-ig__state p {
  margin: 0;
  color: var(--talma-muted);
}

/* Lightbox */
.talma-ig-lb {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.28s ease, visibility 0.28s ease;
}

.talma-ig-lb.is-open {
  opacity: 1;
  visibility: visible;
}

.talma-ig-lb__panel {
  width: min(960px, 100%);
  max-height: min(92vh, 900px);
  display: flex;
  flex-direction: column;
  border-radius: 22px;
  overflow: hidden;
  background: linear-gradient(160deg, rgba(18,18,20,0.96), rgba(6,6,8,0.98));
  border: 1px solid var(--ig-gold-soft);
  box-shadow: 0 40px 120px -30px rgba(0,0,0,0.9);
  transform: scale(0.94) translateY(12px);
  transition: transform 0.28s ease;
}

.talma-ig-lb.is-open .talma-ig-lb__panel {
  transform: scale(1) translateY(0);
}

.talma-ig-lb__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.talma-ig-lb__toolbar span {
  font-size: 0.82rem;
  color: var(--talma-gold-2);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.talma-ig-lb__close,
.talma-ig-lb__nav {
  appearance: none;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: #fff8df;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.talma-ig-lb__close:hover,
.talma-ig-lb__nav:hover {
  background: rgba(203,162,71,0.22);
  border-color: var(--ig-gold-soft);
}

.talma-ig-lb__stage {
  position: relative;
  flex: 1;
  min-height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #050505;
}

.talma-ig-lb__stage img {
  max-width: 100%;
  max-height: min(62vh, 640px);
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

.talma-ig-lb__nav--prev,
.talma-ig-lb__nav--next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
}

.talma-ig-lb__stage .talma-ig-lb__nav--prev { left: 12px; }
.talma-ig-lb__stage .talma-ig-lb__nav--next { right: 12px; }

.talma-ig-lb__footer {
  padding: 16px 18px 18px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.talma-ig-lb__footer p {
  margin: 0 0 12px;
  font-size: 0.92rem;
  line-height: 1.55;
  white-space: pre-wrap;
  color: rgba(255,248,223,0.92);
  max-height: 120px;
  overflow: auto;
}

.talma-ig-lb__footer a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--talma-gold-3);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.88rem;
}

.talma-ig-lb__footer a:hover {
  text-decoration: underline;
}
