/* Custom CSS para Minka Peru Tours - Optimizado */

/* Ajustes globales */
:root {
    --primary-color: #1a365d;
    --secondary-color: #2c5282;
    --accent-color: #ed8936;
    --accent-light: #fbd38d;
    --text-dark: #2d3748;
    --text-light: #718096;
    --bg-light: #f7fafc;
}

/* Smooth scroll y optimizaciones de renderizado */
html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    max-width: 100vw;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    max-width: 100vw;
    position: relative;
}

img {
    max-width: 100%;
    height: auto;
}

/* Container wrapper seguro */
.container {
    max-width: 100%;
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 640px) {
    .container {
        max-width: 640px;
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 768px;
    }
}

@media (min-width: 1024px) {
    .container {
        max-width: 1024px;
    }
}

@media (min-width: 1280px) {
    .container {
        max-width: 1280px;
    }
}

/* Line clamp utility */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Animaciones optimizadas con will-change */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
    will-change: opacity, transform;
}

/* Image zoom - optimizado con GPU acceleration */
.image-zoom-container {
    overflow: hidden;
}

.image-zoom {
    transition: transform 0.5s ease;
    will-change: transform;
}

.image-zoom-container:hover .image-zoom {
    transform: scale(1.03) translateZ(0);
    transform-origin: center center;
}

/* Transiciones suaves globales */
a, button {
    transition: color 0.3s ease, background-color 0.3s ease, transform 0.3s ease;
}

/* Links hover effect */
a:hover {
    text-decoration: none;
}

/* Botones y links principales */
.btn-primary {
    background-color: var(--accent-color);
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: #dd6b20;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Mega menu mejorado */
.group:hover .group-hover\:opacity-100 {
    opacity: 1;
    visibility: visible;
}

/* Prevenir overflow del mega menu */
.group > div {
    contain: layout;
}

/* Card shadows mejoradas */
.shadow-card {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.shadow-card:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

/* Responsive typography - optimizado */
@media (max-width: 640px) {
    h1 { font-size: 2rem !important; }
    h2 { font-size: 1.5rem !important; }
    h3 { font-size: 1.25rem !important; }
}

/* Accesibilidad y foco */
.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 {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* WhatsApp button pulse animation */
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.fixed.bottom-6.right-6 {
    animation: pulse 2s infinite;
}
