/* css/index.css - Styles specific to index.html */

/* === Index Page Specific Hero Styles === */
.ds-page-index .ds-section--hero { /* Targets .ds-section--hero only on the index page */
    min-height: 100vh;
    display: flex;
    align-items: center;
    
    /* --- MODIFIED --- */
    flex-wrap: wrap; /* Allows items to stack vertically when space is limited */
    justify-content: center; /* Centers items horizontally, looks better when wrapped */
    gap: 40px; /* Adds consistent spacing between text and device */

    padding-top: var(--ds-header-height);
    padding-right: 5%; /* Reduced padding slightly for better mobile fit */
    padding-bottom: 60px;
    padding-left: 5%; /* Reduced padding slightly for better mobile fit */
    position: relative;
    overflow: hidden; /* Keep this to prevent animation artifacts from spilling */
    background-color: transparent;
}
.ds-page-index .ds-section--hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, rgba(var(--ds-primary-color-rgb, 110, 0, 255), 0.3) 0%, rgba(10, 10, 24, 0.85) 70%); /* Using --ds-primary-color-rgb if defined, else direct values */
    pointer-events: none;
    z-index: 1;
}

.ds-page-index .ds-hero__content { /* Targets .ds-hero__content within the index page hero */
    max-width: 600px;
    z-index: 2;
    position: relative; /* For z-index */
    /* text-align: left; /* Ensure text is left-aligned if not by default */
}

.ds-page-index .ds-hero__title { /* Targets h1 within index page hero */
    font-size: 3.5rem;
    margin-bottom: 10px;
    line-height: 1.2;
    color: var(--ds-light-text); /* Explicitly set if needed */
}

.ds-page-index .ds-hero__subtitle { /* Targets h2 within index page hero */
    font-size: 1.2rem;
    color: var(--ds-secondary-color); /* Use CSS variable */
    margin-bottom: 20px;
}

.ds-page-index .ds-hero__tagline { /* Targets p (tagline) within index page hero */
    font-size: 1.2rem;
    margin-bottom: 30px;
    color: var(--ds-light-text); /* Or --ds-gray-text if preferred */
}

/* Hero Section - Dream Device Animation */
.ds-page-index .ds-hero__dream-device { /* Was .dream-device */
    position: relative;
    width: 300px; /* Or responsive units */
    height: 300px;
    z-index: 2; /* Above hero overlay */
    /* Add margin or positioning if needed for layout against hero-content */
}

.ds-page-index .ds-hero__device-container { /* Was .device-container */
    position: relative;
    width: 100%;
    height: 100%;
}

.ds-page-index .ds-hero__device-circle { /* Was .device-circle */
    position: absolute;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--ds-primary-light) 0%, var(--ds-primary-color) 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 50px var(--ds-primary-color);
    animation: ds-pulse-animation 4s infinite alternate;
}

.ds-page-index .ds-hero__device-pulse {
    position: absolute;
    /* --- MODIFIED --- */
    /* Set the size directly here, not in the animation */
    width: 300px; 
    height: 300px;
    border-radius: 50%;
    border: 2px solid var(--ds-secondary-color);
    top: 50%;
    left: 50%;
    /* --- MODIFIED --- */
    /* Start the element at scale(0) to make it invisible */
    transform: translate(-50%, -50%) scale(0);
    animation: ds-ripple-animation 2s infinite;
    opacity: 0;
}

@keyframes ds-pulse-animation {
    0% {
        box-shadow: 0 0 30px var(--ds-primary-color);
        transform: translate(-50%, -50%) scale(0.95);
    }
    100% {
        box-shadow: 0 0 60px var(--ds-primary-color), 0 0 100px rgba(var(--ds-primary-light-rgb), 0.3);
        transform: translate(-50%, -50%) scale(1.05);
    }
}

@keyframes ds-ripple-animation {
    0% {
        /* --- MODIFIED --- */
        transform: translate(-50%, -50%) scale(0);
        opacity: 1;
    }
    100% {
        /* --- MODIFIED --- */
        transform: translate(-50%, -50%) scale(1);
        opacity: 0;
    }
}

