/* =========================
   Slider base
   ========================= */

.dw-slider {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #f5f5f5;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
}

.dw-slider.dw-loaded {
    opacity: 1;
    visibility: visible;
}

.dw-slider-inner {
    position: relative;
    width: 100%;
}

/* Crossfade entre slides: empilhados um sobre o outro */
.dw-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--dw-transition, 0.6s) ease-in-out;
}

.dw-slide.dw-active {
    opacity: 1;
    pointer-events: auto;
    z-index: 2;
}

/* Imagem ocupa a largura e altura do container */
.dw-slide-picture,
.dw-slide-picture img {
    width: 100%;
    height: 100%;
}

.dw-slide-picture img {
    display: block;
    object-fit: cover;
    background: #f5f5f5;
}

/* =========================
   Conteúdo (texto + botão)
   ========================= */

.dw-slide-caption {
    position: absolute;
    top: 50%;
    left: 8%;
    right: 8%;
    transform: translateY(-50%);
    max-width: 520px;
    color: #ffffff;
    text-shadow: 0 2px 10px rgba(0,0,0,0.4);
    font-family: inherit;
}

.dw-slide-title {
    font-size: 2.5rem;
    line-height: 1.15;
    margin: 0 0 0.9rem;
    font-weight: 700;
}

.dw-slide-subtitle {
    font-size: 1.05rem;
    line-height: 1.5;
    margin: 0 0 1.3rem;
}

.dw-slide-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.95rem 2.4rem;
    border-radius: 999px;
    background: #ff9f1c;
    color: #ffffff;
    font-weight: 600;
    text-decoration: none;
    font-size: 1rem;
    border: 1px solid #ff9f1c;
    box-shadow: 0 6px 14px rgba(0,0,0,0.25);
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.dw-slide-btn:hover {
    background: #ff8b00;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

/* alinhamentos */
.dw-align-left {
    text-align: left;
    margin-right: auto;
}

.dw-align-right {
    text-align: right;
    margin-left: auto;
}

.dw-align-center {
    text-align: center;
    margin: 0 auto;
}

/* Desktop: garantir texto mais à esquerda e não passar do meio */
@media (min-width: 1024px) {
    .dw-slide-caption.dw-align-left {
        left: 7%;
        right: auto;
        max-width: 40vw; /* não passa do meio do ecrã */
    }
}

/* Mobile */
@media (max-width: 767px) {
    .dw-slide-caption {
        top: auto;
        bottom: 10%;
        transform: translateY(0);
        max-width: 90%;
        left: 5%;
        right: 5%;
    }

    .dw-slide-title {
        font-size: 1.9rem;
    }

    .dw-slide-subtitle {
        font-size: 1rem;
    }

    .dw-slide-btn {
        padding: 0.75rem 1.9rem;
        font-size: 0.95rem;
    }
}

/* =========================
   Dots (bolinhas)
   ========================= */

.dw-slider-dots {
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 5;
}

.dw-slider-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 1px solid #ffffff;
    background: transparent;
    cursor: pointer;
}

.dw-slider-dot.dw-active {
    background: #ffffff;
}

/* Esconde dots se tiver só 1 slide (classe adicionada via JS) */
.dw-slider.dw-single .dw-slider-dots {
    display: none;
}

/* =========================
   Admin helpers
   ========================= */

.dw-slider-admin-wrapper .dw-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.dw-slider-admin-wrapper .dw-col {
    flex: 1 1 250px;
}

.dw-image-preview {
    margin-bottom: 10px;
    max-width: 100%;
    max-height: 180px;
    overflow: hidden;
    border: 1px solid #ddd;
    background: #f7f7f7;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dw-image-preview img {
    max-width: 100%;
    height: auto;
}
