/* ============================================================
   Brand Center – Public Styles
   ============================================================ */

.bc-wrap {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: #111;
    max-width: 1080px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem 4rem;
    box-sizing: border-box;
}

/* ---- Hero banner ---- */

.bc-hero {
    width: 100%;
    height: 220px;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 2rem;
}

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

/* ---- Header ---- */

.bc-header {
    display: flex;
    align-items: center;
    gap: 1.75rem;
    padding-bottom: 2rem;
    margin-bottom: 2.5rem;
    border-bottom: 1px solid #e4e4e4;
}

.bc-logo {
    max-height: 72px;
    max-width: 200px;
    object-fit: contain;
    flex-shrink: 0;
}

.bc-brand-name {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
}

.bc-tagline {
    margin: 0.3rem 0 0;
    color: #777;
    font-size: 0.9rem;
    font-weight: 400;
}

/* ---- Layout ---- */

.bc-layout {
    display: grid;
    grid-template-columns: 170px 1fr;
    gap: 3rem;
    align-items: start;
}

/* ---- Sidebar nav ---- */

.bc-nav {
    position: sticky;
    top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.bc-nav-link {
    display: block;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    color: #666;
    text-decoration: none;
    font-size: 0.84rem;
    font-weight: 500;
    line-height: 1.4;
    transition: background 0.12s, color 0.12s;
    border-left: 2px solid transparent;
}

.bc-nav-link:hover {
    background: #f5f5f5;
    color: #111;
}

.bc-nav-link.is-active {
    background: #f0f0f0;
    color: #111;
    font-weight: 600;
    border-left-color: #111;
}

/* ---- Sections ---- */

.bc-section {
    margin-bottom: 4rem;
    scroll-margin-top: 1.5rem;
}

.bc-section:last-child {
    margin-bottom: 0;
}

.bc-section h2 {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #999;
    margin: 0 0 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #ebebeb;
}

.bc-description {
    font-size: 0.975rem;
    line-height: 1.75;
    color: #444;
    max-width: 600px;
}

/* ---- Colors ---- */

.bc-colors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 1rem;
}

.bc-color-card {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    overflow: hidden;
    transition: box-shadow 0.18s, transform 0.18s;
}

.bc-color-card:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.bc-color-swatch {
    height: 110px;
    background-color: #e0e0e0; /* gris neutro si no hay color válido */
}

.bc-color-info {
    padding: 0.875rem;
    border-top: 1px solid #ebebeb;
}

.bc-color-info h3 {
    font-size: 0.875rem;
    font-weight: 600;
    margin: 0 0 0.7rem;
    color: #111;
}

.bc-code-row {
    display: flex;
    flex-wrap: wrap;        /* badge wraps to its own line */
    align-items: center;
    column-gap: 0.35rem;
    margin-bottom: 0.45rem;
    padding-bottom: 0.45rem;
    border-bottom: 1px solid #f5f5f5;
}

.bc-code-row:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.bc-code-badge {
    /* Takes the full row width → forces val+btn to the next line */
    width: 100%;
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #aaa;
    margin-bottom: 2px;
    /* no background pill — cleaner when stacked */
}

.bc-code-val {
    font-family: 'SFMono-Regular', 'Menlo', 'Consolas', monospace;
    font-size: 0.8rem;
    color: #333;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bc-copy-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #bbb;
    padding: 0.2rem;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: color 0.12s, background 0.12s;
}

.bc-copy-btn:hover {
    color: #555;
    background: #efefef;
}

.bc-copy-btn.is-copied {
    color: #16a34a;
}

.bc-color-usage {
    font-size: 0.775rem;
    color: #999;
    margin: 0.6rem 0 0;
    line-height: 1.4;
    padding-top: 0.5rem;
    border-top: 1px solid #f2f2f2;
}

/* ---- Typography ---- */

.bc-fonts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.25rem;
}

.bc-font-card {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.18s, transform 0.18s;
}

.bc-font-card:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.bc-font-sample {
    background: #f7f7f7;
    border-bottom: 1px solid #ebebeb;
    height: 140px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    overflow: hidden;
}

.bc-font-sample img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.bc-font-aa {
    font-size: 3.5rem;
    font-weight: 700;
    color: #111;
    line-height: 1;
    letter-spacing: -0.02em;
}

.bc-font-abc {
    font-size: 0.65rem;
    color: #aaa;
    line-height: 1.6;
    text-align: center;
    letter-spacing: 0.02em;
}

.bc-font-info {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.bc-font-info h3 {
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0 0 0.4rem;
    color: #111;
}

.bc-font-info p {
    font-size: 0.82rem;
    color: #666;
    margin: 0.2rem 0;
    line-height: 1.5;
}

.bc-font-info .bc-btn {
    margin-top: 0.875rem;
    align-self: flex-start;
}

/* ---- Resources ---- */

.bc-cat-desc {
    font-size: 0.875rem;
    color: #777;
    margin: -0.75rem 0 1.5rem;
    line-height: 1.6;
}

.bc-resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 1.25rem;
}