/* === Story Timeline Section (Replaces Concept Section) === */
.ds-section--story {
    background: radial-gradient(ellipse at center, rgba(var(--ds-primary-color-rgb, 110, 0, 255), 0.3) 0%, rgba(10, 10, 24, 0.85) 70%);
}

.ds-story-timeline {
    position: relative;
    max-width: 900px;
    margin: 40px auto 0;
    padding: 20px 0;
}

/* The central vertical line of the timeline */
.ds-story-timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 100%;
    /* --- MODIFIED --- */
    /* Increased opacity from 0.3 to 0.6 to make the line more solid. */
    background: rgba(var(--ds-primary-light-rgb), 0.6);
    /* --- ADDED --- */
    /* Added a subtle glow using the bright secondary color to make it pop. */
    box-shadow: 0 0 8px rgba(var(--ds-secondary-color-rgb), 0.5);
}

.ds-story-timeline__item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
    /* Animation setup */
    opacity: 0;
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    transition-delay: calc(0.2s * var(--i)); /* Staggered animation delay */
}

/* Position items on alternating sides */
.ds-story-timeline__item:nth-child(odd) {
    left: 0;
    transform: translateX(-50px);
}

.ds-story-timeline__item:nth-child(even) {
    left: 50%;
    transform: translateX(50px);
}

.ds-story-timeline__item.is-visible {
    opacity: 1;
    transform: translateX(0);
}

.ds-story-timeline__content {
    padding: 20px 30px;
    background: var(--ds-card-bg);
    position: relative;
    border-radius: 8px;
    border: 1px solid var(--ds-glass-effect);
    transition: border-color 0.3s ease; /* Added transition for smooth hover */
}
.ds-story-timeline__item:hover .ds-story-timeline__content {
    border-color: var(--ds-primary-light);
}

.ds-story-timeline__year {
    font-size: 1.5rem;
    color: var(--ds-secondary-color);
    margin-bottom: 5px;
}

.ds-story-timeline__event-title {
    font-size: 1.1rem;
    color: var(--ds-light-text);
    margin-bottom: 10px;
    text-transform: none;
}

.ds-story-timeline__event-desc {
    font-size: 0.95rem;
    color: var(--ds-gray-text);
    line-height: 1.7;
}

.ds-story-timeline__dot {
    position: absolute;
    top: 28px;
    width: 20px;
    height: 20px;
    background: var(--ds-dark-bg);
    border: 4px solid var(--ds-primary-light);
    border-radius: 50%;
    z-index: 10;
    transition: transform 0.3s ease;
}
.ds-story-timeline__item:hover .ds-story-timeline__dot {
    transform: scale(1.2);
}

.ds-story-timeline__item:nth-child(odd) .ds-story-timeline__dot {
    right: -10px;
}

.ds-story-timeline__item:nth-child(even) .ds-story-timeline__dot {
    left: -10px;
}

.ds-story-timeline__content::before {
    content: " ";
    height: 0;
    position: absolute;
    top: 28px;
    width: 0;
    z-index: 1;
    border: medium solid transparent; /* Set to transparent initially */
    transition: border-color 0.3s ease; /* Added transition */
}

.ds-story-timeline__item:nth-child(odd) .ds-story-timeline__content::before {
    right: -15px;
    border-width: 10px 0 10px 15px;
    border-left-color: var(--ds-glass-effect); /* Match initial border */
}
.ds-story-timeline__item:hover:nth-child(odd) .ds-story-timeline__content::before {
    border-left-color: var(--ds-primary-light); /* Match hover border */
}

.ds-story-timeline__item:nth-child(even) .ds-story-timeline__content::before {
    left: -15px;
    border-width: 10px 15px 10px 0;
    border-right-color: var(--ds-glass-effect); /* Match initial border */
}
.ds-story-timeline__item:hover:nth-child(even) .ds-story-timeline__content::before {
    border-right-color: var(--ds-primary-light); /* Match hover border */
}

.ds-story__cta-text {
    text-align: center;
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: var(--ds-gray-text);
}

.ds-section__footer {
    text-align: center;
    margin-top: 40px;
}

