/* Quick Fixes for Color and Display Issues */

/* Custom Color Variables */
:root {
    --color-background: #FFFBF7;
    --color-text: #4A4A4A;
    --color-primary: #B76E79;
    --color-secondary: #F4E9E9;
    --color-accent: #D1BDB2;
}

/* Force correct colors */
.bg-background { background-color: var(--color-background) !important; }
.bg-secondary { background-color: var(--color-secondary) !important; }
.bg-primary { background-color: var(--color-primary) !important; }
.bg-accent { background-color: var(--color-accent) !important; }

.text-background { color: var(--color-background) !important; }
.text-text { color: var(--color-text) !important; }
.text-primary { color: var(--color-primary) !important; }
.text-secondary { color: var(--color-secondary) !important; }
.text-accent { color: var(--color-accent) !important; }

.border-primary { border-color: var(--color-primary) !important; }
.border-secondary { border-color: var(--color-secondary) !important; }
.border-accent { border-color: var(--color-accent) !important; }

/* Fix hover states */
.hover\:text-primary:hover { color: var(--color-primary) !important; }
.hover\:text-accent:hover { color: var(--color-accent) !important; }
.hover\:bg-primary:hover { background-color: var(--color-primary) !important; }
.hover\:bg-secondary:hover { background-color: var(--color-secondary) !important; }
.hover\:border-primary:hover { border-color: var(--color-primary) !important; }

/* Fix group hover states */
.group:hover .group-hover\:text-accent { color: var(--color-accent) !important; }

/* Fix filter buttons */
.filter-btn {
    padding: 0.6rem 1.75rem;
    border-radius: 9999px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    will-change: transform, box-shadow;
}

.filter-btn.active {
    background-color: var(--color-primary) !important;
    color: white !important;
}

/* Contact Form Enhancements */
.form-input {
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--color-primary) !important;
    box-shadow: 0 0 0 3px rgba(183, 110, 121, 0.1);
}

.form-input.border-red-500 {
    border-color: #ef4444 !important;
    background-color: #fef2f2 !important;
}

.form-input.border-green-500 {
    border-color: #10b981 !important;
    background-color: #f0fdf4 !important;
}

.error-message {
    color: #dc2626;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.success-message {
    background-color: #d1fae5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}

.error-message-box {
    background-color: #fee2e2;
    border: 1px solid #fca5a5;
    color: #991b1b;
}

/* WhatsApp Button Styling */
.whatsapp-btn {
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
    transition: all 0.3s ease;
}

.whatsapp-btn:hover {
    background: linear-gradient(135deg, #128c7e 0%, #075e54 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(37, 211, 102, 0.3);
}

/* Loading Animation */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* Button Loading State */
button:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

/* Form Status Messages */
.form-status-success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border-left: 4px solid #10b981;
    animation: slideIn 0.3s ease-out;
}

.form-status-error {
    background: linear-gradient(135deg, #fee2e2 0%, #fca5a5 100%);
    border-left: 4px solid #ef4444;
    animation: slideIn 0.3s ease-out;
}

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

/* Phone number input styling */
input[type="tel"] {
    font-family: monospace;
}

/* Select dropdown styling */
select.form-input {
    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 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* Fix button hover effects */
.filter-btn:hover {
    border-color: var(--color-primary) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(183, 110, 121, 0.4);
}

.filter-btn:not(.active) {
    background-color: var(--color-secondary) !important;
    color: var(--color-text) !important;
}

.filter-btn:not(.active):hover {
    background-color: var(--color-accent) !important;
    color: var(--color-primary) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* Ensure images are visible */
.gallery-item img {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Fix any remaining overlay issues */
.absolute.bg-black {
    background-color: transparent !important;
}

/* Fix JavaScript-generated overlays */
.absolute.bg-primary {
    background-color: var(--color-primary) !important;
}

.absolute.bg-transparent,
.bg-transparent {
    background-color: transparent !important;
}

.bg-opacity-0 {
    background-color: transparent !important;
}

.group-hover\:bg-primary:hover,
.group:hover .group-hover\:bg-primary {
    background-color: var(--color-primary) !important;
}

.group-hover\:bg-opacity-20:hover,
.group:hover .group-hover\:bg-opacity-20 {
    background-color: rgba(183, 110, 121, 0.2) !important;
}

.group-hover\:bg-opacity-30:hover,
.group:hover .group-hover\:bg-opacity-30 {
    background-color: rgba(183, 110, 121, 0.3) !important;
}

.group-hover\:bg-opacity-50:hover,
.group:hover .group-hover\:bg-opacity-50 {
    background-color: rgba(183, 110, 121, 0.5) !important;
}

/* Make sure text is visible */
body {
    color: var(--color-text) !important;
}

/* Header fixes */
#header {
    background-color: rgba(255, 251, 247, 0.95) !important;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

#header.scrolled {
    background-color: rgba(255, 251, 247, 0.98) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Enhanced text visibility against pink background */
#header .text-primary {
    color: var(--color-primary) !important;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8) !important;
    font-weight: 700 !important;
    position: relative;
    z-index: 10;
}

#header .group-hover\:text-accent:hover,
#header .group:hover .group-hover\:text-accent {
    color: var(--color-accent) !important;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8) !important;
}

/* Enhanced navigation text visibility */
#header nav a {
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.7) !important;
    position: relative;
    z-index: 10;
}

#header nav a.text-text {
    color: var(--color-text) !important;
    font-weight: 600 !important;
}

