/* ===== CUSTOM STYLES FOR TAILWIND ===== */
/* Variables pour les couleurs personnalisées */
:root {
    --primary-gradient: linear-gradient(135deg, #dc2626, #f97316, #eab308);
    --hero-gradient: linear-gradient(135deg, #dc2626 0%, #f97316 25%, #eab308 50%, #22c55e 75%, #dc2626 100%);
    --text-gradient: linear-gradient(135deg, #dc2626, #f97316, #eab308, #22c55e);
    --warm-gradient: linear-gradient(135deg, #f97316, #eab308, #22c55e);
}

/* Base styles - Tailwind gère déjà la plupart */
html {
    scroll-behavior: smooth;
}

/* ===== GLASS EFFECT ===== */
.glass {
    @apply bg-slate-800/80 backdrop-blur-xl border border-white/10;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* ===== GRADIENTS ===== */
.hero-gradient {
    background: var(--hero-gradient);
    background-size: 300% 300%;
    animation: gradientShift 8s ease infinite;
}

.text-gradient {
    background: var(--text-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 300% 300%;
    animation: gradientShift 6s ease infinite;
}

.action-gradient {
    background: var(--primary-gradient);
    background-size: 200% 200%;
    animation: gradientShift 4s ease infinite;
}

.warm-gradient {
    background: var(--warm-gradient);
    background-size: 200% 200%;
    animation: gradientShift 5s ease infinite;
}

/* ===== ANIMATIONS ===== */
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes fadeIn {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
    0% { opacity: 0; transform: translateY(40px); }
    100% { opacity: 1; transform: translateY(0); }
}

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

/* ===== UTILITY CLASSES ===== */
.animate-fade-in {
    animation: fadeIn 0.6s ease-in-out;
}

.animate-slide-up {
    animation: slideUp 0.8s ease-out;
}

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

.animate-pulse-slow {
    animation: pulse 3s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* ===== CARD EFFECTS ===== */
.card-hover {
    @apply transition-all duration-300 ease-out;
}

.card-hover:hover {
    @apply -translate-y-2;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

/* ===== LIGHTBOX ===== */
.lightbox-image {
    @apply w-auto h-auto object-contain;
    max-width: 90vw !important;
    max-height: 90vh !important;
    width: auto !important;
    height: auto !important;
    display: block !important;
    margin: 0 auto !important;
}

/* Lightbox container pour un meilleur centrage */
.lightbox-container {
    @apply flex items-center justify-center w-full h-full;
    min-height: 100vh;
    padding: 1rem;
}

/* Mobile lightbox optimizations */
@media (max-width: 768px) {
    .lightbox-container {
        padding: 0.5rem;
    }
    
    .lightbox-image {
        max-width: 95vw !important;
        max-height: 95vh !important;
    }
}

/* ===== RESPONSIVE ===== */
.section-padding {
    @apply py-32;
}

@media (max-width: 768px) {
    .section-padding {
        @apply py-20;
    }
}

/* ===== SECTION TITLES SPACING ===== */
.section-title {
    @apply mb-20;
}

@media (max-width: 768px) {
    .section-title {
        @apply mb-16;
    }
}

/* ===== SECTION SPACING ===== */
.section-spacing {
    @apply mt-24;
    margin-top: 6rem !important; /* Force spacing for donate section */
}

@media (max-width: 768px) {
    .section-spacing {
        @apply mt-20;
        margin-top: 5rem !important; /* Force spacing for donate section */
    }
}

/* ===== NAVBAR ===== */
.navbar-brand {
    @apply transition-all duration-300 ease-out;
}

.navbar-brand:hover .navbar-logo {
    @apply scale-105;
}

.navbar-link {
    @apply relative transition-colors duration-300;
}

.navbar-link::after {
    content: '';
    @apply absolute -bottom-1 left-0 w-0 h-0.5 bg-red-400 transition-all duration-300;
}

.navbar-link:hover::after {
    @apply w-full;
}

/* ===== BUTTONS ===== */
.btn-primary {
    @apply px-8 py-3 rounded-full font-semibold text-white transition-all duration-300 ease-out shadow-xl;
    background: var(--primary-gradient);
    background-size: 200% 200%;
    animation: gradientShift 4s ease infinite;
}

.btn-primary:hover {
    @apply -translate-y-1 scale-105;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.btn-secondary {
    @apply px-8 py-3 rounded-full font-semibold border-2 border-white/20 bg-transparent text-slate-100 transition-all duration-300 ease-out;
}

.btn-secondary:hover {
    @apply border-red-400 bg-red-500/10 text-red-400;
}

/* ===== FORMS ===== */
.form-input {
    @apply w-full rounded-xl bg-white/5 border border-white/10 px-4 py-4 text-slate-100 outline-none transition-all duration-300 placeholder-slate-400 text-base;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.form-input:focus {
    @apply border-red-400 bg-white/10;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1), 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    transform: translateY(-1px);
}

.form-input:hover {
    @apply bg-white/8 border-white/20;
    transform: translateY(-1px);
}

.form-label {
    @apply block text-sm font-semibold mb-3 text-slate-100;
    position: relative;
}

.form-label::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #ef4444, #f97316);
    transition: width 0.3s ease;
}

.form-input:focus + .form-label::after,
.form-group:focus-within .form-label::after {
    width: 100%;
}

.form-group {
    @apply relative;
}

.form-group:hover .form-label {
    @apply text-red-300;
}

/* Select styling */
.form-input select {
    @apply appearance-none cursor-pointer;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 40px;
}

/* Textarea specific */
.form-input textarea {
    @apply resize-none;
    min-height: 120px;
}

/* Checkbox styling */
.form-checkbox {
    @apply w-5 h-5 text-red-500 bg-white/5 border-white/10 rounded focus:ring-red-500 focus:ring-2 transition-all duration-300;
}

.form-checkbox:checked {
    @apply bg-red-500 border-red-500;
    background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='m13.854 3.646-7.5 7.5a.5.5 0 0 1-.708 0l-3.5-3.5a.5.5 0 1 1 .708-.708L6 10.293l7.146-7.147a.5.5 0 0 1 .708.708z'/%3e%3c/svg%3e");
}

/* Form button enhanced */
.form-submit {
    @apply relative overflow-hidden;
}

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

.form-submit:hover::before {
    left: 100%;
}

/* Contact section specific styles */
.contact-info-card {
    @apply glass rounded-3xl p-8 hover:bg-white/10 transition-all duration-300;
}

.contact-icon {
    @apply w-12 h-12 rounded-xl flex items-center justify-center flex-shrink-0;
}

.social-link {
    @apply w-12 h-12 rounded-xl flex items-center justify-center hover:scale-110 transition-transform duration-300;
}

/* Navbar specific styles */
.navbar-logo-positioning {
    @apply ml-4 lg:-mr-32;
}

/* ===== GALLERY ===== */
.gallery-item {
    @apply relative aspect-[4/3] overflow-hidden rounded-2xl border border-white/10 bg-white/5 transition-all duration-300 ease-out cursor-pointer;
}

.gallery-item:hover {
    @apply scale-105 bg-white/10;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.gallery-item img {
    @apply w-full h-full object-cover transition-transform duration-500;
}

.gallery-item:hover img {
    @apply scale-110;
}

.gallery-overlay {
    @apply absolute inset-0 bg-gradient-to-t from-black/60 via-transparent to-transparent opacity-0 transition-opacity duration-300;
}

.gallery-item:hover .gallery-overlay {
    @apply opacity-100;
}

.gallery-icon {
    @apply absolute inset-0 flex items-center justify-center opacity-0 transition-opacity duration-300;
}

.gallery-item:hover .gallery-icon {
    @apply opacity-100;
}

.gallery-icon-inner {
    @apply w-12 h-12 rounded-full bg-white/20 backdrop-blur-sm flex items-center justify-center;
}

/* ===== FOOTER ===== */
.footer-link {
    @apply text-slate-400 transition-colors duration-300;
}

.footer-link:hover {
    @apply text-red-400;
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===== SWIPER HERO BANNER ===== */
.hero-swiper {
    @apply w-full;
    height: 100vh;
    min-height: 600px;
    margin-top: 80px; /* Account for fixed navbar */
}

.hero-slide {
    @apply relative overflow-hidden;
    height: calc(100vh - 80px);
    min-height: 520px;
}

.hero-slide-bg {
    @apply absolute inset-0 w-full h-full;
    object-fit: cover;
    object-position: center center;
    transition: transform 0.3s ease;
    z-index: 1;
    display: block;
}

.hero-slide:hover .hero-slide-bg {
    transform: scale(1.05);
}

.hero-slide-overlay {
    @apply absolute inset-0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2;
}

.hero-slide-content {
    @apply relative w-full h-full flex items-center justify-center;
    z-index: 3;
    padding-top: 2rem;
}

/* Improve text visibility with strong contrast */
.hero-slide-content h1 {
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.9), 1px 1px 2px rgba(0, 0, 0, 0.8);
    color: #ffffff !important;
    font-size: 3rem !important;
    font-weight: 900 !important;
}

.hero-slide-content p {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.9), 1px 1px 2px rgba(0, 0, 0, 0.8);
    color: #f1f5f9 !important;
    font-size: 1.25rem !important;
}

.hero-slide-content span {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    color: #e2e8f0 !important;
    font-size: 0.875rem !important;
}

/* Add background to text containers for better readability */
.hero-slide-content .text-center {
    background: rgba(0, 0, 0, 0.6);
    padding: 2rem;
    border-radius: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

/* Swiper Navigation Buttons */
.hero-swiper-next,
.hero-swiper-prev {
    @apply w-12 h-12 rounded-full bg-white/10 backdrop-blur-sm border border-white/20 text-white transition-all duration-300;
    margin-top: -24px;
}

.hero-swiper-next:hover,
.hero-swiper-prev:hover {
    @apply bg-white/20 border-white/30 scale-110;
}

.hero-swiper-next::after,
.hero-swiper-prev::after {
    @apply text-lg font-bold;
}

.hero-swiper-next {
    right: 2rem;
}

.hero-swiper-prev {
    left: 2rem;
}

/* Swiper Pagination */
.hero-swiper-pagination {
    @apply bottom-8;
}

.hero-swiper-pagination .swiper-pagination-bullet {
    @apply w-3 h-3 bg-white/30 border border-white/50 transition-all duration-300;
    margin: 0 6px;
}

.hero-swiper-pagination .swiper-pagination-bullet-active {
    @apply bg-white border-white scale-125;
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .hero-swiper-next,
    .hero-swiper-prev {
        @apply w-10 h-10;
        margin-top: -20px;
    }
    
    .hero-swiper-next {
        right: 1rem;
    }
    
    .hero-swiper-prev {
        left: 1rem;
    }
    
    .hero-swiper-pagination {
        @apply bottom-4;
    }
    
    .hero-swiper-pagination .swiper-pagination-bullet {
        @apply w-2 h-2;
        margin: 0 4px;
    }
}

/* Swiper fade effect for smooth transitions */
.hero-swiper .swiper-slide {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.hero-swiper .swiper-slide-active {
    opacity: 1;
}

/* Ensure images load properly and improve visual quality */
.hero-slide-bg {
    /* Clean image rendering without distortion */
    image-rendering: auto;
}

/* Alternative object-fit for better image display */
.hero-slide-bg.alternative-fit {
    object-fit: contain;
    background-color: #1e293b;
}

/* Improve image positioning for better visual impact */
.hero-slide {
    overflow: hidden;
    border-radius: 0;
}

/* Clean image display without additional effects */

/* Fix for mobile devices */
@media (max-width: 768px) {
    .hero-swiper {
        height: 70vh;
        min-height: 400px;
        margin-top: 60px; /* Smaller navbar on mobile */
    }
    
    .hero-slide {
        height: calc(70vh - 60px);
        min-height: 340px;
    }
    
    .hero-slide-content {
        padding-top: 1rem;
    }
}

/* Ensure proper z-index stacking */
.hero-swiper {
    position: relative;
    z-index: 1;
}

.hero-swiper .swiper-wrapper {
    position: relative;
    z-index: 1;
}

/* ===== SWIPER BANNER ===== */
.banner-swiper {
    height: 80vh;
    min-height: 500px;
}

.banner-slide {
    position: relative;
    height: 100%;
    overflow: hidden;
}

.banner-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center 20%;
    background-repeat: no-repeat;
}

.banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

.banner-content {
    position: relative;
    z-index: 2;
    height: 100%;
}

/* Navigation buttons */
.banner-next,
.banner-prev {
    color: white !important;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    margin-top: -25px;
}

.banner-next:hover,
.banner-prev:hover {
    background: rgba(255, 255, 255, 0.2);
}

.banner-next::after,
.banner-prev::after {
    font-size: 20px;
    font-weight: bold;
}

/* Pagination */
.banner-pagination .swiper-pagination-bullet {
    background: rgba(255, 255, 255, 0.5);
    opacity: 1;
}

.banner-pagination .swiper-pagination-bullet-active {
    background: white;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .banner-swiper {
        height: 60vh;
        min-height: 400px;
    }
    
    .banner-next,
    .banner-prev {
        width: 40px;
        height: 40px;
        margin-top: -20px;
    }
    
    .banner-next::after,
    .banner-prev::after {
        font-size: 16px;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .navbar,
    .lightbox,
    .btn-primary,
    .btn-secondary,
    .banner-swiper {
        @apply hidden;
    }
    
    body {
        @apply bg-white text-black;
    }
}
