/* ============================================
   DIGIN PERÚ - COMPONENTS STYLES
   Componentes reutilizables (botones, cards, formularios, etc.)
   ============================================ */

/* === BOTONES === */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    font-family: var(--font-family);
    font-weight: var(--font-weight-bold);
    font-size: 1rem;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
    white-space: nowrap;
}

/* Botón primario */
.btn-primary {
    background: linear-gradient(135deg, var(--neon-green) 0%, var(--digital-blue) 100%);
    color: var(--white);
    box-shadow: 0 5px 20px rgba(0, 255, 170, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 255, 170, 0.5);
}

/* Botón secundario */
.btn-secondary {
    background: transparent;
    color: var(--digital-blue);
    border: 2px solid var(--digital-blue);
}

.btn-secondary:hover {
    background: var(--digital-blue);
    color: var(--white);
    transform: translateY(-2px);
}

/* Botón outline */
.btn-outline {
    background: transparent;
    color: var(--neon-green);
    border: 2px solid var(--neon-green);
}

.btn-outline:hover {
    background: var(--neon-green);
    color: var(--graphite);
}

/* Botón grande */
.btn-lg {
    padding: 1.25rem 2.5rem;
    font-size: 1.1rem;
    border-radius: var(--radius-lg);
}

/* Botón pequeño */
.btn-sm {
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
}

/* Botón ancho completo */
.btn-block {
    display: block;
    width: 100%;
}

/* === CARDS === */
.card {
    background: var(--bg-white);
    border-radius: var(--radius-xl);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
    border: 2px solid transparent;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
    border-color: var(--neon-green);
}

.card-header {
    margin-bottom: var(--spacing-md);
}

.card-title {
    font-size: 1.5rem;
    font-weight: var(--font-weight-bold);
    color: var(--graphite);
    margin-bottom: var(--spacing-sm);
}

.card-subtitle {
    font-size: 1rem;
    color: var(--text-gray);
}

.card-body {
    margin-bottom: var(--spacing-md);
}

.card-footer {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    padding-top: var(--spacing-md);
}

/* Card con gradiente */
.card-gradient {
    background: linear-gradient(135deg, var(--neon-green) 0%, var(--digital-blue) 100%);
    color: var(--white);
}

.card-gradient .card-title {
    color: var(--white);
}

/* === CARD DE SERVICIO === */
.service-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    border-left: 5px solid var(--digital-blue);
    transition: all var(--transition-base);
}

.service-card:hover {
    border-left-color: var(--neon-green);
    transform: translateX(8px);
    box-shadow: var(--shadow-lg);
}

.service-card-icon {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-sm);
    display: block;
}

.service-card-title {
    font-size: 1.25rem;
    font-weight: var(--font-weight-bold);
    color: var(--graphite);
    margin-bottom: var(--spacing-sm);
}

.service-card-description {
    color: var(--text-dark);
    line-height: 1.6;
}

/* === BADGES === */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.85rem;
    font-weight: var(--font-weight-semibold);
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-primary {
    background: var(--digital-blue);
    color: var(--white);
}

.badge-success {
    background: var(--neon-green);
    color: var(--graphite);
}

.badge-outline {
    background: transparent;
    border: 2px solid var(--neon-green);
    color: var(--neon-green);
}

/* === FORMULARIOS === */
.form-group {
    margin-bottom: var(--spacing-md);
}

.form-label {
    display: block;
    font-weight: var(--font-weight-semibold);
    color: var(--graphite);
    margin-bottom: var(--spacing-xs);
    font-size: 0.95rem;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 0.875rem 1rem;
    font-family: var(--font-family);
    font-size: 1rem;
    color: var(--text-dark);
    background: var(--bg-white);
    border: 2px solid #E5E7EB;
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--digital-blue);
    box-shadow: 0 0 0 3px rgba(0, 119, 255, 0.1);
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--text-gray);
    opacity: 0.7;
}

/* Input con error */
.form-input.error,
.form-textarea.error {
    border-color: #EF4444;
}

.form-error {
    color: #EF4444;
    font-size: 0.85rem;
    margin-top: var(--spacing-xs);
}

/* Input con éxito */
.form-input.success,
.form-textarea.success {
    border-color: var(--neon-green);
}

/* === ALERTAS === */
.alert {
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-md);
    border-left: 4px solid;
}

.alert-success {
    background: rgba(0, 255, 170, 0.1);
    border-left-color: var(--neon-green);
    color: #059669;
}

.alert-info {
    background: rgba(0, 119, 255, 0.1);
    border-left-color: var(--digital-blue);
    color: #0369A1;
}

.alert-warning {
    background: rgba(251, 191, 36, 0.1);
    border-left-color: #F59E0B;
    color: #D97706;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border-left-color: #EF4444;
    color: #DC2626;
}

/* === HERO SECTION === */
.hero {
    background: linear-gradient(135deg, var(--dark-bg) 0%, var(--graphite) 100%);
    color: var(--white);
    padding: 150px 2rem 100px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(0, 255, 170, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(0, 119, 255, 0.1) 0%, transparent 50%);
    animation: pulse 8s ease-in-out infinite;
}

.hero-content {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: var(--font-weight-extrabold);
    line-height: 1.2;
    margin-bottom: var(--spacing-md);
}

.hero-subtitle {
    font-size: 1.3rem;
    opacity: 0.95;
    margin-bottom: var(--spacing-xl);
    color: var(--text-light);
}

/* === SECTION HEADERS === */
.section-header {
    text-align: center;
    margin-bottom: var(--spacing-2xl);
}

.section-title {
    font-size: 2.8rem;
    font-weight: var(--font-weight-extrabold);
    color: var(--graphite);
    margin-bottom: var(--spacing-sm);
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--text-gray);
    max-width: 700px;
    margin: 0 auto;
}

/* === DIVIDERS === */
.divider {
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, var(--neon-green) 50%, transparent 100%);
    margin: var(--spacing-xl) 0;
    opacity: 0.3;
}

/* === GRID SYSTEM === */
.grid {
    display: grid;
    gap: var(--spacing-lg);
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* === LOADING SPINNER === */
.spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 255, 170, 0.2);
    border-top-color: var(--neon-green);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* === MODAL/OVERLAY === */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 9998;
}

.overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal {
    background: var(--bg-white);
    border-radius: var(--radius-xl);
    padding: var(--spacing-xl);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    z-index: 9999;
    animation: fadeInUp 0.3s ease-out;
}

.modal-close {
    position: absolute;
    top: var(--spacing-md);
    right: var(--spacing-md);
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-gray);
    transition: color var(--transition-fast);
}

.modal-close:hover {
    color: var(--graphite);
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .btn {
        padding: 0.875rem 1.5rem;
        font-size: 0.95rem;
    }
    
    .btn-lg {
        padding: 1rem 2rem;
        font-size: 1rem;
    }
    
    .hero {
        padding: 120px 1rem 80px;
    }
    
    .hero-title {
        font-size: 2.2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
    }
    
    .card {
        padding: var(--spacing-md);
    }
    
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
}

/* WhatsApp Flotante */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 30px;
    right: 30px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 15px rgba(0,0,0,0.3);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    text-decoration: none;
}

.whatsapp-float:hover {
    background-color: #128c7e;
    transform: scale(1.1);
    box-shadow: 2px 2px 20px rgba(0,0,0,0.4);
}

.whatsapp-float svg {
    width: 35px;
    height: 35px;
    fill: white;
}

@media (max-width: 768px) {
    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
        font-size: 25px;
    }
    
    .whatsapp-float svg {
        width: 28px;
        height: 28px;
    }
}
