/* ==========================================================================
   Olé Piscinas - Main Stylesheet
   ========================================================================== */

/* Base Styles
   ========================================================================== */

/* RemixIcon fallback */
:where([class^="ri-"])::before { 
    content: "\f3c2"; 
}

body {
    font-family: 'Montserrat', sans-serif;
    overflow-x: hidden;
}

/* Form Styles
   ========================================================================== */

/* Contact Form Styles - Ensure continue buttons are always visible */
#btn-next, #btn-continue-step1 {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    min-width: 120px !important;
    position: relative !important;
    z-index: 10 !important;
}

/* Step content visibility - only when not hidden */
.step-content:not(.hidden) {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Add pulsing animation to make it more noticeable */
#main-btn-next:not(.hidden),
#btn-next:not(.hidden) {
    animation: pulse-glow 2s infinite;
}

/* Service Modal Steps */
.service-modal-step {
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
}

.service-modal-step.hidden {
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
}

/* Fix circles ONLY in service modal */
#serviceModal .rounded-full {
    aspect-ratio: 1 !important;
    flex-shrink: 0 !important;
}

/* Fix for modal header service icon only */
#modalServiceIcon {
    width: 3rem !important;
    height: 3rem !important;
    aspect-ratio: 1 !important;
    flex-shrink: 0 !important;
    border-radius: 50% !important;
}

/* Fix for contact preference radio circles in modal only */
#serviceModal .service-modal-step label input[type="radio"] {
    width: 12px !important;
    height: 12px !important;
    flex-shrink: 0 !important;
}

/* Fix for step 2 header circle in modal only */
#serviceStep2 .w-12.h-12 {
    width: 3rem !important;
    height: 3rem !important;
    aspect-ratio: 1 !important;
    flex-shrink: 0 !important;
}

/* Step indicator styles */
.step-indicator {
    position: relative;
}

.step-indicator::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 100%;
    width: 100%;
    height: 2px;
    background-color: #e5e7eb;
    z-index: -1;
}

.step-indicator:last-child::after {
    display: none;
}

/* Prevent button duplication */
#nextToStep2 {
    display: block !important;
    position: relative !important;
    z-index: 1 !important;
}

#nextToStep2:only-child {
    display: block !important;
}

/* Field styling and validation */
.label-highlighted {
    background-color: rgba(69, 182, 239, 0.9) !important;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(69, 182, 239, 0.4);
}

.field-error {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

.error-message {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
}

.error-message i {
    margin-right: 0.5rem;
}

/* Input styling */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Slider Components
   ========================================================================== */

/* Before/After Slider Styles */
.before-after-container {
    position: relative;
    overflow: hidden;
}

.before-after-slider {
    position: absolute;
    top: 0;
    left: 50%;
    width: 4px;
    height: 100%;
    background: white;
    border: 2px solid #45b6ef;
    cursor: ew-resize;
    z-index: 10;
    transform: translateX(-50%);
}

.before-after-slider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    background: #45b6ef;
    border: 2px solid white;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.before-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.after-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    clip-path: polygon(50% 0%, 100% 0%, 100% 100%, 50% 100%);
}

/* Scrollbar Styles */
.before-after-scroll {
    scrollbar-width: thin;
    scrollbar-color: #0077B6 #f1f1f1;
}

.before-after-scroll::-webkit-scrollbar {
    height: 6px;
}

.before-after-scroll::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.before-after-scroll::-webkit-scrollbar-thumb {
    background: #0077B6;
    border-radius: 10px;
}

/* Animation Effects
   ========================================================================== */

/* Pulse Glow Animation */
@keyframes pulse-glow {
    0% { box-shadow: 0 0 0 0 rgba(69, 182, 239, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(69, 182, 239, 0); }
    100% { box-shadow: 0 0 0 0 rgba(69, 182, 239, 0); }
}

/* Enhanced pulse effect for buttons */
.pulse-glow {
    animation: pulse-glow-enhanced 3s infinite;
}

@keyframes pulse-glow-enhanced {
    0% { box-shadow: 0 4px 15px rgba(69, 182, 239, 0.4); }
    50% { box-shadow: 0 8px 25px rgba(69, 182, 239, 0.6); }
    100% { box-shadow: 0 4px 15px rgba(69, 182, 239, 0.4); }
}

/* Wave effect for buttons */
.wave-effect {
    position: relative;
    overflow: hidden;
}

.wave-effect::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: wave 2.5s infinite;
    z-index: 1;
}

