/* ============================================
   CINEMATIC HERO SECTION - ENHANCED STYLING
   ============================================ */

/* Animated gradient background for hero */
.bray-hero {
    background: linear-gradient(-45deg, #faf5ff, #f0f9ff, #fef3c7, #fce7f3);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    position: relative;
    overflow: hidden;
}

body.dark-mode .bray-hero {
    background: linear-gradient(-45deg, #0f172a, #1e1b4b, #312e81, #4c1d95);
    background-size: 400% 400%;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Cinematic Animated Text Styles */
#animated-service {
    display: inline-block;
    position: relative;
    min-width: 400px;
    text-align: left;
    background: linear-gradient(135deg, #3730a3 0%, #0891b2 50%, #7c3aed 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientFlow 6s ease infinite;
    font-weight: 800;
    letter-spacing: -0.02em;
}

@keyframes gradientFlow {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

/* Typewriter Cursor Effect */
#animated-service::after {
    content: '|';
    position: absolute;
    right: -20px;
    background: linear-gradient(135deg, #3730a3 0%, #0891b2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: blink 1s step-end infinite;
}

@keyframes blink {

    0%,
    50% {
        opacity: 1;
    }

    51%,
    100% {
        opacity: 0;
    }
}

/* Animated Text Transitions */
.hero-text-fade-out {
    animation: fadeOutScale 0.3s ease-out forwards;
}

.hero-text-fade-in {
    animation: fadeInScale 0.5s ease-in forwards;
}

@keyframes fadeOutScale {
    0% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }

    100% {
        opacity: 0;
        transform: scale(0.95) translateY(-10px);
    }
}

@keyframes fadeInScale {
    0% {
        opacity: 0;
        transform: scale(1.05) translateY(10px);
    }

    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Enhanced Section Title Styling */
.section-title {
    font-size: 4rem;
    line-height: 1.15;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 32px;
    text-shadow: 0 2px 20px rgba(79, 70, 229, 0.1);
    color: #0f172a;
}

body.dark-mode .section-title {
    color: #f1f5f9;
}

@media (max-width: 768px) {
    #animated-service {
        min-width: 280px;
    }

    .section-title {
        font-size: 2.5rem;
    }
}

/* Beautiful Hero Lead Text */
.hero-lead-enhanced {
    font-size: 1.25rem;
    line-height: 1.8;
    color: #334155;
    max-width: 700px;
    margin: 0 auto 48px;
    font-weight: 500;
    letter-spacing: 0.01em;
}

body.dark-mode .hero-lead-enhanced {
    color: #cbd5e1;
}

/* Elevated Hero Actions */
.hero-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    align-items: center;
    margin-top: 48px;
    flex-wrap: wrap;
}

.hero-actions .btn-primary,
.hero-actions .btn-secondary {
    font-size: 1.1rem;
    padding: 16px 40px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 30px rgba(79, 70, 229, 0.2);
}

.hero-actions .btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(79, 70, 229, 0.3);
}

.hero-actions .btn-secondary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Elegant Stats/Features Row - FIXED VISIBILITY */
.hero-features {
    display: flex;
    gap: 32px;
    justify-content: center;
    align-items: center;
    margin-top: 48px;
    flex-wrap: wrap;
    padding: 24px 32px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    border-radius: 20px;
    border: 1px solid rgba(79, 70, 229, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
}

body.dark-mode .hero-features {
    background: rgba(30, 41, 59, 0.7);
    border-color: rgba(148, 163, 184, 0.1);
}

.hero-feature-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
    letter-spacing: 0.01em;
}

body.dark-mode .hero-feature-item {
    color: #f1f5f9;
}

.hero-feature-item i {
    color: #22c55e;
    font-size: 1.2rem;
    filter: drop-shadow(0 2px 4px rgba(34, 197, 94, 0.3));
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .hero-actions {
        flex-direction: column;
        width: 100%;
    }

    .hero-actions .btn-primary,
    .hero-actions .btn-secondary {
        width: 100%;
        justify-content: center;
    }

    .hero-features {
        flex-direction: column;
        gap: 16px;
        padding: 16px 20px;
    }

    .hero-feature-item {
        font-size: 0.9rem;
    }
}

/* Mobile Fix for Animated Text & Alignment */
@media (max-width: 768px) {
    #animated-service {
        min-width: auto !important;
        width: 100% !important;
        display: block !important;
        font-size: 2.5rem;
        line-height: 1.2;
        margin-top: 8px;
        white-space: normal !important;
        text-align: center !important; /* CENTER ALIGNMENT */
    }
    
    .section-title {
        font-size: 2.5rem !important;
        word-wrap: break-word;
        padding: 0 16px;
        text-align: center !important;
    }
    
    .hero-lead-enhanced {
        font-size: 1.1rem !important;
        padding: 0 16px;
        text-align: center !important;
    }
    
    /* Fix cursor position on mobile */
    #animated-service::after {
        position: relative;
        right: auto;
        margin-left: 4px;
        display: inline-block;
        vertical-align: middle;
    }
    
    /* Center the eyebrow text/badge */
    .section-eyebrow {
        display: flex;
        justify-content: center;
        align-items: center;
        text-align: center;
        margin-left: auto;
        margin-right: auto;
        width: fit-content;
    }
}