/* Ensure mobile menu button is visible */
#header #mobile-menu-button {
    color: var(--color-primary) !important;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.7) !important;
    position: relative;
    z-index: 10;
}

/* Reduce bokeh circle opacity for better text visibility */
.bokeh-circle {
    opacity: 0.6 !important;
    filter: blur(2px) !important;
}

/* Additional z-index protection for header */
#header {
    z-index: 100 !important;
}

/* Enhanced navigation text visibility */
#header nav a {
    text-shadow: 0 0 4px rgba(255, 255, 255, 0.8), 0 0 8px rgba(255, 255, 255, 0.6) !important;
    position: relative;
    z-index: 10;
}

#header nav a.text-text {
    color: var(--color-text) !important;
    font-weight: 600 !important;
}

#header nav a:hover {
    text-shadow: 0 0 6px rgba(255, 255, 255, 0.9), 0 0 12px rgba(255, 255, 255, 0.7) !important;
}

/* Ensure mobile menu button is visible */
#header #mobile-menu-button {
    color: var(--color-primary) !important;
    text-shadow: 0 0 4px rgba(255, 255, 255, 0.8) !important;
    position: relative;
    z-index: 10;
}

/* Reduce bokeh circle opacity for better text visibility */
.bokeh-circle {
    opacity: 0.6 !important;
    filter: blur(2px) !important;
}

/* Additional z-index protection for header */
#header {
    z-index: 100 !important;
}

/* Button fixes */
.bg-primary.text-white {
    background-color: var(--color-primary) !important;
    color: white !important;
}

.hover\:bg-accent:hover {
    background-color: var(--color-accent) !important;
}

/* Typography fixes */
.font-headings {
    font-family: 'Cormorant Garamond', serif !important;
}

.font-body {
    font-family: 'Poppins', sans-serif !important;
}

/* 🎡 Instagram-Style Gallery Carousel Styles */
.gallery-carousel-wrapper {
    margin-bottom: 2rem;
    animation: fadeInUp 0.6s ease-out;
}

.gallery-carousel {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.gallery-carousel .carousel-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.gallery-carousel .carousel-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.gallery-carousel .carousel-slide {
    min-width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.gallery-carousel .carousel-slide img,
.gallery-carousel .carousel-slide video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-carousel .carousel-slide:hover img,
.gallery-carousel .carousel-slide:hover video {
    transform: scale(1.02);
}

.gallery-carousel .carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: bold;
    color: var(--color-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    opacity: 0;
}

.gallery-carousel:hover .carousel-nav {
    opacity: 1;
}

.gallery-carousel .carousel-prev {
    left: 12px;
}

.gallery-carousel .carousel-next {
    right: 12px;
}

.gallery-carousel .carousel-nav:hover {
    background: white;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.gallery-carousel .carousel-indicators {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 2;
}

.gallery-carousel .carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.gallery-carousel .carousel-counter {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    z-index: 2;
}

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

/* Responsive Design */
@media (max-width: 640px) {
    .gallery-carousel {
        height: 300px;
    }
    
    .gallery-carousel .carousel-nav {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
    
    .gallery-carousel .carousel-prev {
        left: 8px;
    }
    
    .gallery-carousel .carousel-next {
        right: 8px;
    }
    
    .gallery-carousel .carousel-indicators {
        bottom: 12px;
    }
    
    .gallery-carousel .carousel-counter {
        top: 12px;
        right: 12px;
    }
}

/* Mobile touch improvements */
.gallery-item {
    cursor: pointer;
    transition: all 0.3s ease;
    -webkit-tap-highlight-color: rgba(183, 110, 121, 0.2);
}

.gallery-item:hover,
.gallery-item:focus {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Improve touch targets */
button, 
.filter-btn,
a {
    -webkit-tap-highlight-color: rgba(183, 110, 121, 0.3);
    touch-action: manipulation;
}

/* Mobile menu animation */
#mobile-menu {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: top;
}

#mobile-menu.hidden {
    transform: scaleY(0);
    opacity: 0;
}

#mobile-menu:not(.hidden) {
    transform: scaleY(1);
    opacity: 1;
}

/* Improve form inputs on mobile */
input, textarea, select {
    font-size: 16px !important; /* Prevents zoom on iOS */
}

/* Better scrolling on mobile */
html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    -webkit-overflow-scrolling: touch;
}

/* Mobile gallery improvements */
.gallery-item img {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

/* Gallery Load More Button */
#load-more-btn button {
    background: linear-gradient(135deg, var(--color-primary), #A85D68);
    border: none;
    color: white;
    font-weight: 600;
    padding: 0.875rem 2rem;
    border-radius: 0.75rem;
    box-shadow: 0 10px 25px rgba(183, 110, 121, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

#load-more-btn button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(183, 110, 121, 0.4);
    background: linear-gradient(135deg, #A85D68, var(--color-primary));
}

#load-more-btn button:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 5px 15px rgba(183, 110, 121, 0.3);
}

#load-more-btn button:disabled {
    opacity: 0.8;
    cursor: not-allowed;
    transform: none !important;
}

#load-more-btn button::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;
}

#load-more-btn button:hover:not(:disabled)::before {
    left: 100%;
}

/* Gallery Status */
#gallery-status {
    font-weight: 500;
    opacity: 0.8;
}

/* Gallery Item Animation Enhancement */
.gallery-item {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-item.hidden {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
}
