/* Reset básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-green: #00b15e;
    --dark-green: #008f4c;
    --yellow-accent: #f7df1e;
    --light-bg: #f3faf6;
    --card-bg: rgba(255, 255, 255, 0.75);
    --card-hover-bg: rgba(255, 255, 255, 0.9);
    --text-main: #06110a;
    --text-muted: #2d4536;
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

body {
    font-family: 'Outfit', sans-serif;
    background: linear-gradient(135deg, #e8f5ed 0%, #d2ebd9 100%);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow-x: hidden;
    padding: 2rem 1rem;
}

/* Círculos decorativos de fondo */
.background-decor {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.circle {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
}

.circle-1 {
    width: 300px;
    height: 300px;
    background: var(--primary-green);
    top: -100px;
    left: -100px;
    animation: float-slow 15s ease-in-out infinite alternate;
}

.circle-2 {
    width: 400px;
    height: 400px;
    background: var(--yellow-accent);
    bottom: -150px;
    right: -150px;
    opacity: 0.3;
    animation: float-slow 20s ease-in-out infinite alternate-reverse;
}

@keyframes float-slow {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(40px, 40px) scale(1.1); }
}

/* Contenedor Principal */
.container {
    width: 100%;
    max-width: 580px;
    background: linear-gradient(rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.1)), url('../images/banner.PNG') no-repeat center center;
    background-size: 100% 100%;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 30px;
    padding: 3rem 2rem;
    box-shadow: var(--shadow-lg);
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow: hidden;
    animation: fadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}


@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Encabezado / Perfil */
.profile {
    text-align: center;
    margin-bottom: 2.5rem;
    width: 100%;
    position: relative;
    z-index: 1;
    margin-top: 220px;
}

.logo-container {
    width: 130px;
    height: 130px;
    margin: 0 auto 0.4rem auto;
    border-radius: 50%;
    border: 4px solid #ffffff;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
    background-color: #ffffff;
}

.logo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile .tagline {
    font-size: 1rem;
    font-weight: 600;
    color: #0b1c11;
    line-height: 1.5;
    max-width: 400px;
    margin: 0 auto 0 auto;
    text-shadow: 0 1px 3px rgba(255, 255, 255, 0.9);
}

/* Enlaces Principales */
.links-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    margin-bottom: 2.5rem;
    position: relative;
    z-index: 1;
}

.link-card {
    display: flex;
    align-items: center;
    text-decoration: none;
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.7);
    padding: 1.2rem 1.5rem;
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    opacity: 0;
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Delay secuencial para cada enlace */
.links-container > *:nth-child(1) { animation-delay: 0.1s; }
.links-container > *:nth-child(2) { animation-delay: 0.2s; }
.links-container > *:nth-child(3) { animation-delay: 0.3s; }
.links-container > *:nth-child(4) { animation-delay: 0.4s; }
.links-container > *:nth-child(5) { animation-delay: 0.5s; }
.links-container > *:nth-child(6) { animation-delay: 0.6s; }

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.link-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.4) 50%, rgba(255,255,255,0) 100%);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.link-card:hover::before {
    transform: translateX(100%);
}

.link-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: var(--shadow-lg);
    background: var(--card-hover-bg);
}

/* Iconos de las tarjetas */
.icon-wrapper {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 1.2rem;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.icon-wrapper svg {
    width: 24px;
    height: 24px;
    transition: transform 0.3s ease;
}

.link-card:hover .icon-wrapper svg {
    transform: rotate(8deg) scale(1.1);
}

/* Estilos específicos WhatsApp */
.whatsapp-link .icon-wrapper {
    background-color: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    overflow: hidden;
    padding: 2px;
}

.wa-icon-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 10px;
    transition: transform 0.3s ease;
}

.whatsapp-link:hover {
    border-color: rgba(37, 211, 102, 0.5);
}

.whatsapp-link:hover .icon-wrapper {
    border-color: #25d366;
    box-shadow: 0 0 8px rgba(37, 211, 102, 0.2);
}

.whatsapp-link:hover .wa-icon-img {
    transform: scale(1.1) rotate(8deg);
}

/* Estilos específicos Sitio Web */
.website-link .icon-wrapper {
    background-color: rgba(0, 177, 94, 0.1);
    color: var(--primary-green);
}

.website-link:hover {
    border-color: rgba(0, 177, 94, 0.4);
}

.website-link:hover .icon-wrapper {
    background-color: var(--primary-green);
    color: white;
}

/* Textos de la tarjeta */
.link-info {
    flex-grow: 1;
    text-align: left;
}

.link-info h2 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 0.2rem;
}

.link-info p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.arrow {
    color: var(--text-muted);
    opacity: 0.5;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.arrow svg {
    width: 20px;
    height: 20px;
}

.link-card:hover .arrow {
    opacity: 1;
    transform: translateX(3px);
    color: var(--primary-green);
}

/* Redes Sociales / Footer */
.socials {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin-bottom: 1.5rem;
    width: 100%;
    position: relative;
    z-index: 1;
}

.social-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-main);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-icon svg,
.social-icon-img {
    width: 22px;
    height: 22px;
    transition: transform 0.3s ease;
}

.social-icon-img {
    object-fit: contain;
}

/* Hover Instagram */
#link-instagram:hover {
    background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%,#d6249f 60%,#285AEB 90%);
    color: white;
    border-color: transparent;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(214, 36, 159, 0.3);
}

/* Hover TikTok */
#link-tiktok:hover {
    background-color: #ffffff; /* Or white to match light theme, or dark since tiktok is dark */
    background: #000000;
    color: white;
    border-color: transparent;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

