/* Custom styles for Joudeh Afandi Barbershop */

/* Hero background with barbershop image */
.hero-gradient {
    background: linear-gradient(rgba(42, 25, 12, 0.95), rgba(26, 15, 8, 0.98)), 
                url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 800"><defs><pattern id="barbershop" patternUnits="userSpaceOnUse" width="120" height="120"><rect width="120" height="120" fill="%231A0F08"/><circle cx="30" cy="30" r="12" fill="%23D4AF37" opacity="0.03"/><circle cx="90" cy="90" r="12" fill="%23CD853F" opacity="0.02"/><rect x="50" y="50" width="20" height="20" fill="%23654321" opacity="0.02"/></pattern></defs><rect width="1200" height="800" fill="url(%23barbershop)"/></svg>');
    background-size: cover, 300px 300px;
    background-position: center, center;
    background-attachment: fixed;
    animation: gradientShift 15s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}

.hero-gradient::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(212, 175, 55, 0.08) 0%, transparent 60%),
                radial-gradient(circle at 80% 80%, rgba(205, 133, 63, 0.05) 0%, transparent 60%);
    animation: ambientGlow 12s ease-in-out infinite alternate;
}

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

@keyframes ambientGlow {
    0% { opacity: 0.3; }
    100% { opacity: 0.8; }
}

/* Enhanced smooth transitions */
* {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Fade-in animation for sections */
.fade-in {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* Stagger animation for cards */
.stagger-animation {
    animation-delay: calc(var(--index) * 0.1s);
}

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

::-webkit-scrollbar-track {
    background: #2A1A0C;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #CD853F;
}

/* Interactive Button Styles */
.hero-btn {
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.hero-btn::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;
}

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

.hero-btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.5);
}

.hero-btn:active {
    transform: translateY(0) scale(0.98);
    transition: all 0.1s;
}

/* Enhanced text shadows for better readability */
.drop-shadow-lg {
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
}

.drop-shadow-md {
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.6);
}

/* Enhanced Button Animations */
button[type="submit"]:hover {
    animation: buttonPulse 0.6s ease-in-out;
}

@keyframes buttonPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1.02); }
}

/* Special Offer Highlight */
.special-offer-highlight {
    animation: specialGlow 2s ease-in-out infinite alternate;
}

@keyframes specialGlow {
    0% { 
        box-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
    }
    100% { 
        box-shadow: 0 0 20px rgba(212, 175, 55, 0.8), 0 0 30px rgba(212, 175, 55, 0.3);
    }
}

