/* ─── Gallery, comparison, ICS chrome overrides ─── */

.section-gallery,
.section-ics {
    background-color: #201d1d;
    padding: 96px 0 0;
}

.section-ics {
    padding-bottom: 96px;
}

.gallery-section {
    padding: 0;
}

.gallery-title {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.5;
    color: #fdfcfc;
    text-align: left;
    margin-bottom: 24px;
    letter-spacing: 0;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(253, 252, 252, 0.12);
}

.gallery-title::before {
    content: "[+] ";
    font-weight: 700;
}

.gallery-container {
    position: relative;
    margin-bottom: 0;
}

.gallery-wrapper {
    width: 100%;
    overflow: hidden;
    border: 1px solid rgba(253, 252, 252, 0.12);
    -webkit-border-radius: 0;
    -moz-border-radius: 0;
    border-radius: 0;
    background-color: #201d1d;
}

.gallery-track {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
}

.gallery-item {
    min-width: 100%;
    -webkit-box-flex: 0;
    -ms-flex: 0 0 100%;
    flex: 0 0 100%;
    position: relative;
}

.gallery-item::before {
    content: "";
    display: block;
    padding-bottom: 56.25%;
}

.gallery-item img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
}

@supports (aspect-ratio: 1) {
    .gallery-item::before {
        display: none;
        padding-bottom: 0;
    }

    .gallery-item img {
        position: static;
        height: auto;
        aspect-ratio: 16 / 9;
        object-fit: cover;
    }
}

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: transparent;
    padding: 8px 12px;
    font-size: 14px;
    font-weight: 400;
    line-height: 2;
    text-align: left;
    color: #fdfcfc;
    text-shadow: 1px 1px 0 #201d1d, -1px -1px 0 #201d1d, 1px -1px 0 #201d1d, -1px 1px 0 #201d1d;
}

.gallery-empty {
    padding: 24px 16px;
    font-size: 16px;
    color: #9a9898;
    background-color: #302c2c;
    text-align: left;
}

.gallery-btn {
    position: absolute;
    top: 50%;
    -webkit-transform: translateY(-50%);
    -moz-transform: translateY(-50%);
    -ms-transform: translateY(-50%);
    -o-transform: translateY(-50%);
    transform: translateY(-50%);
    z-index: 2;
    width: 40px;
    height: 40px;
    background-color: #fdfcfc;
    border: 0;
    -webkit-border-radius: 4px;
    -moz-border-radius: 4px;
    border-radius: 4px;
    color: #201d1d;
    font-size: 16px;
    font-weight: 500;
    line-height: 1;
    cursor: pointer;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    -webkit-box-shadow: none;
    -moz-box-shadow: none;
    box-shadow: none;
}

.gallery-btn-prev {
    left: 12px;
}

.gallery-btn-next {
    right: 12px;
}

.gallery-btn:active {
    background-color: #e8e4e4;
    color: #201d1d;
}

.gallery-btn:focus {
    outline: 2px solid #fdfcfc;
    outline-offset: 2px;
}

/* Selectors Level 4: regla aislada. */
.gallery-btn:focus-visible {
    outline: 2px solid #fdfcfc;
    outline-offset: 2px;
}

.gallery-btn span {
    line-height: 1;
}

.ics-spacer {
    display: none;
}

/* ICS overrides — #ics-slider gana al CSS del componente (carga después). */
#ics-slider .ics__line {
    width: 2px;
    background: #fdfcfc;
    -webkit-box-shadow: none;
    -moz-box-shadow: none;
    box-shadow: none;
}

#ics-slider .ics__handle {
    width: 40px;
    height: 40px;
    background: #fdfcfc;
    -webkit-border-radius: 4px;
    -moz-border-radius: 4px;
    border-radius: 4px;
    border: 1px solid #646262;
    -webkit-box-shadow: none;
    -moz-box-shadow: none;
    box-shadow: none;
}

#ics-slider .ics__handle:before {
    border-color: transparent #201d1d transparent transparent;
}

#ics-slider .ics__handle:after {
    border-color: transparent transparent transparent #201d1d;
}

#ics-slider .ics__select,
#ics-slider .ics__label {
    font-family: 'JetBrains Mono', 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
    color: #fdfcfc;
    background-color: #201d1d;
    border: 1px solid #201d1d;
    -webkit-border-radius: 4px;
    -moz-border-radius: 4px;
    border-radius: 4px;
    -webkit-box-shadow: none;
    -moz-box-shadow: none;
    box-shadow: none;
    letter-spacing: 0;
}

#ics-slider .ics__select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23fdfcfc'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 10px 6px;
}

#ics-slider .ics__select:focus {
    outline: 2px solid #fdfcfc;
    outline-offset: 2px;
    -webkit-box-shadow: none;
    -moz-box-shadow: none;
    box-shadow: none;
    border-color: #fdfcfc;
}

@media (max-width: 850px) {
    .section-gallery,
    .section-ics {
        padding-top: 64px;
    }

    .section-ics {
        padding-bottom: 64px;
    }
}

@media (max-width: 640px) {
    .section-gallery,
    .section-ics {
        padding-top: 48px;
    }

    .section-ics {
        padding-bottom: 48px;
    }

    .gallery-btn {
        width: 32px;
        height: 32px;
        font-size: 14px;
        left: 8px;
    }

    .gallery-btn-next {
        left: auto;
        right: 8px;
    }

    #ics-slider .ics__select,
    #ics-slider .ics__label {
        font-size: 11px;
        line-height: 1.4;
    }

    #ics-slider .ics__select {
        padding: 2px 18px 2px 6px;
        top: 8px;
        max-width: 40%;
        background-position: right 5px center;
        background-size: 8px 5px;
    }

    #ics-slider .ics__select--left {
        left: 8px;
    }

    #ics-slider .ics__select--right {
        right: 8px;
    }
}
