/* ===================================
   Anantadrishtiyoga Custom Styles
   Enhanced & Optimized Version
   =================================== */

/* Base Styles */
body {
    background: linear-gradient(135deg, #F1C338 0%, #FDE68A 50%, #F1C338 100%);
    background-attachment: fixed;
    color: #44403C;
    font-family: 'Poppins', sans-serif;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Lora', serif;
}

/* Skip to Content - Accessibility */
.skip-to-content {
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: #D97706;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    z-index: 9999;
    transition: top 0.3s ease;
    font-weight: 600;
}

.skip-to-content:focus {
    top: 1rem;
}

/* Henna Pattern Background */
.henna-pattern {
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23D97706' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* Hero Text Shadow */
.hero-text-shadow {
    text-shadow: 2px 2px 8px rgba(0,0,0,0.6);
}

/* Scroll Reveal Animations */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

.delay-100 { transition-delay: 100ms; }
.delay-200 { transition-delay: 200ms; }
.delay-300 { transition-delay: 300ms; }

/* Navigation Styles - MERGED & IMPROVED */
#main-nav a {
    position: relative;
    transition: color 0.3s ease;
    padding: 0.5rem 0.25rem;
}

#main-nav a::after {
    content: '';
    position: absolute;
    width: 0%;
    height: 2px;
    left: 0;
    bottom: 0;
    background: #D97706;
    transition: width 0.3s ease-in-out;
}

#main-nav a:hover::after,
#main-nav a:focus::after {
    width: 100%;
}

/* Focus Visible States - Accessibility Enhancement */
*:focus-visible {
    outline: 3px solid #D97706;
    outline-offset: 2px;
    border-radius: 2px;
}

button:focus-visible,
a:focus-visible {
    outline: 3px solid #D97706;
    outline-offset: 3px;
}

/* Header Color Transitions */
#header:not(.scrolled) #main-nav a {
    color: white;
}

#header:not(.scrolled) #main-nav a:hover,
#header:not(.scrolled) #main-nav a:focus {
    color: #FCD34D;
}

#header:not(.scrolled) #logo-text {
    color: white;
}

#header.scrolled #main-nav a {
    color: #78716C;
}

#header.scrolled #main-nav a:hover,
#header.scrolled #main-nav a:focus {
    color: #D97706;
}

#header.scrolled #logo-text {
    color: #292524;
}

/* Mobile Menu Improvements */
#mobile-menu-btn {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
}

#mobile-menu a {
    padding: 1rem;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Bounce Animation */
@keyframes bounce-slow {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.animate-bounce-slow {
    animation: bounce-slow 3s infinite ease-in-out;
}

/* Breathing Circle Animation */
.breathing-circle {
    transition: transform 4s cubic-bezier(0.445, 0.05, 0.55, 0.95);
}

.breathing-circle.inhale {
    transform: scale(1.15);
}

.breathing-circle.exhale {
    transform: scale(1);
}

/* WhatsApp Button Pulse Animation */
@keyframes pulse-contact {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

.animate-pulse-contact {
    animation: pulse-contact 2s infinite;
}

/* FIXED: Floating Buttons Positioning */
#back-to-top {
    bottom: 2rem;
    right: 2rem;
}

#whatsapp-button {
    bottom: 2rem;
    left: 2rem; /* Changed from right to left to avoid overlap */
}

/* Mobile: Stack buttons vertically on right side */
@media (max-width: 768px) {
    #back-to-top {
        bottom: 2rem;
        right: 1rem;
    }

    #whatsapp-button {
        bottom: 6rem; /* Stack above back-to-top on mobile */
        right: 1rem;
        left: auto;
    }
}

/* Enhanced Card Hover Effects */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Improved Color Contrast for Better Accessibility */
.text-improved-contrast {
    color: #57534E; /* Darker than original #78716C for better readability */
}

/* Image Lazy Loading Placeholder */
img[loading="lazy"] {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

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

/* Retreat Card Enhancement */
.retreat-card {
    transition: all 0.3s ease;
    cursor: pointer;
}

.retreat-card:hover {
    border-color: #D97706;
    box-shadow: 0 10px 30px rgba(217, 119, 6, 0.15);
}

/* Testimonial Card Enhancement */
.testimonial-card {
    position: relative;
    overflow: hidden;
}

.testimonial-card::before {
    content: '"';
    position: absolute;
    top: -10px;
    left: 10px;
    font-size: 6rem;
    color: rgba(217, 119, 6, 0.1);
    font-family: Georgia, serif;
    line-height: 1;
}

/* CTA Button Enhancement */
.cta-primary {
    position: relative;
    overflow: hidden;
}

.cta-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.cta-primary:hover::before {
    width: 300px;
    height: 300px;
}

/* Video Background Optimization */
#hero-video {
    object-fit: cover;
    width: 100%;
    height: 100%;
}

/* Print Styles */
@media print {
    #header,
    #back-to-top,
    #whatsapp-button,
    #mobile-menu,
    video {
        display: none !important;
    }

    body {
        background: white;
    }
}