/* New Barbershop Color Palette */
.bg-barbershop-dark { background-color: #2A1A0C; }
.bg-barbershop-medium { background-color: #3D2814; }
.bg-barbershop-light { background-color: #654321; }
.bg-barbershop-cream { background-color: #F5F5DC; }
.text-barbershop-gold { color: #D4AF37; }
.text-barbershop-bronze { color: #CD853F; }
.text-barbershop-cream { color: #F5F5DC; }
.text-barbershop-brown { color: #8B4513; }
.border-barbershop-gold { border-color: #D4AF37; }
.border-barbershop-bronze { border-color: #CD853F; }

/* Enhanced card styling */
.testimonial-card {
    background: linear-gradient(135deg, #2A1A0C 0%, #3D2814 100%);
    border: 1px solid rgba(212, 175, 55, 0.2);
    backdrop-filter: blur(10px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.testimonial-card:hover {
    border-color: #D4AF37;
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.2);
    transform: translateY(-5px);
}

.service-card {
    background: linear-gradient(135deg, #3D2814 0%, #2A1A0C 100%);
    border: 1px solid rgba(205, 133, 63, 0.2);
    transition: all 0.4s ease;
}

.service-card:hover {
    border-color: #CD853F;
    box-shadow: 0 8px 25px rgba(205, 133, 63, 0.15);
}

/* Gallery Section */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

.gallery-item {
    position: relative;
    height: 280px;
    border-radius: 10px;
    overflow: hidden;
    background: linear-gradient(135deg, #2A1A0C, #3D2814);
    cursor: pointer;
    transition: all 0.4s ease;
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.gallery-item.has-image {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.gallery-item:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 35px rgba(212, 175, 55, 0.3);
}

.gallery-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(212, 175, 55, 0.1), rgba(139, 69, 19, 0.2));
    z-index: 1;
}

.gallery-item .gallery-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(transparent, rgba(42, 26, 12, 0.9));
    color: #F5F5DC;
    z-index: 2;
}

/* Feather icons styling */
[data-feather] {
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}

/* Form focus states */
input:focus, select:focus, textarea:focus {
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

/* Button hover effects */
.hover\:transform:hover {
    transform: translateY(-2px);
}

/* Mobile menu animation */
#mobile-menu {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Card hover effects */
.hover\:scale-105:hover {
    transform: scale(1.05);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Star icons for ratings */
.fill-current {
    fill: currentColor;
}

/* Typography improvements */
h1, h2, h3, h4, h5, h6 {
    letter-spacing: -0.025em;
}

/* Custom amber variations */
.text-amber-300 {
    color: #fcd34d;
}

.bg-amber-300 {
    background-color: #fcd34d;
}

/* Responsive typography */
@media (max-width: 640px) {
    h1 {
        font-size: 2.5rem;
        line-height: 1.1;
    }
    
    h2 {
        font-size: 2rem;
        line-height: 1.2;
    }
}

/* Loading animation for buttons */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin-top: -10px;
    margin-left: -10px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Print styles */
@media print {
    header, footer, #mobile-menu-btn {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .bg-gray-900, .bg-gray-800, .bg-black {
        background: white !important;
    }
    
    .text-white, .text-gray-300, .text-gray-400 {
        color: black !important;
    }
    
    .text-amber-400 {
        color: #d97706 !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .bg-gray-900 {
        background-color: #000000;
    }
    
    .bg-gray-800 {
        background-color: #1a1a1a;
    }
    
    .text-gray-300 {
        color: #ffffff;
    }
    
    .text-gray-400 {
        color: #cccccc;
    }
}

/* Professional Gallery Styles */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
    padding: 1rem;
}

.gallery-item {
    position: relative;
    height: 250px;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    background: linear-gradient(45deg, #374151, #4b5563);
}

.gallery-item:hover {
    transform: scale(1.03) translateY(-8px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.gallery-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: linear-gradient(135deg, #374151 0%, #4b5563 100%);
    color: #f59e0b;
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    padding: 1.5rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

/* Floating elements animation */
.floating {
    animation: floating 3s ease-in-out infinite;
}

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

/* Professional card animations */
.card-hover {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(145deg, #1f2937, #374151);
    border: 1px solid rgba(245, 158, 11, 0.1);
}

.card-hover:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 25px 50px -12px rgba(245, 158, 11, 0.2);
    border-color: rgba(245, 158, 11, 0.3);
}

/* Text reveal animation */
.text-reveal {
    overflow: hidden;
}

.text-reveal span {
    display: inline-block;
    transform: translateY(100%);
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.text-reveal.visible span {
    transform: translateY(0);
}

/* Professional loading spinner */
.professional-loader {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(245, 158, 11, 0.1);
    border-top: 3px solid #f59e0b;
    border-radius: 50%;
    animation: professionalSpin 1s linear infinite;
}

@keyframes professionalSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Enhanced button styles */
.btn-primary {
    position: relative;
    overflow: hidden;
    background: linear-gradient(45deg, #f59e0b, #d97706);
    transition: all 0.3s ease;
}

.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 ease;
}

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

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

/* Professional navigation */
.nav-blur {
    backdrop-filter: blur(10px);
    background: rgba(0, 0, 0, 0.8);
    border-bottom: 1px solid rgba(245, 158, 11, 0.2);
}

/* Testimonial card enhancements */
.testimonial-card {
    background: linear-gradient(145deg, #1f2937, #374151);
    border: 1px solid rgba(245, 158, 11, 0.1);
    position: relative;
    overflow: hidden;
}

.testimonial-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, #f59e0b, #d97706);
    transform: scaleX(0);
    transition: transform 0.5s ease;
}

.testimonial-card:hover::before {
    transform: scaleX(1);
}

/* Professional section dividers */
.section-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(245, 158, 11, 0.5), transparent);
    margin: 2rem 0;
}

/* Reduce 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;
    }
}
