:root {
  --primary: #36aae1;
  --primary-dark: #1688bf;
  --secondary: #083b4b;
  --text: #4a4a4a;
  --muted: #6d7a80;
  --bg: #eeeeee;
  --card: #ffffff;
  --border: rgba(8, 59, 75, 0.12);
  --shadow: 0 18px 45px rgba(8, 59, 75, 0.08);
  --shadow-strong: 0 22px 60px rgba(8, 59, 75, 0.16);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Bai Jamjuree", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}

.site-header {
  padding: 20px 24px 26px;
  background:
    radial-gradient(circle at top right, rgba(54, 170, 225, 0.28), transparent 34%),
    linear-gradient(135deg, var(--secondary) 0%, #062f3c 52%, #041f29 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.site-header-inner,
.container,
.site-footer-inner {
  max-width: 1180px;
  margin: 0 auto;
}

.site-header-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 22px;
}

.site-logo-link {
  display: inline-flex;
  align-items: center;
  width: fit-content;
}

.site-logo {
  display: block;
  width: min(100px, 28vw);
  height: auto;
  flex: 0 0 auto;
}

.site-header-content {
  min-width: 0;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease;
}

.site-link {
  padding: 8px 13px;
}

.social-link {
  width: 40px;
  height: 40px;
  padding: 0;
}

.social-link svg {
  width: 21px;
  height: 21px;
}

.site-nav a:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.4);
  color: #ffffff;
}

.site-nav a:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.4);
  color: #ffffff;
}

.eyebrow {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--secondary);
}

.site-header h1 {
  color: #ffffff;
}

.site-header .subtitle {
  color: rgba(255, 255, 255, 0.86);
}

.site-header .eyebrow {
  color: #8bd7f5;
}

h1 {
  font-size: clamp(42px, 8vw, 76px);
  line-height: 1;
  font-weight: 700;
}

h2 {
  font-size: clamp(28px, 4.6vw, 50px);
  line-height: 1.05;
  font-weight: 700;
}

h3 {
  font-size: 22px;
  font-weight: 700;
}

.subtitle {
  max-width: 660px;
  margin: 16px 0 0;
  font-size: 18px;
  color: var(--text);
}

.container {
  padding: 34px 24px 64px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  color: var(--muted);
}

.breadcrumb button {
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--secondary);
  border-radius: 999px;
  padding: 8px 12px;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(8, 59, 75, 0.05);
  font-family: inherit;
  font-weight: 600;
}

.breadcrumb button:hover {
  border-color: rgba(54, 170, 225, 0.65);
  color: var(--primary-dark);
}

.breadcrumb-separator {
  color: #9aa8ad;
}

.breadcrumb-current {
  font-weight: 700;
  color: var(--secondary);
}

.status {
  padding: 18px 20px;
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 18px;
  box-shadow: var(--shadow);
  color: var(--muted);
}

.status[data-type="error"] {
  color: #b42318;
}

.folder-title-row {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
  margin: 8px 0 30px;
}

.folder-count {
  max-width: 390px;
  color: var(--muted);
  text-align: right;
  line-height: 1.45;
}

.content-section + .content-section {
  margin-top: 46px;
}

.section-title-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: baseline;
  margin-bottom: 16px;
}

.pagination-info {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.folder-grid,
.media-grid {
  display: grid;
  gap: 18px;
}

.folder-grid {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.media-grid {
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
}

.folder-card {
  display: block;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 24px;
  background: var(--card);
  box-shadow: var(--shadow);
  overflow: hidden;
  cursor: pointer;
  text-align: left;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
  font-family: inherit;
}

.folder-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-strong);
  border-color: rgba(54, 170, 225, 0.45);
}

.folder-cover {
  display: block;
  height: 185px;
  background:
    linear-gradient(135deg, rgba(54, 170, 225, 0.22), rgba(8, 59, 75, 0.1)),
    #d8eef7;
}

.folder-cover img,
.media-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 16px;
  color: var(--muted);
  text-align: center;
}

.placeholder-folder,
.placeholder-media {
  background:
    linear-gradient(135deg, rgba(54, 170, 225, 0.08), rgba(8, 59, 75, 0.04));
}

.placeholder-icon {
  display: inline-flex;
  width: 48px;
  height: 48px;
  color: rgba(8, 59, 75, 0.5);
}

.placeholder-icon svg {
  width: 100%;
  height: 100%;
}

.folder-info {
  display: grid;
  gap: 7px;
  padding: 18px;
}

.folder-info strong {
  font-size: 18px;
  color: var(--secondary);
  line-height: 1.2;
}

.folder-info small {
  color: var(--muted);
  line-height: 1.35;
}

.media-card {
  position: relative;
  display: block;
  height: 180px;
  overflow: hidden;
  border-radius: 20px;
  background: #d8eef7;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.8);
}

.media-card img {
  transition: transform 220ms ease;
}

.media-card:hover img {
  transform: scale(1.035);
}

.video-badge {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(8, 59, 75, 0.82);
  color: white;
  font-size: 12px;
  font-weight: 700;
}

.load-more-row {
  display: flex;
  justify-content: center;
  margin-top: 26px;
}

