/* Modern Hero Section Styles - Nepal Cancer Hospital */

/* Advanced Gradient Backgrounds */
.hero-gradient-modern {
    background: linear-gradient(135deg, 
        #2b306f 0%, 
        #55ba5a 50%, 
        #2b306f 100%);
    position: relative;
    overflow: hidden;
    min-height: 60vh; /* Reduced from min-h-screen */
}

.hero-gradient-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    animation: gradientShift 8s ease-in-out infinite;
}

@keyframes gradientShift {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

/* Animated Background Particles */
.hero-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

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

.particle:nth-child(1) {
    width: 4px;
    height: 4px;
    top: 20%;
    left: 10%;
    animation-delay: 0s;
    animation-duration: 8s;
}

.particle:nth-child(2) {
    width: 6px;
    height: 6px;
    top: 60%;
    left: 80%;
    animation-delay: 2s;
    animation-duration: 10s;
}

.particle:nth-child(3) {
    width: 3px;
    height: 3px;
    top: 80%;
    left: 20%;
    animation-delay: 4s;
    animation-duration: 7s;
}

.particle:nth-child(4) {
    width: 5px;
    height: 5px;
    top: 30%;
    left: 70%;
    animation-delay: 1s;
    animation-duration: 9s;
}

.particle:nth-child(5) {
    width: 4px;
    height: 4px;
    top: 70%;
    left: 50%;
    animation-delay: 3s;
    animation-duration: 6s;
}

@keyframes floatParticle {
    0%, 100% {
        transform: translateY(0px) translateX(0px);
        opacity: 0.3;
    }
    25% {
        transform: translateY(-20px) translateX(10px);
        opacity: 0.6;
    }
    50% {
        transform: translateY(-10px) translateX(-5px);
        opacity: 0.8;
    }
    75% {
        transform: translateY(-30px) translateX(15px);
        opacity: 0.4;
    }
}

/* Modern Icon Container */
.hero-icon-modern {
    position: relative;
    display: inline-block;
    margin-bottom: 1.5rem; /* Reduced from 2rem */
}

.hero-icon-container {
    width: 80px; /* Reduced from 100px */
    height: 80px; /* Reduced from 100px */
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.3s ease;
}

.hero-icon-container:hover {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.hero-icon-container svg {
    width: 40px; /* Reduced from 50px */
    height: 40px; /* Reduced from 50px */
    color: white;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

/* Pulsing Ring Animation */
.pulse-ring-modern {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px; /* Reduced from 120px */
    height: 100px; /* Reduced from 120px */
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    animation: pulseRing 3s ease-out infinite;
}

.pulse-ring-modern:nth-child(2) {
    animation-delay: 1s;
    width: 120px; /* Reduced from 140px */
    height: 120px; /* Reduced from 140px */
}

.pulse-ring-modern:nth-child(3) {
    animation-delay: 2s;
    width: 140px; /* Reduced from 160px */
    height: 140px; /* Reduced from 160px */
}

@keyframes pulseRing {
    0% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0;
    }
}

/* Modern Typography */
.hero-title-modern {
    font-size: clamp(2rem, 4vw, 3rem); /* Reduced from 2.5rem, 5vw, 4rem */
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1rem; /* Reduced from 1.5rem */
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    color: #ffffff !important; /* Changed to white for better visibility with !important */
    animation: titleGlow 3s ease-in-out infinite alternate;
}

/* Override any conflicting text gradient classes */
.hero-title-modern .text-gradient,
.hero-title-modern span {
    color: #ffffff !important;
    background: none !important;
    -webkit-background-clip: unset !important;
    -webkit-text-fill-color: unset !important;
    background-clip: unset !important;
}

/* Brand text styling - Only Cancer in red */
.hero-title-modern .brand-text .nepal {
    color: #ffffff !important;
}

.hero-title-modern .brand-text .cancer {
    color: #ff0000 !important; /* Red color for Cancer */
}

/* General brand text styling for all sections */
.brand-text .nepal {
    color: inherit; /* Use parent color */
}

.brand-text .cancer {
    color: #ff0000 !important; /* Red color for Cancer everywhere */
}

/* Specific styling to ensure only Cancer is red, not other words */
.text-red-500 {
    color: #ff0000 !important;
}

/* Ensure other text stays white in hero sections */
.text-white {
    color: #ffffff !important;
}

@keyframes titleGlow {
    0% {
        text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    }
    100% {
        text-shadow: 0 4px 30px rgba(255, 255, 255, 0.3);
    }
}

.hero-subtitle-modern {
    font-size: clamp(1rem, 2vw, 1.25rem); /* Reduced from 1.1rem, 2.5vw, 1.5rem */
    line-height: 1.5; /* Reduced from 1.6 */
    margin-bottom: 1.5rem; /* Reduced from 2.5rem */
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    max-width: 700px; /* Reduced from 800px */
    margin-left: auto;
    margin-right: auto;
}

/* Modern Button Styles */
.hero-buttons-modern {
    display: flex;
    flex-direction: column;
    gap: 1rem; /* Increased gap to prevent overlapping */
    align-items: center;
    margin-top: 1.5rem; /* Reduced from 2rem */
    margin-bottom: 2rem; /* Added bottom margin for scroll indicator spacing */
}

@media (min-width: 640px) {
    .hero-buttons-modern {
        flex-direction: row;
        justify-content: center;
        gap: 1.5rem; /* Increased gap for desktop to prevent overlapping */
    }
}

.btn-modern-primary {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.5rem; /* Reduced from 1rem 2rem */
    background: rgba(255, 255, 255, 0.95);
    color: #2b306f;
    font-weight: 600;
    font-size: 1rem; /* Reduced from 1.1rem */
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-modern-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.6s;
}

.btn-modern-primary:hover::before {
    left: 100%;
}

.btn-modern-primary:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    background: rgba(255, 255, 255, 1);
}

.btn-modern-secondary {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.5rem; /* Reduced from 1rem 2rem */
    background: transparent;
    color: white;
    font-weight: 600;
    font-size: 1rem; /* Reduced from 1.1rem */
    border: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.btn-modern-secondary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transition: width 0.3s ease;
}

.btn-modern-secondary:hover::before {
    width: 100%;
}

.btn-modern-secondary:hover {
    transform: translateY(-3px) scale(1.05);
    border-color: rgba(255, 255, 255, 1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.btn-modern-primary svg,
.btn-modern-secondary svg {
    width: 20px;
    height: 20px;
    margin-right: 0.5rem;
    transition: transform 0.3s ease;
}

.btn-modern-primary:hover svg,
.btn-modern-secondary:hover svg {
    transform: translateX(3px);
}

/* Floating Elements */
.floating-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.floating-element {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: floatElement 6s ease-in-out infinite;
}

.floating-element:nth-child(1) {
    width: 8px;
    height: 8px;
    top: 15%;
    left: 15%;
    animation-delay: 0s;
}

.floating-element:nth-child(2) {
    width: 12px;
    height: 12px;
    top: 25%;
    right: 20%;
    animation-delay: 2s;
}

.floating-element:nth-child(3) {
    width: 6px;
    height: 6px;
    bottom: 30%;
    left: 25%;
    animation-delay: 4s;
}

.floating-element:nth-child(4) {
    width: 10px;
    height: 10px;
    bottom: 20%;
    right: 15%;
    animation-delay: 1s;
}

.floating-element:nth-child(5) {
    width: 14px;
    height: 14px;
    top: 50%;
    left: 10%;
    animation-delay: 3s;
}

.floating-element:nth-child(6) {
    width: 8px;
    height: 8px;
    top: 70%;
    right: 30%;
    animation-delay: 5s;
}

@keyframes floatElement {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
        opacity: 0.3;
    }
    25% {
        transform: translateY(-15px) rotate(90deg);
        opacity: 0.6;
    }
    50% {
        transform: translateY(-25px) rotate(180deg);
        opacity: 0.8;
    }
    75% {
        transform: translateY(-10px) rotate(270deg);
        opacity: 0.4;
    }
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 2rem; /* Increased from 1rem to provide more spacing */
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    z-index: 10; /* Added z-index to ensure proper layering */
}

.scroll-indicator:hover {
    color: white;
    transform: translateX(-50%) translateY(-5px);
}

.scroll-text {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.scroll-arrow {
    width: 24px;
    height: 24px;
    border: 2px solid currentColor;
    border-top: none;
    border-right: none;
    transform: rotate(-45deg);
    animation: bounceArrow 2s ease-in-out infinite;
}

@keyframes bounceArrow {
    0%, 20%, 50%, 80%, 100% {
        transform: rotate(-45deg) translateY(0);
    }
    40% {
        transform: rotate(-45deg) translateY(-10px);
    }
    60% {
        transform: rotate(-45deg) translateY(-5px);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-gradient-modern {
        min-height: 50vh; /* Further reduced for mobile */
    }
    
    .hero-icon-container {
        width: 60px; /* Further reduced for mobile */
        height: 60px;
    }
    
    .hero-icon-container svg {
        width: 30px; /* Further reduced for mobile */
        height: 30px;
    }
    
    .pulse-ring-modern {
        width: 80px; /* Further reduced for mobile */
        height: 80px;
    }
    
    .pulse-ring-modern:nth-child(2) {
        width: 100px; /* Further reduced for mobile */
        height: 100px;
    }
    
    .pulse-ring-modern:nth-child(3) {
        width: 120px; /* Further reduced for mobile */
        height: 120px;
    }
    
    .hero-buttons-modern {
        flex-direction: column;
        width: 100%;
        max-width: 280px; /* Slightly reduced */
        gap: 1.2rem; /* Increased gap for mobile */
        margin-bottom: 3rem; /* More spacing for mobile */
    }
    
    .btn-modern-primary,
    .btn-modern-secondary {
        width: 100%;
        justify-content: center;
        padding: 0.6rem 1.2rem; /* Slightly smaller on mobile */
        font-size: 0.9rem;
    }
    
    .scroll-indicator {
        bottom: 1.5rem; /* Adjusted for mobile */
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .hero-gradient-modern::before,
    .particle,
    .pulse-ring-modern,
    .floating-element,
    .scroll-arrow {
        animation: none;
    }
    
    .hero-icon-container:hover,
    .btn-modern-primary:hover,
    .btn-modern-secondary:hover {
        transform: none;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .hero-gradient-modern {
        background: #000;
    }
    
    .hero-title-modern {
        color: #fff;
        -webkit-text-fill-color: #fff;
    }
    
    .btn-modern-primary {
        background: #fff;
        color: #000;
        border: 2px solid #000;
    }
    
    .btn-modern-secondary {
        background: #000;
        color: #fff;
        border: 2px solid #fff;
    }
}
