/* ============================================================
   Starter Slider – Frontend Styles
   ============================================================ */

/* Wrapper: half-page height */
.starter-slider-wrapper {
    position: relative;
    width: 100%;
    height: 50vh;
    min-height: 280px;
    overflow: hidden;
    background: #111;
    border-radius: 0;
    box-sizing: border-box;
    font-family: inherit;
}

/* Track: full size container, no flex layout needed for fade */
.starter-slider-track {
    position: relative;
    width: 100%;
    height: 100%;
}

/* Individual slide – stacked via absolute, fade in/out */
.starter-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 40px 70px;
    box-sizing: border-box;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: #fff;
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.65s ease;
    pointer-events: none;
    z-index: 1;
}

/* Active slide */
.starter-slide.is-active {
    opacity: 1;
    pointer-events: auto;
    z-index: 2;
}

/* nth-child tints for variety */
.starter-slide:nth-child(2n) {
    background: linear-gradient(135deg, #0d0d1a 0%, #1a0533 50%, #2d0b69 100%);
}
.starter-slide:nth-child(3n) {
    background: linear-gradient(135deg, #001a12 0%, #003322 50%, #005c3a 100%);
}
.starter-slide:nth-child(4n) {
    background: linear-gradient(135deg, #1a0e00 0%, #3d2400 50%, #7a4800 100%);
}

/* Title */
.starter-slide__title {
    font-size: clamp(1.3rem, 3vw, 2.2rem);
    font-weight: 700;
    line-height: 1.25;
    margin: 0 0 16px;
    color: #fff;
    letter-spacing: -0.02em;
    max-width: 72ch;
    opacity: 0;
    transform: translateY(24px);
    transition: transform 0.65s cubic-bezier(0.23, 1, 0.32, 1), 
                opacity 0.65s cubic-bezier(0.23, 1, 0.32, 1);
}

/* Excerpt */
.starter-slide__excerpt {
    font-size: clamp(0.9rem, 1.8vw, 1.1rem);
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.78);
    margin: 0 0 28px;
    max-width: 527px;
    width: 100%;
    opacity: 0;
    transform: translateY(24px);
    transition: transform 0.65s cubic-bezier(0.23, 1, 0.32, 1), 
                opacity 0.65s cubic-bezier(0.23, 1, 0.32, 1);
}

/* ------------------------------------------------------------------ */
/*  Button – Modern & Professional                                      */
/* ------------------------------------------------------------------ */
.starter-slide__btn {
    display: inline-block;
    padding: 13px 32px;
    border-radius: 7px;
    color: #fff;
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: background-color 0.22s ease,
                transform 0.22s ease,
                box-shadow 0.22s ease;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.30);
    white-space: nowrap;
    cursor: pointer;
}

/* Button wrapper centering */
.starter-slide .starter-slide__btn-wrap {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transform: translateY(24px);
    transition: transform 0.65s cubic-bezier(0.23, 1, 0.32, 1), 
                opacity 0.65s cubic-bezier(0.23, 1, 0.32, 1);
}

/* Staggered slide in up animations when active */
.starter-slide.is-active .starter-slide__title {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.1s;
}
.starter-slide.is-active .starter-slide__excerpt {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.22s;
}
.starter-slide.is-active .starter-slide__btn-wrap {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.34s;
}

.starter-slide__btn:hover,
.starter-slide__btn:focus {
    color: #fff;
    text-decoration: none;
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.42);
    filter: brightness(1.12);
    outline: none;
}

.starter-slide__btn:active {
    transform: translateY(0) scale(1);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.30);
}

/* Navigation arrows */
.starter-slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.25);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
    backdrop-filter: blur(4px);
    z-index: 10;
    padding: 0;
}

.starter-slider-nav:hover {
    background: rgba(255, 255, 255, 0.28);
}

.starter-slider-prev { left: 12px; }
.starter-slider-next { right: 12px; }

/* Dot indicators */
.starter-slider-dots {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.starter-slider-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.35);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: background 0.25s ease, transform 0.25s ease;
}

.starter-slider-dot.is-active {
    background: #fff;
    transform: scale(1.35);
}

/* Clickable slide (no button mode) */
.starter-slide.is-clickable {
    cursor: pointer;
}

/* Hide dots when disabled via admin setting */
.starter-slider-wrapper.hide-dots .starter-slider-dots {
    display: none;
}

/* Empty state */
.starter-slider-empty {
    padding: 20px;
    color: #666;
    font-style: italic;
}

/* ------------------------------------------------------------------ */
/*  Responsive                                                          */
/* ------------------------------------------------------------------ */