/* Responsive adjustments for the timeline */
@media (max-width: 768px) {
    .ds-story-timeline::before {
        left: 31px; /* Move the line to the left */
    }
    .ds-story-timeline__item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }
    .ds-story-timeline__item:nth-child(even) {
        left: 0; /* Stack all items on the left */
    }
    .ds-story-timeline__dot {
        left: 21px; /* Align dot with the new line position */
    }
    .ds-story-timeline__item:nth-child(odd) .ds-story-timeline__dot,
    .ds-story-timeline__item:nth-child(even) .ds-story-timeline__dot {
        left: 21px;
    }
    .ds-story-timeline__content::before {
        left: -15px;
        border-width: 10px 15px 10px 0;
        border-color: transparent var(--ds-card-bg) transparent transparent;
    }
}

/* Rooms Preview Section on Index Page */
.ds-section--rooms-preview {
    /* Specific background if different from default ds-section */
}

.ds-rooms-preview__grid { /* Was .rooms-container on index */
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Responsive grid */
    gap: 30px;
    margin-top: 40px; /* Space from section header */
    position: relative; /* For z-index if section has overlay */
    z-index: 2;
}

/* .ds-card--room-preview is a modifier of .ds-card, styles in main.css */
.ds-card--room-preview .ds-card__image-container {
    height: 220px; /* Specific height for preview cards */
}

.ds-card--room-preview .ds-card__actions .ds-btn--small { /* Example of a smaller button variant */
    padding: 8px 18px;
    font-size: 0.75rem;
}

.ds-section--rooms-preview .ds-section__footer {
    margin-top: 50px;
    text-align: center;
    position: relative;
    z-index: 2;
}


/* Testimonials Section on Index Page */
.ds-section--testimonials {
    /* background: linear-gradient(to bottom, var(--ds-darker-bg), var(--ds-dark-bg)); */ /* Already in main.css as --ds-section-bg */
    display: none; /* Remove this if you want to show testimonials */
}

.ds-testimonial-slider { /* Was .testimonials-slider */
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    margin-top: 40px; /* Space from section header */
    z-index: 2;
}

.ds-testimonial-slider__track {
    position: relative; /* For positioning testimonials if using absolute */
    overflow: hidden; /* If using a sliding mechanism */
}

.ds-card--testimonial { /* Was .testimonial */
    display: none; /* JS handles active state */
    animation: ds-fadeIn-animation 0.5s ease;
    /* background: var(--ds-card-bg); */ /* Handled by .ds-card */
    /* padding: 40px; */ /* Handled by .ds-card__body */
    /* border-radius: 10px; */ /* Handled by .ds-card */
    /* border: 1px solid var(--ds-glass-effect); */ /* Handled by .ds-card */
    position: relative; /* If not using a track that slides */
}
.ds-card--testimonial.active {
    display: block; /* Or flex if .ds-card is flex */
}

.ds-card--testimonial .ds-card__quote-icon { /* Was .quote i */
    font-size: 1.5rem;
    color: var(--ds-primary-light);
    margin-bottom: 10px;
    display: block; /* Or inline-block if preferred */
}

.ds-testimonial__author-info { /* Was .testimonial-author */
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
}
.ds-testimonial__author-name { /* Was .name */
    font-weight: 600;
    color: var(--ds-secondary-color);
}
.ds-testimonial__rating { /* Was .rating */
    color: var(--ds-secondary-color);
}
.ds-testimonial__rating i {
    margin-left: 2px;
}

.ds-testimonial-slider__controls { /* Was .slider-controls */
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 30px;
    gap: 20px;
}
.ds-testimonial-slider__btn { /* Was .prev-btn, .next-btn */
    background: none;
    border: none;
    color: var(--ds-light-text);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ds-testimonial-slider__btn:hover {
    background: var(--ds-primary-light);
    color: white;
}
.ds-testimonial-slider__dots-container { /* Was .slider-dots */
    display: flex;
    gap: 10px;
}
.ds-testimonial-slider__dot { /* Was .dot */
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--ds-gray-text);
    cursor: pointer;
    transition: all 0.3s ease;
}
.ds-testimonial-slider__dot.active {
    background: var(--ds-secondary-color);
    transform: scale(1.2);
}

