/* 
 * Calzado Freedom - Página Linktree
 * Stylesheet Principal
 */

/* ==================== RESET & BASE ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Paleta de colores */
    --rojo-principal: #C70000;
    --rojo-oscuro: #8A0000;
    --rojo-suave: #F8C4C4;
    --fondo-general: #FFF9F9;
    --texto-principal: #222222;
    --texto-secundario: #555555;
    --blanco: #FFFFFF;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--fondo-general);
    color: var(--texto-principal);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    line-height: 1.6;
}

/* ==================== CONTAINER PRINCIPAL ==================== */
.linktree-container {
    max-width: 480px;
    width: 100%;
    background-color: var(--blanco);
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(199, 0, 0, 0.08);
    padding: 2.5rem 2rem;
    animation: fadeIn 0.6s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==================== HEADER ==================== */
.header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(199, 0, 0, 0.1);
}

.logo {
    width: 120px;
    height: 120px;
    margin-bottom: 1.25rem;
    transition: all 0.3s ease;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--rojo-principal);
    box-shadow: 0 6px 20px rgba(199, 0, 0, 0.3), 0 2px 8px rgba(0, 0, 0, 0.1);
    animation: logoPulse 3s ease-in-out infinite;
    position: relative;
}

.logo::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--rojo-principal), var(--rojo-oscuro));
    opacity: 0;
    animation: logoGlow 3s ease-in-out infinite;
    z-index: -1;
}

.logo:hover {
    transform: scale(1.08) rotate(3deg);
    box-shadow: 0 10px 30px rgba(199, 0, 0, 0.4), 0 4px 12px rgba(0, 0, 0, 0.15);
    animation-play-state: paused;
}

@keyframes logoPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 6px 20px rgba(199, 0, 0, 0.3), 0 2px 8px rgba(0, 0, 0, 0.1);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 8px 25px rgba(199, 0, 0, 0.5), 0 3px 10px rgba(0, 0, 0, 0.15);
    }
}

@keyframes logoGlow {
    0%, 100% {
        opacity: 0;
        transform: scale(1);
        filter: blur(8px);
    }
    50% {
        opacity: 0.6;
        transform: scale(1.15);
        filter: blur(12px);
    }
}

.brand-name {
    font-size: 2rem;
    font-weight: 800;
    color: var(--rojo-principal);
    margin-bottom: 0.75rem;
    letter-spacing: -0.5px;
    text-transform: uppercase;
    background: linear-gradient(135deg, var(--rojo-principal) 0%, var(--rojo-oscuro) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header p {
    font-size: 1rem;
    color: var(--texto-secundario);
    font-weight: 300;
    line-height: 1.6;
    max-width: 85%;
    margin: 0 auto;
    margin-bottom: 1.75rem;
    letter-spacing: 0.3px;
}

/* ==================== SOCIAL ICONS ==================== */
.social-icons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: transparent;
    border: 2px solid var(--rojo-principal);
    color: var(--rojo-principal);
    text-decoration: none;
    font-size: 1.25rem;
    transition: all 0.3s ease;
}

.social-icon:hover {
    background-color: var(--rojo-principal);
    color: var(--blanco);
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 4px 15px rgba(199, 0, 0, 0.3);
}

.social-icon:active {
    transform: translateY(0) scale(1);
}

/* ==================== BOTONES LINKTREE ==================== */
.links-section {
    margin-bottom: 2rem;
}

.link-button {
    display: block;
    width: 100%;
    min-height: 90px;
    background-color: var(--blanco);
    border: 2px solid var(--rojo-principal);
    border-radius: 14px;
    color: var(--rojo-principal);
    text-decoration: none;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(199, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    padding: 1rem 1.25rem;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    text-align: center;
}

.link-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--rojo-principal);
    transition: left 0.3s ease;
    z-index: 0;
}

.link-button:hover::before {
    left: 0;
}

.link-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(199, 0, 0, 0.2);
    border-color: var(--rojo-oscuro);
}

.link-button:hover .link-title,
.link-button:hover .link-content p {
    color: var(--blanco);
}

.link-button:active {
    transform: translateY(0);
}

.link-content {
    position: relative;
    z-index: 1;
    text-align: center;
    width: 100%;
}

.link-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 0.25rem 0;
    color: var(--rojo-principal);
    transition: color 0.3s ease;
}

.link-content p {
    font-size: 0.875rem;
    font-weight: 400;
    margin: 0;
    color: var(--texto-secundario);
    line-height: 1.4;
    transition: color 0.3s ease;
}

/* ==================== SUCURSALES SECTION ==================== */
.sucursales-section {
    margin-bottom: 2rem;
}

.sucursales-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--rojo-principal);
    text-align: center;
    margin-bottom: 0.5rem;
}

.sucursales-subtitle {
    font-size: 0.95rem;
    color: var(--texto-secundario);
    text-align: center;
    margin-bottom: 1.5rem;
    font-weight: 400;
    line-height: 1.5;
}

