﻿/* ===== RESET Y VARIABLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --color-primario: #b65c1d;
    --color-primario-hover: #9e4e19;
    --color-texto: #333;
    --color-texto-secundario: #666;
    --color-fondo: #f5f5f5;
    --color-blanco: #ffffff;
    --color-borde: #ddd;
    --sombra-suave: 0 4px 15px rgba(0, 0, 0, 0.08);
    --sombra-media: 0 6px 20px rgba(0, 0, 0, 0.1);
    --borde-redondo: 20px;
    --espaciado: 20px;
}

/* ===== ESTILOS BASE ===== */
body {
    font-family: 'Arial', Helvetica, sans-serif;
    background-color: var(--color-fondo);
    margin: 0;
    padding-top: 70px;
    padding-bottom: 80px;
    min-height: 100vh;
    color: var(--color-texto);
}

/* ===== MENÚ SUPERIOR ===== */
.top-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 70px;
    background: var(--color-blanco);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 25px;
    box-shadow: var(--sombra-media);
    z-index: 1000;
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.95);
}

.icon {
    font-size: 24px;
    cursor: pointer;
    transition: transform 0.2s;
}

    .icon:hover {
        transform: scale(1.1);
    }

.logo {
    font-size: 20px;
    font-weight: 600;
    color: var(--color-primario);
    letter-spacing: 0.5px;
}

.icons-right {
    font-size: 22px;
    display: flex;
    gap: 15px;
}

    .icons-right span {
        cursor: pointer;
        transition: transform 0.2s;
    }

        .icons-right span:hover {
            transform: scale(1.1);
        }

/* ===== CONTENIDO PRINCIPAL ===== */
/* ===== CONTENIDO PRINCIPAL - CORREGIDO ===== */
.contenido {
    padding: 20px;
    width: 100%;
    max-width: 1200px; /* Aumentado para desktop */
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Tablets */
@media screen and (min-width: 768px) {
    .contenido {
        padding: 30px;
        display: grid;
        grid-template-columns: repeat(2, 1fr); /* 2 columnas */
        gap: 25px;
    }
}

/* Desktop */
@media screen and (min-width: 1024px) {
    .contenido {
        padding: 40px;
        grid-template-columns: repeat(2, 1fr); /* Mantiene 2 columnas */
        gap: 35px;
        max-width: 1200px;
    }
}

/* Pantallas grandes */
@media screen and (min-width: 1440px) {
    .contenido {
        max-width: 1400px;
        gap: 40px;
    }
}

/* ===== TARJETAS ===== */
.card {
    background: var(--color-blanco);
    border-radius: var(--borde-redondo);
    overflow: hidden;
    box-shadow: var(--sombra-suave);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
    text-align: center;
    width: 100%; /* Ocupa todo el ancho de su celda */
    height: 100%; /* Misma altura */
    display: flex;
    flex-direction: column;
}

    .card:hover {
        transform: translateY(-5px);
        box-shadow: var(--sombra-media);
    }

    .card img {
        width: 100%;
        height: 220px;
        object-fit: cover;
        transition: transform 0.3s ease;
    }

/* Diferentes alturas de imagen según dispositivo */
@media screen and (min-width: 768px) {
    .card img {
        height: 200px;
    }
}

@media screen and (min-width: 1024px) {
    .card img {
        height: 250px;
    }
}

@media screen and (min-width: 1440px) {
    .card img {
        height: 280px;
    }
}

.card:hover img {
    transform: scale(1.05);
}

.card-content {
    padding: 25px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    flex: 1; /* Para que todas las cards tengan misma altura */
}

.card h3 {
    font-size: 22px;
    color: var(--color-texto);
    font-weight: 700;
    margin: 0;
    line-height: 1.3;
}

@media screen and (min-width: 1024px) {
    .card h3 {
        font-size: 24px;
    }
}

.card p {
    color: var(--color-texto-secundario);
    font-size: 15px;
    line-height: 1.6;
    margin: 0;
    text-align: center;
    max-width: 90%;
}

@media screen and (min-width: 1024px) {
    .card p {
        font-size: 16px;
    }
}

.btn-card {
    display: inline-block;
    background-color: var(--color-primario);
    color: white;
    padding: 12px 30px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(182, 92, 29, 0.3);
    margin-top: auto; /* Empuja el botón hacia abajo */
}

    .btn-card:hover {
        background-color: var(--color-primario-hover);
        transform: translateY(-2px);
        box-shadow: 0 6px 15px rgba(182, 92, 29, 0.4);
    }

/* ===== MENÚ INFERIOR CORREGIDO ===== */
/* ===== MENÚ INFERIOR CON ENLACES ===== */
.bottom-menu {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background: var(--color-blanco);
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.08);
    z-index: 1000;
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.95);
    padding: 0 10px;
}

    /* Estilo para los enlaces del menú inferior */
    .bottom-menu a {
        text-decoration: none;
        color: inherit;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        flex: 1;
        max-width: 80px;
        padding: 8px 5px;
        border-radius: 10px;
        transition: all 0.3s;
        position: relative;
        gap: 5px;
    }

        /* Iconos con pseudo-elemento */
        .bottom-menu a::before {
            font-size: 24px;
            line-height: 1;
            display: block;
            margin-bottom: 2px;
        }

        /* Asignar iconos según data-icon */
        .bottom-menu a[data-icon="📅"]::before {
            content: "📅";
        }

        .bottom-menu a[data-icon="🛍️"]::before {
            content: "🛍️";
        }

        .bottom-menu a[data-icon="📍"]::before {
            content: "📍";
        }

        .bottom-menu a[data-icon="✉️"]::before {
            content: "✉️";
        }

    /* Texto del menú */
    .bottom-menu a {
        font-size: 12px;
        color: var(--color-texto-secundario);
    }

        /* Efectos hover */
        .bottom-menu a:hover {
            color: var(--color-primario);
            background-color: rgba(182, 92, 29, 0.1);
            transform: translateY(-3px);
        }

        .bottom-menu a:active {
            transform: translateY(0);
        }

        /* Estado activo */
        .bottom-menu a.active {
            color: var(--color-primario);
            font-weight: 600;
        }

            .bottom-menu a.active::after {
                content: '';
                position: absolute;
                bottom: -5px;
                left: 50%;
                transform: translateX(-50%);
                width: 5px;
                height: 5px;
                background-color: var(--color-primario);
                border-radius: 50%;
            }

        /* Quitar subrayado y estilos por defecto */
        .bottom-menu a:link,
        .bottom-menu a:visited,
        .bottom-menu a:hover,
        .bottom-menu a:active {
            text-decoration: none;
            outline: none;
        }