@keyframes ds-fadeIn-animation {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Booking Preview Section on Index Page */
.ds-section--booking-preview {
    /* background: linear-gradient(to bottom, var(--ds-darker-bg), var(--ds-dark-bg)); */ /* Handled by --ds-section-bg */
    text-align: center; /* Center content within this section */
}
/* Optional overlay for this specific section if needed */
/* .ds-section--booking-preview::before { ... } */

.ds-booking-preview__content { /* Was .booking-preview-content */
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
    margin-top: 40px; /* Space from section header */
}
.ds-booking-preview__content .ds-section__subtitle { /* Overriding default subtitle margin if needed */
    margin-bottom: 40px;
}

.ds-booking-preview__info-blocks { /* Was .booking-preview-info */
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    margin-bottom: 40px;
}

.ds-card--info-block { /* Was .preview-info-block, now a modifier of .ds-card */
    width: 280px; /* Or use flex-basis for responsiveness */
    text-align: center; /* Center content within info blocks */
}
.ds-card--info-block .ds-card__icon-area { /* New element for icon */
    font-size: 2rem;
    color: var(--ds-primary-light);
    margin-bottom: 15px;
}
.ds-card--info-block .ds-card__title {
    color: var(--ds-secondary-color);
    font-size: 1.1rem; /* Override default .ds-card__title if needed */
}
.ds-card--info-block .ds-card__description {
    color: var(--ds-gray-text);
    font-size: 0.9rem; /* Override default .ds-card__description if needed */
    margin-bottom: 0; /* Remove bottom margin if it's the last element */
}
.ds-card--info-block .ds-card__description br { /* Ensure line breaks work */
    content: "";
    margin: 0.5em; /* Adjust spacing for <br> */
    display: block;
}


/* Responsive adjustments for index-specific elements */
@media (max-width: 1024px) {
    .ds-page-index .ds-section--hero {
        flex-direction: column;
        justify-content: center;
        text-align: center;
        
        /* --- MODIFIED & FINAL FIX --- */
        /* This is the key change: We explicitly override the desktop's percentage-based
           padding with a fixed unit (rem) for all tablet and mobile sizes. This
           prevents any width calculation errors and guarantees no overflow. */
        padding: calc(var(--ds-header-height) + 40px) 2rem 60px; /* top | left/right | bottom */
    }

    .ds-page-index .ds-hero__content {
        margin-bottom: 50px;
        max-width: 100%;
        /* Added for robustness in a flex column */
        width: 100%; 
        flex-basis: auto;
    }
    
    .ds-hero__content {
        max-width: 600px;
        margin-bottom: 40px;
    }
    
    /* This rule was missing from the original media query, causing stacking issues */
    .ds-section--hero {
        flex-direction: column;
    }
    
    .ds-concept__content-wrapper {
        flex-direction: column;
    }
    .ds-concept__image-area {
        margin-top: 30px;
    }
    .ds-concept__portal-container {
        width: 280px;
        height: 280px;
    }
}

@media (max-width: 768px) {
    .ds-page-index .ds-hero__title {
        font-size: 2.8rem; /* Adjust font size for mobile */
    }
     .ds-hero__dream-device {
        width: 250px;
        height: 250px;
    }
    .ds-hero__device-circle {
        width: 150px;
        height: 150px;
    }
    .ds-page-index .ds-hero__device-pulse {
        width: 250px;
        height: 250px;
    }
    .ds-rooms-preview__grid {
        grid-template-columns: 1fr; /* Single column for room previews */
    }
    .ds-card--room-preview {
        max-width: 380px;
        margin-left: auto;
        margin-right: auto;
    }

    .ds-booking-preview__info-blocks {
        flex-direction: column;
        align-items: center;
    }
    .ds-card--info-block { /* For booking preview on index */
        width: 100%;
        max-width: 350px;
    }
}

@media (max-width: 480px) {
    .ds-hero__title {
        font-size: 2rem;
    }
    .ds-hero__subtitle {
        font-size: 1rem;
    }
    .ds-hero__cta-buttons {
        flex-direction: column;
        gap: 15px;
        align-items: center; /* Center buttons when stacked */
    }
    .ds-hero__cta-buttons .ds-btn {
        width: 100%;
        max-width: 280px; /* Limit button width */
    }
}