/* Web Stories Styles - Isha Women's Hospital */
/* Theme Colors: Primary #ef5a9c, Secondary #de1b71, Accent #2fc1e0 */

/* Container Styles */
.web-stories-container {
    padding: 80px 0;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 60vh;
}

.web-stories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

/* Story Card Styles */
.story-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    position: relative;
    height: 500px;
}

.story-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(239, 90, 156, 0.3);
}

.story-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

.story-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.8) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 30px;
    color: white;
    z-index: 2;
}

.story-card-title {
    font-size: 24px;
    font-weight: bold;
    margin: 0 0 10px 0;
    color: white;
    line-height: 1.3;
}

.story-card-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 14px;
    opacity: 0.9;
}

.story-badge {
    background: #ef5a9c;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 10;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

/* Modal Styles */
.story-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(135deg, rgba(239, 90, 156, 0.15) 0%, transparent 50%, rgba(47, 193, 224, 0.15) 100%),
        radial-gradient(circle at 20% 30%, rgba(222, 27, 113, 0.2) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(11, 69, 117, 0.2) 0%, transparent 40%),
        linear-gradient(180deg, #1a1a2e 0%, #16213e 100%);
    overflow: hidden;
}

.story-modal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(239, 90, 156, 0.1) 0%, transparent 30%),
        radial-gradient(circle at 90% 80%, rgba(47, 193, 224, 0.1) 0%, transparent 30%),
        radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.03) 0%, transparent 50%);
    animation: backgroundPulse 10s ease-in-out infinite;
    pointer-events: none;
}

@keyframes backgroundPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.story-modal-content {
    position: relative;
    width: 100%;
    height: 100%;
    max-width: 500px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.story-modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100px;
    right: -100px;
    bottom: 0;
    background-image: 
        repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(255,255,255,0.02) 2px, rgba(255,255,255,0.02) 4px),
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(255,255,255,0.02) 2px, rgba(255,255,255,0.02) 4px);
    pointer-events: none;
    z-index: 0;
}

/* Slide Styles */
.story-slide {
    display: none;
    width: 100%;
    max-width: 500px;
    height: 100vh;
    max-height: 900px;
    background: white;
    position: relative;
    border-radius: 0;
    box-shadow: 
        0 0 60px rgba(239, 90, 156, 0.3),
        0 0 120px rgba(47, 193, 224, 0.2),
        0 20px 80px rgba(0, 0, 0, 0.5);
    z-index: 2;
}

.story-slide.active {
    display: flex;
    flex-direction: column;
    animation: slideIn 0.5s ease;
}

@keyframes slideIn {
    from { 
        opacity: 0; 
        transform: translateX(50px); 
    }
    to { 
        opacity: 1; 
        transform: translateX(0); 
    }
}

/* Progress Bar */
.story-progress-bar {
    display: flex;
    gap: 5px;
    padding: 15px 20px;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: linear-gradient(180deg, rgba(0,0,0,0.3) 0%, transparent 100%);
}

.progress-segment {
    flex: 1;
    height: 3px;
    background: rgba(255,255,255,0.3);
    border-radius: 2px;
    overflow: hidden;
}

.progress-segment.active .progress-fill {
    width: 100%;
    height: 100%;
    background: white;
    animation: progressFill 5s linear;
}

.progress-segment.completed {
    background: rgba(255,255,255,0.8);
}

@keyframes progressFill {
    from { width: 0%; }
    to { width: 100%; }
}

/* Slide Content */
.story-slide-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 80px 40px 40px;
    text-align: center;
}

