/**
 * Landing Page Custom Styles
 * Animations and custom styles for landing page
 *
 * @package AadiyogiShivYoga
 */

/* Base styles */
.aadiyogi-page {
    min-height: 100vh;
    color: var(--slate-text);
    background-color: var(--sand);
}

/* Hero Section Styles */
.hero-section {
    position: relative;
    width: 100%;
}

.hero-section .absolute {
    will-change: transform;
}

/* Ensure background image covers properly */
.hero-section .bg-cover {
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

/* Smooth transitions for hover effects */
.hero-section a {
    transition: all 0.3s ease;
}

/* Ensure text is readable */
.hero-section h1,
.hero-section p,
.hero-section div {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Ensure all hero sections have white text */
section[class*="relative"] h1,
section[class*="relative"] p,
section[class*="relative"] .text-white,
section[class*="relative"] h1.text-white,
section[class*="relative"] p.text-white {
    color: #ffffff !important;
}

/* Hero section text shadow for better visibility */
section[class*="relative"] h1,
section[class*="relative"] p {
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6), 
                 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* Mobile optimizations for hero */
@media (max-width: 768px) {
    .hero-section {
        min-height: 60vh !important;
        padding-top: 2rem;
        padding-bottom: 2rem;
    }
    
    /* Darker overlay on mobile for better text contrast */
    .hero-section .bg-black\/60,
    .hero-section .bg-black\/50 {
        background-color: rgba(0, 0, 0, 0.65) !important;
    }
    
    /* Ensure CTAs are tappable and full-width on mobile */
    .hero-section a[href^="tel:"],
    .hero-section a[href*="wa.me"] {
        min-height: 48px;
        width: 100%;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 1rem;
        padding: 0.875rem 1.5rem;
    }
    
    /* Better spacing on mobile for above-fold visibility */
    .hero-section .space-y-4 {
        gap: 1rem;
    }
}

/* Extra small mobile devices */
@media (max-width: 480px) {
    .hero-section {
        min-height: 55vh !important;
    }
    
    .hero-section h1 {
        font-size: 1.75rem !important;
        line-height: 1.2;
    }
    
    .hero-section p {
        font-size: 0.9375rem !important;
    }
}

/* Tablet optimizations */
@media (min-width: 769px) and (max-width: 1024px) {
    .hero-section {
        min-height: 80vh;
    }
}

/* Desktop optimizations */
@media (min-width: 1025px) {
    .hero-section {
        min-height: 90vh;
    }
}

/* Fade In Up Animation */
.fade-in-up {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.55s ease-out, transform 0.55s ease-out;
}

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

/* Fade In with Delay */
.fade-in-delay {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.5s ease-out 0.18s, transform 0.5s ease-out 0.18s;
}

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

/* Stagger Container Animation */
.stagger-container > * {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.stagger-container.visible > *:nth-child(1) {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.06s;
}

.stagger-container.visible > *:nth-child(2) {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.18s;
}

.stagger-container.visible > *:nth-child(3) {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.30s;
}

.stagger-container.visible > *:nth-child(4) {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.42s;
}

.stagger-container.visible > *:nth-child(5) {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.54s;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Mobile Menu Styles */
#mobile-menu {
    transition: opacity 0.3s ease;
}

#mobile-menu.hidden {
    display: none;
}

/* Reduce Motion Support */
@media (prefers-reduced-motion: reduce) {
    .fade-in-up,
    .fade-in-delay,
    .stagger-container > * {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* Mobile CTA Bar Styles */
.mobile-cta-bar a {
    min-height: 44px;
    min-width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-cta-bar a:active {
    opacity: 0.7;
}

/* Ensure icons and text are properly aligned */
.mobile-cta-bar svg {
    flex-shrink: 0;
}

.mobile-cta-bar span {
    line-height: 1.2;
    text-align: center;
}

/* Legal Pages Styles */
.aadiyogi-page article.prose,
.aadiyogi-page .prose {
    max-width: none;
}

.aadiyogi-page article h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.aadiyogi-page article h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.aadiyogi-page article h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.aadiyogi-page article p {
    margin-bottom: 1rem;
    line-height: 1.75;
}

.aadiyogi-page article ul,
.aadiyogi-page article ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.aadiyogi-page article li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.aadiyogi-page article a {
    text-decoration: underline;
    transition: opacity 0.2s;
}

.aadiyogi-page article a:hover {
    opacity: 0.8;
}

/* Mobile optimizations for legal pages */
@media (max-width: 768px) {
    .aadiyogi-page article h1 {
        font-size: 2rem;
    }
    
    .aadiyogi-page article h2 {
        font-size: 1.5rem;
    }
    
    .aadiyogi-page article h3 {
        font-size: 1.125rem;
    }
}

/* Scroll to Top Button - Theme Styling */
#ast-scroll-top {
    background-color: #C85A00 !important;
    color: #ffffff !important;
    border-radius: 50% !important;
    width: 48px !important;
    height: 48px !important;
    min-width: 48px !important;
    min-height: 48px !important;
    box-shadow: 0 4px 12px rgba(200, 90, 0, 0.3) !important;
    transition: all 0.3s ease !important;
    z-index: 100 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: none !important;
    cursor: pointer !important;
}

#ast-scroll-top:hover,
#ast-scroll-top:focus {
    background-color: #B04A00 !important;
    transform: scale(1.05) !important;
    box-shadow: 0 6px 16px rgba(200, 90, 0, 0.4) !important;
}

#ast-scroll-top:active {
    transform: scale(0.95) !important;
}

#ast-scroll-top .ast-icon.icon-arrow svg,
#ast-scroll-top svg {
    color: #ffffff !important;
    fill: #ffffff !important;
    stroke: #ffffff !important;
    width: 24px !important;
    height: 24px !important;
}

/* Desktop positioning */
@media (min-width: 769px) {
    #ast-scroll-top {
        width: 52px !important;
        height: 52px !important;
        min-width: 52px !important;
        min-height: 52px !important;
    }
    
    #ast-scroll-top svg {
        width: 26px !important;
        height: 26px !important;
    }
}

/* Mobile adjustments - Position above mobile CTA bar */
@media (max-width: 768px) {
    #ast-scroll-top {
        bottom: 80px !important; /* Above mobile CTA bar */
        right: 20px !important;
    }
}

/* Extra small mobile devices */
@media (max-width: 480px) {
    #ast-scroll-top {
        width: 44px !important;
        height: 44px !important;
        min-width: 44px !important;
        min-height: 44px !important;
        bottom: 75px !important;
        right: 16px !important;
    }
    
    #ast-scroll-top svg {
        width: 20px !important;
        height: 20px !important;
    }
}
