/* Index/Home Page Modern Styles */

:root {
    --brand-primary: #9E7FA4;
    --brand-light: #B9A8BF;
    --brand-pale: rgba(158, 127, 164, 0.1);
    --text-dark: #2d3748;
    --text-muted: #718096;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --radius-md: 12px;
    --radius-lg: 16px;
}

.index-page-container {
    padding: 0;
    padding-top: 1rem;
}

/* Hero Section */
.index-hero {
    background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-light) 100%);
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: visible;
    --hero-pad-x: 2rem;
    padding: 4rem var(--hero-pad-x);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.index-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    max-width: 1100px;
    margin: 0 auto;
    width: 100%;
}

/* Keep the text at a readable line length while the gallery below uses the full width */
.index-hero-title,
.index-hero-subtitle {
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.index-hero-sidebar-left {
    position: fixed;
    left: 20px;
    top: 50%;
    transform: translateY(-50%) rotate(-90deg);
    transform-origin: center;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.3em;
    white-space: nowrap;
    color: #ffffff;
    z-index: 10;
}

.index-hero-sidebar-right {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%) rotate(90deg);
    transform-origin: center;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.3em;
    white-space: nowrap;
    color: #ffffff;
    z-index: 10;
}

.index-hero-title {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
    line-height: 1.1;
    color: #ffffff;
}

.index-hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    line-height: 1.6;
}

.index-hero-cta {
    padding: 0.875rem 2rem;
    background: white;
    color: var(--brand-primary);
    text-decoration: none;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 1.125rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.index-hero-cta:hover {
    background: rgba(255, 255, 255, 0.95);
    color: var(--brand-primary);
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
    text-decoration: none;
}

/* Hero showcase: native scroll-snap carousel showing one large slide, centred, with the
   neighbours peeking in. The track extends into the hero's side padding (still inside the
   hero box) so the slide can be as wide as possible; the svh term caps the width so a slide
   (4:5) is never taller than 7/8 of the viewport. */
.index-hero-showcase {
    --showcase-gap: 1.25rem;
    --showcase-interval: 5s; /* autoplay: time each slide stays before the next one */
    --showcase-slide: min(92%, 720px, 70svh);
    position: relative;
    margin: 3rem calc(-1 * var(--hero-pad-x)) 0;
}

.index-hero-showcase-track::before,
.index-hero-showcase-track::after {
    content: "";
    flex: 0 0 max(0px, calc((100% - var(--showcase-slide)) / 2 - var(--showcase-gap)));
}

.index-hero-showcase-track {
    position: relative;
    display: flex;
    gap: var(--showcase-gap);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    padding: 0.5rem 0 1.75rem; /* keeps slide shadows from being clipped */
}

.index-hero-showcase-track::-webkit-scrollbar {
    display: none;
}

.index-hero-showcase-track:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 4px;
}

.index-hero-showcase-slide {
    flex: 0 0 var(--showcase-slide);
    margin: 0;
    aspect-ratio: 4 / 5;
    border-radius: var(--radius-lg);
    overflow: hidden;
    scroll-snap-align: center;
    box-shadow: 0 8px 18px rgba(45, 27, 51, 0.18);
}

.index-hero-showcase-slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.index-hero-showcase-nav {
    position: absolute;
    top: calc(50% - 1.75rem); /* centre on the slides, not the dots below */
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    min-width: 0;
    padding: 0;
    line-height: 1;
    border: none;
    border-radius: 50%;
    background: #ffffff;
    color: var(--brand-primary);
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 1;
}

.index-hero-showcase-nav:hover {
    transform: translateY(-50%) scale(1.08);
}

.index-hero-showcase-nav:disabled {
    opacity: 0;
    pointer-events: none;
}

.index-hero-showcase-prev {
    left: 0.75rem;
}

.index-hero-showcase-next {
    right: 0.75rem;
}

.index-hero-showcase-dots {
    display: flex;
    justify-content: center;
    gap: 0.25rem;
}

.index-hero-showcase-dot {
    width: 32px;
    height: 24px;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.index-hero-showcase-dot::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.5);
    transition: width 0.25s ease, background 0.25s ease;
}

.index-hero-showcase-dot.is-active::before {
    width: 22px;
    background: #ffffff;
}

/* Depth: the centred slide is in focus, its peeking neighbours recede (JS sets .is-current) */
.index-hero-showcase.is-enhanced .index-hero-showcase-slide {
    transform: scale(0.92);
    opacity: 0.55;
    transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1), opacity 0.6s ease, box-shadow 0.6s ease;
}

.index-hero-showcase.is-enhanced .index-hero-showcase-slide.is-current {
    transform: none;
    opacity: 1;
    box-shadow: 0 16px 36px rgba(45, 27, 51, 0.28);
}

/* Autoplay: the active dot becomes a pill that fills up while the slide is shown; when the
   fill animation ends, JS advances to the next slide. Pausing freezes the fill. */
