/* Future Boutique - Custom Styles */

/* ==========================================
   BASE STYLES
   ========================================== */

body {
    font-family: "Spline Sans", sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* ==========================================
   MOBILE OPTIMIZATIONS
   ========================================== */

/* Prevent horizontal scroll on mobile */
html, body {
    overflow-x: hidden;
    width: 100%;
}

/* Better touch scrolling for iOS */
* {
    -webkit-overflow-scrolling: touch;
}

/* Prevent zoom on input focus for iOS */
input[type="text"],
input[type="email"],
input[type="tel"],
textarea,
select {
    font-size: 16px !important; /* iOS zooms if font-size < 16px */
}

/* Remove iOS button styling */
button,
input[type="submit"],
input[type="button"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* Touch-friendly tap targets (minimum 44x44px for iOS) */
a, button {
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Remove tap highlight on mobile */
* {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

/* Better active states for touch */
button:active,
a:active {
    opacity: 0.7;
}

/* ==========================================
   MOBILE MENU
   ========================================== */

.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background: white;
    transition: right 0.3s ease-in-out;
    z-index: 9999;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
}

.dark .mobile-menu {
    background: #1a1a1a;
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
    z-index: 9998;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Mobile menu links alignment */
.mobile-menu-link {
    justify-content: flex-start !important;
}

/* Hamburger icon animation */
.hamburger {
    width: 24px;
    height: 20px;
    position: relative;
    cursor: pointer;
    display: none;
}

.hamburger span {
    display: block;
    position: absolute;
    height: 2px;
    width: 100%;
    background: currentColor;
    border-radius: 2px;
    opacity: 1;
    left: 0;
    transform: rotate(0deg);
    transition: .25s ease-in-out;
}

.hamburger span:nth-child(1) {
    top: 0px;
}

.hamburger span:nth-child(2),
.hamburger span:nth-child(3) {
    top: 9px;
}

.hamburger span:nth-child(4) {
    top: 18px;
}

.hamburger.active span:nth-child(1),
.hamburger.active span:nth-child(4) {
    top: 9px;
    width: 0%;
    left: 50%;
}

.hamburger.active span:nth-child(2) {
    transform: rotate(45deg);
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg);
}

@media (max-width: 1023px) {
    .hamburger {
        display: block;
    }
}

/* ==========================================
   RESPONSIVE TYPOGRAPHY
   ========================================== */

/* Extra small devices (< 375px) */
@media (max-width: 374px) {
    h1 {
        font-size: 2rem !important; /* 32px instead of 48px */
    }

    h2 {
        font-size: 1.5rem !important; /* 24px instead of 32px */
    }

    .hero-subtitle {
        font-size: 0.875rem !important; /* 14px instead of 18px */
    }
}

/* Small devices (375px - 639px) */
@media (min-width: 375px) and (max-width: 639px) {
    h1 {
        font-size: 2.25rem !important; /* 36px */
    }
}

/* ==========================================
   HERO SECTION OPTIMIZATIONS
   ========================================== */

/* Fallback para navegadores sin soporte dvh */
.hero-section {
    /* Fallback para navegadores antiguos */
    min-height: 60vh;
    min-height: 60dvh;
}

@media (min-width: 640px) {
    .hero-section {
        min-height: 70vh;
        min-height: 70dvh;
    }
}

@media (min-width: 1024px) {
    .hero-section {
        min-height: 80vh;
        min-height: 80dvh;
    }
}

/* Optimizar carga de imagen hero */
.hero-bg {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    /* Prevenir flash de contenido */
    background-color: #1a1a1a;
}

/* ==========================================
   ANIMATIONS
   ========================================== */

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

.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out;
}

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

/* Initial hidden state for GSAP animations */
[data-gsap-reveal] {
    opacity: 0;
    transform: translateY(30px);
}

/* Lightbox backdrop blur effect */
#image-lightbox {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Service modal backdrop blur */
#service-modal {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* Service modal content scroll */
#service-modal > div {
    -webkit-overflow-scrolling: touch;
}

/* Service modal responsive adjustments */
@media (max-width: 640px) {
    #service-modal > div {
        border-radius: 1rem;
        margin: 0.5rem;
    }
}

/* Improved hover effects with transform origin */
.group:hover {
    will-change: transform;
}

/* Optimize rendering for animated elements */
.gsap-animated {
    will-change: transform, opacity;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    perspective: 1000px;
    -webkit-perspective: 1000px;
}

