/* Estilos base */
body {
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-width: 20rem;
    overflow: hidden; /* Global no-scroll para adaptación móvil */
}

/* Transiciones y animaciones */
.view-transition {
    transition: transform 0.5s ease-in-out, opacity 0.5s ease-in-out; /* Reducida para más rapidez */
}

@keyframes fade-in-out {
    0% { opacity: 0; }
    10% { opacity: 1; }
    33% { opacity: 1; }
    43% { opacity: 0; }
    100% { opacity: 0; }
}

#darkModeToggle {
    animation: slideInFromRight 0.5s ease-out forwards;
}

@keyframes slideInFromRight {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

/* Modo oscuro y filtros */
.dark .invert-on-dark {
    filter: invert(1);
}

/* Interacciones hover */
#toggleArrow:hover,
.arrow-shape:hover {
    transform: scale(1.1);
    cursor: pointer;
    transition: transform 0.3s ease;
}

/* Contenedor principal */
#views-container {
    position: relative;
    overflow: hidden;
    height: 100vh;
    touch-action: pan-y; /* Cambiado: Permite scroll vertical si es necesario, pero swipe horizontal via JS */
}

/* Vistas deslizantes */
#about-view,
#home-view,
#newsletter-view {
    z-index: 10;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    will-change: transform, opacity; /* Optimización de rendimiento */
    overflow: hidden; /* Sin scrolling */
    touch-action: manipulation; /* Permite taps, pero swipe via JS */
    transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
    -webkit-user-select: none; /* Evita selección de texto durante swipe (iOS) */
    user-select: none;
}

/* Ajuste específico para formulario (nuevo) */
#newsletterForm {
    touch-action: auto; /* Permite comportamientos nativos en inputs (escribir, focus) */
}

/* Clases de posición */
.left-full { transform: translateX(100%); }
.-left-full { transform: translateX(-100%); }
.left-0 { transform: translateX(0); opacity: 1 !important; }

/* Navegación */
#nav-arrows {
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    bottom: 0;
    width: 100%; /* Extiende a todo el ancho */
    padding: 1rem 0;
    z-index: 50;
}

#leftArrow, #rightArrow {
    margin: 0 1rem;
}

#toggleArrow {
    position: absolute;
    bottom: 0;
    transition: none;
    right: auto !important;
    left: 0 !important;
}

/* Contenido de newsletter */
#newsletter-content {
    max-width: 400px;
    margin: 0 auto;
}

#newsletter-form input,
#newsletter-form button {
    width: 100%;
    margin-bottom: 0.5rem;
}

#newsletter-response {
    color: #333;
}

.dark #newsletter-response {
    color: #ddd;
}

.text-green-500 { color: #10b981; }
.text-red-500 { color: #ef4444; }

/* Contenido about */
#about-content {
    flex-direction: column; /* Siempre columna, imagen arriba */
    align-items: center; /* Centrar todo */
    text-align: center; /* Texto centrado */
}

#owner {
    margin-bottom: 1rem; /* Espacio debajo de la imagen */
}

/* Media queries: Mobile-first (de menor a mayor) */
@media (max-width: 599px) {
    #about-view {
        padding: 0.1rem; /* Padding reducido */
        display: flex;
        flex-direction: column;
        justify-content: center;
        height: 80%;
    }

    #about-logo {
        display: block;
        margin: 0 auto 0.5rem;
        max-width: 80%;
        height: auto;
        width: 60px; /* Más pequeño para móvil */
    }

    #about-view p {
        font-size: 0.75rem;
        line-height: 1.4;
        margin-bottom: 0.5rem;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

@media (max-width: 767px) {
    #about-view {
        padding: 1rem;
    }

    #about-logo {
        width: 100px;
    }

    #nav-arrows-mobile {
        display: flex !important;
    }

    #nav-arrows-desktop {
        display: none;
    }

    #nav-arrows-mobile .arrow-shape {
        padding: 1.5rem; /* Mayor para touch */
    }

    #about-view,
    #home-view,
    #newsletter-view {
        padding-bottom: 20px; /* Reducido para ajuste */
        width: 100%; /* Ancho completo */
        height: 80%; /* Adaptación completa */
    }
}

@media (min-width: 768px) {
        #social-icons{
        height: 40%;
    }
    #nav-arrows-desktop {
        display: flex !important;
        right: 0;
        flex-direction: column;
    }

    #nav-arrows-mobile {
        display: none;
    }

    #owner {
        width: 10rem;
        height: 10rem;
    }
}

@media (min-width: 1024px) {
    .about-visible #toggleArrow {
        left: auto;
        right: 0;
        transition: left 0.5s ease;
    }
}

/* Accesibilidad: Reducir motion para usuarios que lo prefieran */
@media (prefers-reduced-motion: reduce) {
    * {
        transition-duration: 0s !important;
        animation-duration: 0s !important;
    }
}

/* Mensajes de newsletter (nuevo para mostrar feedback visual) */
#messageContainer {
    margin-top: 1rem;
    text-align: center;
}

.message {
    padding: 0.5rem;
    border-radius: 0.25rem;
}

.message.success {
    background-color: #d4edda;
    color: #155724;
}

.message.error {
    background-color: #f8d7da;
    color: #721c24;
}