/* =========================================================
   Smart & Stylish Living
   =========================================================

   Sections:
   1. Design Tokens (CSS Variables)
   2. Section Background
   3. Heading & Navigation Buttons
   4. Swiper / Image Slider
   5. Content Panel & Card
   6. Content Card — Typography & Hover
   7. Responsive
   ========================================================= */


/* ── 1. Design Tokens ────────────────────────────────────
   Edit colors here only — all components inherit from these.
   -------------------------------------------------------- */
:root {
    /* Palette */
    --ssl-bg:          #353631;   /* section / heading background */
    --ssl-bg-dark:     #1e1e1c;   /* active / focus state */
    --ssl-card-bg:     rgba(255, 255, 255, 0.7);
    --ssl-text:        #353631;   /* primary card text */
    --ssl-text-hover:  #333;      /* text hover state */
    --ssl-white:       #ffffff;

    /* Borders */
    --ssl-divider:     rgba(255, 255, 255, 0.42);

    /* Animations */
    --ssl-fade-speed:  1.2s;      /* image fade */
    --ssl-hover-speed: 0.3s;      /* hover transitions */
}


/* ── 2. Section Background ───────────────────────────────
   Pseudo-element for full-viewport width without breaking
   the container layout.
   -------------------------------------------------------- */
.sm-st-living {
    position: relative;
}

/* Anchor point για absolute positioned children */
.sm-st-living__body {
    position: relative;
}

/* Full-viewport background */
.sm-st-living-section::before {
    content: "";
    background-color: var(--ssl-bg);
    width: 100vw;
    height: 100%;
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
}


/* ── 3. Heading & Navigation Buttons ────────────────────
   Title + prev/next arrows above the slider.
   -------------------------------------------------------- */
.sm-st-living__heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    border-bottom: 4px solid var(--ssl-divider);
    padding-bottom: 0.5rem;
    margin-bottom: 2rem;
}

.sm-st-living__heading h2 {
    color: var(--ssl-white);
    font-weight: 700;
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 0;
}

.sm-st-living .swiper-btn-container {
    display: flex;
    gap: 0.5rem;
}

.sm-st-living__heading button {
    margin-bottom: 0;
    border-radius: 50%;
    height: 50px;
    width: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1rem;
}

.sm-st-living__heading button svg {
    width: 24px;
    height: 8px;
    flex-shrink: 0;
}

@media (hover: hover) {
    .sm-st-living__heading button:hover {
        background-color: var(--ssl-bg);
        color: var(--ssl-white);
    }
}

.sm-st-living__heading button:focus {
    background-color: var(--ssl-bg-dark);
    color: var(--ssl-white);
}


/* ── 4. Swiper / Image Slider ────────────────────────────
   Swiper handles the slide transition; we only add the img fade.
   -------------------------------------------------------- */
.sm-st-living-slider {
    width: 100%;
    overflow: hidden;
    min-width: 0;
    max-width: 100%;
}

.sm-st-living-slider .swiper-slide a {
    display: block;
    line-height: 0;
}

/* All images start transparent — only the active slide fades in */
.sm-st-living-slider .swiper-slide img {
    opacity: 0;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity var(--ssl-fade-speed) ease;
}

.sm-st-living-slider .swiper-slide-active img {
    opacity: 1;
}


/* ── 5. Content Panel & Card ─────────────────────────────
   Absolute overlay on top of the image (right side).
   The card background stays static — only the inner <a>
   runs the clip-path reveal driven by JS.
   -------------------------------------------------------- */
.sm-st-living__content-panel {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 48%;
    height: 100%;
    z-index: 2;
    display: flex;
    align-items: center;
}

/* Card background — no animation */
.sm-st-living__content-card {
    width: 100%;
    display: flex;
    flex-direction: column;
    background-color: var(--ssl-card-bg);
    padding: 2rem;
}

/* The <a> receives its clip-path reveal from JS */
.sm-st-living__content-card a {
    display: flex;
    flex-direction: column;
    gap: 12px;
    height: 100%;
    text-decoration: none;
    color: inherit;
    -webkit-clip-path: inset(0 0 0 0);
    clip-path: inset(0 0 0 0);
    will-change: clip-path;
}


/* ── 6. Content Card — Typography & Hover ────────────────
   Hover effects scoped to (hover: hover) — no touch devices.
   -------------------------------------------------------- */
.sm-st-living__content-card a h3 {
    font-size: clamp(1.4rem, 2.5vw, 1.8rem);
    font-weight: 700;
    color: var(--ssl-text);
    line-height: 1;
    border-bottom: 4px double var(--ssl-text);
    margin: 0;
    padding-bottom: 1rem;
    transition: color var(--ssl-hover-speed) ease;
}

@media (hover: hover) {
    .sm-st-living__content-card a:hover h3 {
        color: var(--ssl-text-hover);
    }
}

.sm-st-living__content-card p {
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
    flex: 1;
}

.sm-st-living__content-card span {
    font-size: 0.75rem;
    color: var(--ssl-white);
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-top: auto;
    padding: 0.5rem 2rem;
    background-color: var(--ssl-bg);
    width: -webkit-fit-content;
    width: fit-content;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    transition: background-color var(--ssl-hover-speed) ease,
                color            var(--ssl-hover-speed) ease;
}

@media (hover: hover) {
    .sm-st-living__content-card a:hover span {
        background-color: var(--ssl-white);
        color: var(--ssl-text-hover);
    }

    .sm-st-living__content-card a:hover span svg line,
    .sm-st-living__content-card a:hover span svg polyline {
        stroke: var(--ssl-text-hover);
    }
}


/* ── 7. Responsive ───────────────────────────────────────
   Below 768px the content panel exits absolute positioning
   and stacks below the image.
   -------------------------------------------------------- */
@media (max-width: 768px) {
    .sm-st-living__content-panel {
        position: static;
        width: 100%;
        height: auto;
    }
}
