/* Enhanced Hero Sections CSS */
/* Advanced styling for customizable hero sections with animations and effects */

.hero-section-enhanced {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

/* Background and Overlay Effects */
.hero-section-enhanced .hero-overlay {
    z-index: 1;
    transition: opacity 0.3s ease;
}

.hero-section-enhanced:hover .hero-overlay {
    opacity: 0.7 !important;
}

/* Content Styling */
.hero-section-enhanced .container {
    position: relative;
    z-index: 2;
}

/* Typography Enhancements */
.hero-title {
    position: relative;
    transition: all 0.3s ease;
    word-wrap: break-word;
    hyphens: auto;
}

.hero-subtitle {
    transition: all 0.3s ease;
    word-wrap: break-word;
}

.hero-description {
    transition: all 0.3s ease;
    max-width: 600px;
    margin: 0 auto;
}

/* Text Effects */
.hero-title[data-hover-effect="glow"]:hover {
    text-shadow: 0 0 20px currentColor, 0 0 30px currentColor, 0 0 40px currentColor;
}

.hero-title[data-hover-effect="scale"]:hover {
    transform: scale(1.05);
}

.hero-title[data-hover-effect="bounce"]:hover {
    animation: textBounce 0.6s ease-in-out;
}

.hero-title[data-hover-effect="fade"]:hover {
    opacity: 0.7;
}

.hero-title[data-hover-effect="gradient"]:hover {
    background: linear-gradient(45deg, #667eea, #764ba2, #f093fb, #4facfe);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 2s ease-in-out infinite;
}

/* Button Styling */
.hero-buttons {
    transition: all 0.3s ease;
}

.hero-btn-primary, .hero-btn-secondary {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-family: inherit;
    outline: none;
}

/* Button Size Variations */
.btn-sm {
    padding: 8px 16px;
    font-size: 0.875rem;
    min-width: 100px;
}

.btn-md {
    padding: 12px 24px;
    font-size: 1rem;
    min-width: 140px;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 1.125rem;
    min-width: 180px;
}

.btn-xl {
    padding: 20px 40px;
    font-size: 1.25rem;
    min-width: 220px;
}

/* Button Hover Effects */
.hero-btn-primary[data-hover-effect="lift"]:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.25);
}

.hero-btn-primary[data-hover-effect="glow"]:hover {
    box-shadow: 0 0 30px currentColor, 0 8px 25px rgba(0,0,0,0.2);
}

.hero-btn-primary[data-hover-effect="scale"]:hover {
    transform: scale(1.08);
}

.hero-btn-primary[data-hover-effect="shake"]:hover {
    animation: buttonShake 0.5s ease-in-out;
}

.hero-btn-primary[data-hover-effect="bounce"]:hover {
    animation: buttonBounce 0.6s ease-in-out;
}

.hero-btn-primary[data-hover-effect="gradient-shift"]:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 50%, #f093fb 100%) !important;
    animation: gradientShift 2s ease-in-out infinite;
}

/* Button Ripple Effect */
.hero-btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
    z-index: 1;
}

.hero-btn-primary:active::before {
    width: 300px;
    height: 300px;
}

.hero-btn-primary > * {
    position: relative;
    z-index: 2;
}

/* Loading State for Buttons */
.hero-btn-primary.loading {
    pointer-events: none;
    position: relative;
}

.hero-btn-primary.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    margin: auto;
    border: 2px solid transparent;
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: buttonSpin 1s ease infinite;
}

