/* Nautimar - Main Styles */

:root {
    --primary: #16599D;
    --secondary: #FDC31C;
    --white: #ffffff;
    --off-white: #f8f9fa;
    --light-gray: #e9ecef;
    --text-primary: #2c3e50;
    --text-secondary: #6c757d;
    --gradient-start: rgba(255, 255, 255, 0.95);
    --gradient-end: rgba(255, 255, 255, 0.98);
    
    /* Forzar modo claro */
    color-scheme: light;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color-scheme: light;
}

body {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    min-height: 100vh;
    padding: 2rem 1rem;
    position: relative;
    overflow-x: hidden;
    /* iOS optimizations */
    -webkit-overflow-scrolling: touch;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://images.unsplash.com/photo-1500514966906-fe245eea9344?auto=format&fit=crop&q=80') center/cover no-repeat fixed;
    opacity: 0.1;
    z-index: -1;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem;
    animation: fadeIn 1s ease-out;
    min-height: calc(100vh - 4rem);
    display: flex;
    flex-direction: column;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.header {
    text-align: center;
    margin-bottom: 1rem;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.logo-container {
    position: relative;
    width: 324px;
    height: 80px;
    perspective: 1000px;
    margin-bottom: 1rem;
}

.logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.logo:hover {
    transform: translateY(-5px) rotateX(5deg);
}

.language-fab {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
}

.language-fab:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.language-fab i {
    font-size: 24px;
    transition: transform 0.3s ease;
}

.language-fab:hover i {
    transform: rotate(180deg);
}

.language-menu {
    position: fixed;
    bottom: -150px;
    right: 2rem;
    background: var(--white);
    border-radius: 16px;
    padding: 1rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
}

.language-menu.show {
    bottom: 6rem;
    opacity: 1;
    visibility: visible;
}

.language-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.language-option:hover {
    background: var(--off-white);
    transform: translateX(5px);
}

.language-option.active {
    background: var(--primary);
    color: var(--white);
}

.language-option img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

.menu {
    display: grid;
    gap: 1rem;
    perspective: 1000px;
    margin-bottom: 3rem;
}

.menu-item {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    cursor: pointer;
    transform-style: preserve-3d;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    animation: menuItemIn 0.5s cubic-bezier(0.23, 1, 0.32, 1) backwards;
}

@keyframes menuItemIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.menu-item:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 20px 30px rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, var(--white), var(--off-white));
}

.menu-item i {
    font-size: 1.5rem;
    color: var(--primary);
    transition: all 0.3s ease;
}

.menu-item:hover i {
    transform: scale(1.2) rotate(5deg);
    color: var(--secondary);
}

.menu-item span {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-primary);
    letter-spacing: 0.5px;
}

.brands-slider {
    margin: 3rem 0;
    padding: 2rem;
    background: rgba(22, 89, 157, 0.95);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.swiper {
    width: 100%;
    overflow: hidden;
    /* iOS-specific fixes */
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-perspective: 1000px;
    perspective: 1000px;
}

.swiper-wrapper {
    /* Hardware acceleration for smooth scrolling */
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
    will-change: transform;
}

.swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    transition: all 0.3s ease;
    height: 80px;
    /* iOS touch optimization */
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    /* Hardware acceleration */
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
}

.swiper-slide img {
    max-width: 200px;
    height: 60px;
    object-fit: contain;
    transition: all 0.3s ease;
    filter: brightness(0) invert(1);
    opacity: 0.7;
    /* Prevent image dragging on mobile */
    -webkit-user-drag: none;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    pointer-events: none;
}

.swiper-slide a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    /* Touch target optimization */
    min-height: 44px;
    min-width: 44px;
}

.swiper-slide:hover img,
.swiper-slide.swiper-slide-active img {
    opacity: 1;
    transform: scale(1.05);
}

/* Mobile-specific styles */
@media (max-width: 768px) {
    .swiper-slide {
        height: 70px;
        padding: 0.5rem;
    }
    
    .swiper-slide img {
        max-width: 150px;
        height: 50px;
    }
}

/* iOS-specific pagination fixes */
.swiper-pagination {
    bottom: 10px !important;
    position: relative !important;
    margin-top: 20px;
}

.swiper-pagination-bullet {
    background: var(--primary);
    opacity: 0.3;
    transition: all 0.3s ease;
}

