/* ============================================
   CAROUSEL & ANIMATIONS ENHANCEMENTS
   ============================================ */

/* Hero Section with Background Carousel */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #000; /* Fallback color */
}

/* Remove extra base background layer for maximum clarity */
.hero::before {
    content: none !important;
}

/* Animated Background Slideshow */
.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    opacity: 0;
    animation: slideShow 24s infinite;
    /* Remove any transforms or filters for maximum clarity */
    transform: scale(1.0);
    filter: none;
    -webkit-filter: none;
    image-rendering: -webkit-optimize-contrast; /* Improve image sharpness on webkit browsers */
    image-rendering: crisp-edges; /* Improve image sharpness on modern browsers */
}

.hero-slide:nth-child(1) {
    animation-delay: 0s;
}

.hero-slide:nth-child(2) {
    animation-delay: 8s;
}

.hero-slide:nth-child(3) {
    animation-delay: 16s;
}

@keyframes slideShow {
    0% { opacity: 0; }
    8% { opacity: 1; }
    33% { opacity: 1; }
    41% { opacity: 0; }
    100% { opacity: 0; }
}

/* Enhanced Hero Overlay */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.15) 0%,
        rgba(0, 0, 0, 0.30) 50%,
        rgba(0, 0, 0, 0.50) 100%
    );
    z-index: 1;
    background: rgba(0, 0, 0, 0.3); /* Lighter overlay for better image visibility */
    backdrop-filter: none; /* Remove any blur effects */
    -webkit-backdrop-filter: none;
}

/* Floating Particles Effect */
.hero-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
}

.particle {
    position: absolute;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    animation: float 15s infinite ease-in-out;
}

.particle:nth-child(1) { width: 80px; height: 80px; left: 10%; animation-delay: 0s; }
.particle:nth-child(2) { width: 60px; height: 60px; left: 30%; animation-delay: 2s; }
.particle:nth-child(3) { width: 100px; height: 100px; left: 50%; animation-delay: 4s; }
.particle:nth-child(4) { width: 70px; height: 70px; left: 70%; animation-delay: 6s; }
.particle:nth-child(5) { width: 90px; height: 90px; left: 85%; animation-delay: 8s; }

@keyframes float {
    0%, 100% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
    10% { opacity: 0.3; }
    90% { opacity: 0.3; }
    100% { transform: translateY(-100px) rotate(360deg); opacity: 0; }
}

/* Hero Content Animations */
.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

/* Animated Messages */
.animated-message-container {
    position: relative;
    width: 100%;
    height: 200px;
    margin-bottom: 2rem;
    perspective: 1000px;
}

.animated-message {
    position: absolute;
    width: 100%;
    opacity: 0;
    transform: translateY(30px);
    transition: all 1s ease-in-out;
    backface-visibility: hidden;
    visibility: hidden;
}

.animated-message.active {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
    animation: fadeInUp 0.8s ease-out forwards;
}

.animated-message[data-position="left"] {
    transform: translateX(-100%);
}

.animated-message[data-position="right"] {
    transform: translateX(100%);
}

.animated-message[data-position="center"].active {
    transform: translateX(0);
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin: 0 0 0.5rem 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7), 
                 0 0 20px rgba(0, 0, 0, 0.5);
    line-height: 1.1;
    color: #fff;
    letter-spacing: 0.5px;
}

.hero-content h1 .second-line {
    display: block;
    margin-top: 0.3rem;
    font-size: 2.8rem;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7), 
                 0 0 20px rgba(0, 0, 0, 0.5);
    font-weight: 700;
    letter-spacing: 0.5px;
}

.hero-tagline {
    font-size: 1.4rem;
    line-height: 1.5;
    margin: 0.8rem 0 2rem;
    opacity: 0.95;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    color: #fff;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 20px;
}

@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-tagline {
        font-size: 1.2rem;
    }
}

.hero-tagline {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    animation: fadeInUp 1s ease-out 0.4s both;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    animation: fadeInUp 1s ease-out 0.6s both;
    margin-top: 2rem;
}

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

/* Scroll Indicator Animation */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    animation: bounce 2s infinite;
}

.scroll-indicator i {
    font-size: 2rem;
    color: white;
    opacity: 0.8;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-20px); }
    60% { transform: translateX(-50%) translateY(-10px); }
}

/* ============================================
   SERMONS CAROUSEL
   ============================================ */

.sermons-carousel {
    position: relative;
    padding: 80px 0;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    overflow: hidden;
}

.sermons-carousel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><path d="M0 0h100v100H0z" fill="none"/><path d="M50 0L100 50L50 100L0 50z" fill="rgba(255,255,255,0.05)"/></svg>');
    opacity: 0.3;
}

.carousel-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.carousel-track {
    display: flex;
    gap: 30px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 20px 0;
    scrollbar-width: none;
}

.carousel-track::-webkit-scrollbar {
    display: none;
}

