/* Modern Styles for Grace Community Church */

/* Base styles and reset */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', 'Inter', sans-serif;
    line-height: 1.7;
    letter-spacing: -0.01em;
}

/* Modern Navigation styles */
.nav-link-modern {
    @apply px-4 py-3 rounded-xl text-gray-700 dark:text-gray-300 hover:text-primary-600 dark:hover:text-primary-400 hover:bg-gray-100 dark:hover:bg-gray-800 font-medium transition-all duration-300 relative;
}

.nav-link-modern.active {
    @apply text-primary-600 dark:text-primary-400 bg-primary-50 dark:bg-primary-900/30;
}

.nav-link-modern::after {
    content: '';
    @apply absolute bottom-0 left-1/2 w-0 h-0.5 bg-primary-600 transition-all duration-300;
    transform: translateX(-50%);
}

.nav-link-modern.active::after,
.nav-link-modern:hover::after {
    @apply w-full;
}

.modern-cta-button {
    @apply px-6 py-3 bg-gradient-to-r from-primary-600 to-blue-600 hover:from-primary-700 hover:to-blue-700 text-white font-semibold rounded-xl shadow-lg hover:shadow-xl transition-all duration-300 transform hover:scale-105 hover:-translate-y-0.5;
}

.nav-link-mobile-modern {
    @apply flex items-center px-6 py-4 text-gray-700 dark:text-gray-300 hover:text-primary-600 dark:hover:text-primary-400 hover:bg-gray-50 dark:hover:bg-gray-800 rounded-xl transition-all duration-300 font-medium;
}

.nav-link-mobile-modern.active {
    @apply text-primary-600 dark:text-primary-400 bg-primary-50 dark:bg-primary-900/30;
}

.mobile-cta-button {
    @apply flex items-center justify-center px-6 py-4 bg-gradient-to-r from-primary-600 to-blue-600 text-white font-semibold rounded-xl shadow-lg mt-4 mx-4 transition-all duration-300 transform hover:scale-105;
}

/* Modern Hero CTA Buttons */
.hero-cta-primary {
    @apply inline-flex items-center px-8 py-6 bg-gradient-to-r from-primary-600 via-primary-500 to-blue-600 hover:from-primary-700 hover:via-primary-600 hover:to-blue-700 text-white font-bold rounded-2xl shadow-2xl hover:shadow-3xl transition-all duration-500 transform hover:scale-105 hover:-translate-y-1 border border-white/20 backdrop-blur-sm;
    background-size: 200% 200%;
    animation: gradient-shift 3s ease infinite;
}

.hero-cta-secondary {
    @apply inline-flex items-center px-8 py-4 bg-white/10 hover:bg-white/20 text-white font-semibold rounded-xl border border-white/30 backdrop-blur-xl transition-all duration-300 transform hover:scale-105 hover:-translate-y-0.5;
}

@keyframes gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Modern Activity Cards */
.modern-activity-card {
    @apply relative bg-white dark:bg-gray-800 rounded-3xl shadow-xl hover:shadow-2xl transition-all duration-500 transform hover:-translate-y-4 hover:scale-105 overflow-hidden border border-gray-100 dark:border-gray-700;
    background: linear-gradient(135deg, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0.95) 100%);
}

.dark .modern-activity-card {
    background: linear-gradient(135deg, rgba(31,41,55,0.9) 0%, rgba(17,24,39,0.95) 100%);
}

.modern-activity-card::before {
    content: '';
    @apply absolute inset-0 bg-gradient-to-br from-transparent to-black/5 dark:to-white/5 opacity-0 transition-opacity duration-500;
}

.modern-activity-card:hover::before {
    opacity: 1;
}

.modern-activity-icon {
    @apply w-16 h-16 rounded-2xl flex items-center justify-center shadow-lg transform -translate-y-8 mx-auto transition-all duration-500 group-hover:scale-110 group-hover:-translate-y-10;
}

/* Card styles */
.activity-card {
    @apply transition-all duration-300;
}

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

.sermon-card {
    @apply transition-all duration-300;
}

.sermon-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.event-card {
    @apply transition-all duration-300;
}

.event-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

/* Footer styles */
.footer-link {
    @apply text-gray-300 hover:text-white transition-colors duration-200;
}

.social-link {
    @apply w-10 h-10 bg-gray-800 hover:bg-primary-600 text-gray-300 hover:text-white rounded-full flex items-center justify-center transition-all duration-200;
}

/* Animation classes */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

.slide-in-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.slide-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.slide-in-right {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.slide-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

.scale-in {
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scale-in.visible {
    opacity: 1;
    transform: scale(1);
}

/* Scroll to top button */
#scroll-to-top {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

#scroll-to-top.visible {
    transform: scale(1);
    opacity: 1;
}

/* Form styles */
input:focus,
textarea:focus,
select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-error {
    @apply border-red-500 bg-red-50 dark:bg-red-900/20;
}

.form-success {
    @apply border-green-500 bg-green-50 dark:bg-green-900/20;
}

/* Loading states */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    transform: translate(-50%, -50%);
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* PayPal button customization */
#paypal-button-container {
    min-height: 50px;
}

/* Donation amount buttons */
.donation-amount-btn {
    @apply transition-all duration-200;
}

.donation-amount-btn.selected {
    @apply bg-primary-600 text-white border-primary-600;
}

.donation-amount-btn:hover:not(.selected) {
    @apply bg-primary-100 dark:bg-primary-900 border-primary-300 dark:border-primary-600;
}

/* Filter buttons */
.filter-btn,
.event-filter-btn {
    @apply transition-all duration-200;
}

.filter-btn.active,
.event-filter-btn.active {
    @apply bg-primary-600 text-white;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.dark ::-webkit-scrollbar-track {
    background: #1e293b;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.dark ::-webkit-scrollbar-thumb {
    background: #475569;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.dark ::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* Modal styles */
.modal-overlay {
    backdrop-filter: blur(4px);
}

/* Responsive video containers */
.aspect-video {
    aspect-ratio: 16 / 9;
}

/* Hero section gradient overlay */
.hero-overlay {
    background: linear-gradient(
        135deg,
        rgba(0, 0, 0, 0.4) 0%,
        rgba(0, 0, 0, 0.6) 100%
    );
}

/* Dark mode transition */
* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .bg-gray-900,
    .bg-gray-800,
    .bg-primary-600 {
        background: white !important;
        color: black !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .nav-link,
    .footer-link {
        text-decoration: underline;
    }
    
    .cta-button {
        border: 2px solid currentColor;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Focus visible support */
.focus-visible:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Custom utility classes */
.text-shadow {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.glass-morphism {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.dark .glass-morphism {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Image hover effects */
.image-hover-zoom {
    transition: transform 0.3s ease;
}

.image-hover-zoom:hover {
    transform: scale(1.05);
}

/* Pulse animation for live indicators */
.pulse-red {
    animation: pulse-red 2s infinite;
}

@keyframes pulse-red {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Skeleton loading animation */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

.dark .skeleton {
    background: linear-gradient(90deg, #374151 25%, #4b5563 50%, #374151 75%);
    background-size: 200% 100%;
}

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

/* Accessibility improvements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Skip link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #000;
    color: #fff;
    padding: 8px;
    text-decoration: none;
    z-index: 1000;
}

.skip-link:focus {
    top: 6px;
}