/* Slide Types */
.story-slide.cover {
    background: linear-gradient(135deg, #ef5a9c 0%, #de1b71 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.story-slide.cover::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px),
        radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    background-position: 0 0, 25px 25px;
    opacity: 0.3;
    animation: patternMove 20s linear infinite;
    pointer-events: none;
}

@keyframes patternMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

.story-slide.content {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    color: #333;
    position: relative;
}

.story-slide.content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(239, 90, 156, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(47, 193, 224, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(222, 27, 113, 0.05) 0%, transparent 40%);
    pointer-events: none;
    z-index: 0;
}

.story-slide.content .story-slide-content {
    position: relative;
    z-index: 1;
}

.story-slide.cta {
    background: linear-gradient(135deg, #2fc1e0 0%, #0b4575 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.story-slide.cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.1) 50%, transparent 70%);
    background-size: 200% 200%;
    animation: shimmer 3s ease-in-out infinite;
    pointer-events: none;
}

@keyframes shimmer {
    0%, 100% { background-position: 0% 0%; }
    50% { background-position: 100% 100%; }
}

.story-slide.cover .story-slide-content,
.story-slide.cta .story-slide-content {
    position: relative;
    z-index: 1;
}

/* Icons */
.story-icon {
    font-size: 80px;
    margin-bottom: 20px;
    color: #ef5a9c;
}

.story-slide.cover .story-icon,
.story-slide.cta .story-icon {
    color: white;
}

/* Typography */
.story-title {
    font-size: 36px;
    font-weight: bold;
    margin-bottom: 20px;
    line-height: 1.2;
}

.story-subtitle {
    font-size: 18px;
    opacity: 0.9;
    margin-bottom: 10px;
}

.story-text {
    font-size: 20px;
    line-height: 1.6;
    margin-bottom: 20px;
    max-width: 400px;
}

.story-highlight {
    background: #fff3f8;
    padding: 20px;
    border-radius: 15px;
    border-left: 4px solid #ef5a9c;
    margin: 20px 0;
    max-width: 400px;
    text-align: left;
}

.story-slide.cover .story-highlight,
.story-slide.cta .story-highlight {
    background: rgba(255,255,255,0.2);
    border-left-color: white;
}

/* CTA Button */
.story-cta-button {
    display: inline-block;
    background: white;
    color: #ef5a9c;
    padding: 15px 40px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: bold;
    font-size: 18px;
    margin-top: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.story-cta-button:hover {
    background: #ef5a9c;
    color: white;
    transform: scale(1.05);
    text-decoration: none;
}

/* Navigation */
.story-navigation {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    transform: translateY(-50%);
    z-index: 90;
    pointer-events: none;
}

.story-nav-btn {
    background: rgba(255,255,255,0.3);
    border: none;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 24px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    pointer-events: all;
}

.story-nav-btn:hover {
    background: rgba(255,255,255,0.5);
    transform: scale(1.1);
}

.story-nav-btn:focus {
    outline: 2px solid white;
    outline-offset: 2px;
}

.story-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0,0,0,0.5);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 24px;
    z-index: 101;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.story-close:hover {
    background: rgba(0,0,0,0.8);
    transform: rotate(90deg);
}

/* Loading Animation */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.story-loading {
    animation: pulse 1.5s ease-in-out infinite;
}

/* Responsive Design */
@media (max-width: 768px) {
    .story-slide-content {
        padding: 60px 30px 30px;
    }
    
    .story-title {
        font-size: 28px;
    }
    
    .story-text {
        font-size: 18px;
    }
    
    .story-icon {
        font-size: 60px;
    }
    
    .web-stories-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .story-card {
        height: 400px;
    }
    
    .story-card-title {
        font-size: 20px;
    }
    
    .story-nav-btn {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .story-modal-content {
        max-width: 100%;
    }
    
    .story-slide {
        max-width: 100%;
        border-radius: 0;
    }
}

@media (max-width: 480px) {
    .story-title {
        font-size: 24px;
    }
    
    .story-text {
        font-size: 16px;
    }
    
    .story-cta-button {
        padding: 12px 30px;
        font-size: 16px;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .story-slide.active,
    .story-card,
    .story-nav-btn,
    .story-cta-button {
        animation: none !important;
        transition: none !important;
    }
    
    .progress-segment.active .progress-fill {
        animation: none;
        width: 100%;
    }
}

/* Print Styles */
@media print {
    .story-modal,
    .story-navigation,
    .story-close,
    .story-progress-bar {
        display: none !important;
    }
}