@media (max-width: 768px) {
    .starter-slider-wrapper {
        height: 40vh !important;
        min-height: 220px !important;
        border-radius: 4px !important;
    }

    .starter-slide {
        padding: 20px 36px;
    }

    .starter-slide__title {
        font-size: clamp(1.2rem, 3.5vw, 1.6rem) !important;
        margin-bottom: 10px !important;
        padding-right: 28px; /* Sağ ok ile çakışmayı önlemek için */
        padding-left: 4px;
    }

    .starter-slide__excerpt {
        font-size: clamp(0.85rem, 2vw, 0.95rem) !important;
        margin-bottom: 16px !important;
        padding-right: 28px; /* Sağ ok ile çakışmayı önlemek için */
        padding-left: 4px;
    }

    .starter-slide__btn {
        padding: 10px 24px;
        font-size: 0.78rem;
    }

    .starter-slider-nav {
        width: 28px;
        height: 28px;
        font-size: 0.95rem;
    }

    .starter-slider-prev { left: 8px; }
    .starter-slider-next { right: 8px; }
}

@media (max-width: 480px) {
    .starter-slider-wrapper {
        width: 100% !important;
        border-radius: 0 !important; /* Edge-to-edge / Full width on mobile */
        height: 35vh !important;    /* Reduced height to prevent excessive vertical empty space */
        min-height: 190px !important;
    }

    .starter-slide {
        padding: 16px 20px; /* Reduced paddings so the text spans almost the entire width */
    }

    .starter-slide__title {
        font-size: 1.15rem !important; /* Clean font size for small phones */
        margin-bottom: 6px !important;  /* Reduced gap between elements */
        padding-right: 24px; /* Sağ ok ile çakışmayı kesin önlemek için ekstra iç boşluk */
        padding-left: 12px;  /* Sol ok ile çakışmayı önlemek için */
    }

    .starter-slide__excerpt {
        font-size: 0.82rem !important;
        margin-bottom: 12px !important; /* Reduced gap between elements */
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
        line-height: 1.5;
        padding-right: 24px; /* Sağ ok ile çakışmayı kesin önlemek için ekstra iç boşluk */
        padding-left: 12px;  /* Sol ok ile çakışmayı önlemek için */
    }

    .starter-slide__btn {
        padding: 8px 18px;
        font-size: 0.72rem;
        letter-spacing: 0.05em;
        margin-left: 12px; /* Butonu yazılarla aynı hizaya getirmek için */
    }

    .starter-slider-dots {
        bottom: 8px; /* Position dots slightly lower to save vertical space */
    }

    .starter-slider-nav {
        width: 24px;
        height: 24px;
        font-size: 0.85rem;
    }
}

/* ------------------------------------------------------------------ */
/*  Background image + overlay support                                  */
/* ------------------------------------------------------------------ */

/* When a custom bg image or uniform bg color is set, clear the default gradient on slides */
.starter-slider-wrapper.has-bg-image .starter-slide,
.starter-slider-wrapper.has-bg-image .starter-slide:nth-child(2n),
.starter-slider-wrapper.has-bg-image .starter-slide:nth-child(3n),
.starter-slider-wrapper.has-bg-image .starter-slide:nth-child(4n),
.starter-slider-wrapper.has-uniform-bg .starter-slide,
.starter-slider-wrapper.has-uniform-bg .starter-slide:nth-child(2n),
.starter-slider-wrapper.has-uniform-bg .starter-slide:nth-child(3n),
.starter-slider-wrapper.has-uniform-bg .starter-slide:nth-child(4n) {
    background: transparent;
}

/* Semi-transparent color overlay (only rendered when both image + color are set) */
.starter-slider-overlay {
    position: absolute;
    inset: 0;
    opacity: 0.45;
    pointer-events: none;
    z-index: 1;
}

/* Ensure track + slides sit above the overlay */
.starter-slider-wrapper.has-bg-image .starter-slider-track {
    position: relative;
    z-index: 2;
}

/* ------------------------------------------------------------------ */
/*  Reduced motion                                                      */
/* ------------------------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
    .starter-slide {
        transition: none;
    }

    .starter-slide__btn {
        transition: none;
    }

    .starter-slide__title,
    .starter-slide__excerpt,
    .starter-slide__btn-wrap {
        transform: none !important;
        opacity: 1 !important;
        transition: none !important;
    }
}

/* ------------------------------------------------------------------ */
/*  Split Layout (Banner Mode)                                        */
/* ------------------------------------------------------------------ */
.starter-slide.is-split {
    flex-direction: row;
    align-items: stretch !important;
    padding: 0 !important;
}

.starter-slide.is-split .starter-slide__content {
    width: 50%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 40px 70px;
    box-sizing: border-box;
    flex-shrink: 0;
}

.starter-slide.is-split .starter-slide__image {
    width: 50%;
    height: 100%;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .starter-slide.is-split .starter-slide__content {
        padding: 20px 36px;
    }
}

@media (max-width: 480px) {
    .starter-slide.is-split {
        flex-direction: column;
    }
    .starter-slide.is-split.layout-split_left {
        flex-direction: column; 
    }
    .starter-slide.is-split.layout-split_right {
        flex-direction: column-reverse; 
    }
    .starter-slide.is-split .starter-slide__image {
        width: 100%;
        height: 50%;
    }
    .starter-slide.is-split .starter-slide__content {
        width: 100%;
        height: 50%;
        padding: 16px 20px;
    }
}}
