/* Custom CSS for The Palada website */

/* Number input spinner buttons - make arrows bigger */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
    position: relative;
}

/* Custom larger spinner buttons */
input[type="number"].custom-number-input {
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="%23374151" viewBox="0 0 16 16"><path d="M8 3a.5.5 0 0 1 .5.5v2H10a.5.5 0 0 1 0 1H8.5v2a.5.5 0 0 1-1 0v-2H6a.5.5 0 0 1 0-1h1.5v-2A.5.5 0 0 1 8 3z"/><path d="M8 11a.5.5 0 0 1 .5.5v2H10a.5.5 0 0 1 0 1H8.5v2a.5.5 0 0 1-1 0v-2H6a.5.5 0 0 1 0-1h1.5v-2A.5.5 0 0 1 8 11z"/></svg>');
    background-position: right 8px center;
    background-repeat: no-repeat;
    background-size: 20px 40px;
    padding-right: 40px;
}

/* Modern approach - add custom buttons */
.number-input-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}

.number-input-wrapper input[type="number"] {
    padding-right: 40px;
}

.spinner-buttons {
    position: absolute;
    right: 2px;
    top: 2px;
    bottom: 2px;
    width: 36px;
    display: flex;
    flex-direction: column;
}

.spinner-button {
    flex: 1;
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    color: #374151;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.2s ease;
    user-select: none;
}

.spinner-button:first-child {
    border-top-right-radius: 6px;
    border-bottom: 0.5px solid #d1d5db;
}

.spinner-button:last-child {
    border-bottom-right-radius: 6px;
    border-top: 0.5px solid #d1d5db;
}

.spinner-button:hover {
    background: #e5e7eb;
    color: #1f2937;
}

.spinner-button:active {
    background: #d1d5db;
    transform: scale(0.95);
}

/* Brand logo sizing override */
.brand-logo { 
    height: 80px !important; 
    width: auto !important; 
    min-height: 80px !important;
}
@media (min-width: 768px) {
    .brand-logo { 
        height: 100px !important; 
        min-height: 100px !important;
    }
}

/* Root variables for consistent theming */
:root {
    --primary-50: #f0f9ff;
    --primary-500: #3b82f6;
    --primary-600: #2563eb;
    --primary-700: #1d4ed8;
    --transition-default: all 0.3s ease;
}

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

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    color: #1f2937;
}

/* Smooth scrolling for the entire page */
html {
    scroll-behavior: smooth;
}

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

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

::-webkit-scrollbar-thumb {
    background: var(--primary-500);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-600);
}

/* Hero section video styling */
#hero-video {
    filter: brightness(0.8);
    transition: var(--transition-default);
}

#hero-video:hover {
    filter: brightness(0.9);
}

/* Button hover effects */
.btn-primary {
    background: var(--primary-600);
    color: white;
    padding: 1rem 2rem;
    border-radius: 9999px;
    font-weight: 600;
    transition: var(--transition-default);
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.btn-primary:hover {
    background: var(--primary-700);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

/* Card hover effects */
.card-hover {
    transition: var(--transition-default);
}

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

/* Loading animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

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

/* Lazy loading placeholder */
.lazy-load {
    opacity: 0;
    transition: opacity 0.5s ease;
}

.lazy-load.loaded {
    opacity: 1;
}

/* Custom carousel styles */
.carousel-container {
    position: relative;
    overflow: hidden;
}

.carousel-slide {
    min-width: 100%;
    transition: transform 0.5s ease-in-out;
}

/* Indicator active state */
.indicator.active {
    background-color: var(--primary-500) !important;
    transform: scale(1.2);
}

/* Gallery lightbox styles */
#lightbox {
    backdrop-filter: blur(5px);
    transition: var(--transition-default);
}

#lightbox-image {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

/* Success modal animation */
#success-modal,
#error-modal {
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

#success-modal > div,
#error-modal > div {
    animation: slideUp 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

/* Form styling */
input[type="email"] {
    transition: var(--transition-default);
}

input[type="email"]:focus {
    outline: none;
    ring: 2px;
    ring-color: var(--primary-500);
    border-color: var(--primary-500);
}

/* Pricing cards */
.pricing-card {
    transition: var(--transition-default);
    position: relative;
}

.pricing-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

/* Waitlist animations and effects */
@keyframes floating {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-10px) rotate(2deg); }
    66% { transform: translateY(5px) rotate(-1deg); }
}

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

@keyframes confetti {
    0% { transform: scale(0) rotate(0deg); opacity: 1; }
    100% { transform: scale(1) rotate(180deg); opacity: 0; }
}

.floating-accent {
    animation: floating 6s ease-in-out infinite;
}

.pulse-animation {
    animation: pulse 8s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
    .floating-accent,
    .pulse-animation {
        animation: none;
    }
}

/* Confetti particles */
.confetti-particle {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #3b82f6;
    animation: confetti 2s ease-out forwards;
    pointer-events: none;
}

.confetti-particle:nth-child(2n) { background: #ef4444; }
.confetti-particle:nth-child(3n) { background: #10b981; }
.confetti-particle:nth-child(4n) { background: #f59e0b; }
.confetti-particle:nth-child(5n) { background: #8b5cf6; }

/* Message styles */
.message-success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
}

.message-warning {
    background-color: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
}

.message-error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
}

/* Feature icons animation */
.feature-icon {
    transition: var(--transition-default);
}

.feature-icon:hover {
    transform: rotate(360deg) scale(1.1);
}

/* Navigation scroll effect */
nav.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

/* Mobile optimizations */
@media (max-width: 768px) {
    /* Hero section mobile adjustments */
    .hero-content h1 {
        font-size: 2.5rem;
        line-height: 1.2;
    }
    
    /* Carousel touch feedback */
    .carousel-container {
        touch-action: pan-y pinch-zoom;
    }
    
    /* Mobile-friendly buttons */
    .btn-primary {
        padding: 0.875rem 1.5rem;
        font-size: 0.95rem;
    }
    
    /* Adjust spacing for mobile */
    section {
        padding: 3rem 0;
    }
    
    /* Gallery mobile adjustments */
    #lightbox-image {
        max-width: 95vw;
        max-height: 80vh;
    }
}

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

/* High contrast mode support */
@media (prefers-contrast: high) {
    .bg-primary-50 {
        background-color: white;
        border: 2px solid var(--primary-600);
    }
    
    .text-gray-600 {
        color: #000;
    }
    
    .text-gray-400 {
        color: #333;
    }
}

/* Focus indicators for accessibility */
button:focus,
a:focus,
input:focus {
    outline: 2px solid var(--primary-500);
    outline-offset: 2px;
}

/* Print styles */
@media print {
    nav,
    footer,
    #lightbox,
    #success-modal,
    #error-modal,
    #loading {
        display: none !important;
    }
    
    body {
        color: black;
        background: white;
    }
    
    .bg-gray-50,
    .bg-primary-50 {
        background: white !important;
    }
}

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

.backdrop-blur-sm {
    backdrop-filter: blur(4px);
}

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

/* Video controls hide on mobile */
video::-webkit-media-controls {
    display: none !important;
}

video::-webkit-media-controls-enclosure {
    display: none !important;
}

/* Loading spinner enhancement */
.loading-spinner {
    animation: spin 1s linear infinite;
}

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