/* Vaikom Ashtami Temple Festival Section Styles - Unique Naming */

.ashtami-temple-section {
    max-width: 1400px;
    margin: 60px auto;
    padding: 0 20px;
}

.ashtami-section-header {
    text-align: center;
    margin-bottom: 50px;
    position: relative;
}

.ashtami-section-header::before {
    content: '🕉';
    display: block;
    font-size: 4rem;
    color: #dba56c;
    margin-bottom: 15px;
    animation: ashtamiPulse 2s ease-in-out infinite;
}

@keyframes ashtamiPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.1); }
}

.ashtami-section-title {
    font-size: 3rem;
    font-family: 'Gayathri Malayalam', sans-serif;;
    color: #8b4513;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}



/* Ashtami Main Events Grid */
.ashtami-main-events {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-bottom: 60px;
}

.ashtami-event-card {
    background: linear-gradient(135deg, #fff 0%, #fef9f3 100%);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(139, 69, 19, 0.15);
    transition: all 0.4s ease;
    border: 2px solid #f4e4d0;
    position: relative;
}

.ashtami-event-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, #d4a574, #8b4513, #d4a574);
    z-index: 1;
}

.ashtami-event-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 50px rgba(139, 69, 19, 0.25);
}

.ashtami-event-image {
    width: 100%;
    height: 300px;
    position: relative;
    overflow: hidden;
}

.ashtami-event-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ashtami-event-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(to top, rgba(0,0,0,0.5), transparent);
}

.ashtami-event-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.95);
    color: #8b4513;
    padding: 8px 20px;
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    z-index: 10;
}

.ashtami-event-content {
    padding: 30px;
}

.ashtami-event-date {
    display: inline-block;
    background: #fff3e6;
    color: #8b4513;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 15px;
    border: 1px solid #d4a574;
}

.ashtami-event-title {
    font-size: 1.8rem;
    color: #2c1810;
    margin-bottom: 15px;
    font-weight: 700;
    line-height: 1.3;
}

.ashtami-event-title a {
    color: #2c1810;
    text-decoration: none;
    transition: color 0.3s ease;
}

.ashtami-event-title a:hover {
    color: #8b4513;
}

.ashtami-event-description {
    color: #5a4a42;
    font-size: 1.4rem;
    line-height: 1.6;
    margin-bottom: 20px;
}

.ashtami-event-link {
    display: inline-flex;
    align-items: center;
    color: #8b4513;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.ashtami-event-link:hover {
    color: #d4a574;
    transform: translateX(5px);
}

.ashtami-event-link::after {
    content: '→';
    margin-left: 8px;
    font-size: 1.2rem;
}

/* Ashtami Sliding News Section with CSS-only Animation */
.ashtami-sliding-news-wrapper {
    margin-bottom: 60px;
    overflow: hidden;
}

.ashtami-sliding-news-header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 30px;
    padding: 0 10px;
}

.ashtami-sliding-news-title {
    font-size: 2rem;
    color: #8b4513;
    font-weight: 700;
    display: flex;
    align-items: center;
}

.ashtami-sliding-news-title::before {
    content: '📰';
    margin-right: 12px;
}

.ashtami-slider-container {
    overflow-x: auto;
    overflow-y: hidden;
    position: relative;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.ashtami-slider-container::-webkit-scrollbar {
    display: none;
}

.ashtami-slider-track {
    display: flex;
    gap: 20px;
    animation: ashtamiAutoSlide 30s linear infinite;
    animation-play-state: running;
}

.ashtami-slider-track:hover {
    animation-play-state: paused;
}

/* Ashtami Auto-slide animation - pauses at each item */
@keyframes ashtamiAutoSlide {
    0%, 10% { transform: translateX(0); }
    15%, 25% { transform: translateX(calc(-33.333% - 20px)); }
    30%, 40% { transform: translateX(calc(-66.666% - 40px)); }
    45%, 55% { transform: translateX(calc(-100% - 60px)); }
    60%, 70% { transform: translateX(calc(-133.333% - 80px)); }
    75%, 85% { transform: translateX(calc(-166.666% - 100px)); }
    90%, 100% { transform: translateX(0); }
}

.ashtami-news-card {
    min-width: calc(33.333% - 14px);
    max-width: calc(33.333% - 14px); /* ✅ CRITICAL FIX */
    flex-shrink: 0;
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border-left: 4px solid #d4a574;
}

.ashtami-news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(139, 69, 19, 0.2);
}

