/*
Theme Name: Enlaces
Theme URI: https://cazandogangas.es
Description: Contexto de enlaces curados dentro del ecosistema CG.
Author: CazandoGangas
Author URI: https://cazandogangas.es
Template: esgalla
Version: 0.1.12
Text Domain: cg-enlaces
*/

body.cg-enlaces-theme {
  background:
    radial-gradient(circle at top left, rgba(35, 122, 113, .10), transparent 24%),
    radial-gradient(circle at top right, rgba(20, 44, 71, .06), transparent 28%),
    linear-gradient(180deg, #eef4f2 0%, #e7efec 100%);
  color: #1d2b29;
}

.cg-links-shell {
  max-width: 1040px;
  margin: 0 auto;
  padding: 18px 18px 60px;
}

body.cg-enlaces-theme .header-2-contenedor.cg-context-header-active {
  position: relative;
  overflow: hidden;
  background-image: none;
  background:
    radial-gradient(circle at top left, rgba(35, 122, 113, .12), transparent 24%),
    radial-gradient(circle at top right, rgba(20, 44, 71, .08), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, .98) 0%, rgba(244, 249, 247, .96) 100%);
}

body.cg-enlaces-theme .header-2-contenedor.cg-context-header-active::after {
  content: "";
  position: absolute;
  inset: auto 24px 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(18, 71, 66, 0), rgba(18, 71, 66, .18), rgba(18, 71, 66, 0));
}

body.cg-enlaces-theme .header-2-contenedor.cg-context-header-active .header-2 {
  position: relative;
  z-index: 2;
  min-height: 142px;
}

body.cg-enlaces-theme .cg-context-header {
  position: absolute;
  top: 15px;
  left: 50%;
  z-index: 1;
  display: grid;
  align-content: space-between;
  justify-items: center;
  gap: 0;
  height: 90px;
  width: min(calc(100vw - 32px), 760px);
  padding: 1px 10px 2px;
  text-align: center;
  pointer-events: none;
  transform: translateX(-50%);
}

body.cg-enlaces-theme .cg-context-header__eyebrow {
  display: none;
}

body.cg-enlaces-theme .cg-context-header__title {
  margin: 0;
  color: #1e2e2c;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(42px, 6vw, 74px);
  line-height: .86;
  letter-spacing: .05em;
}

body.cg-enlaces-theme .cg-context-header__meta {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
  justify-content: center;
  min-width: 0;
  max-width: 100%;
  margin: 0;
  padding-top: 6px;
  border-top: 2px solid rgba(22, 68, 64, .2);
  color: #173d39;
  font-family: "Open Sans", "Segoe UI", sans-serif;
  font-size: clamp(13px, 1.4vw, 16px);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
}

body.cg-enlaces-theme .cg-context-header__stat {
  display: inline-flex;
  gap: 7px;
  align-items: baseline;
}

body.cg-enlaces-theme .cg-context-header__separator {
  opacity: .58;
}

body.cg-enlaces-theme .cg-context-header__value {
  font-weight: 800;
}

body.cg-enlaces-theme .cg-context-header__label {
  opacity: .92;
}

.cg-links-hero {
  display: none;
  margin-bottom: 16px;
  padding: 24px 22px 20px;
  border: 1px solid rgba(36, 96, 90, .14);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .84) 0%, rgba(248, 251, 250, .72) 100%);
  box-shadow: 0 22px 46px rgba(37, 62, 58, .08);
}

.cg-links-title {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(44px, 10vw, 88px);
  line-height: .92;
  letter-spacing: .06em;
}

.cg-links-meta {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  min-width: min(100%, 35ch);
  margin: 10px 0 0;
  padding-top: 10px;
  border-top: 2px solid rgba(22, 68, 64, .2);
  color: #173d39;
  font-family: "Open Sans", "Segoe UI", sans-serif;
  font-size: clamp(15px, 2vw, 19px);
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.cg-links-panel {
  border-radius: 28px;
  padding: 18px;
  background: rgba(255, 255, 255, .78);
  border: 1px solid rgba(36, 96, 90, .14);
  box-shadow: 0 18px 38px rgba(37, 62, 58, .07);
}

.cg-links-empty {
  color: #657673;
}

.cg-links-panel--tree .cge-tree {
  display: grid;
  gap: 12px;
}

.cg-links-panel--tree .cge-tree__section {
  border: 1px solid rgba(27, 91, 85, .14);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(250, 252, 251, .95) 0%, rgba(243, 248, 247, .94) 100%);
  overflow: clip;
}

.cg-links-panel--tree .cge-tree__section > summary {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 18px 20px;
  list-style: none;
  color: #163a37;
  font-family: "Open Sans", "Segoe UI", sans-serif;
  cursor: pointer;
  user-select: none;
}

.cg-links-panel--tree .cge-tree__section > summary::-webkit-details-marker {
  display: none;
}

.cg-links-panel--tree .cge-tree__section > summary::before {
  content: "\1F4C1";
  flex: 0 0 auto;
  font-size: 24px;
  line-height: 1;
}

.cg-links-panel--tree .cge-tree__section[open] > summary::before {
  content: "\1F4C2";
}

.cg-links-panel--tree .cge-tree__summary-label {
  flex: 1 1 auto;
  min-width: 0;
  font-size: clamp(18px, 3vw, 24px);
  font-weight: 700;
  line-height: 1.18;
}