.load-more-button {
  border: 0;
  border-radius: 999px;
  padding: 13px 22px;
  background: var(--primary);
  color: #ffffff;
  cursor: pointer;
  font-family: inherit;
  font-weight: 700;
  box-shadow: 0 14px 32px rgba(54, 170, 225, 0.28);
  transition: transform 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.load-more-button:hover {
  transform: translateY(-2px);
  background: var(--primary-dark);
  box-shadow: 0 18px 38px rgba(54, 170, 225, 0.34);
}

.hidden {
  display: none !important;
}

.site-footer {
  padding: 34px 24px;
  background: #ffffff;
  border-top: 1px solid var(--border);
}

.site-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.footer-brand,
.footer-credit {
  display: flex;
  align-items: center;
}

.footer-federacion-logo {
  width: min(360px, 58vw);
  height: auto;
}

.footer-credit {
  gap: 12px;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}

.footer-credit:hover {
  color: var(--secondary);
}

.footer-zaro-logo {
  width: 82px;
  height: auto;
}

@media (max-width: 860px) {
  .site-header-inner {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .site-logo {
    width: min(92px, 34vw);
  }

  .site-nav {
    justify-content: flex-start;
  }

  .site-footer-inner {
    display: grid;
    justify-items: start;
  }

  .footer-federacion-logo {
    width: min(340px, 82vw);
  }

  .folder-title-row,
  .section-title-row {
    display: block;
  }

  .folder-count,
  .pagination-info {
    margin-top: 12px;
    text-align: left;
  }
}

@media (max-width: 640px) {
  .site-header {
    padding: 34px 18px;
  }

  .container {
    padding: 24px 18px 46px;
  }

  .folder-grid,
  .media-grid {
    grid-template-columns: 1fr;
  }

  .media-card {
    height: 220px;
  }
}

.lightbox-caption {
  display: grid;
  gap: 14px;
  text-align: center;
}

.lightbox-caption h4 {
  margin: 0;
  color: #ffffff;
  font-family: "Bai Jamjuree", sans-serif;
  font-size: 16px;
  font-weight: 600;
  text-align: center;
}

.lightbox-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.lightbox-action {
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.92);
  cursor: pointer;
  font-family: "Bai Jamjuree", sans-serif;
  font-size: 13px;
  font-weight: 600;
  backdrop-filter: blur(3px);
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease;
}

.lightbox-action:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.34);
  color: #ffffff;
}

.share-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: grid;
  place-items: center;
  padding: 22px;
}

.share-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 59, 75, 0.58);
  backdrop-filter: blur(3px);
}

.share-modal-panel {
  position: relative;
  z-index: 1;
  width: min(440px, 100%);
  padding: 28px;
  border-radius: 26px;
  background: #ffffff;
  box-shadow: 0 28px 80px rgba(8, 59, 75, 0.28);
}

.share-modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  border: 0;
  background: transparent;
  color: var(--secondary);
  cursor: pointer;
  font-size: 30px;
  line-height: 1;
}

.share-file-name {
  margin: 12px 0 20px;
  color: var(--muted);
  word-break: break-word;
}

.share-actions {
  display: grid;
  gap: 10px;
}

.share-action-button {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 999px;
  padding: 13px 16px;
  background: var(--primary);
  color: #ffffff;
  cursor: pointer;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}

.share-action-button:hover {
  background: var(--primary-dark);
}

.share-action-button.secondary {
  background: var(--secondary);
}

.share-feedback {
  min-height: 20px;
  margin: 16px 0 0;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
}

.share-feedback.is-success {
  display: block;
  padding: 10px 14px;
  border-radius: 14px;
  background: #d1fadf;
  color: #067647;
}

.share-feedback.is-error {
  display: block;
  padding: 10px 14px;
  border-radius: 14px;
  background: #fee4e2;
  color: #b42318;
}

.video-modal.hidden {
  display: none;
}

.video-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 24px;
}

.video-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
}

.video-modal-panel {
  position: relative;
  z-index: 1;
  width: min(1100px, 94vw);
  display: grid;
  gap: 18px;
}

.video-modal-close {
  position: absolute;
  top: -44px;
  right: 0;
  border: 0;
  background: transparent;
  color: #ffffff;
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
}

.video-player {
  width: 100%;
  max-height: 76vh;
  background: #000000;
  border-radius: 18px;
}

.video-modal-caption {
  display: grid;
  justify-items: center;
  gap: 12px;
  color: #ffffff;
  text-align: center;
}

.video-modal-caption h4 {
  margin: 0;
  color: #ffffff;
  font-family: "Bai Jamjuree", sans-serif;
  font-size: 16px;
  font-weight: 600;
}

.video-modal-nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-size: 38px;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
  backdrop-filter: blur(8px);
}

.video-modal-nav:hover {
  background: rgba(255, 255, 255, 0.16);
}

.video-modal-prev {
  left: -68px;
}

.video-modal-next {
  right: -68px;
}

.video-modal-nav.hidden {
  display: none;
}

@media (max-width: 760px) {
  .video-modal-prev {
    left: 8px;
  }

  .video-modal-next {
    right: 8px;
  }
}