/* Carousel Styles for Rosary73 Bead Hero Section */

.hero-carousel {
    padding-top: 120px;
    padding-bottom: 80px;
    background: linear-gradient(180deg, #E8F4FD 0%, #FFFFFF 100%);
    position: relative;
    overflow: hidden;
}

.hero-carousel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(255, 215, 0, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(93, 173, 226, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.hero-carousel-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.carousel-title {
    font-size: 2.5rem;  /* Reduced from 3rem */
    font-weight: 700;
    background: linear-gradient(135deg, #5DADE2 0%, #3498DB 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
    animation: fadeInUp 0.8s ease;
}

.carousel-subtitle {
    font-size: 1.1rem;  /* Reduced from 1.25rem */
    color: #5D6D7E;
    margin-bottom: 50px;
    animation: fadeInUp 1s ease;
}

/* Bead Carousel Container */
.bead-carousel-container {
    max-width: 900px;
    margin: 0 auto 50px;
    position: relative;
    background: white;
    border-radius: 24px;
    box-shadow: 0 10px 40px rgba(93, 173, 226, 0.15);
    padding: 60px;
    border: 2px solid rgba(255, 215, 0, 0.3);
    animation: fadeInUp 1.2s ease;
    overflow: hidden;  /* Prevent overflow */
}

.bead-carousel {
    position: relative;
    min-height: 450px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Carousel Slides */
.carousel-slide {
    display: none;
    text-align: center;
    animation: slideIn 0.5s ease;
}

.carousel-slide.active {
    display: block;
}

/* Desktop: 20% larger (320px * 1.2 = 384px) */
.bead-image-container {
    width: 384px;
    height: 384px;
    margin: 0 auto 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* Pulsing effect behind bead - now smaller since bead is bigger */
.bead-image-container::after {
    content: '';
    position: absolute;
    width: 408px;
    height: 408px;
    border: 2px solid rgba(93, 173, 226, 0.2);
    border-radius: 50%;
    animation: pulse 3s ease-in-out infinite;
}

/* Desktop: 20% larger (300px * 1.2 = 360px) */
.bead-visual {
    width: 360px;
    height: 360px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
    transform: rotate(-4deg); /* Slight rotation for natural look */
}

.bead-visual:hover {
    transform: rotate(4deg) scale(1.08);
}

/* Bead Image - fills the entire visual container */
.bead-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 15px 30px rgba(0, 0, 0, 0.35));
}

/* Fallback for when images aren't loaded - shows colored circles with icons */
.bead-visual.fallback {
    width: 336px;
    height: 336px;
    border-radius: 50%;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.3),
        inset 0 5px 20px rgba(255, 255, 255, 0.6),
        inset 0 -5px 20px rgba(0, 0, 0, 0.3);
    border: 3px solid rgba(255, 255, 255, 0.3);
}

/* Fallback Individual Bead Solid Colors - only used if images fail to load */
.bead-start.fallback {
    background: #8B3A8B;
    background-image: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.4), transparent 70%);
}

.bead-participate.fallback {
    background: #DC143C;
    background-image: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.4), transparent 70%);
}

.bead-record.fallback {
    background: #FF8C00;
    background-image: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.4), transparent 70%);
}

.bead-finished.fallback {
    background: #008B8B;
    background-image: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.4), transparent 70%);
}

.bead-group.fallback {
    background: #4682B4;
    background-image: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.4), transparent 70%);
}

.bead-gift.fallback {
    background: #FFD700;
    background-image: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.4), transparent 70%);
}

.bead-subscribe.fallback {
    background: #5DADE2;
    background-image: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.4), transparent 70%);
}

/* Bead Icon - only shown in fallback mode */
.bead-icon {
    font-size: 90px;
    color: white;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.3));
    display: none; /* Hidden by default when using images */
}

.fallback .bead-icon {
    display: block; /* Show icon only in fallback mode */
}

/* Chain connecting beads - optional visual element */
.bead-chain {
    position: absolute;
    width: 4px;
    height: 60px;
    background: linear-gradient(to bottom, #8B7355, #6B5D54);
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
    opacity: 0.3;
}

.bead-title {
    font-size: 1.75rem;  /* Reduced from 2rem */
    color: #2C3E50;
    margin-bottom: 20px;
    font-weight: 700;
}

.bead-description {
    font-size: 1rem;  /* Reduced from 1.125rem */
    color: #5D6D7E;
    line-height: 1.8;
    max-width: 600px;
    margin: 0 auto;
}

/* Carousel Navigation */
.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, #5DADE2, #3498DB);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: 0 4px 15px rgba(93, 173, 226, 0.3);
}