.wave-effect:hover::before {
    animation: wave-fast 1s infinite;
}

@keyframes wave {
    0% { left: -100%; }
    100% { left: 100%; }
}

@keyframes wave-fast {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Fade-in animation */
.animate-fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

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

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

/* Card Components
   ========================================================================== */

/* Service Cards */
.service-card {
    transition: transform 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
}

/* Gallery Cards */
.gallery-card:hover {
    transform: translateY(-8px) scale(1.02);
}

/* Gallery Section Styles
   ========================================================================== */

/* Scrollbar hiding */
.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

.quick-gallery-slider {
    scroll-behavior: smooth;
}

/* Custom scrollbar for webkit browsers */
.quick-gallery-slider::-webkit-scrollbar {
    height: 0px;
}

/* Modal Components
   ========================================================================== */

/* New Contact Modal Styles */
#newContactModal .close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    color: #6b7280;
    cursor: pointer;
    z-index: 10;
}

#newContactModal .close-btn:hover {
    color: #374151;
}

#newContactModal .step-indicator {
    background: white;
    color: #374151;
    padding: 30px 40px 20px;
    text-align: left;
    border-bottom: 1px solid #f3f4f6;
}

#newContactModal .service-option {
    transition: all 0.2s ease;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    margin-bottom: 12px;
}

#newContactModal .service-option:hover {
    border-color: #45b6ef;
}

#newContactModal .service-option.selected {
    border-color: #45b6ef;
}

#newContactModal .contact-option {
    transition: all 0.2s ease;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    margin-bottom: 12px;
}

#newContactModal .contact-option:hover {
    border-color: #45b6ef;
}

#newContactModal .contact-option.selected {
    border-color: #45b6ef;
}

#newContactModal .btn-primary {
    background: #45b6ef;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 16px;
}

#newContactModal .btn-primary:hover {
    background: #3aa5db;
}

#newContactModal .btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: #94a3b8;
}

#newContactModal .input-field {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 16px;
    transition: all 0.2s ease;
    background: white;
}

#newContactModal .input-field:focus {
    outline: none;
    border-color: #45b6ef;
    box-shadow: 0 0 0 3px rgba(69, 182, 239, 0.1);
}

#newContactModal .success-message {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
    padding: 12px;
    border-radius: 6px;
    margin-top: 8px;
}

#newContactModal .error-message {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 12px;
    border-radius: 6px;
    margin-top: 8px;
}

#newContactModal .loading-spinner {
    border: 3px solid #f3f4f6;
    border-top: 3px solid #45b6ef;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
}

#newContactModal .step-content {
    padding: 40px;
    min-height: 400px;
}

#newContactModal .hidden { 
    display: none; 
}

/* Force all service buttons to be identical - no white lines */
#verDetallesBtn,
#reparacionDetallesBtn, 
#construccionDetallesBtn {
    width: 100% !important;
    padding: 0.75rem 1rem !important;
    background-color: #45b6ef !important;
    color: white !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    position: relative !important;
    overflow: hidden !important;
    cursor: pointer !important;
    border: none !important;
    margin: 0 !important;
    border-radius: 0 0 0.75rem 0.75rem !important;
    transition: all 0.3s ease !important;
}

#verDetallesBtn:hover,
#reparacionDetallesBtn:hover,
#construccionDetallesBtn:hover {
    background-color: #2563eb !important;
}

/* Fix height difference - ensure all service content sections are at least 308px like the working first one */
.bg-white.rounded-xl.shadow-lg .p-6 {
    min-height: 308px !important;
    box-sizing: border-box !important;
}

/* Ensure parent containers have no spacing */
.bg-white.rounded-xl.shadow-lg .relative {
    margin: 0 !important;
    padding: 0 !important;
} 