/* Home Page Specific Styles */
.home-container {
    display: flex;
    max-width: 1200px;
    margin: 2rem auto;
    gap: 1rem;
    padding: 0 1rem;
}

.left-section {
    flex: 0 0 70%;
    max-width: 70%;
    display: flex;
    flex-direction: column;
    gap: 1rem; /* Reduced from 2rem */
}

.right-section {
    flex: 0 0 30%;
    max-width: 30%;
    position: sticky;
    top: 1rem;
    height: fit-content;
    align-self: flex-start;
}

.ad-panel {
    background: white;
    border-radius: 8px;
    box-shadow: var(--card-shadow);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap:0.5rem;
}

.ad-panel .section-title {
    /* Reduce the space below the title. Adjust as needed. */
    margin-bottom: 0.5rem; 
}

.ad-placeholder {
    width: 100%;
    height: 250px;
    background: var(--light-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--light-text);
    border-radius: 4px;
}

.sponsor-image {
    width: 100%;
    border-radius: 4px;
    transition: var(--transition);
}

.sponsor-image:hover {
    opacity: 0.9;
}

/* Spa Tiles with Button */
.spa-tiles-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.spa-tile {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    cursor: pointer;
    text-decoration: none;
    color: var(--dark-text);
    position: relative;
    padding-right: 120px; /* Space for button */
}

.spa-tile:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.spa-tile-icon {
    width: 40px;
    height: 40px;
    margin-right: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--light-bg);
    border-radius: 50%;
    color: var(--rainbow-purple);
    flex-shrink: 0;
}

.spa-tile-content {
    flex: 1;
    min-width: 0;
}

.spa-tile-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--rainbow-purple);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.spa-tile-desc {
    font-size: 0.9rem;
    color: var(--light-text);
    display: -webkit-box;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.spa-tile-button {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: var(--rainbow-purple);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.spa-tile-button.disabled-button {
    background: rgba(var(--rainbow-purple-rgb), 0.2);
    color: var(--rainbow-purple);
    border: 1px solid var(--rainbow-purple);
    cursor: not-allowed;
}


.disabled-tile {
    cursor: default;
}

.disabled-tile:hover {
    transform: none;
    box-shadow: var(--card-shadow);
}


.spa-tile.disabled-tile .spa-tile-icon {
    opacity: 0.7;
}

.spa-tile.disabled-tile .spa-tile-title {
    color: #888;
}

/* Articles Section */
.section {
    margin-bottom: 1.5rem; /* Reduced spacing between sections */
}

.article-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.article-card {
    background: white;
    border-radius: 8px;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    cursor: pointer;
    text-decoration: none;
    color: var(--dark-text);
    overflow: hidden;
}

.article-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.article-card-content {
    padding: 1rem;
}

.article-card-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--rainbow-purple);
}

.article-card-excerpt {
    font-size: 0.9rem;
    color: var(--light-text);
    display: -webkit-box;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Videos Section */
.video-scroll-container {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 1rem;
    scrollbar-width: thin;
}

.video-item {
    min-width: 300px;
    background: white;
    border-radius: 8px;
    box-shadow: var(--card-shadow);
    overflow: hidden;
}

.video-iframe {
    width: 100%;
    height: 180px;
    border: none;
}

.video-title {
    padding: 0.75rem;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Responsive Design */
/* ... (all existing styles in home.css up to the media queries) ... */

@media (max-width: 768px) {
    .home-container {
        flex-direction: column;
    }

    .left-section,
    .right-section {
        flex: 1 1 100%;
        max-width: 100%;
        position: static;
    }

    .article-cards {
        grid-template-columns: 1fr;
    }

    .ad-panel {
        display: flex;
        flex-direction: column;
    }

    /* --- SLIDER STYLES START --- */

    .sponsor-images-container {
        overflow: hidden;
        width: 100%;
        -webkit-mask-image: linear-gradient(to right, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 10%, rgba(0,0,0,1) 90%, rgba(0,0,0,0) 100%);
        mask-image: linear-gradient(to right, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 10%, rgba(0,0,0,1) 90%, rgba(0,0,0,0) 100%);
    }
    
    .sponsor-scroll-track {
        display: flex;
        width: calc(140px * 6); /* Adjust '6' to your (number of sponsors * 2) */
        animation: scroll 15s linear infinite;
    }
    
    .sponsor-images-container:hover .sponsor-scroll-track {
        animation-play-state: paused;
    }

    .sponsor-images-container > div > a {
        flex-shrink: 0;
        width: 180px;
        height: 90px; 
        margin: 0 10px;
        display: flex;
        align-items: center;
        justify-content: center; /* Horizontally center the image */
    }
    
    /* Ensure the image scales correctly within the new, taller container */
    .sponsor-image {
        height: 100%;       /* Make the image as tall as the 90px container */
        width: auto;         /* Allow the width to adjust to maintain aspect ratio */
        object-fit: initial; /* Reset object-fit to its default behavior */
    }

    /* --- SLIDER STYLES END --- */

    .ad-placeholder {
        width: 100%;
        height: 200px;
        margin-top: 1rem;
    }

    .spa-tile {
        padding-right: 1rem;
    }

    .spa-tile-button {
        position: static;
        transform: none;
        margin-top: 0.5rem;
        display: inline-block;
    }
}


@media (max-width: 480px) {
    .sponsor-images-container > a {
        max-width: 48%; /* Adjust for 2 images per row on very small screens */
    }
}


@keyframes scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    /* This moves the track to the left by the width of the *original* set of images */
    transform: translateX(calc(-140px * 3)); /* Adjust '3' to your number of sponsors */
  }
}