.carousel-nav:hover {
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 20px rgba(93, 173, 226, 0.4);
}

.carousel-prev {
    left: -25px;
}

.carousel-next {
    right: -25px;
}

/* Carousel Indicators */
.carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #D5DBDB;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.indicator.active {
    background: #FFD700;
    width: 30px;
    border-radius: 6px;
    border-color: #DAA520;
}

.indicator:hover {
    background: #AED6F1;
    transform: scale(1.2);
}

/* Hero Buttons */
.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    animation: fadeInUp 1.4s ease;
}

.blessing-text {
    color: #DAA520;
    font-style: italic;
    font-size: 1rem;  /* Reduced from 1.1rem */
    padding: 20px;
    background: #FFF8DC;
    border-radius: 16px;
    border-left: 4px solid #FFD700;
    max-width: 600px;
    margin: 0 auto;
    animation: fadeInUp 1.6s ease;
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.3;
    }
    100% {
        transform: scale(1);
        opacity: 0.5;
    }
}

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

/* Mobile Responsive - 20% larger (240px * 1.2 = 288px) */
@media (max-width: 768px) {
    .carousel-title {
        font-size: 1.75rem;  /* Reduced from 2rem */
    }
    
    .carousel-subtitle {
        font-size: 0.9rem;  /* Reduced from 1rem */
    }
    
    .bead-carousel-container {
        padding: 40px 20px;
        margin: 0 20px 40px;
    }
    
    /* Mobile: 20% larger */
    .bead-image-container {
        width: 288px;
        height: 288px;
    }
    
    .bead-visual {
        width: 264px;
        height: 264px;
    }
    
    .bead-visual.fallback {
        width: 240px;
        height: 240px;
    }
    
    .bead-icon {
        font-size: 72px;
    }
    
    .bead-title {
        font-size: 1.3rem;  /* Reduced from 1.5rem */
    }
    
    .bead-description {
        font-size: 0.9rem;  /* Reduced from 1rem */
    }
    
    .carousel-nav {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .carousel-prev {
        left: 10px;
    }
    
    .carousel-next {
        right: 10px;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .blessing-text {
        font-size: 0.9rem;  /* Reduced from 1rem */
        margin: 0 20px;
    }
}

/* Small Mobile - Fixed to prevent overflow */
@media (max-width: 480px) {
    .bead-carousel-container {
        padding: 20px 10px;  /* Reduced padding */
        margin: 0 10px 30px;  /* Reduced margins */
        overflow: hidden;
    }
    
    .bead-carousel {
        min-height: 380px;  /* Reduced height */
        overflow: hidden;
    }
    
    /* Small mobile: Constrained to screen width */
    .bead-image-container {
        width: 260px;  /* Reduced from 350px to fit screen */
        height: 260px;
        max-width: calc(100vw - 40px);  /* Ensure it doesn't exceed viewport */
    }
    
    /* Hide pulsing circle on small mobile to prevent overflow */
    .bead-image-container::after {
        display: none;
    }
    
    .bead-visual {
        width: 240px;  /* Reduced from 315px */
        height: 240px;
        max-width: calc(100vw - 60px);
    }
    
    .bead-visual.fallback {
        width: 220px;
        height: 220px;
    }
    
    .bead-icon {
        font-size: 60px;
    }
    
    .bead-title {
        font-size: 1.2rem;  /* Smaller font */
        padding: 0 10px;  /* Add padding to prevent edge touching */
    }
    
    .bead-description {
        font-size: 0.85rem;  /* Smaller font */
        padding: 0 10px;  /* Add padding */
        line-height: 1.6;
    }
    
    .carousel-nav {
        position: static;
        transform: none;
        display: inline-block;
        margin: 10px 5px;
        width: 35px;
        height: 35px;
        font-size: 18px;
    }
    
    .carousel-nav:hover {
        transform: scale(1.1);
    }
    
    .carousel-indicators {
        margin-top: 20px;
        gap: 8px;
    }
    
    .indicator {
        width: 10px;
        height: 10px;
    }
    
    .blessing-text {
        font-size: 0.85rem;
        margin: 0 10px;
        padding: 15px;
    }
}