/* ===== MEDIA QUERIES ===== */

/* Tablets */
@media screen and (min-width: 768px) {
    .contenido {
        max-width: 700px;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 25px;
        padding: 30px;
    }

    .card {
        margin-bottom: 0;
    }

        .card img {
            height: 200px;
        }

        .card h3 {
            font-size: 20px;
        }

    .logo {
        font-size: 24px;
    }
}

/* Desktop */
@media screen and (min-width: 1024px) {
    .contenido {
        max-width: 1000px;
        gap: 35px;
        padding: 40px;
    }

    .card img {
        height: 250px;
    }

    .card h3 {
        font-size: 24px;
    }

    .card p {
        font-size: 16px;
    }

    .btn-card {
        padding: 14px 35px;
        font-size: 16px;
    }
}

/* Móviles pequeños */
@media screen and (max-width: 380px) {
    .top-menu {
        padding: 0 15px;
        height: 60px;
    }

    .logo {
        font-size: 16px;
    }

    .icon, .icons-right {
        font-size: 20px;
    }

    .card-content {
        padding: 20px 15px;
    }

    .card h3 {
        font-size: 20px;
    }

    .card p {
        font-size: 14px;
    }

    .btn-card {
        padding: 10px 25px;
        font-size: 14px;
    }
}

/* ===== ANIMACIONES ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fadeInUp 0.5s ease-out forwards;
}

    .card:first-child {
        animation-delay: 0.2s;
    }

    .card:last-child {
        animation-delay: 0.3s;
    }

.icon-link {
    text-decoration: none;
    font-size: 24px;
    color: var(--color-texto-secundario);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    cursor: pointer;
}

    .icon-link:hover {
        color: var(--color-primario);
        transform: scale(1.1);
    }

/* Asegurar que los spans con rol button tengan el mismo estilo */
.icons-right span[role="button"] {
    font-size: 24px;
    cursor: pointer;
    transition: all 0.2s;
}

    .icons-right span[role="button"]:hover {
        color: var(--color-primario);
        transform: scale(1.1);
    }

/* Espaciado correcto en icons-right */
.icons-right {
    display: flex;
    gap: 20px;
    align-items: center;
}

    /* ===== QUITAR SUBRAYADO SOLO DE LOS ICONOS ===== */
    .top-menu a,
    .top-menu a:link,
    .top-menu a:visited,
    .icons-right a {
        text-decoration: none;
        border: none;
    }

        /* Quitar el rectángulo azul al hacer clic */
        .top-menu a:active,
        .icons-right a:active {
            outline: none;
        }

.icon-link:focus {
    outline: none;
}

a {
    text-decoration: none;
}

/* Animaciones y mejoras para PWA */
@keyframes slideUp {
    from

{
    transform: translateX(-50%) translateY(100px);
    opacity: 0;
}

to {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

}

/* Mejorar experiencia táctil para PWA */
@media (hover: none) and (pointer: coarse) {
    button, a, .menu-item, .icon-link, .btn-card {
        min-height: 44px;
        min-width: 44px;
    }
}

/* Banner de instalación */
.pwa-install-banner {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: #b65c1d;
    color: white;
    padding: 12px 20px;
    border-radius: 50px;
    display: flex;
    gap: 15px;
    align-items: center;
    z-index: 10000;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    animation: slideUp 0.3s ease;
    font-family: Arial, Helvetica, sans-serif;
}

    .pwa-install-banner button {
        background: white;
        color: #b65c1d;
        border: none;
        padding: 6px 16px;
        border-radius: 30px;
        font-weight: bold;
        cursor: pointer;
    }

    .pwa-install-banner .close-banner {
        background: none;
        color: white;
        font-size: 20px;
        padding: 0 5px;
    }
