/* Root Variables */
:root {
    --primary-color: #f97316;
    --primary-dark: #ea580c;
    --primary-light: #fed7aa;
    --secondary-color: #dc2626;
    --accent-color: #fbbf24;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f9fafb;
    --white: #ffffff;
    --shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.15);
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    overflow-x: hidden;
    background: var(--white);
}

.font-display {
    font-family: 'Playfair Display', serif;
}

/* Utility Classes */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

@media (min-width: 640px) {
    .container {
        padding: 0 2rem;
    }
}

/* Ticker Animation Styles */
.ticker-container {
    white-space: nowrap;
    overflow: hidden;
    position: relative;
}

.ticker-text {
    display: inline-block;
    white-space: nowrap;
    animation: scroll 30s linear infinite;
}

@keyframes scroll {
    0% {
        transform: translateX(100%);
    }
    100% {
        transform: translateX(-100%);
    }
}

.animate-scroll {
    animation: scroll 30s linear infinite;
}

/* Custom animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(220, 38, 38, 0.3);
    }
    50% {
        box-shadow: 0 0 30px rgba(220, 38, 38, 0.5);
    }
}

/* Mobile-specific responsive styles */
@media (max-width: 640px) {
    /* Ensure proper spacing for mobile header */
    body {
        padding-top: 110px; /* Account for fixed header height */
    }
    
    /* Mobile navigation adjustments */
    .mobile-dropdown button {
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }
    
    /* Improve touch targets */
    .mobile-dropdown a,
    .mobile-dropdown button {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    
    /* Prevent horizontal scroll */
    .ticker-container {
        width: 100%;
        max-width: 100%;
    }
    
    /* Mobile logo adjustments */
    .group h1 {
        font-size: 1.25rem;
        line-height: 1.2;
    }
}

@media (max-width: 480px) {
    /* Extra small mobile devices */
    body {
        padding-top: 100px;
    }
    
    /* Compact mobile header */
    .ticker-text span {
        margin-left: 1rem;
        margin-right: 1rem;
        font-size: 0.75rem;
    }
    
    /* Smaller logo for very small screens */
    .group h1 {
        font-size: 1.125rem;
    }
}

@media (min-width: 641px) and (max-width: 1024px) {
    /* Tablet adjustments */
    body {
        padding-top: 90px;
    }
}

@media (min-width: 1025px) {
    /* Desktop adjustments */
    body {
        padding-top: 100px;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    .animate-pulse,
    .animate-ping,
    .animate-scroll {
        animation: none;
    }
    
    .transition-all,
    .transition-colors,
    .transition-transform {
        transition: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .bg-gradient-to-r {
        background: #f97316;
    }
    
    .text-gray-700 {
        color: #000;
    }
    
    .text-gray-600 {
        color: #333;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    50% {
        box-shadow: 0 0 30px rgba(220, 38, 38, 0.6);
    }
}

@keyframes typewriter {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

@keyframes blink {
    0%, 50% {
        border-color: transparent;
    }
    51%, 100% {
        border-color: var(--primary-red);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

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

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(-100px);
    }
}

.animate-fadeInUp {
    animation: fadeInUp 0.8s ease-out;
}

.animate-slideInLeft {
    animation: slideInLeft 0.8s ease-out;
}

.animate-glow {
    animation: glow 2s ease-in-out infinite;
}

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

.gradient-bg {
    background: linear-gradient(-45deg, #DC2626, #991B1B, #EF4444, #B91C1C);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

.typewriter {
    overflow: hidden;
    border-right: 3px solid var(--primary-red);
    white-space: nowrap;
    animation: typewriter 3s steps(40, end), blink 0.75s step-end infinite;
}

/* Carousel Styles */
.carousel-container {
    position: relative;
    overflow: hidden;
}

.carousel-slide {
    transition: opacity 1s ease-in-out, transform 1s ease-in-out;
    will-change: opacity, transform;
}

.carousel-slide.active {
    opacity: 1;
    z-index: 2;
}

.carousel-slide:not(.active) {
    opacity: 0;
    z-index: 1;
}

.carousel-slide.slide-in {
    animation: slideIn 1s ease-out forwards;
}

.carousel-slide.slide-out {
    animation: slideOut 1s ease-out forwards;
}

.slide-content {
    animation: fadeInUp 1s ease-out 0.3s both;
}

.carousel-dot.active {
    background-color: white;
    transform: scale(1.2);
}

.carousel-dot {
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dot:hover {
    transform: scale(1.1);
}

.carousel-prev, .carousel-next {
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.carousel-prev:hover, .carousel-next:hover {
    transform: translateY(-50%) scale(1.1);
}

/* Activity Card Animations */
.activity-card {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.activity-card.animate {
    opacity: 1;
    transform: translateY(0);
}

/* Impact Card Animations */
.impact-card {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.impact-card.animate {
    opacity: 1;
    transform: translateY(0);
}

/* Counter Animation */
.counter {
    font-variant-numeric: tabular-nums;
    transition: all 0.3s ease;
}

.counter.counting {
    color: #dc2626;
    transform: scale(1.05);
}

.activity-card:nth-child(1) { transition-delay: 0.1s; }
.activity-card:nth-child(2) { transition-delay: 0.2s; }
.activity-card:nth-child(3) { transition-delay: 0.3s; }
.activity-card:nth-child(4) { transition-delay: 0.4s; }

/* Navigation Styles - White Background */
nav {
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

nav.scrolled {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(15px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
    border-bottom: 1px solid rgba(0, 0, 0, 0.15);
}

/* Custom hover effects */
.hover-lift {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.nav-link {
    position: relative;
    transition: all 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 50%;
    background: linear-gradient(90deg, var(--primary-red), var(--accent-red));
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 100%;
}

.dropdown {
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.dropdown-parent:hover .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-red), var(--deep-red));
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

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

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(220, 38, 38, 0.4);
}

/* Particle animation background */
.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

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

.mobile-menu {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.mobile-menu.active {
    transform: translateX(0);
}

/* Ashram Slider Styles */
.ashram-slider {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
}

.ashram-slides {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.ashram-slide {
    flex: 0 0 100%;
    min-width: 100%;
}

/* Smooth transitions for slider navigation */
.ashram-slides {
    transition: transform 0.6s ease-in-out;
}

/* Hover effects for navigation buttons */
#ashramPrevBtn:hover,
#ashramNextBtn:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Indicator animations */
#ashramIndicators button {
    transition: all 0.3s ease;
    cursor: pointer;
}

#ashramIndicators button:hover {
    transform: scale(1.2);
}

#ashramIndicators button.bg-orange-500 {
    transform: scale(1.3);
}

/* Auto-play indicator pulse animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.ashram-slider .fa-play {
    animation: pulse 2s infinite;
}

/* Touch feedback for mobile */
.ashram-slide {
    touch-action: pan-y;
    user-select: none;
}

/* Responsive utilities */
@media (max-width: 768px) {
    .typewriter {
        animation: typewriter 2s steps(30, end), blink 0.75s step-end infinite;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-content p {
        font-size: 1.1rem;
    }
    
    .nav-links {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .grid {
        grid-template-columns: 1fr;
    }
    
    .lg\:grid-cols-2 {
        grid-template-columns: 1fr;
    }
    
    .lg\:grid-cols-3 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Mobile slider adjustments */
    .ashram-slide {
        grid-template-columns: 1fr;
    }
    
    #ashramPrevBtn,
    #ashramNextBtn {
        width: 10px;
        height: 10px;
    }
    
    #ashramIndicators button {
        width: 8px;
        height: 8px;
    }
}