.sucursal-card {
    background-color: var(--blanco);
    border: 2px solid var(--rojo-principal);
    border-radius: 14px;
    padding: 0;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(199, 0, 0, 0.1);
    overflow: hidden;
}

.sucursal-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(199, 0, 0, 0.15);
}

.sucursal-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    border-bottom: 2px solid var(--rojo-principal);
}

.sucursal-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding: 1.5rem 1.5rem 1rem 1.5rem;
    border-bottom: 1px solid var(--rojo-suave);
}

.sucursal-header i {
    font-size: 1.5rem;
    color: var(--rojo-principal);
}

.sucursal-header h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--texto-principal);
    margin: 0;
}

.sucursal-info {
    margin-bottom: 1rem;
    padding: 0 1.5rem;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.info-item:last-child {
    margin-bottom: 0;
}

.info-item i {
    color: var(--rojo-principal);
    font-size: 1rem;
    margin-top: 0.15rem;
    min-width: 16px;
}

.info-item span {
    color: var(--texto-secundario);
    font-size: 0.9rem;
    line-height: 1.4;
}

.sucursal-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background-color: var(--rojo-principal);
    color: var(--blanco);
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(199, 0, 0, 0.2);
}

.sucursal-btn:hover {
    background-color: var(--rojo-oscuro);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(199, 0, 0, 0.3);
}

.sucursal-btn i {
    font-size: 1rem;
}

.sucursal-buttons {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
    padding: 0 1.5rem 1.5rem 1.5rem;
}

.btn-whatsapp {
    background-color: #25D366;
    flex: 1;
}

.btn-whatsapp:hover {
    background-color: #20BA5A;
}

.btn-map {
    flex: 1;
}

/* ==================== SECCIÓN DESTACADA ==================== */
.featured-section {
    background-color: var(--rojo-suave);
    border-radius: 14px;
    padding: 1.5rem;
    text-align: center;
    margin-bottom: 2rem;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
}

.featured-text {
    font-size: 0.95rem;
    color: var(--texto-principal);
    margin-bottom: 1rem;
    font-weight: 500;
    line-height: 1.5;
}

.featured-button {
    display: inline-block;
    padding: 0.6rem 1.5rem;
    background-color: var(--rojo-principal);
    color: var(--blanco);
    text-decoration: none;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.9rem;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(199, 0, 0, 0.2);
}

.featured-button:hover {
    background-color: var(--rojo-oscuro);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(199, 0, 0, 0.3);
}

/* ==================== TOP ACTIONS ==================== */
.top-actions {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.top-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: var(--blanco);
    border: 2px solid var(--rojo-principal);
    border-radius: 50%;
    color: var(--rojo-principal);
    text-decoration: none;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(199, 0, 0, 0.1);
    cursor: pointer;
    font-family: inherit;
}

.top-button:hover {
    background-color: var(--rojo-principal);
    color: var(--blanco);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 5px 15px rgba(199, 0, 0, 0.2);
}

.top-button:active {
    transform: translateY(0) scale(1);
}

/* ==================== FOOTER ==================== */
.footer {
    text-align: center;
    margin-top: 2rem;
}

.copyright {
    font-size: 0.85rem;
    color: var(--texto-secundario);
    margin-bottom: 0.5rem;
    font-weight: 400;
}

.tagline {
    font-size: 0.75rem;
    color: var(--texto-secundario);
    font-weight: 300;
    font-style: italic;
    opacity: 0.8;
}

.created-by {
    font-size: 0.8rem;
    color: var(--rojo-principal);
    font-weight: 500;
    margin-top: 0.75rem;
    opacity: 0.9;
}

.created-by a {
    color: var(--rojo-principal);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border-bottom: 1px solid transparent;
}