#link-tiktok:hover .social-icon-img {
    /* If the image has white background or is dark, we can apply contrast/invert if needed, 
       but if it's already a transparent PNG or looks good, we just scale it. */
    transform: scale(1.15);
}

.social-icon:hover svg,
.social-icon:hover .social-icon-img {
    transform: scale(1.15);
}

.footer-text {
    font-size: 0.75rem;
    color: var(--text-muted);
    opacity: 0.7;
    margin-top: 1rem;
    text-align: center;
}


/* Estilos para los submenús de Sucursales */
.submenu-card {
    display: flex;
    flex-direction: column;
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    opacity: 0;
    width: 100%;
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.submenu-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: var(--shadow-lg);
    background: var(--card-hover-bg);
}

.address-text {
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--text-muted);
    margin-left: 0.3rem;
}

.submenu-trigger {
    display: flex;
    align-items: center;
    width: 100%;
    background: none;
    border: none;
    padding: 1.2rem 1.5rem;
    font-family: inherit;
    cursor: pointer;
    text-align: left;
    color: inherit;
    outline: none;
    position: relative;
    overflow: hidden;
}

.submenu-trigger::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.4) 50%, rgba(255,255,255,0) 100%);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.submenu-card:hover .submenu-trigger::before {
    transform: translateX(100%);
}

.submenu-card.is-open {
    background: var(--card-hover-bg);
    border-color: rgba(0, 177, 94, 0.3);
    box-shadow: var(--shadow-md);
    transform: none; /* Don't scale up or float when already open to prevent awkward layouts */
}

.submenu-card.is-open:hover {
    transform: translateY(-2px);
}

.submenu-card .arrow svg {
    transition: transform 0.3s ease;
}

.submenu-card.is-open .arrow svg {
    transform: rotate(180deg);
}

.submenu-card.is-open .arrow {
    opacity: 1;
    color: var(--primary-green);
}

.submenu-card .wa-icon-img {
    transition: transform 0.3s ease;
}

.submenu-card:hover .wa-icon-img {
    transform: scale(1.1) rotate(8deg);
}

/* Contenido del Submenú */
.submenu-content {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.35s cubic-bezier(0.25, 1, 0.5, 1);
}

.submenu-card.is-open .submenu-content {
    grid-template-rows: 1fr;
}

.submenu-content-inner {
    overflow: hidden;
    padding: 0 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    transition: padding 0.35s cubic-bezier(0.25, 1, 0.5, 1);
}

.submenu-card.is-open .submenu-content-inner {
    padding-bottom: 1.5rem;
}

/* Elementos de contacto */
.submenu-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.9rem 1.2rem;
    background: rgba(0, 177, 94, 0.04);
    border: 1px solid rgba(0, 177, 94, 0.08);
    border-radius: 14px;
    text-decoration: none;
    color: var(--text-main);
    transition: all 0.3s ease;
}

.submenu-item:hover {
    background: var(--primary-green);
    color: white;
    border-color: var(--primary-green);
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0, 177, 94, 0.15);
}

.contact-name {
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: -0.2px;
}

.chat-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    font-weight: 600;
    background: white;
    color: var(--primary-green);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.submenu-item:hover .chat-btn {
    background: white;
    color: var(--primary-green);
    transform: scale(1.05);
}

.wa-btn-icon {
    width: 14px;
    height: 14px;
    border-radius: 50%;
}

/* Responsividad para pantallas pequeñas */
@media (max-width: 480px) {
    .submenu-trigger {
        padding: 1rem;
    }
    .submenu-content-inner {
        padding: 0 1rem;
    }
    .submenu-card.is-open .submenu-content-inner {
        padding-bottom: 1.2rem;
    }
    .submenu-item {
        padding: 0.8rem 1rem;
    }
    .contact-name {
        font-size: 0.9rem;
    }
}

/* Responsividad para pantallas pequeñas original */
@media (max-width: 480px) {
    body {
        padding: 1rem 0.5rem;
    }
    
    .container {
        padding: 2rem 1.2rem;
        border-radius: 20px;
    }


    .profile {
        margin-top: 200px;
        margin-bottom: 1.8rem;
    }


    
    .link-card {
        padding: 1rem;
    }
    
    .icon-wrapper {
        width: 40px;
        height: 40px;
        margin-right: 0.8rem;
    }
    
    .icon-wrapper svg {
        width: 20px;
        height: 20px;
    }
    
    .link-info h2 {
        font-size: 0.95rem;
    }
}

/* Redes Sociales / Footer */
.footer-text {
    font-size: 0.85rem;
    color: #0b1c11;
    font-weight: 600;
    text-align: center;
    margin-top: 1.5rem;
    width: 100%;
    position: relative;
    z-index: 1;
    text-shadow: 0 1px 3px rgba(255, 255, 255, 0.9);
}

/* Enlaces de Google Maps */
.submenu-item.maps-link {
    background: rgba(66, 133, 244, 0.06);
    border: 1px solid rgba(66, 133, 244, 0.12);
    margin-bottom: 0.5rem; /* Separar la ubicación de los números */
}

.submenu-item.maps-link:hover {
    background: #4285f4;
    color: white;
    border-color: #4285f4;
    box-shadow: 0 4px 12px rgba(66, 133, 244, 0.2);
}

.submenu-item.maps-link .maps-btn {
    color: #4285f4;
}

.submenu-item.maps-link:hover .maps-btn {
    color: #4285f4;
}
