/**
 * Button Styles for Congero Components
 * 
 * @package CongeroComponents
 * @since 1.0.0
 */

/* ===== BASE BUTTON STYLES ===== */
.hero-btn {
    display: inline-flex;
    align-items: center;
    background: var(--color-blue-secondary, #051A40);
    color: #fff;
    font-family: var(--font-heading, 'Open Sans', Arial, sans-serif);
    font-weight: var(--font-weight-bold, 700);
    font-size: 1rem;
    border-radius: 2rem;
    padding: 0.7em 1.2em;
    text-decoration: none;
    gap: 0.7em;
    box-shadow: 0 2px 8px rgba(16, 26, 58, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    margin-bottom: 1.2rem;
    white-space: nowrap;
    min-width: fit-content;
    cursor: pointer;
    border: none;
    outline: none;
}

/* ===== BUTTON VARIANTS ===== */
.hero-btn.secondary-btn {
    background: var(--color-blue-main, #0073C2);
    color: #fff;
    padding: 0.4em 1.2em;
    margin-bottom: 0;
}

.hero-btn.tertiary-btn {
    background: var(--color-purple-main, #5E21BA);
    color: #fff;
    padding: 0.4em 1.2em;
    margin-bottom: 0;
}

/* ===== PRIMARY BUTTON - MISMO TAMAÑO QUE HERO ===== */
.hero-btn:not(.secondary-btn):not(.tertiary-btn) {
    /* Estilos para botones primary (por defecto) - mismo tamaño que hero */
    background: var(--color-blue-secondary, #051A40);
    color: #fff;
    padding: 0.7em 1.2em;
    margin-bottom: 1.2rem;
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(16, 26, 58, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    min-width: fit-content;
    cursor: pointer;
    border: none;
    outline: none;
    gap: 0.7em;
}

/* ===== BUTTON ELEMENTS ===== */
.hero-btn-text {
    letter-spacing: 0.04em;
    margin-top: 1px;
    margin-right: 10px;
    text-transform: none;
    white-space: nowrap;
}

.hero-btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.2em;
    height: 2.2em;
    border-radius: 50%;
    background: var(--color-gray-light, #D4D4DB); 
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

/* ===== HOVER EFFECTS ===== */
.hero-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(16, 26, 58, 0.2);
}

.hero-btn.secondary-btn:hover {
    box-shadow: 0 4px 16px rgba(0, 115, 194, 0.3);
}

.hero-btn.tertiary-btn:hover {
    box-shadow: 0 4px 16px rgba(94, 33, 186, 0.3);
}

.hero-btn:hover .hero-btn-icon,
.hero-btn:focus .hero-btn-icon {
    background: #b0b8d0;
    transform: translateX(2px);
}

.hero-btn:hover svg path,
.hero-btn:focus svg path {
    stroke: #101a3a;
}

/* ===== SHINE EFFECT ===== */
.hero-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.hero-btn:hover::before {
    left: 100%;
}

/* ===== BUTTON SIZES ===== */
.hero-btn.btn-size-small {
    font-size: 0.85rem;
    padding: 0.5em 1em;
}

.hero-btn.btn-size-small .hero-btn-icon {
    width: 1.8em;
    height: 1.8em;
}

.hero-btn.btn-size-large {
    font-size: 1.1rem;
    padding: 0.8em 1.4em;
}

.hero-btn.btn-size-large .hero-btn-icon {
    width: 2.4em;
    height: 2.4em;
}

/* ===== UTILITY CLASSES ===== */
.hero-btn-centered {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-btn-no-margin {
    margin-bottom: 0;
}

/* ===== RESPONSIVE DESIGN - MOBILE FIRST OPTIMIZATION ===== */
@media (max-width: 768px) {
    .hero-btn {
        font-size: 1rem;
        padding: 0.8rem 1.8rem;  /* Aumentado padding para mejor touch target */
        gap: 0.7em;
        margin-bottom: 1rem;
        min-height: 48px; /* Touch target mínimo */
        border-radius: 2rem;
    }
    
    .hero-btn-icon {
        width: 2.2em;
        height: 2.2em;
    }
    
    .hero-btn-text {
        font-size: 1rem;
        font-weight: 600;
    }
}

@media (max-width: 600px) {
    .hero-btn {
        font-size: 1.1rem;
        padding: 1.2rem 2.2rem;     /* Padding aumentado para mejor usabilidad */
        gap: 0.8em;
        margin-bottom: 1rem;
        border-radius: 2rem;
        width: auto !important;
        max-width: none !important;
        min-width: auto !important;
        justify-content: center;
        text-align: center;
        height: auto;
        min-height: 56px; /* Touch target aumentado */
    }
    
    .hero-btn-icon {
        width: 2.4em;
        height: 2.4em;
        flex-shrink: 0;
    }
    
    .hero-btn-text {
        font-size: 1.1rem;
        font-weight: 600;
    }
}

@media (max-width: 480px) {
    .hero-btn {
        font-size: 1rem;
        padding: 1rem 2rem; /* Padding optimizado para móviles pequeños */
        gap: 0.7em;
        margin-bottom: 0.8rem;
        border-radius: 2rem;
        width: auto !important;
        max-width: none !important;
        min-width: auto !important;
        justify-content: center;
        text-align: center;
        height: auto;
        min-height: 52px; /* Touch target mínimo mantenido */
    }
    
    .hero-btn-icon {
        width: 2.2em;
        height: 2.2em;
        flex-shrink: 0;
    }
    
    .hero-btn-text {
        font-size: 1rem;
        font-weight: 600;
    }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
    .hero-btn,
    .hero-btn::before,
    .hero-btn-icon {
        transition: none;
    }
    
    .hero-btn:hover,
    .hero-btn:focus {
        transform: none;
    }
    
    .hero-btn:hover .hero-btn-icon {
        transform: none;
    }
    
    .hero-btn::before {
        display: none;
    }
}

@media (prefers-contrast: high) {
    .hero-btn {
        border: 2px solid currentColor;
    }
    
    .hero-btn-icon {
        border: 1px solid currentColor;
    }
}

/* ===== FOCUS STATES ===== */
.hero-btn:focus {
    outline: 2px solid var(--color-blue-main, #0073C2);
    outline-offset: 2px;
}

.hero-btn:focus:not(:focus-visible) {
    outline: none;
}

/* ===== DISABLED STATE ===== */
.hero-btn:disabled,
.hero-btn.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.hero-btn:disabled:hover,
.hero-btn.disabled:hover {
    transform: none;
    box-shadow: 0 2px 8px rgba(16, 26, 58, 0.08);
}

/* ===== BOTONES ESPECÍFICOS PARA SUCCESS STORIES Y NEWS ===== */
.success-stories-card-btn,
.news-card-btn,
.back-to-success-stories-btn,
.congero-success-story-btn {
    width: auto !important;
    max-width: none !important;
    min-width: auto !important;
    justify-content: center !important;
    text-align: center !important;
    margin: 0 1.2rem 1.2rem 1.2rem !important;
    font-size: 0.85rem !important;
    padding: 0.5em 1em !important;
    min-height: 36px !important;
    max-height: 40px !important;
    align-self: flex-start !important;
    background: var(--color-blue-main, #0073C2) !important;
    color: #fff !important;
}

/* Hover effects para botones de tarjetas */
.success-stories-card-btn:hover,
.news-card-btn:hover,
.back-to-success-stories-btn:hover,
.congero-success-story-btn:hover {
    background: var(--color-blue-secondary, #051A40) !important;
    color: #fff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 115, 194, 0.3);
}

/* Estilos específicos para mobile en estos botones - OPTIMIZADOS PARA TOUCH */
@media (max-width: 600px) {
    .success-stories-card-btn,
    .news-card-btn,
    .back-to-success-stories-btn,
    .congero-success-story-btn {
        font-size: 1rem !important; /* Aumentado de 0.75rem */
        padding: 0.8rem 1.5rem !important; /* Aumentado padding significativamente */
        height: auto !important;
        min-height: 48px !important; /* Touch target mínimo */
        max-height: none !important;
        border-radius: 2rem !important;
        font-weight: 600 !important; /* Aumentado peso de fuente */
        margin: 0 1rem 1rem 1rem !important;
        width: auto !important;
        max-width: 200px !important; /* Aumentado ancho máximo */
        background: var(--color-blue-main, #0073C2) !important;
        color: #fff !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 0.6em !important;
    }
    
    .success-stories-card-btn .hero-btn-icon,
    .news-card-btn .hero-btn-icon,
    .back-to-success-stories-btn .hero-btn-icon,
    .congero-success-story-btn .hero-btn-icon {
        width: 1.8em !important; /* Aumentado de 1em */
        height: 1.8em !important; /* Aumentado de 1em */
        flex-shrink: 0 !important;
    }
}

@media (max-width: 480px) {
    .success-stories-card-btn,
    .news-card-btn,
    .back-to-success-stories-btn,
    .congero-success-story-btn {
        font-size: 0.95rem !important; /* Aumentado de 0.7rem */
        padding: 0.7rem 1.3rem !important; /* Aumentado padding */
        height: auto !important;
        min-height: 44px !important; /* Touch target mínimo */
        max-height: none !important;
        border-radius: 2rem !important;
        font-weight: 600 !important; /* Aumentado peso de fuente */
        margin: 0 0.8rem 0.8rem 0.8rem !important;
        width: auto !important;
        max-width: 180px !important; /* Aumentado de 160px */
        background: var(--color-blue-main, #0073C2) !important;
        color: #fff !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 0.5em !important;
    }
    
    .success-stories-card-btn .hero-btn-icon,
    .news-card-btn .hero-btn-icon,
    .back-to-success-stories-btn .hero-btn-icon,
    .congero-success-story-btn .hero-btn-icon {
        width: 1.6em !important; /* Aumentado de 0.9em */
        height: 1.6em !important; /* Aumentado de 0.9em */
        flex-shrink: 0 !important;
    }
}

/* ===== ESTILOS PARA TARJETAS DE SUCCESS STORIES Y NEWS EN MOBILE ===== */
@media (max-width: 600px) {
    /* Asegurar que las imágenes se vean correctamente */
    .success-stories-archive-item img,
    .news-archive-item img,
    .success-stories-archive-thumb img,
    .news-archive-thumb img {
        width: 100% !important;
        height: auto !important;
        object-fit: cover !important;
        border-radius: 0.8rem !important;
        max-height: 200px !important;
    }
    
    /* Asegurar que las tarjetas tengan el ancho correcto */
    .success-stories-archive-item,
    .news-archive-item {
        width: 100% !important;
        max-width: 100% !important;
        margin: 1rem 0 !important;
        padding: 1rem !important;
    }
    
    /* Asegurar que el contenido de las tarjetas se vea bien */
    .success-stories-archive-content,
    .news-archive-content {
        padding: 1rem !important;
    }
    
    /* Asegurar que los títulos se vean bien */
    .success-stories-archive-title,
    .news-archive-title {
        font-size: 1.2rem !important;
        line-height: 1.4 !important;
        margin-bottom: 0.8rem !important;
    }
    
    /* Asegurar que los excerpts se vean bien */
    .success-stories-archive-excerpt,
    .news-archive-excerpt {
        font-size: 0.95rem !important;
        line-height: 1.5 !important;
        margin-bottom: 1rem !important;
    }
}

@media (max-width: 480px) {
    /* Ajustes adicionales para mobile muy pequeño */
    .success-stories-archive-item,
    .news-archive-item {
        padding: 0.8rem !important;
        margin: 0.8rem 0 !important;
    }
    
    .success-stories-archive-content,
    .news-archive-content {
        padding: 0.8rem !important;
    }
    
    .success-stories-archive-title,
    .news-archive-title {
        font-size: 1.1rem !important;
        margin-bottom: 0.6rem !important;
    }
    
    .success-stories-archive-excerpt,
    .news-archive-excerpt {
        font-size: 0.9rem !important;
        margin-bottom: 0.8rem !important;
    }
} 