/* Reduced Motion for Accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    body {
        background: white;
        color: black;
    }

    .text-brand-text-muted,
    .text-improved-contrast {
        color: black;
    }
}

/* ===================================
   ENHANCED DESIGN ELEMENTS
   =================================== */

/* Decorative Section Dividers */
.section-divider {
    position: relative;
    height: 4px;
    background: linear-gradient(90deg, transparent, #D97706, transparent);
    margin: 3rem auto;
    max-width: 200px;
}

.section-divider::before,
.section-divider::after {
    content: '✦';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #D97706;
    font-size: 1.5rem;
}

.section-divider::before {
    left: -2rem;
}

.section-divider::after {
    right: -2rem;
}

/* Ornamental Borders */
.ornamental-border {
    border: 2px solid #D97706;
    border-image: repeating-linear-gradient(
        45deg,
        #D97706,
        #D97706 10px,
        #FBBF24 10px,
        #FBBF24 20px
    ) 1;
    padding: 2rem;
    position: relative;
}

.ornamental-border::before,
.ornamental-border::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid #D97706;
}

.ornamental-border::before {
    top: -2px;
    left: -2px;
    border-right: none;
    border-bottom: none;
}

.ornamental-border::after {
    bottom: -2px;
    right: -2px;
    border-left: none;
    border-top: none;
}

/* Floating Elements Animation */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

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

/* Gradient Text Effect */
.gradient-text {
    background: linear-gradient(135deg, #D97706, #FBBF24, #F59E0B);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Shine Effect on Cards */
.shine-effect {
    position: relative;
    overflow: hidden;
}

.shine-effect::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    transform: rotate(45deg);
    transition: all 0.6s;
}

.shine-effect:hover::after {
    left: 100%;
}

/* Decorative Corner Elements */
.corner-decoration {
    position: relative;
}

.corner-decoration::before,
.corner-decoration::after {
    content: '';
    position: absolute;
    width: 40px;
    height: 40px;
    border: 3px solid #D97706;
    opacity: 0.6;
}

.corner-decoration::before {
    top: 0;
    left: 0;
    border-right: none;
    border-bottom: none;
}

.corner-decoration::after {
    bottom: 0;
    right: 0;
    border-left: none;
    border-top: none;
}

/* Mandala Background Pattern */
.mandala-bg {
    background-image:
        radial-gradient(circle at 20% 50%, rgba(217, 119, 6, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(251, 191, 36, 0.05) 0%, transparent 50%);
    background-size: 100% 100%;
}

/* Glowing Border Effect */
@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 10px rgba(217, 119, 6, 0.5),
                    0 0 20px rgba(217, 119, 6, 0.3),
                    0 0 30px rgba(217, 119, 6, 0.1);
    }
    50% {
        box-shadow: 0 0 20px rgba(217, 119, 6, 0.7),
                    0 0 30px rgba(217, 119, 6, 0.5),
                    0 0 40px rgba(217, 119, 6, 0.3);
    }
}

.glow-border {
    animation: glow 3s ease-in-out infinite;
}

/* Lotus Petal Design */
.lotus-petal {
    clip-path: polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%);
    transition: all 0.4s ease;
}

.lotus-petal:hover {
    transform: scale(1.1) rotate(5deg);
}

/* Sacred Geometry Patterns */
.sacred-geometry {
    background-image:
        repeating-linear-gradient(0deg, transparent, transparent 35px, rgba(217, 119, 6, 0.03) 35px, rgba(217, 119, 6, 0.03) 70px),
        repeating-linear-gradient(90deg, transparent, transparent 35px, rgba(217, 119, 6, 0.03) 35px, rgba(217, 119, 6, 0.03) 70px);
}

/* Om Symbol Animation */
@keyframes om-pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

.om-symbol {
    animation: om-pulse 4s ease-in-out infinite;
}

/* Zen Circle Effect */
.zen-circle {
    position: relative;
    border-radius: 50%;
    border: 3px solid #D97706;
    border-top-color: transparent;
    animation: spin 10s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Improved Section Backgrounds */
section {
    position: relative;
    overflow: hidden;
}

section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    z-index: -1;
}

/* Enhanced Card Shadows with Depth */
.depth-shadow {
    box-shadow:
        0 1px 3px rgba(0, 0, 0, 0.12),
        0 4px 6px rgba(217, 119, 6, 0.1),
        0 8px 12px rgba(217, 119, 6, 0.05);
}

.depth-shadow:hover {
    box-shadow:
        0 4px 6px rgba(0, 0, 0, 0.12),
        0 8px 12px rgba(217, 119, 6, 0.15),
        0 12px 20px rgba(217, 119, 6, 0.1);
}

/* Spiritual Gradient Overlays */
.spiritual-gradient {
    background: linear-gradient(
        135deg,
        rgba(217, 119, 6, 0.9) 0%,
        rgba(251, 191, 36, 0.8) 50%,
        rgba(217, 119, 6, 0.9) 100%
    );
}

/* Text Shadow for Better Readability on Saffron */
.text-shadow-soft {
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.text-shadow-strong {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}