.swiper-pagination-bullet-active {
    background: var(--secondary);
    opacity: 1;
    transform: scale(1.2);
}

/* Navigation buttons mobile optimization */
.swiper-button-next,
.swiper-button-prev {
    color: var(--primary) !important;
    background: rgba(255, 255, 255, 0.9);
    width: 40px !important;
    height: 40px !important;
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-top: -20px !important;
}

.swiper-button-next:after,
.swiper-button-prev:after {
    font-size: 16px !important;
    font-weight: bold;
}

@media (max-width: 640px) {
    .swiper-button-next,
    .swiper-button-prev {
        display: none !important;
    }
}

.brands-section {
    display: none;
    animation: sectionIn 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

@keyframes sectionIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.parts-form {
    background: var(--white);
    padding: 2rem;
    border-radius: 16px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    text-align: center;
}

.parts-form h2 {
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.parts-form p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 1.1rem;
    line-height: 1.5;
}

.brand-selection {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.brand-option {
    background: var(--off-white);
    padding: 1.5rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.brand-option:hover {
    transform: translateY(-5px);
    background: var(--white);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.brand-option img {
    height: 40px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.brand-option:hover img {
    transform: scale(1.1);
}

.brand-option span {
    font-weight: 500;
    color: var(--text-primary);
}

.brands-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.brand-item {
    background: var(--white);
    padding: 2rem;
    border-radius: 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    overflow: hidden;
    animation: brandIn 0.5s cubic-bezier(0.23, 1, 0.32, 1) backwards;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

@keyframes brandIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.brand-item img {
    height: 60px;
    object-fit: contain;
    transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    opacity: 0.8;
}

.brand-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 30px rgba(0, 0, 0, 0.1);
}

.brand-item:hover img {
    transform: scale(1.05);
    filter: none;
    opacity: 1;
}

.brand-name {
    color: var(--text-primary);
    font-weight: 500;
    margin-top: 1rem;
}

.agents-section {
    display: none;
    animation: sectionIn 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.agent-card {
    background: var(--white);
    border-radius: 20px;
    padding: 1.5rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    animation: agentIn 0.5s cubic-bezier(0.23, 1, 0.32, 1) backwards;
}

@keyframes agentIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.agent-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 30px rgba(0, 0, 0, 0.1);
}

.agent-header {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.agent-image {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--white);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.agent-card:hover .agent-image {
    transform: scale(1.1) rotate(5deg);
}

.agent-info h3 {
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    font-size: 1.1rem;
}

.agent-info p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.agent-contact {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.contact-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem;
    border-radius: 12px;
    background: var(--off-white);
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    border: 1px solid var(--light-gray);
    font-size: 0.9rem;
}

.contact-btn:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.contact-btn i {
    font-size: 1.1rem;
}

.back-btn {
    display: none;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    background: var(--white);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    transition: all 0.3s ease;
    color: var(--text-primary);
    font-weight: 500;
}

.back-btn:hover {
    transform: translateX(-5px);
    background: var(--off-white);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.1);
}

.fade-transition {
    transition: opacity 0.3s ease;
}

.fade-out {
    opacity: 0;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 1s ease, visibility 1s ease;
}

.overlay-logo {
    width: 180px;
    animation: pulse 1.8s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1.5);
        opacity: 1;
    }

    50% {
        transform: scale(1.6);
        opacity: 0.9;
    }

    100% {
        transform: scale(1.5);
        opacity: 1;
    }
}

.overlay.hide {
    opacity: 0;
    visibility: hidden;
}

/* Media Queries */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    .language-fab {
        bottom: 1rem;
        right: 1rem;
    }

    .language-menu {
        right: 1rem;
    }

    .language-menu.show {
        bottom: 5rem;
    }

    .logo-container {
        width: 100%;
        max-width: 324px;
    }

    .brands-grid {
        grid-template-columns: 1fr;
    }

    .menu-item {
        padding: 1.25rem;
    }

    .brands-slider {
        padding: 1rem;
    }

    .swiper-slide {
        height: 60px;
    }

    .swiper-slide img {
        max-width: 150px;
        height: 40px;
    }

    .agent-contact {
        grid-template-columns: 1fr;
    }

    .brand-selection {
        grid-template-columns: 1fr;
    }
} 