/* FIX: overflow visible so dropdown is not clipped */
.bc-resource-card {
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    overflow: visible;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.18s, transform 0.18s;
    background: #fff;
    position: relative;
    /* No z-index by default — avoids creating stacking contexts for every card */
}

.bc-resource-card:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
    z-index: 1;  /* lift above siblings only when hovered */
}

/* A card with an open dropdown always wins over any hovered sibling */
.bc-resource-card:has(.bc-download-wrap.is-open) {
    z-index: 20 !important;
}

/* overflow:hidden scoped only to the image preview */
.bc-resource-preview {
    background: #f7f7f7;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 11px 11px 0 0;
    border-bottom: 1px solid #ebebeb;
}

.bc-resource-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* ---- Video previews ---- */

.bc-resource-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.bc-resource-preview--video {
    position: relative;
    cursor: pointer;
}

/* Centered play button — fades out on hover */
.bc-resource-preview--video::after {
    content: '▶';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.48);
    color: #fff;
    font-size: 1.35rem;
    width: 54px;
    height: 54px;
    line-height: 54px;      /* vertical center without flexbox */
    text-align: center;
    padding-left: 4px;      /* optical nudge: ▶ glyph sits slightly left */
    border-radius: 50%;
    box-sizing: border-box;
    pointer-events: none;
    transition: opacity 0.2s;
}

.bc-resource-card:hover .bc-resource-preview--video::after {
    opacity: 0;
}

.bc-resource-body {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.bc-resource-body h3 {
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0 0 0.35rem;
    color: #111;
}

.bc-resource-body p {
    font-size: 0.82rem;
    color: #666;
    margin: 0.2rem 0;
    line-height: 1.5;
}

.bc-resource-usage {
    font-style: italic;
    color: #999 !important;
}

/* ---- Buttons & Download ---- */

.bc-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    background: #111;
    color: #fff;
    border: none;
    border-radius: 7px;
    font-size: 0.825rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.12s;
    white-space: nowrap;
    font-family: inherit;
}

.bc-btn:hover {
    background: #2a2a2a;
    color: #fff;
}

/* Download toggle overrides – light, unobtrusive */
.bc-download-toggle {
    background: #f0f0f0;
    color: #777;
    border: 1px solid #e2e2e2;
}

.bc-download-toggle:hover {
    background: #e6e6e6;
    color: #444;
    border-color: #d4d4d4;
}

.bc-download-wrap {
    position: relative;
    margin-top: auto;
    padding-top: 0.875rem;
}

.bc-download-toggle {
    width: 100%;
    justify-content: space-between;
}

.bc-fmt-count {
    font-size: 0.7rem;
    opacity: 0.55;
    margin-left: auto;
    margin-right: 0.3rem;
}

.bc-chevron {
    flex-shrink: 0;
    transition: transform 0.15s;
}

.bc-download-wrap.is-open .bc-chevron {
    transform: rotate(180deg);
}

.bc-format-menu {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 9px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    z-index: 200;
    overflow-y: auto;
    max-height: 260px;
}

.bc-download-wrap.is-open .bc-format-menu {
    display: block;
}

/* Opens upward when there is not enough space below */
.bc-download-wrap.opens-up .bc-format-menu {
    top: auto;
    bottom: calc(100% + 4px);
}

.bc-format-link {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.65rem 1rem;
    color: #222;
    text-decoration: none;
    font-size: 0.825rem;
    font-weight: 600;
    transition: background 0.1s;
    border-bottom: 1px solid #f2f2f2;
}

.bc-format-link::before {
    content: '↓';
    font-size: 0.75rem;
    color: #aaa;
    flex-shrink: 0;
}

.bc-format-link:last-child {
    border-bottom: none;
}

.bc-format-link:hover {
    background: #f7f7f7;
    color: #000;
}

.bc-format-link:hover::before {
    color: #555;
}

/* ---- Responsive ---- */

@media (max-width: 780px) {
    .bc-layout {
        grid-template-columns: 1fr;
    }

    .bc-nav {
        position: static;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 4px;
        padding-bottom: 1.25rem;
        margin-bottom: 1rem;
        border-bottom: 1px solid #e8e8e8;
    }

    .bc-nav-link {
        font-size: 0.8rem;
        border-left: none;
        border-bottom: 2px solid transparent;
    }

    .bc-nav-link.is-active {
        border-left: none;
        border-bottom-color: #111;
    }

    .bc-fonts-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
}

@media (max-width: 480px) {
    .bc-wrap {
        padding: 1.5rem 1rem 3rem;
    }

    .bc-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    /* 1 column on small screens so cards are readable */
    .bc-colors-grid,
    .bc-fonts-grid,
    .bc-resources-grid {
        grid-template-columns: 1fr;
    }
}
