/* ==========================================================================
   PERSINOVAA - COMPONENTS.CSS
   Botones, Tarjetas, Formularios y Elementos de Interfaz
   Agencia: Web Total México
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. BOTONES (Llamados a la Acción / CTAs)
   -------------------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-primary, 'Inter', sans-serif);
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    border: none;
    border-radius: 8px; /* Bordes ligeramente redondeados para estilo moderno */
    padding: 0.8rem 1.8rem;
    font-size: 1rem;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

/* Variante Primaria (Azul de conversión) */
.btn-primary {
    background-color: var(--color-primary, #0056b3);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(0, 86, 179, 0.3);
}

.btn-primary:hover {
    background-color: var(--color-primary-dark, #003d82);
    color: #ffffff;
    box-shadow: 0 6px 20px rgba(0, 86, 179, 0.4);
}

/* Variante Secundaria (Transparente / Outline) */
.btn-secondary {
    background-color: transparent;
    color: var(--color-white, #ffffff);
    border: 2px solid var(--color-white, #ffffff);
}

.btn-secondary:hover {
    background-color: var(--color-white, #ffffff);
    color: var(--color-black, #0a0a0a);
}

/* Tamaños */
.btn-large {
    padding: 1rem 2.5rem;
    font-size: 1.125rem;
}

.btn-full {
    width: 100%;
    padding: 1rem;
}

/* Estado de Carga (Spinner oculto por defecto) */
.btn-loading-state .btn-loader {
    display: none;
    margin-left: 10px;
}
.btn-loading-state.is-loading .btn-text {
    display: none;
}
.btn-loading-state.is-loading .btn-loader {
    display: inline-block;
}

/* Botón Play Video */
.play-btn {
    width: 80px;
    height: 80px;
    background-color: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    color: var(--color-primary, #0056b3);
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-bounce);
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.5);
    animation: pulseWhite 2s infinite;
}

.play-btn:hover {
    transform: scale(1.1);
    background-color: #ffffff;
    color: var(--color-black, #0a0a0a);
}

@keyframes pulseWhite {
    0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7); }
    70% { box-shadow: 0 0 0 20px rgba(255, 255, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}

/* --------------------------------------------------------------------------
   2. ETIQUETAS (Badges)
   -------------------------------------------------------------------------- */
.badge-premium {
    display: inline-block;
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 1rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.badge-outline {
    display: inline-block;
    color: var(--color-primary, #0056b3);
    padding: 0.3rem 1rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 1rem;
    border: 1px solid var(--color-primary, #0056b3);
}

.icon-badge {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

/* --------------------------------------------------------------------------
   3. TARJETAS DE PRODUCTOS / CATEGORÍAS
   -------------------------------------------------------------------------- */
.category-card {
    display: block;
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: var(--color-black, #0a0a0a);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: all var(--transition-normal);
    position: relative;
}

.card-image-wrapper {
    width: 100%;
    height: 300px;
    overflow: hidden;
    position: relative;
}

.card-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.card-content {
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #ffffff;
    position: relative;
    z-index: 2;
}

.card-content h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.card-action-icon {
    width: 40px;
    height: 40px;
    background-color: var(--color-gray-light, #f8f9fa);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary, #0056b3);
    transition: all var(--transition-normal);
}

/* Hover en la tarjeta */
.category-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.category-card:hover .card-image-wrapper img {
    transform: scale(1.08); /* Zoom sutil a la imagen */
}

.category-card:hover .card-action-icon {
    background-color: var(--color-primary, #0056b3);
    color: #ffffff;
    transform: rotate(-45deg); /* Flecha apuntando diagonalmente para denotar acción */
}

/* --------------------------------------------------------------------------
   4. COMPONENTES DE CONFIANZA (Trust Items)
   -------------------------------------------------------------------------- */
.trust-item {
    text-align: center;
    padding: 2rem;
}

.trust-item i {
    font-size: 3rem;
    color: var(--color-primary, #0056b3);
    margin-bottom: 1.5rem;
}

.trust-item h3 {
    color: #ffffff;
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.trust-item p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
}

/* --------------------------------------------------------------------------
   5. TARJETAS DE TESTIMONIOS
   -------------------------------------------------------------------------- */
.testimonial-card {
    background-color: #ffffff;
    color: var(--color-black, #0a0a0a);
    padding: 2rem;
    border-radius: 16px;
    text-align: left;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.client-info {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
}

.client-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-right: 1rem;
    background-size: cover;
    background-position: center;
}

.client-info h4 {
    margin: 0 0 0.2rem 0;
    font-size: 1.1rem;
}

.stars i {
    font-size: 0.8rem;
    margin-right: 2px;
}

.review-text {
    font-style: italic;
    flex-grow: 1; /* Empuja la fecha hacia abajo */
    color: var(--color-gray-dark, #495057);
}

.review-date {
    font-size: 0.8rem;
    color: var(--color-gray-dark, #adb5bd);
    text-align: right;
    display: block;
    margin-top: 1rem;
}

/* --------------------------------------------------------------------------
   6. CONTENEDOR DE VIDEO
   -------------------------------------------------------------------------- */
.video-container {
    position: relative;
    width: 100%;
    max-width: 900px;
    margin: 3rem auto 0;
    border-radius: 20px;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background-color: var(--color-black, #000);
    background-image: url('../assets/img/video-poster.jpg'); /* Se ajustará cuando subamos assets */
    background-size: cover;
    background-position: center;
}

.video-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition-normal);
}

.video-container:hover .video-overlay {
    background: rgba(0, 0, 0, 0.1);
}

/* --------------------------------------------------------------------------
   7. FORMULARIOS OPTIMIZADOS (Floating Labels & Custom Inputs)
   -------------------------------------------------------------------------- */
.styled-form {
    width: 100%;
}

.form-group {
    position: relative;
    margin-bottom: 1.5rem;
}

/* Inputs Base */
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group select {
    width: 100%;
    padding: 1.2rem 1rem 0.4rem 1rem;
    font-size: 1rem;
    font-family: inherit;
    color: var(--color-black, #0a0a0a);
    background-color: var(--color-gray-light, #f8f9fa);
    border: 1px solid transparent;
    border-radius: 8px;
    border-bottom: 2px solid var(--color-gray-light, #dee2e6);
    outline: none;
    transition: all 0.3s ease;
}

/* Floating Label Logic */
.floating-label label {
    position: absolute;
    top: 50%;
    left: 1rem;
    transform: translateY(-50%);
    font-size: 1rem;
    color: var(--color-gray-dark, #6c757d);
    pointer-events: none;
    transition: all 0.3s ease;
}

/* Cuando el input tiene foco o contiene texto, el label sube */
.floating-label input:focus,
.floating-label input:not(:placeholder-shown) {
    background-color: #ffffff;
    border-bottom-color: var(--color-primary, #0056b3);
    box-shadow: 0 4px 10px rgba(0,0,0,0.03);
}

.floating-label input:focus + label,
.floating-label input:not(:placeholder-shown) + label {
    top: 0.6rem;
    font-size: 0.75rem;
    color: var(--color-primary, #0056b3);
    font-weight: 600;
}

/* Select Personalizado */
.select-wrapper {
    position: relative;
}

.select-wrapper label {
    display: block;
    font-size: 0.85rem;
    color: var(--color-gray-dark, #6c757d);
    margin-bottom: 0.3rem;
    margin-left: 0.5rem;
}

.select-wrapper select {
    appearance: none;
    padding: 1rem;
    cursor: pointer;
}

.select-wrapper select:focus {
    background-color: #ffffff;
    border-bottom-color: var(--color-primary, #0056b3);
}

.select-icon {
    position: absolute;
    right: 1rem;
    bottom: 1.1rem;
    color: var(--color-gray-dark, #6c757d);
    pointer-events: none;
}

/* Radio Buttons Customizados */
.radio-label-title {
    font-size: 0.85rem;
    color: var(--color-gray-dark, #6c757d);
    margin-bottom: 0.5rem;
    margin-left: 0.5rem;
}

.radio-options {
    display: flex;
    gap: 1.5rem;
}

.custom-radio {
    display: flex;
    align-items: center;
    position: relative;
    cursor: pointer;
    font-size: 1rem;
    user-select: none;
    color: var(--color-black, #0a0a0a);
}

.custom-radio input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.radio-mark {
    width: 20px;
    height: 20px;
    background-color: #ffffff;
    border: 2px solid var(--color-gray-dark, #ced4da);
    border-radius: 50%;
    margin-right: 10px;
    position: relative;
    transition: all 0.2s ease;
}

.custom-radio:hover input ~ .radio-mark {
    border-color: var(--color-primary, #0056b3);
}

.custom-radio input:checked ~ .radio-mark {
    border-color: var(--color-primary, #0056b3);
}

.radio-mark:after {
    content: "";
    position: absolute;
    display: none;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--color-primary, #0056b3);
}

.custom-radio input:checked ~ .radio-mark:after {
    display: block;
}