.carousel-card {
    min-width: 350px;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease;
    animation: slideIn 0.6s ease-out;
}

.carousel-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 60px rgba(102, 126, 234, 0.3);
}

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

.carousel-card-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

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

.carousel-card:hover .carousel-card-image img {
    transform: scale(1.1);
}

.carousel-card-content {
    padding: 25px;
}

.carousel-card-content h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: #333;
}

.carousel-card-content p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
}

/* Carousel Navigation */
.carousel-nav {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
}

.carousel-nav button {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: white;
    color: #667eea;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.carousel-nav button:hover {
    background: #667eea;
    color: white;
    transform: scale(1.1);
}

/* ============================================
   ANIMATED QUICK LINKS
   ============================================ */

.quick-link-card {
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
}

.quick-link-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s ease;
}

.quick-link-card:hover::before {
    left: 100%;
}

.quick-link-card .icon {
    transition: all 0.4s ease;
}

.quick-link-card:hover .icon {
    transform: scale(1.2) rotate(10deg);
}

/* ============================================
   PARALLAX SECTIONS
   ============================================ */

.parallax-section {
    position: relative;
    background-attachment: scroll;
    background-size: cover;
    background-position: center;
    padding: 100px 0;
    color: white;
}

.parallax-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.25);
}

.parallax-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

/* ============================================
   FLOATING ELEMENTS
   ============================================ */

.float-animation {
    animation: floatUpDown 3s ease-in-out infinite;
}

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

/* ============================================
   WELCOME SECTION
   ============================================ */
.welcome-message {
    padding: 100px 0;
    background-color: #fff;
    position: relative;
    overflow: hidden;
}

.welcome-content {
    position: relative;
    z-index: 2;
}

.welcome-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 60px;
}

.section-subtitle {
    display: block;
    font-size: 1.1rem;
    color: #667eea;
    font-weight: 600;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.section-title {
    font-size: 2.8rem;
    color: #2d3748;
    margin-bottom: 20px;
    position: relative;
    line-height: 1.2;
}

.divider {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 20px auto;
    width: 100px;
}

.divider .dot {
    width: 8px;
    height: 8px;
    background: #667eea;
    border-radius: 50%;
    display: inline-block;
}

.divider .line {
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    margin: 0 5px;
}

.welcome-grid {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 60px;
}

.welcome-text {
    flex: 1;
    min-width: 300px;
}

.welcome-text .lead {
    font-size: 1.4rem;
    color: #4a5568;
    line-height: 1.6;
    margin-bottom: 25px;
    font-weight: 500;
}

.welcome-message-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #4a5568;
    margin-bottom: 30px;
}

.pastor-signature {
    margin: 40px 0;
    position: relative;
    display: inline-block;
}

.signature-line {
    width: 50px;
    height: 2px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    margin-bottom: 15px;
}

.signature {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2d3748;
    font-style: italic;
    margin: 0;
    letter-spacing: 1px;
}

.welcome-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 40px;
}

.welcome-image-container {
    flex: 1;
    min-width: 300px;
    position: relative;
    padding: 20px;
}

.welcome-image {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    transform: perspective(1000px) rotateY(-5deg);
    transition: transform 0.5s ease, box-shadow 0.5s ease;
}

.welcome-image:hover {
    transform: perspective(1000px) rotateY(0);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.15);
}

.welcome-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

.welcome-image:hover img {
    transform: scale(1.05);
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(102, 126, 234, 0.1) 0%,
        rgba(118, 75, 162, 0.2) 100%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
}

.welcome-image:hover .image-overlay {
    opacity: 1;
}

.image-frame {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 2px solid rgba(102, 126, 234, 0.2);
    border-radius: 10px;
    pointer-events: none;
    transform: translate(15px, 15px);
    z-index: -1;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.welcome-image-container:hover .image-frame {
    transform: translate(10px, 10px);
    border-color: rgba(102, 126, 234, 0.4);
}

@media (max-width: 992px) {
    .welcome-grid {
        flex-direction: column-reverse;
        gap: 40px;
    }
    
    .welcome-text, .welcome-image-container {
        width: 100%;
        max-width: 600px;
        margin: 0 auto;
    }
    
    .welcome-header {
        margin-bottom: 40px;
    }
    
    .section-title {
        font-size: 2.2rem;
    }
    
    .welcome-text .lead {
        font-size: 1.2rem;
    }
}

@media (max-width: 576px) {
    .welcome-message {
        padding: 60px 0;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .welcome-actions {
        flex-direction: column;
    }
    
    .welcome-actions .btn {
        width: 100%;
        text-align: center;
    }
}

/* ============================================
   GRADIENT TEXT
   ============================================ */

.gradient-text {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================
   P
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* ============================================
   FADE IN ON SCROLL
   ============================================ */

.fade-in-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.fade-in-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-tagline {
        font-size: 1.2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .carousel-card {
        min-width: 280px;
    }
    
    .particle {
        display: none;
    }
}