.cg-links-panel--tree .cge-tree__summary-count {
  flex: 0 0 auto;
  color: #4d6b67;
  font-family: "Open Sans", "Segoe UI", sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .01em;
}

.cg-links-panel--tree .cge-tree__folder-description,
.cg-links-panel--tree .cge-tree__links,
.cg-links-panel--tree .cge-tree__branch,
.cg-links-panel--tree .cge-tree__empty {
  margin-left: 56px;
  margin-right: 20px;
}

.cg-links-panel--tree .cge-tree__folder-description,
.cg-links-panel--tree .cge-tree__empty {
  margin-top: 0;
  margin-bottom: 14px;
  color: #60726e;
  font-family: "Open Sans", "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.5;
}

.cg-links-panel--tree .cge-tree__links {
  display: grid;
  gap: 12px;
  margin-top: 0;
  margin-bottom: 18px;
  padding: 0;
  list-style: none;
}

.cg-links-panel--tree .cge-tree__item {
  padding-left: 16px;
  border-left: 2px solid rgba(36, 96, 90, .15);
}

.cg-links-panel--tree .cge-tree__link {
  color: #174c47;
  font-family: "Open Sans", "Segoe UI", sans-serif;
  font-size: 17px;
  font-weight: 700;
  text-decoration: none;
}

.cg-links-panel--tree .cge-tree__link:hover,
.cg-links-panel--tree .cge-tree__link:focus-visible {
  color: #0f6e64;
}

.cg-links-panel--tree .cge-tree__description,
.cg-links-panel--tree .cge-tree__link--missing {
  color: #5d6c69;
}

.cg-links-panel--tree .cge-tree__description {
  margin: 6px 0 0;
  color: #5d6c69;
  font-family: "Open Sans", "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.55;
}

.cg-links-panel--tree .cge-tree__branch {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
  padding-top: 2px;
}

.cg-links-panel--tree .cge-tree__branch .cge-tree__section {
  background: rgba(255, 255, 255, .82);
}

.cg-links-panel--tree .cge-tree__branch .cge-tree__section > summary {
  padding-top: 14px;
  padding-bottom: 14px;
}

.cg-links-panel--tree .cge-tree__branch .cge-tree__summary-label {
  font-size: clamp(16px, 2.6vw, 20px);
}

@media (max-width: 1400px) {
  body.cg-enlaces-theme .cg-context-header {
    width: min(calc(100vw - 24px), 700px);
  }
}

@media (max-width: 640px) {
  .cg-links-shell {
    padding-left: 14px;
    padding-right: 14px;
  }

  .cg-links-hero,
  .cg-links-panel {
    padding-left: 16px;
    padding-right: 16px;
  }

  .cg-links-meta {
    gap: 8px;
    font-size: 14px;
    letter-spacing: .02em;
  }

  .cg-links-panel--tree .cge-tree__section > summary {
    gap: 10px;
    padding: 16px;
  }

  .cg-links-panel--tree .cge-tree__section > summary::before {
    font-size: 22px;
  }

  .cg-links-panel--tree .cge-tree__folder-description,
  .cg-links-panel--tree .cge-tree__links,
  .cg-links-panel--tree .cge-tree__branch,
  .cg-links-panel--tree .cge-tree__empty {
    margin-left: 18px;
    margin-right: 16px;
  }

  .cg-links-panel--tree .cge-tree__item {
    padding-left: 12px;
  }
}

@media (max-width: 1200px) {
  body.cg-enlaces-theme .header-2-contenedor.cg-context-header-active .header-2 {
    min-height: 256px;
  }

  body.cg-enlaces-theme .cg-context-header {
    top: auto;
    bottom: 16px;
    display: grid;
    align-content: start;
    justify-items: start;
    gap: 12px;
    height: auto;
    min-height: 96px;
    width: min(calc(100vw - 28px), 560px);
    padding: 16px 18px 14px;
    border: 1px solid rgba(36, 96, 90, .14);
    border-radius: 28px;
    background: linear-gradient(135deg, rgba(255, 255, 255, .92) 0%, rgba(248, 251, 250, .86) 100%);
    box-shadow: 0 18px 36px rgba(37, 62, 58, .08);
    text-align: left;
  }

  body.cg-enlaces-theme .cg-context-header__title {
    width: 100%;
    font-size: clamp(34px, 10vw, 56px);
    line-height: .9;
    letter-spacing: .04em;
  }

  body.cg-enlaces-theme .cg-context-header__meta {
    justify-content: flex-start;
    gap: 8px;
    padding-top: 10px;
    font-size: clamp(13px, 2.5vw, 16px);
    line-height: 1.12;
  }

  .cg-links-hero--fallback {
    display: none;
  }
}

@media (max-width: 640px) {
  body.cg-enlaces-theme .header-2-contenedor.cg-context-header-active .header-2 {
    min-height: 150px;
  }

  body.cg-enlaces-theme .cg-context-header {
    top: 50%;
    right: clamp(72px, 18vw, 106px);
    bottom: auto;
    left: clamp(108px, 29vw, 152px);
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
    text-align: center;
    transform: translateY(-50%);
  }

  body.cg-enlaces-theme .cg-context-header__title {
    width: auto;
    max-width: 100%;
    font-size: clamp(28px, 8.2vw, 38px);
    line-height: .94;
    letter-spacing: .03em;
    white-space: nowrap;
  }

  body.cg-enlaces-theme .cg-context-header__meta {
    display: none;
  }
}
