/* Estilos principales para Cocinas Integrales Medellín */

/* Reseteo y estilos base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    color: #333;
    line-height: 1.6;
    overflow-x: hidden; /* Previene el scroll horizontal */
    width: 100%; /* Asegura que el cuerpo ocupa solo el ancho de la pantalla */
}

html {
    overflow-x: hidden; /* Asegura que no hay scroll horizontal a nivel de HTML también */
}

/* Ocultar flechas en input[type=number] */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
input[type="number"] {
    -moz-appearance: textfield; /* Firefox */
}

/* Asegurar que el mapa y video sean responsivos */
iframe {
    max-width: 100%;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9; /* Común para videos */
}

.map-container iframe {
    aspect-ratio: 4 / 3; /* Común para mapas */
    height: 450px; /* Altura fija para el mapa en desktop */
    width: 100%;
}

@media (max-width: 768px) {
    .map-container iframe {
        height: 300px; /* Altura reducida en móvil */
    }
}

/* Estilo para el menú móvil */
#mobile-menu {
    transition: transform 0.3s ease-in-out;
}

.menu-hidden {
    transform: translateX(100%);
}

.menu-visible {
    transform: translateX(0);
}

/* Mejoras visuales sutiles */
.hero-gradient {
    background: linear-gradient(to right, rgba(255,255,255,1) 0%, rgba(255,255,255,0.8) 50%, rgba(255,255,255,0) 100%);
}

@media (max-width: 768px) {
    .hero-gradient {
        background: linear-gradient(to bottom, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.8) 50%, rgba(255,255,255,0.3) 100%);
    }
}

/* Mejoras de espaciado entre secciones */
section {
    padding-top: 4rem;
    padding-bottom: 4rem;
}

@media (min-width: 768px) {
    section {
        padding-top: 6rem;
        padding-bottom: 6rem;
    }
}

/* Espaciado adicional para secciones específicas */
section#catalogo, 
section#galeria, 
section#testimonios {
    padding-top: 5rem;
    padding-bottom: 5rem;
}

@media (min-width: 768px) {
    section#catalogo, 
    section#galeria, 
    section#testimonios {
        padding-top: 7rem;
        padding-bottom: 7rem;
    }
}

/* Mejorar respiro entre componentes interiores de secciones */
section h2 {
    margin-bottom: 1.5rem;
}

section p + .grid,
section h2 + p {
    margin-top: 1.5rem;
}

@media (min-width: 768px) {
    section h2 {
        margin-bottom: 2rem;
    }
    
    section p + .grid,
    section h2 + p {
        margin-top: 2rem;
    }
}

/* Animación sutil para botones */
button, a.button-style {
    transition: all 0.2s ease-in-out;
    /* Botones más compactos al estilo app */
    font-size: 0.875rem; /* Texto más pequeño */
    padding: 0.5rem 1rem !important; /* Padding reducido */
    border-radius: 8px !important; /* Bordes más suaves */
    font-weight: 500;
}

@media (max-width: 640px) {
    button, a.button-style {
        font-size: 0.8125rem;
        padding: 0.4rem 0.875rem !important;
        border-radius: 6px !important;
    }
    
    /* Botones más atractivos en el hero para móvil 
    - Eliminar este bloque que causa problemas con los botones en móvil */
    /*.hero-gradient + div .button-style {
        width: 85%;
        max-width: 250px;
        margin: 0 auto;
        display: block;
    }*/
    
    /* Mejora para el texto del hero en móvil */
    .hero-gradient + div h1 {
        text-shadow: 0 1px 2px rgba(0,0,0,0.1);
    }
    
    .hero-gradient + div p {
        font-size: 0.9375rem;
        line-height: 1.5;
        margin-bottom: 1.25rem;
    }
}

button:hover, a.button-style:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Efecto de pulsación para botones en móvil */
@media (max-width: 640px) {
    button:active, a.button-style:active {
        transform: translateY(1px);
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    }
}

/* Estilos para la nueva sección de video */
.video-container {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.video-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.video-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.2);
    z-index: 1;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    border-radius: inherit;
}

.video-container:hover::before {
    opacity: 1;
}

/* Estilos para tarjetas de características */
.feature-card {
    padding: 1.5rem !important;
    border-radius: 10px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    width: 3.5rem !important;
    height: 3.5rem !important;
    margin-bottom: 1rem !important;
}

.feature-title {
    font-size: 1.125rem !important;
    margin-bottom: 0.75rem !important;
}

.feature-description {
    font-size: 0.875rem !important;
    line-height: 1.5;
}

/* Galería de imágenes */
.gallery-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 columnas en móvil */
    gap: 12px;
}

@media (min-width: 640px) {
    .gallery-container {
        grid-template-columns: repeat(3, 1fr); /* 3 columnas en tablets */
        gap: 16px;
    }
}

@media (min-width: 1024px) {
    .gallery-container {
        grid-template-columns: repeat(4, 1fr); /* 4 columnas en desktop */
        gap: 20px;
    }
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 3px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 1 / 1;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 100%);
    color: white;
    padding: 16px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay h3 {
    font-size: 16px;
    margin-bottom: 4px;
}

