/* Modern Timeline Design */
.saree-timeline {
    padding: 80px 0;
    background: linear-gradient(135deg, #fff6e6 0%, #fff 100%);
    position: relative;
    overflow: hidden;
}

.timeline-header {
    text-align: center;
    margin-bottom: 80px;
    position: relative;
    z-index: 1;
}

.timeline-header h2 {
    font-size: 48px;
    background: linear-gradient(45deg, #dc3545, #8b4513);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 20px;
    font-family: 'Playfair Display', serif;
}

.timeline-header .subtitle {
    font-size: 18px;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

.timeline-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    padding: 40px 0;
}

.timeline-wrapper::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, 
        transparent,
        rgba(220, 53, 69, 0.3) 15%,
        rgba(220, 53, 69, 0.8) 50%,
        rgba(220, 53, 69, 0.3) 85%,
        transparent
    );
}

.timeline-item {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    margin-bottom: 100px;
    opacity: 0;
    transform: translateY(50px);
    animation: fadeInUp 0.8s ease forwards;
}

.timeline-item:nth-child(even) {
    flex-direction: row-reverse;
}

.timeline-item {
    animation-delay: calc(var(--item-number) * 0.2s);
}

.timeline-item:nth-child(1) { --item-number: 1; }
.timeline-item:nth-child(2) { --item-number: 2; }
.timeline-item:nth-child(3) { --item-number: 3; }
.timeline-item:nth-child(4) { --item-number: 4; }
.timeline-item:nth-child(5) { --item-number: 5; }

.timeline-item:last-child{
    margin-bottom: 0;
}

.timeline-date {
    min-width: 160px;
    padding: 15px 25px;
    background: linear-gradient(45deg, #dc3545, #8b4513);
    color: #fff;
    border-radius: 30px;
    text-align: center;
    font-weight: 600;
    position: relative;
    z-index: 2;
    box-shadow: 0 5px 20px rgba(220, 53, 69, 0.2);
    margin: 0 30px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.timeline-date:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(220, 53, 69, 0.3);
}

.timeline-content {
    width: calc(50% - 110px);
    background: #fff;
    padding: 0;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    transform-origin: center;
}

.timeline-content:hover {
    transform: translateY(-10px) scale(1.02);
}

.timeline-image {
    width: 100%;
    height: 250px;
    overflow: hidden;
    position: relative;
}

.timeline-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(220, 53, 69, 0.2) 100%
    );
    pointer-events: none;
}

.timeline-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.timeline-text {
    padding: 30px;
}

.timeline-text h3 {
    font-size: 24px;
    color: #333;
    margin-bottom: 15px;
    font-family: 'Playfair Display', serif;
    position: relative;
    display: inline-block;
}

.timeline-text h3::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 40px;
    height: 2px;
    background: #dc3545;
    transition: width 0.3s ease;
}

.timeline-content:hover .timeline-text h3::after {
    width: 100%;
}

.timeline-text .period {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(220, 53, 69, 0.1);
    border-radius: 20px;
    color: #dc3545;
    font-size: 14px;
    margin-bottom: 20px;
}

.timeline-text ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.timeline-text ul li {
    padding: 8px 0 8px 24px;
    position: relative;
    color: #666;
}

.timeline-text ul li::before {
    content: '✦';
    position: absolute;
    left: 0;
    color: #dc3545;
}

.timeline-content:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(220, 53, 69, 0.15);
}

.timeline-content:hover .timeline-image img {
    transform: scale(1.1);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    }
}

/* Decorative Elements */
.timeline-dot {
    width: 20px;
    height: 20px;
    background: #dc3545;
    border-radius: 50%;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    border: 4px solid #fff;
    box-shadow: 0 0 0 4px rgba(220, 53, 69, 0.3);
}

/* Horizontal Timeline Styles */
.horizontal-timeline {
    padding: 80px 0;
    background: linear-gradient(135deg, #fff6e6 0%, #fff 100%);
}

.timeline-title {
    text-align: center;
    margin-bottom: 50px;
}

.timeline-title h2 {
    font-size: 42px;
    background: linear-gradient(45deg, #dc3545, #8b4513);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-family: 'Playfair Display', serif;
}

.timelineSwiper {
    padding: 40px 60px !important;
    position: relative;
    overflow: hidden;
    height: 400px;
}

.timeline-item-h {
    background: #fff;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.timeline-item-h:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(220, 53, 69, 0.15);
}

.timeline-dot-h {
    width: 15px;
    height: 15px;
    background: #dc3545;
    border-radius: 50%;
    margin: 0 auto 20px;
    position: relative;
}

.timeline-dot-h::before {
    content: '';
    position: absolute;
    width: 200px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #dc3545, transparent);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.timeline-content-h {
    text-align: center;
}

.timeline-content-h h3 {
    font-size: 24px;
    color: #333;
    margin-bottom: 15px;
    font-family: 'Playfair Display', serif;
    position: relative;
    display: inline-block;
}

.timeline-content-h h3::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background: #dc3545;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    transition: width 0.3s ease;
}

.timeline-item-h:hover .timeline-content-h h3::after {
    width: 100%;
}

.timeline-content-h p {
    color: #666;
    font-size: 16px;
    line-height: 1.6;
}

/* Enhanced Swiper Navigation */
.swiper-button-next,
.swiper-button-prev {
    background: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
    background: #dc3545;
    color: #fff !important;
    transform: scale(1.1);
}

.swiper-button-next::after,
.swiper-button-prev::after {
    font-size: 18px !important;
}

/* Add pagination styles */
.swiper-pagination {
    position: relative;
    margin-top: 30px;
}

.swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background: #ddd;
    opacity: 1;
    transition: all 0.3s ease;
}

.swiper-pagination-bullet-active {
    width: 30px;
    border-radius: 5px;
    background: #dc3545 !important;
}

/* Responsive Adjustments */
@media screen and (max-width: 991px) {
    .timeline-wrapper::before {
        left: 30px;
    }

    .timeline-item {
        flex-direction: column;
        align-items: flex-start;
        padding-left: 80px;
        margin-bottom: 60px;
    }

    .timeline-item:nth-child(even) {
        flex-direction: column;
    }

    .timeline-date {
        margin: 0 0 20px 0;
        min-width: auto;
    }

    .timeline-content {
        width: 100%;
    }

    .timeline-dot {
        left: 30px;
    }

    .timeline-header h2 {
        font-size: 36px;
    }
}

@media screen and (max-width: 768px) {
    .saree-timeline {
        padding: 40px 0;
    }

    .timeline-header {
        margin-bottom: 40px;
    }

    .timeline-header h2 {
        font-size: 28px;
    }

    .timeline-header .subtitle {
        font-size: 16px;
    }

    .timeline-text h3 {
        font-size: 20px;
    }

    .timeline-image {
        height: 200px;
    }

    .timeline-text {
        padding: 20px;
    }
}

@media screen and (max-width: 480px) {
    .timeline-date {
        padding: 10px 20px;
        font-size: 14px;
    }

    .timeline-header h2 {
        font-size: 24px;
    }

    .timeline-text ul li {
        font-size: 14px;
    }

    .timeline-image {
        height: 180px;
    }

    .timeline-wrapper {
        padding: 20px 0;
    }

    .timeline-item {
        padding-left: 60px;
    }

    .timeline-wrapper::before {
        left: 20px;
    }

    .timeline-dot {
        left: 20px;
        width: 16px;
        height: 16px;
    }
}