/* Responsive Design */
@media (max-width: 575.98px) {
    .hero-section-enhanced {
        min-height: 400px !important;
        padding: 40px 0 !important;
    }
    
    .hero-title {
        font-size: 1.75rem !important;
        line-height: 1.3 !important;
        margin-bottom: 1rem !important;
    }
    
    .hero-subtitle {
        font-size: 1rem !important;
        margin-bottom: 1rem !important;
    }
    
    .hero-description {
        font-size: 0.9rem !important;
        margin-bottom: 1.5rem !important;
    }
    
    .hero-buttons {
        flex-direction: column !important;
        align-items: center !important;
        gap: 12px !important;
    }
    
    .hero-buttons .btn {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
}

@media (max-width: 767.98px) {
    .hero-section-enhanced {
        text-align: center !important;
    }
    
    .hero-title {
        font-size: 2rem !important;
    }
    
    .hero-subtitle {
        font-size: 1.1rem !important;
    }
}

@media (max-width: 991.98px) {
    .hero-title {
        font-size: 2.25rem !important;
    }
    
    .hero-subtitle {
        font-size: 1.2rem !important;
    }
}

/* High Performance Animations */
@keyframes textBounce {
    0%, 20%, 53%, 80%, 100% { 
        transform: translate3d(0,0,0); 
    }
    40%, 43% { 
        transform: translate3d(0,-15px,0); 
    }
    70% { 
        transform: translate3d(0,-7px,0); 
    }
    90% { 
        transform: translate3d(0,-2px,0); 
    }
}

@keyframes buttonBounce {
    0%, 20%, 53%, 80%, 100% { 
        transform: translate3d(0,0,0) scale(1); 
    }
    40%, 43% { 
        transform: translate3d(0,-8px,0) scale(1.02); 
    }
    70% { 
        transform: translate3d(0,-4px,0) scale(1.01); 
    }
    90% { 
        transform: translate3d(0,-1px,0) scale(1.005); 
    }
}

@keyframes buttonShake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-8px); }
    20%, 40%, 60%, 80% { transform: translateX(8px); }
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes buttonSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Entrance Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 40px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translate3d(0, -40px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translate3d(-40px, 0, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translate3d(40px, 0, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale3d(0.3, 0.3, 0.3);
    }
    50% {
        opacity: 1;
    }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    .hero-section-enhanced,
    .hero-title,
    .hero-subtitle,
    .hero-description,
    .hero-buttons,
    .hero-btn-primary,
    .hero-btn-secondary {
        animation: none !important;
        transition: none !important;
    }
    
    .hero-btn-primary:hover,
    .hero-btn-secondary:hover {
        transform: none !important;
    }
}

/* Focus States for Accessibility */
.hero-btn-primary:focus,
.hero-btn-secondary:focus {
    outline: 3px solid #4A90E2;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .hero-section-enhanced {
        min-height: auto !important;
        background-image: none !important;
        background-color: #ffffff !important;
        color: #000000 !important;
        padding: 20px 0 !important;
    }
    
    .hero-overlay {
        display: none !important;
    }
    
    .hero-buttons {
        display: none !important;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .hero-section-enhanced[data-auto-dark="true"] {
        background-color: #1a1a1a !important;
    }
    
    .hero-section-enhanced[data-auto-dark="true"] .hero-title {
        color: #ffffff !important;
    }
    
    .hero-section-enhanced[data-auto-dark="true"] .hero-subtitle,
    .hero-section-enhanced[data-auto-dark="true"] .hero-description {
        color: #cccccc !important;
    }
}

/* Performance Optimizations */
.hero-section-enhanced * {
    will-change: auto;
}

.hero-section-enhanced:hover * {
    will-change: transform, opacity;
}

.hero-section-enhanced .hero-btn-primary:hover,
.hero-section-enhanced .hero-btn-secondary:hover {
    will-change: transform, box-shadow;
}

/* Smooth scrolling for anchor links */
html {
    scroll-behavior: smooth;
}

/* Loading skeleton for hero sections */
.hero-section-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    min-height: 400px;
    border-radius: 8px;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Custom cursor for clickable hero sections */
.hero-section-enhanced[onclick] {
    cursor: pointer;
}

.hero-section-enhanced[onclick]:hover {
    transform: scale(1.001);
    transition: transform 0.3s ease;
}

/* Grid Layout Support for Multiple Hero Sections */
.hero-sections-container {
    display: grid;
    gap: 2rem;
    margin-bottom: 2rem;
}

.hero-sections-container.grid-layout {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.hero-sections-container.masonry-layout {
    columns: 2;
    column-gap: 2rem;
    column-fill: balance;
}

@media (max-width: 768px) {
    .hero-sections-container.masonry-layout {
        columns: 1;
    }
}

/* Hero Section Card Style (for admin preview) */
.hero-section-card {
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.hero-section-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border-color: #667eea;
}

.hero-section-card .card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem;
    border-bottom: none;
}

.hero-section-card .card-body {
    padding: 1.5rem;
}

/* Status indicators */
.status-indicator {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 8px;
}

.status-indicator.active {
    background-color: #28a745;
    animation: pulse 2s infinite;
}

.status-indicator.inactive {
    background-color: #6c757d;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(40, 167, 69, 0); }
    100% { box-shadow: 0 0 0 0 rgba(40, 167, 69, 0); }
}

/* Utility classes for common effects */
.text-shadow-sm { text-shadow: 0 1px 2px rgba(0,0,0,0.1); }
.text-shadow-md { text-shadow: 0 2px 4px rgba(0,0,0,0.2); }
.text-shadow-lg { text-shadow: 0 4px 8px rgba(0,0,0,0.3); }

.backdrop-blur-sm { backdrop-filter: blur(4px); }
.backdrop-blur-md { backdrop-filter: blur(8px); }
.backdrop-blur-lg { backdrop-filter: blur(16px); }