/* =============================================================
   CC Sensitive Images — Frontend CSS
   ============================================================= */

/* ── Base wrapper ─────────────────────────────────────────── */
.ccsi-wrapper {
  font-family: Manrope, Arial, sans-serif;
}

/* ── Alert ────────────────────────────────────────────────── */
.ccsi-alert {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 20px;
  background: rgba(200, 155, 60, .08);
  border: 1px solid rgba(200, 155, 60, .3);
  border-radius: 10px;
  margin-bottom: 18px;
}

.ccsi-alert-icon {
  font-size: 20px;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
  color: #c89b3c;
  display: flex;
  align-items: flex-start;
}

.ccsi-alert-icon i {
  font-size: inherit;
  line-height: 1;
}

.ccsi-alert-icon svg {
  width: 1em;
  height: 1em;
  fill: currentColor;
}

.ccsi-alert-text {
  font-size: 13px;
  line-height: 1.7;
  color: #7a6020;
}

.ccsi-alert-title {
  font-weight: 700;
  color: #5a4010;
}

/* ── Button ───────────────────────────────────────────────── */
.ccsi-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 30px;
  background: #071a46;
  color: #fff;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  font-family: Manrope, Arial, sans-serif;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: background .25s, transform .15s, opacity .25s;
}

.ccsi-btn svg {
  width: 17px;
  height: 17px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.ccsi-btn-icon {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  font-size: 15px;
  line-height: 1;
}

.ccsi-btn-icon i {
  font-size: inherit;
  line-height: 1;
}

.ccsi-btn-icon svg {
  width: 1em;
  height: 1em;
  fill: currentColor;
}

.ccsi-btn:hover {
  background: #1db6cf;
  transform: translateY(-1px);
}

.ccsi-btn:focus-visible {
  outline: 3px solid #1db6cf;
  outline-offset: 3px;
}

/* Button preset overrides */
.ccsi-btn-preset-pill-brand .ccsi-btn { background: #1db6cf; }
.ccsi-btn-preset-pill-brand .ccsi-btn:hover { background: #179ab0; }

.ccsi-btn-preset-outline .ccsi-btn {
  background: transparent;
  color: #071a46;
  border: 2px solid #071a46;
}
.ccsi-btn-preset-outline .ccsi-btn:hover { background: #071a46; color: #fff; }

.ccsi-btn-preset-ghost .ccsi-btn {
  background: transparent;
  color: #071a46;
  border: none;
  padding-left: 0;
  padding-right: 0;
  border-bottom: 2px solid #071a46;
  border-radius: 0;
}
.ccsi-btn-preset-ghost .ccsi-btn:hover { color: #1db6cf; border-color: #1db6cf; }

.ccsi-btn-preset-flat .ccsi-btn { border-radius: 8px; }

/* ── Hidden state ─────────────────────────────────────────── */
.ccsi-btn.ccsi-hidden { display: none; }

/* ── Grid (default hidden) ────────────────────────────────── */
.ccsi-grid {
  display: none;
  gap: 14px;
  margin-top: 24px;
}

.ccsi-grid.ccsi-open {
  display: grid;
}

/* ── LAYOUT: grid-2 (default) ─────────────────────────────── */
.ccsi-layout-grid-2 .ccsi-grid,
.ccsi-grid { /* fallback */
  grid-template-columns: 1fr 1fr;
}

/* ── LAYOUT: grid-3 ───────────────────────────────────────── */
.ccsi-layout-grid-3 .ccsi-grid {
  grid-template-columns: repeat(3, 1fr);
}

/* ── LAYOUT: grid-auto ────────────────────────────────────── */
.ccsi-layout-grid-auto .ccsi-grid {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* ── LAYOUT: masonry ──────────────────────────────────────── */
.ccsi-layout-masonry .ccsi-grid {
  display: block;
  columns: 2;
  column-gap: 14px;
}

.ccsi-layout-masonry .ccsi-card {
  break-inside: avoid;
  margin-bottom: 14px;
}

.ccsi-layout-masonry .ccsi-card img {
  height: auto !important;
}

/* ── LAYOUT: filmstrip horizontal ────────────────────────── */
.ccsi-layout-filmstrip .ccsi-grid {
  grid-template-columns: none;
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  gap: 12px;
  padding-bottom: 8px;
}

.ccsi-layout-filmstrip .ccsi-grid::-webkit-scrollbar {
  height: 4px;
}
.ccsi-layout-filmstrip .ccsi-grid::-webkit-scrollbar-track { background: #f0f0f0; border-radius: 2px; }
.ccsi-layout-filmstrip .ccsi-grid::-webkit-scrollbar-thumb { background: #bbb; border-radius: 2px; }

.ccsi-layout-filmstrip .ccsi-card {
  flex-shrink: 0;
  width: 260px;
  scroll-snap-align: start;
}

/* ── LAYOUT: hero-left (big left + column right) ─────────── */
.ccsi-layout-hero-left .ccsi-grid {
  grid-template-columns: 2fr 1fr;
  grid-template-rows: auto;
}

.ccsi-layout-hero-left .ccsi-card:first-child {
  grid-row: 1 / 3;
}

.ccsi-layout-hero-left .ccsi-card:first-child img {
  height: 100% !important;
  object-fit: cover;
}

/* ── LAYOUT: stack ────────────────────────────────────────── */
.ccsi-layout-stack .ccsi-grid {
  grid-template-columns: 1fr;
}

.ccsi-layout-stack .ccsi-card img {
  height: 300px;
}

/* ── Card ─────────────────────────────────────────────────── */
.ccsi-card {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #dfe6f0;
  background: #f7f9fc;
  transition: transform .25s cubic-bezier(.4,0,.2,1), box-shadow .25s;
}

.ccsi-card img {
  width: 100%;
  height: 240px;
  object-fit: contain;
  object-position: center;
  display: block;
  background: #0d0d0d;
  transition: transform .4s cubic-bezier(.4,0,.2,1), filter .3s;
}

/* Card hover presets */
.ccsi-card-hover-lift .ccsi-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0,0,0,.12);
}

.ccsi-card-hover-zoom .ccsi-card:hover img {
  transform: scale(1.05);
}

.ccsi-card-hover-dim .ccsi-card:hover img {
  filter: brightness(.85);
}

/* ── Caption ──────────────────────────────────────────────── */
.ccsi-cap {
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #61708f;
  background: transparent;
}

/* Caption: overlay */
.ccsi-cap-overlay .ccsi-card {
  position: relative;
}

.ccsi-cap-overlay .ccsi-cap {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0,0,0,.65) 0%, transparent 100%);
  color: #fff;
  padding: 24px 14px 12px;
}

/* Caption: hidden */
.ccsi-cap-hidden .ccsi-cap { display: none; }

/* ── Reveal animations ────────────────────────────────────── */

/* fade */
@keyframes ccsi-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* fade-up */
@keyframes ccsi-fade-up {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* zoom */
@keyframes ccsi-zoom {
  from { opacity: 0; transform: scale(.92); }
  to   { opacity: 1; transform: scale(1); }
}

/* blur */
@keyframes ccsi-blur {
  from { opacity: 0; filter: blur(10px); }
  to   { opacity: 1; filter: blur(0); }
}

/* Applied when .ccsi-open is added */
[data-animation="fade"] .ccsi-grid.ccsi-open .ccsi-card     { animation: ccsi-fade     .45s ease both; }
[data-animation="fade-up"] .ccsi-grid.ccsi-open .ccsi-card  { animation: ccsi-fade-up  .45s ease both; }
[data-animation="zoom"] .ccsi-grid.ccsi-open .ccsi-card     { animation: ccsi-zoom     .45s ease both; }
[data-animation="blur"] .ccsi-grid.ccsi-open .ccsi-card     { animation: ccsi-blur     .5s  ease both; }

.ccsi-grid.ccsi-open .ccsi-card:nth-child(1) { animation-delay: .04s; }
.ccsi-grid.ccsi-open .ccsi-card:nth-child(2) { animation-delay: .10s; }
.ccsi-grid.ccsi-open .ccsi-card:nth-child(3) { animation-delay: .16s; }
.ccsi-grid.ccsi-open .ccsi-card:nth-child(4) { animation-delay: .22s; }
.ccsi-grid.ccsi-open .ccsi-card:nth-child(5) { animation-delay: .28s; }
.ccsi-grid.ccsi-open .ccsi-card:nth-child(n+6) { animation-delay: .34s; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 600px) {
  .ccsi-layout-grid-2 .ccsi-grid,
  .ccsi-layout-grid-3 .ccsi-grid,
  .ccsi-layout-hero-left .ccsi-grid {
    grid-template-columns: 1fr;
  }

  .ccsi-layout-hero-left .ccsi-card:first-child {
    grid-row: auto;
  }

  .ccsi-layout-hero-left .ccsi-card:first-child img {
    height: 220px !important;
  }

  .ccsi-layout-masonry .ccsi-grid {
    columns: 1;
  }
}