.created-by a:hover {
    color: var(--rojo-oscuro);
    border-bottom: 1px solid var(--rojo-oscuro);
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 480px) {
    .linktree-container {
        padding: 2rem 1.5rem;
    }
    
    .brand-name {
        font-size: 1.65rem;
        letter-spacing: -0.3px;
    }
    
    .header p {
        font-size: 0.95rem;
        max-width: 90%;
    }
    
    .link-button {
        min-height: 80px;
        padding: 0.875rem 1rem;
    }
    
    .link-title {
        font-size: 1rem;
    }
    
    .link-content p {
        font-size: 0.8rem;
    }
    
    .social-icons {
        gap: 1.2rem;
    }
    
    .social-icon {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }
    
    .sucursales-title {
        font-size: 1.3rem;
    }
    
    .sucursales-subtitle {
        font-size: 0.85rem;
    }
    
    .sucursal-card {
        padding: 0;
    }
    
    .sucursal-image {
        height: 180px;
    }
    
    .sucursal-header {
        padding: 1.25rem 1.25rem 0.875rem 1.25rem;
    }
    
    .sucursal-info {
        padding: 0 1.25rem;
    }
    
    .sucursal-buttons {
        padding: 0 1.25rem 1.25rem 1.25rem;
    }
    
    .sucursal-header h3 {
        font-size: 1.1rem;
    }
    
    .sucursal-header i {
        font-size: 1.3rem;
    }
    
    .info-item span {
        font-size: 0.85rem;
    }
    
    .sucursal-buttons {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .sucursal-btn {
        width: 100%;
        justify-content: center;
        padding: 0.75rem 1rem;
    }
}

@media (max-width: 360px) {
    body {
        padding: 1rem 0.5rem;
    }
    
    .linktree-container {
        padding: 1.5rem 1rem;
    }
    
    .logo {
        width: 100px;
        height: 100px;
    }
}

/* ==================== ACCESIBILIDAD ==================== */
.link-button:focus,
.featured-button:focus {
    outline: 3px solid var(--rojo-principal);
    outline-offset: 2px;
}

/* ==================== ANIMACIONES EXTRAS ==================== */
.link-button:nth-child(1) {
    animation-delay: 0.1s;
}

.link-button:nth-child(2) {
    animation-delay: 0.2s;
}

.link-button:nth-child(3) {
    animation-delay: 0.3s;
}

.link-button:nth-child(4) {
    animation-delay: 0.4s;
}

.link-button:nth-child(5) {
    animation-delay: 0.5s;
}

/* ==================== MODAL COMPARTIR ==================== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(34, 34, 34, 0.95);
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
    border-radius: 24px;
    padding: 2.5rem 2rem;
    max-width: 420px;
    width: 90%;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 2px solid var(--rojo-principal);
    animation: slideUp 0.4s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    color: var(--rojo-principal);
    font-size: 1.5rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(199, 0, 0, 0.1);
    transform: rotate(90deg);
}

.modal-title {
    text-align: center;
    font-size: 1.75rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 2rem;
    letter-spacing: 0.5px;
}

.qr-container {
    background: #ffffff;
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    margin-bottom: 2rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

#qrcode {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

#qrcode img,
#qrcode canvas {
    border-radius: 8px;
    max-width: 100%;
    height: auto;
}

.qr-text {
    color: #64748b;
    font-size: 0.95rem;
    font-weight: 500;
    margin: 0;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.modal-btn {
    flex: 1;
    min-width: 140px;
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: 12px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-copy {
    background: transparent;
    border: 2px solid var(--rojo-principal);
    color: var(--rojo-principal);
}

.btn-copy:hover {
    background: rgba(199, 0, 0, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(199, 0, 0, 0.3);
}

.btn-share {
    background: linear-gradient(135deg, var(--rojo-principal) 0%, var(--rojo-oscuro) 100%);
    color: var(--blanco);
    border: none;
}

.btn-share:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(199, 0, 0, 0.4);
}

.modal-btn:active {
    transform: translateY(0);
}

.modal-btn i {
    font-size: 1.1rem;
}

/* Responsive Modal */
@media (max-width: 480px) {
    .modal-content {
        padding: 2rem 1.5rem;
        width: 95%;
    }
    
    .modal-title {
        font-size: 1.5rem;
    }
    
    .qr-container {
        padding: 1.5rem;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .modal-btn {
        width: 100%;
    }
}

/* ==================== MODAL SUSCRIPCIÓN ==================== */
.modal-subtitle {
    text-align: center;
    font-size: 0.95rem;
    color: #94a3b8;
    margin: -1rem 0 2rem 0;
    font-weight: 400;
}

.subscribe-form {
    width: 100%;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: #e2e8f0;
    margin-bottom: 0.5rem;
}

.form-label i {
    color: var(--rojo-principal);
    margin-right: 0.5rem;
}

.form-input {
    width: 100%;
    padding: 0.875rem 1rem;
    background-color: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(199, 0, 0, 0.3);
    border-radius: 10px;
    color: #ffffff;
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.form-input::placeholder {
    color: #64748b;
}

.form-input:focus {
    outline: none;
    border-color: var(--rojo-principal);
    background-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 4px rgba(199, 0, 0, 0.1);
}

.btn-subscribe-submit {
    width: 100%;
    margin-top: 1rem;
    background: linear-gradient(135deg, var(--rojo-principal) 0%, var(--rojo-oscuro) 100%);
    color: var(--blanco);
    border: none;
    padding: 1rem 1.5rem;
    font-weight: 600;
}

.btn-subscribe-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(199, 0, 0, 0.4);
}

.subscribe-note {
    text-align: center;
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 1.5rem;
}

.subscribe-note i {
    color: #22c55e;
    margin-right: 0.25rem;
}

/* Responsive Suscripción */
@media (max-width: 480px) {
    .modal-subtitle {
        font-size: 0.85rem;
        margin: -0.5rem 0 1.5rem 0;
    }
    
    .form-label {
        font-size: 0.85rem;
    }
    
    .form-input {
        padding: 0.75rem 0.875rem;
        font-size: 0.9rem;
    }
    
    .btn-subscribe-submit {
        padding: 0.875rem 1.25rem;
    }
}