.ashtami-news-image {
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: linear-gradient(135deg, #d4a574, #a0522d);
}

.ashtami-news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ashtami-news-content {
    padding: 20px;
}

.ashtami-news-category {
    display: inline-block;
    background: #fff3e6;
    color: #8b4513;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.ashtami-news-title {
    font-size: 1.6rem;
    color: #2c1810;
    margin-bottom: 10px;
    font-weight: 600;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ashtami-news-title a {
    color: #2c1810;
    text-decoration: none;
    transition: color 0.3s ease;
}

.ashtami-news-title a:hover {
    color: #8b4513;
}

.ashtami-news-excerpt {
    color: #666;
    font-size: 1.2rem;
    line-height: 1.5;
    margin-bottom: 0; 
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical; /* MUST come before line-clamp */
    -webkit-line-clamp: 3;
    
    word-break: break-word;
    white-space: normal; /* Force multi-line */
}

/* Ashtami Dedicated Writer Section */
/* .ashtami-writer-section {
    background: linear-gradient(135deg, #2c1810 0%, #4a3529 100%);
    border-radius: 25px;
    padding: 50px;
    color: white;
    position: relative;
    overflow: hidden;
}

.ashtami-writer-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(212, 165, 116, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.ashtami-writer-section::after {
    content: '🕉';
    position: absolute;
    bottom: 20px;
    right: 40px;
    font-size: 8rem;
    opacity: 0.05;
}

.ashtami-writer-header {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-bottom: 40px;
    position: relative;
    z-index: 1;
}

.ashtami-writer-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, #d4a574, #8b4513);
    border: 5px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    overflow: hidden;
}

.ashtami-writer-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ashtami-writer-info {
    flex: 1;
}

.ashtami-writer-badge {
    display: inline-block;
    background: rgba(212, 165, 116, 0.2);
    color: #d4a574;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 10px;
    border: 1px solid rgba(212, 165, 116, 0.3);
}

.ashtami-writer-name {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: #d4a574;
}

.ashtami-writer-title {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 400;
}

.ashtami-writer-articles {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    position: relative;
    z-index: 1;
} */

/* .ashtami-article-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 25px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.ashtami-article-card:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-5px);
    border-color: #d4a574;
}

.ashtami-article-date {
    color: #d4a574;
    font-size: 0.85rem;
    margin-bottom: 12px;
    font-weight: 600;
}

.ashtami-article-title {
    font-size: 1.5rem;
    color: white;
    margin-bottom: 12px;
    font-weight: 600;
    line-height: 1.4;
}

.ashtami-article-title a {
    color: white;
    text-decoration: none;
    transition: color 0.3s ease;
}

.ashtami-article-title a:hover {
    color: #d4a574;
}

.ashtami-article-excerpt {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 15px;
    
    
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    word-break: break-word;
}

.ashtami-read-more {
    color: #d4a574;
    font-size: 1.4rem;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    transition: all 0.3s ease;
}

.ashtami-read-more:hover {
    color: white;
    transform: translateX(5px);
}

.ashtami-read-more::after {
    content: '→';
    margin-left: 6px;
} */

/* Tablet Responsive */
@media (max-width: 1024px) {
    .ashtami-main-events {
        grid-template-columns: 1fr;
    }

    .ashtami-news-card {
        min-width: calc(50% - 10px);
    }

    @keyframes ashtamiAutoSlide {
        0%, 12% { transform: translateX(0); }
        17%, 29% { transform: translateX(calc(-50% - 10px)); }
        34%, 46% { transform: translateX(calc(-100% - 20px)); }
        51%, 63% { transform: translateX(calc(-150% - 30px)); }
        68%, 80% { transform: translateX(calc(-200% - 40px)); }
        85%, 100% { transform: translateX(0); }
    }

    .ashtami-writer-articles {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .ashtami-temple-section {
        margin: 40px auto;
        padding: 0 15px;
    }

    .ashtami-section-header {
        margin-bottom: 35px;
    }

    .ashtami-section-header::before {
        font-size: 2rem;
        margin-bottom: 10px;
    }

    .ashtami-section-title {
        font-size: 2rem;
    }

    .ashtami-main-events {
        gap: 20px;
        margin-bottom: 40px;
    }

    .ashtami-event-image {
        height: 220px;
    }

    .ashtami-event-content {
        padding: 20px;
    }

    .ashtami-event-title {
        font-size: 1.6rem;
    }

    .ashtami-event-description {
        font-size: 1.2rem;
    }

    .ashtami-sliding-news-wrapper {
        margin-bottom: 40px;
    }

    .ashtami-sliding-news-header {
        margin-bottom: 20px;
    }

    .ashtami-sliding-news-title {
        font-size: 1.6rem;
    }

    /* Mobile: One card at a time */
    .ashtami-news-card {
        min-width: calc(100% - 0px);
    }

    @keyframes ashtamiAutoSlide {
        0%, 14% { transform: translateX(0); }
        16%, 30% { transform: translateX(calc(-100% - 20px)); }
        32%, 46% { transform: translateX(calc(-200% - 40px)); }
        48%, 62% { transform: translateX(calc(-300% - 60px)); }
        64%, 78% { transform: translateX(calc(-400% - 80px)); }
        80%, 100% { transform: translateX(0); }
    }

    .ashtami-slider-container {
        padding-bottom: 10px;
    }

    .ashtami-slider-track {
        animation-duration: 35s;
    }

    .ashtami-news-image {
        height: 160px;
    }

    .ashtami-news-content {
        padding: 15px;
    }

    /* .ashtami-writer-section {
        padding: 30px 20px;
        border-radius: 20px;
    }

    .ashtami-writer-header {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }

    .ashtami-writer-avatar {
        width: 100px;
        height: 100px;
    }

    .ashtami-writer-name {
        font-size: 1.7rem;
    }

    .ashtami-writer-articles {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .ashtami-article-card {
        padding: 20px;
    }

    .ashtami-writer-section::after {
        font-size: 5rem;
        right: 20px;
    }

    .ashtami-writer-section::before {
        width: 300px;
        height: 300px;
    } */
    /* === FIX: ASHTAMI TEMPLE SECTION === */
    .ashtami-temple-section {
        margin: 30px 0;
        padding: 0 10px;
    }

    .ashtami-main-events,
/*     .ashtami-writer-section {
        margin-left: 0;
        margin-right: 0;
    } */


}

/* Small Mobile Responsive */
@media (max-width: 480px) {
    .ashtami-temple-section {
        margin: 30px auto;
    }

    .ashtami-section-title {
        font-size: 1.6rem;
    }

    .ashtami-section-subtitle {
        font-size: 0.9rem;
    }

    .ashtami-event-badge {
        padding: 6px 15px;
        font-size: 0.75rem;
        top: 15px;
        right: 15px;
    }

    .ashtami-event-title {
        font-size: 1.2rem;
    }

    .ashtami-event-description {
        font-size: 0.9rem;
    }

    .ashtami-event-date {
        font-size: 0.8rem;
        padding: 5px 12px;
    }

    .ashtami-sliding-news-title {
        font-size: 1.3rem;
    }

    .ashtami-sliding-news-title::before {
        font-size: 1.3rem;
    }

    .ashtami-news-title {
        font-size: 1.05rem;
    }

    .ashtami-news-excerpt {
        font-size: 0.9rem;
    }

/*     .ashtami-writer-name {
        font-size: 1.5rem;
    } */

    .ashtami-article-title {
        font-size: 1.1rem;
    }
}





@media (max-width: 768px) {
    /* Make container full width on mobile */
    .container {
        max-width: 100%;
        padding: 0 10px; /* Minimal padding for breathing room */
    }
    
    /* Remove main-content side padding */
    .main-content {
        padding: 1rem 0;
    }
    
    /* Make all grids single-column */
    .sub-latest-grid,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .latest-news .latest-grid {
        display: block;
    }
    
    .featured-article {
        width: 100%;
        margin-bottom: 2rem;
    }
    
    .featured-article img {
        height: 250px;
        aspect-ratio: 16 / 9;
    }
    
    .featured-article .featured-overlay {
        top: auto;
        height: auto;
        position: relative;
        background: rgba(0, 0, 0, 0.8);
    }
    
    .side-articles {
        width: 100%;
        margin-top: 1rem;
    }
    
    /* Ensure cards fill screen width */
    .news-card,
    .local-news-card {
        width: 100%;
        max-width: 100%;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .featured-title {
        font-size: 1.6rem;
    }
    
    .featured-excerpt {
        font-size: 1.2rem;
    }
}


@media (max-width: 480px) {
    .container {
        padding: 0 8px; /* Even less padding on very small screens */
    }
    
    .main-content {
        padding: 0.5rem 0;
    }
}