.index-hero-showcase.is-autoplay .index-hero-showcase-dot.is-active::before {
    width: 30px;
    background: linear-gradient(#ffffff, #ffffff) left / 0% 100% no-repeat, rgba(255, 255, 255, 0.45);
    animation: showcase-progress var(--showcase-interval) linear forwards;
}

.index-hero-showcase.is-autoplay.is-paused .index-hero-showcase-dot.is-active::before {
    animation-play-state: paused;
}

@keyframes showcase-progress {
    from { background-size: 0% 100%; }
    to { background-size: 100% 100%; }
}

.index-hero-showcase-toggle {
    display: none; /* only useful once autoplay is running */
    width: 28px;
    height: 28px;
    margin-left: 0.5rem;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    font-size: 0.95rem;
    line-height: 1;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease;
}

.index-hero-showcase-toggle:hover {
    background: rgba(255, 255, 255, 0.35);
}

.index-hero-showcase-toggle:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

.index-hero-showcase.is-autoplay .index-hero-showcase-toggle {
    display: flex;
}

.index-hero-showcase-toggle .bi-play-fill,
.index-hero-showcase-toggle[aria-pressed="true"] .bi-pause-fill {
    display: none;
}

.index-hero-showcase-toggle[aria-pressed="true"] .bi-play-fill {
    display: inline;
}

.index-hero-showcase-dots {
    align-items: center;
}

@media (prefers-reduced-motion: reduce) {
    .index-hero-showcase-nav,
    .index-hero-showcase-dot::before,
    .index-hero-showcase.is-enhanced .index-hero-showcase-slide {
        transition: none;
    }
}

/* About Section */
.index-about-section {
    padding: 5rem 0;
    background: white;
}

.index-about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.index-about-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.index-about-image img {
    max-width: 100%;
    height: auto;
    filter: drop-shadow(0 10px 25px rgba(158, 127, 164, 0.2));
    transition: all 0.3s ease;
}

.index-about-image img:hover {
    transform: scale(1.05) rotate(2deg);
}

.index-about-text {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.index-about-badge {
    display: inline-block;
    background: var(--brand-pale);
    color: var(--brand-primary);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    width: fit-content;
}

.index-about-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.2;
    margin: 0;
}

.index-about-description {
    font-size: 1.125rem;
    color: var(--text-muted);
    line-height: 1.8;
    text-align: justify;
    /* Hyphenation (uses the page's lang) keeps justified lines from leaving wide gaps on phones */
    hyphens: auto;
    -webkit-hyphens: auto;
}

/* Features Section */
.index-features-section {
    padding: 5rem 0;
}

.index-section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.index-section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.index-section-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
}

.index-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.index-feature-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
    border: 2px solid transparent;
}

.index-feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--brand-primary);
}

.index-feature-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-light) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: white;
    font-size: 2.5rem;
    transition: all 0.3s ease;
}

.index-feature-card:hover .index-feature-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 8px 20px rgba(158, 127, 164, 0.4);
}

.index-feature-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.index-feature-description {
    font-size: 1.05rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* CTA Section */
.index-cta-section {
    padding: 5rem 0;
    background: white;
}

.index-cta-card {
    background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-light) 100%);
    border-radius: var(--radius-lg);
    padding: 4rem 3rem;
    text-align: center;
    color: white;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.index-cta-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.index-cta-content {
    position: relative;
    z-index: 1;
}

.index-cta-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: white;
}

.index-cta-description {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    opacity: 0.95;
}

.index-cta-button {
    padding: 1.25rem 3rem;
    background: white;
    color: var(--brand-primary);
    text-decoration: none;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 1.25rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
}

.index-cta-button:hover {
    background: rgba(255, 255, 255, 0.95);
    color: var(--brand-primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    text-decoration: none;
}

/* Responsive Design */
@media (max-width: 992px) {
    .index-about-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .index-about-image {
        order: -1;
    }
}

@media (max-width: 768px) {
    .index-hero {
        min-height: 70vh;
        --hero-pad-x: 1.5rem;
        padding: 3rem var(--hero-pad-x);
    }

    .index-hero-sidebar-left,
    .index-hero-sidebar-right {
        display: none;
    }

    .index-hero-title {
        font-size: 2.5rem;
    }

    .index-hero-subtitle {
        font-size: 1.125rem;
    }

    .index-hero-cta {
        padding: 1rem 2rem;
        font-size: 1.125rem;
    }

    .index-hero-showcase {
        --showcase-gap: 0.75rem;
        margin-top: 2.5rem;
    }

    .index-about-section {
        padding: 3rem 0;
    }

    .index-about-title {
        font-size: 2rem;
    }

    .index-about-description {
        font-size: 1rem;
    }

    .index-features-section {
        padding: 3rem 0;
    }

    .index-section-title {
        font-size: 2rem;
    }

    .index-section-subtitle {
        font-size: 1.125rem;
    }

    .index-features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .index-feature-card {
        padding: 2rem;
    }

    .index-cta-section {
        padding: 3rem 0;
    }

    .index-cta-card {
        padding: 3rem 2rem;
    }

    .index-cta-title {
        font-size: 2rem;
    }

    .index-cta-description {
        font-size: 1.125rem;
    }

    .index-cta-button {
        padding: 1rem 2rem;
        font-size: 1.125rem;
    }
}

@media (max-width: 576px) {
    /* Edge-to-edge hero on phones: cancel the Bootstrap .container's 15px side padding */
    .index-hero {
        --hero-pad-x: 1rem;
        margin-left: -15px;
        margin-right: -15px;
        border-radius: 0;
    }

    /* Phones: swipe and dots only, arrows would cover the design */
    .index-hero-showcase-nav {
        display: none;
    }

    .index-hero-title {
        font-size: 2rem;
    }

    .index-hero-subtitle {
        font-size: 1rem;
    }

    .index-about-title {
        font-size: 1.75rem;
    }

    .index-section-title {
        font-size: 1.75rem;
    }

    .index-feature-icon {
        width: 60px;
        height: 60px;
        font-size: 2rem;
    }

    .index-cta-title {
        font-size: 1.75rem;
    }

    .index-cta-description {
        font-size: 1rem;
    }
}
