/* Cotech Hero Banner Slider */
.cotech-hero-slider {
    --cotech-hero-radius: 0px;
    position: relative;
    width: 100vw;
    max-width: 100vw;
    margin: 0 0 24px calc(50% - 50vw);
    overflow: hidden;
    border-radius: var(--cotech-hero-radius);
    line-height: 0;
    isolation: isolate;
}

.cotech-hero-slider .cotech-hero-viewport {
    width: 100%;
    overflow: hidden;
}

.cotech-hero-slider .cotech-hero-track {
    display: flex;
    width: 100%;
    transform: translate3d(0, 0, 0);
    transition: transform 500ms ease;
    will-change: transform;
}

.cotech-hero-slider .cotech-hero-slide-item {
    flex: 0 0 100%;
    width: 100%;
    min-width: 100%;
    position: relative;
}

.cotech-hero-slider .cotech-hero-slide-item picture,
.cotech-hero-slider .cotech-hero-link {
    display: block;
    width: 100%;
}

.cotech-hero-slider img {
    display: block;
    width: 100%;
    height: auto;
    max-width: none;
    margin: 0;
}

.cotech-hero-slider.cotech-hero-transition-fade .cotech-hero-track {
    display: block;
    position: relative;
    transform: none !important;
}

.cotech-hero-slider.cotech-hero-transition-fade .cotech-hero-slide-item {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 500ms ease, visibility 500ms ease;
}

.cotech-hero-slider.cotech-hero-transition-fade .cotech-hero-slide-item:first-child {
    position: relative;
}

.cotech-hero-slider.cotech-hero-transition-fade .cotech-hero-slide-item.is-active {
    opacity: 1;
    visibility: visible;
    z-index: 1;
}

.cotech-hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, .55);
    color: #fff;
    font-size: 24px;
    line-height: 44px;
    text-align: center;
    cursor: pointer;
    transform: translateY(-50%);
    transition: background .2s ease, opacity .2s ease;
}

.cotech-hero-arrow:hover {
    background: rgba(0, 0, 0, .8);
}

.cotech-hero-prev { left: 16px; }
.cotech-hero-next { right: 16px; }

.cotech-hero-dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 14px;
    z-index: 5;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 7px;
    line-height: 0;
}

.cotech-hero-dot {
    width: 9px;
    height: 9px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255,255,255,.65);
    box-shadow: 0 1px 4px rgba(0,0,0,.25);
    cursor: pointer;
}

.cotech-hero-dot.is-active {
    background: #fff;
    transform: scale(1.2);
}

@media (max-width: 767px) {
    .cotech-hero-slider {
        margin-bottom: 16px;
    }

    .cotech-hero-arrow {
        width: 36px;
        height: 36px;
        font-size: 19px;
        line-height: 36px;
    }

    .cotech-hero-prev { left: 9px; }
    .cotech-hero-next { right: 9px; }

    .cotech-hero-dots {
        bottom: 9px;
        gap: 5px;
    }

    .cotech-hero-dot {
        width: 7px;
        height: 7px;
    }
}

/* Admin */
.cotech-hero-admin {
    max-width: 1100px;
}

.cotech-hero-settings-card,
.cotech-hero-slide {
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 10px;
    padding: 22px;
    margin-top: 18px;
    box-shadow: 0 1px 2px rgba(0,0,0,.03);
}

.cotech-hero-settings-card h2,
.cotech-hero-slides-header h2 {
    margin-top: 0;
}

.cotech-hero-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.cotech-switch-row,
.cotech-field {
    min-height: 58px;
    box-sizing: border-box;
}

.cotech-switch-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 13px 15px;
    border: 1px solid #e2e4e7;
    border-radius: 8px;
}

.cotech-switch-row strong,
.cotech-field span {
    display: block;
    font-weight: 600;
}

.cotech-switch-row small {
    display: block;
    color: #646970;
    margin-top: 4px;
}

.cotech-switch-row input {
    flex: 0 0 auto;
}

.cotech-field {
    display: block;
}

.cotech-field input[type="number"],
.cotech-field input[type="url"],
.cotech-field input[type="text"],
.cotech-field select {
    width: 100%;
    margin-top: 7px;
}

.cotech-hero-slides-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-top: 30px;
}

.cotech-hero-slides-header p {
    margin-bottom: 0;
    color: #646970;
}

.cotech-hero-slide {
    position: relative;
}

.cotech-hero-slide-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.cotech-hero-slide-top h3 {
    margin: 0;
}

.cotech-hero-image-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 15px;
}

.cotech-image-field {
    border: 1px solid #e2e4e7;
    border-radius: 8px;
    padding: 14px;
}

.cotech-image-field > strong,
.cotech-image-field > small {
    display: block;
}

.cotech-image-field > small {
    color: #646970;
    margin-top: 4px;
}

.cotech-image-preview {
    aspect-ratio: 16 / 7;
    margin: 12px 0;
    background: #f6f7f7;
    border: 1px dashed #c3c4c7;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: #646970;
    font-size: 12px;
    text-align: center;
}

.cotech-image-preview img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.cotech-slide-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 16px;
}

.cotech-check {
    grid-column: 1 / -1;
}

@media (max-width: 900px) {
    .cotech-hero-grid,
    .cotech-hero-image-grid {
        grid-template-columns: 1fr;
    }

    .cotech-slide-fields {
        grid-template-columns: 1fr;
    }
}