/* ==========================================
   FORM OPTIMIZATIONS FOR MOBILE
   ========================================== */

/* Better spacing for mobile forms */
@media (max-width: 768px) {
    form input,
    form select,
    form textarea {
        padding: 14px 16px !important; /* Larger tap targets */
    }

    form button[type="submit"],
    form button[type="button"] {
        padding: 16px 24px !important;
        min-height: 48px !important;
    }
}

/* Autofill styling */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px white inset !important;
    -webkit-text-fill-color: #181111 !important;
}

.dark input:-webkit-autofill,
.dark input:-webkit-autofill:hover,
.dark input:-webkit-autofill:focus,
.dark input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px #252525 inset !important;
    -webkit-text-fill-color: white !important;
}

/* ==========================================
   SAFARI iOS SPECIFIC FIXES
   ========================================== */

/* Fix for iOS Safari rounded corners */
input,
textarea,
button,
select {
    border-radius: 0.5rem;
}

/* Prevent iOS from adding inner shadow to inputs */
input[type="text"],
input[type="email"],
input[type="tel"],
textarea {
    -webkit-appearance: none;
}

/* Fix for iOS Safari bottom bar issue */
@supports (-webkit-touch-callout: none) {
    .min-h-screen {
        min-height: -webkit-fill-available;
    }
}

/* ==========================================
   PERFORMANCE OPTIMIZATIONS
   ========================================== */

/* GPU acceleration for animations */
.transform-gpu {
    transform: translateZ(0);
    -webkit-transform: translateZ(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;
    }

    html {
        scroll-behavior: auto;
    }
}

/* ==========================================
   UTILITY CLASSES
   ========================================== */

.overflow-x-hidden {
    overflow-x: hidden;
}

.safe-area-inset-top {
    padding-top: env(safe-area-inset-top);
}

.safe-area-inset-bottom {
    padding-bottom: env(safe-area-inset-bottom);
}

/* Screen Reader Only - Hides content visually but keeps it accessible to screen readers */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus Visible - Better keyboard navigation */
*:focus-visible {
    outline: 2px solid #FAB12F;
    outline-offset: 2px;
}

/* Skip to main content link for keyboard users */
.skip-to-main {
    position: absolute;
    left: -9999px;
    z-index: 999;
    padding: 1rem 1.5rem;
    background-color: #FAB12F;
    color: white;
    font-weight: bold;
    text-decoration: none;
    border-radius: 0.5rem;
}

.skip-to-main:focus {
    left: 1rem;
    top: 1rem;
}

/* ==========================================
   BREAKPOINT HELPERS (for debugging)
   ========================================== */

/* Uncomment to debug responsive breakpoints
@media (max-width: 374px) {
    body::before {
        content: 'XS (<375px)';
        position: fixed;
        top: 0;
        left: 0;
        background: red;
        color: white;
        padding: 5px;
        z-index: 99999;
    }
}

@media (min-width: 375px) and (max-width: 639px) {
    body::before {
        content: 'SM (375-639px)';
        position: fixed;
        top: 0;
        left: 0;
        background: orange;
        color: white;
        padding: 5px;
        z-index: 99999;
    }
}

@media (min-width: 640px) and (max-width: 767px) {
    body::before {
        content: 'MD (640-767px)';
        position: fixed;
        top: 0;
        left: 0;
        background: yellow;
        color: black;
        padding: 5px;
        z-index: 99999;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    body::before {
        content: 'LG (768-1023px)';
        position: fixed;
        top: 0;
        left: 0;
        background: green;
        color: white;
        padding: 5px;
        z-index: 99999;
    }
}

@media (min-width: 1024px) {
    body::before {
        content: 'XL (1024px+)';
        position: fixed;
        top: 0;
        left: 0;
        background: blue;
        color: white;
        padding: 5px;
        z-index: 99999;
    }
}
*/

/* ==========================================
   PARTNERS SLIDER
   ========================================== */

/* Partners slider infinite scroll animation */
@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-100%);
    }
}

.animate-scroll {
    animation: scroll 40s linear infinite;
}

/* Pause animation on hover */
.partners-track:hover .animate-scroll {
    animation-play-state: paused;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    .animate-scroll {
        animation: none;
    }

    .partners-track {
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
    }

    .partner-logo {
        scroll-snap-align: start;
    }
}