.gallery-overlay p {
    font-size: 14px;
    margin: 0;
}

@media (min-width: 768px) {
    .gallery-overlay {
        padding: 1.25rem;
    }
    
    .gallery-overlay h3 {
        font-size: 1.125rem;
        margin-bottom: 6px;
    }
    
    .gallery-overlay p {
        font-size: 0.875rem;
    }
}

/* Asegurar que todas las imágenes y elementos no causen overflow */
img, video, iframe, embed, object {
    max-width: 100%;
}

/* Estilos para testimonios */
.testimonial-card {
    position: relative;
    padding: 1.75rem;
    border-radius: 0.75rem;
    background: #fff;
    box-shadow: 0 3px 8px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.1);
}

.testimonial-card:before {
    content: '"';
    position: absolute;
    top: 15px;
    left: 15px;
    font-size: 4rem;
    font-family: Georgia, serif;
    color: rgba(46, 90, 143, 0.1);
    line-height: 1;
}

/* Estilos para modales */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: white;
    border-radius: 12px;
    max-width: 90%;
    max-height: 90%;
    overflow: auto;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    padding: 1.5rem;
    overflow-y: auto;
}

.modal-backdrop.active .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: white;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* Animaciones de carga */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.slide-up {
    animation: slideUp 0.5s ease forwards;
}

/* Estilos para cuadro comparativo */
.comparativo-table {
    width: 100%;
    border-collapse: collapse;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    font-size: 0.875rem;
}

.comparativo-table thead th {
    background-color: #2E5A8F;
    color: white;
    text-align: left;
    padding: 0.75rem 1rem;
}

.comparativo-table tbody tr:nth-child(odd) {
    background-color: #f8f9fa;
}

.comparativo-table tbody tr:hover {
    background-color: rgba(46, 90, 143, 0.05);
}

.comparativo-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.comparativo-table td i.ri-check-line {
    color: #4CAF50;
}

.comparativo-table td i.ri-close-line {
    color: #f44336;
}

/* Corregir posibles problemas con tablas en móvil */
table {
    width: 100% !important;
    max-width: 100% !important;
    display: block;
    overflow-x: auto;
}

/* Diseño de tarjetas más compacto estilo app */
.app-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.app-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

.app-card-img {
    height: 180px;
}

.app-card-content {
    padding: 1rem;
}

.app-card-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.app-card-text {
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.app-card-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    border-radius: 999px;
    background: #f0f2f5;
    color: #555;
    margin-right: 0.25rem;
    margin-bottom: 0.25rem;
}

/* Pestañas para sección de tipos de cocinas */
.tabs-container {
    border-radius: 8px;
    overflow: hidden;
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.tabs-header {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
    background: #f8f9fa;
    border-bottom: 1px solid #e5e7eb;
    -webkit-overflow-scrolling: touch; /* Mejora el scroll en iOS */
}

.tabs-header::-webkit-scrollbar {
    display: none; /* Chrome/Safari/Opera */
}

.tab-button {
    padding: 0.75rem 1.25rem;
    white-space: nowrap;
    font-weight: 500;
    color: #555;
    border: none;
    background: transparent;
    cursor: pointer;
    position: relative;
    transition: color 0.3s ease;
    transition: color 0.3s ease, background-color 0.3s ease;
    position: relative;
    z-index: 1;
}

.tab-button:hover {
    color: #2E5A8F;
    background-color: rgba(46, 90, 143, 0.05);
}

.tab-button.active {
    color: #2E5A8F;
    font-weight: 600;
}

.tab-button.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(46, 90, 143, 0.08);
    z-index: -1;
}

.tab-button.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #2E5A8F;
    transition: transform 0.3s ease;
}

.tab-content {
    padding: 1.5rem;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
    animation: fadeIn 0.3s ease forwards;
}

/* Estilos para tarjetas de comparación interactivas */
#tab-comparativo .bg-white {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

#tab-comparativo .bg-white::after {
    content: "Ver detalles";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(46, 90, 143, 0.85);
    color: white;
    font-size: 0.75rem;
    padding: 5px;
    text-align: center;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

#tab-comparativo .bg-white:hover::after {
    transform: translateY(0);
}

#tab-comparativo .h-2.bg-primary {
    transition: width 0.5s ease-out;
}

/* Estilo para gráfico comparativo */
#compareFeature {
    background-color: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #4a5568;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

#compareFeature:hover {
    border-color: #2E5A8F;
}

#compareFeature:focus {
    outline: none;
    border-color: #2E5A8F;
    box-shadow: 0 0 0 3px rgba(46, 90, 143, 0.15);
}

/* Mejorar animaciones en tarjetas */
#tab-comparativo .bg-white .h-2.bg-primary {
    position: relative;
    overflow: hidden;
}

#tab-comparativo .bg-white .h-2.bg-primary::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transform: translateX(-100%);
}

#tab-comparativo .bg-white:hover .h-2.bg-primary::after {
    animation: shine 1.5s infinite;
}

@keyframes shine {
    100% {
        transform: translateX(100%);
    }
}