/* 
 * byte Soluciones Intelligentes - Estilos Personalizados
 * Archivo: styles.css
 * Descripción: Estilos CSS personalizados para el sitio web
 */

:root {
    --primary: #2c3e50;
    --secondary: #3498db;
    --accent: #e74c3c;
    --light: #ecf0f1;
    --gray: #95a5a6;
    --dark: #2c3e50;
}

/* ============================================
   ESTILOS GENERALES
   ============================================ */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
    line-height: 1.6;
    padding-top: 80px; /* Para header desktop */
}

@media (max-width: 992px) {
    body {
        padding-top: 0; /* En móvil no hay header fijo */
    }
}

/* ============================================
   LOGO PERSONALIZADO (TEXTO)
   ============================================ */

/* Logo para DESKTOP */
.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo-icon {
    background-color: #3498db;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 24px;
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3);
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-text .byte {
    font-size: 28px;
    font-weight: 900;
    color: #2c3e50;
    line-height: 1;
}

.logo-text .soluciones {
    font-size: 18px;
    font-weight: 700;
    color: #2c3e50;
    line-height: 1;
}

.logo-text .intelligentes {
    font-size: 14px;
    font-weight: 500;
    color: #3498db;
    font-style: italic;
    line-height: 1;
    margin-top: 2px;
}

/* Logo para MÓVIL */
.mobile-logo {
    font-size: 24px;
    font-weight: 900;
    color: var(--primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
}

.mobile-logo::before {
    content: 'S';
    background-color: var(--secondary);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 20px;
    box-shadow: 0 3px 6px rgba(52, 152, 219, 0.3);
}

/* ============================================
   HEADER DESKTOP (SOLO SE MUESTRA EN DESKTOP)
   ============================================ */

/* Navegación personalizada */
.navbar-custom {
    background-color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    padding: 15px 0;
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 1030;
}

.nav-link-custom {
    color: var(--primary) !important;
    font-weight: 600;
    font-size: 16px;
    padding: 8px 15px !important;
    position: relative;
}

.nav-link-custom::after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px;
    background-color: var(--secondary);
    bottom: 0;
    left: 15px;
    transition: width 0.3s;
}

.nav-link-custom:hover {
    color: var(--secondary) !important;
}

.nav-link-custom:hover::after {
    width: calc(100% - 30px);
}

/* ============================================
   HEADER MÓVIL (SOLO SE MUESTRA EN MÓVIL)
   ============================================ */

/* Ocultar header desktop en móvil */
@media (max-width: 992px) {
    header, .navbar-custom {
        display: none !important;
    }
}

/* Header móvil */
.mobile-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    z-index: 1050;
    padding: 12px 0;
}

@media (min-width: 993px) {
    .mobile-header {
        display: none !important;
    }
}

.mobile-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.mobile-menu-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--primary);
    cursor: pointer;
    padding: 8px;
    transition: all 0.3s;
    border-radius: 5px;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-menu-btn:hover {
    color: var(--secondary);
    background-color: rgba(52, 152, 219, 0.1);
}

/* Menú móvil desplegable */
.mobile-nav {
    display: none;
    background: white;
    padding: 0 20px 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-top: 2px solid var(--light);
    animation: slideDown 0.3s ease;
}

.mobile-nav.active {
    display: block;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mobile-nav-link {
    display: block;
    padding: 14px 0;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    border-bottom: 1px solid #f5f5f5;
    transition: all 0.3s;
    position: relative;
}

.mobile-nav-link:last-child {
    border-bottom: none;
}

.mobile-nav-link:hover {
    color: var(--secondary);
    padding-left: 10px;
}

.mobile-nav-link.whatsapp-link {
    color: #25d366;
    margin-top: 10px;
    padding-left: 0;
    font-weight: 700;
}

.mobile-nav-link.whatsapp-link:hover {
    color: #128C7E;
}

.mobile-nav-link.whatsapp-link i {
    font-size: 18px;
    margin-right: 10px;
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero-section {
    background: linear-gradient(rgba(44, 62, 80, 0.85), rgba(44, 62, 80, 0.9)), 
                url('https://images.unsplash.com/photo-1516321318423-f06f85e504b3?ixlib=rb-4.0.3&auto=format&fit=crop&w=1200&q=80');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 60px 0;
    min-height: 85vh;
    display: flex;
    align-items: center;
}

@media (max-width: 992px) {
    .hero-section {
        padding-top: 100px; /* Espacio para header móvil */
        min-height: 90vh;
        padding-bottom: 40px;
    }
}

@media (max-width: 768px) {
    .hero-section {
        padding-top: 90px;
        min-height: 85vh;
    }
}

@media (max-width: 576px) {
    .hero-section {
        padding-top: 80px;
        min-height: 80vh;
    }
    
    .hero-section h1 {
        font-size: 1.8rem;
    }
    
    .hero-section .lead {
        font-size: 1rem;
    }
}

/* ============================================
   TÍTULOS DE SECCIÓN
   ============================================ */

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    position: absolute;
    width: 70px;
    height: 4px;
    background-color: var(--secondary);
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
}

.section-title p {
    color: var(--gray);
    max-width: 700px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .section-title h2 {
        font-size: 2rem;
    }
}

/* ============================================
   TARJETAS DE SERVICIOS
   ============================================ */

.service-card {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
    border-top: 4px solid var(--secondary);
    height: 100%;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease, box-shadow 0.3s;
}

.service-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.service-icon {
    background-color: var(--light);
    padding: 25px;
    text-align: center;
    font-size: 40px;
    color: var(--primary);
}

.service-content {
    padding: 25px;
}

.service-content h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--primary);
}

.service-list {
    list-style: none;
    padding-left: 0;
    margin-top: 15px;
}

.service-list li {
    padding: 8px 0;
    border-bottom: 1px dashed #eee;
}

.service-list li:last-child {
    border-bottom: none;
}

.service-list i {
    color: var(--secondary);
    margin-right: 10px;
}

/* ============================================
   BOTONES PERSONALIZADOS
   ============================================ */

.btn-custom {
    background-color: var(--secondary);
    color: white;
    padding: 12px 30px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    border: none;
}

.btn-custom:hover {
    background-color: var(--accent);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* ============================================
   FORMULARIO DE CONTACTO
   ============================================ */

.contact-section {
    background-color: var(--light);
    padding: 80px 0;
}

.form-control-custom:focus {
    border-color: var(--secondary);
    box-shadow: 0 0 0 0.25rem rgba(52, 152, 219, 0.25);
}

/* ============================================
   BOTÓN FLOTANTE DE WHATSAPP
   ============================================ */

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

.whatsapp-float-desktop:hover {
    background-color: #128C7E;
    color: white;
    transform: scale(1.1);
    box-shadow: 2px 2px 15px rgba(0, 0, 0, 0.3);
}

.whatsapp-float-desktop i {
    margin-top: 5px;
}

/* Botón de WhatsApp en móviles */
.whatsapp-float .btn-success {
    background-color: #25d366;
    border-color: #25d366;
    padding: 12px 20px;
    font-weight: 600;
}

.whatsapp-float .btn-success:hover {
    background-color: #128C7E;
    border-color: #128C7E;
}

/* Mejoras para formulario */
.btn-success {
    background-color: #25d366;
    border-color: #25d366;
}

.btn-success:hover {
    background-color: #128C7E;
    border-color: #128C7E;
}

/* ============================================
   FOOTER
   ============================================ */

.footer-section {
    background-color: var(--primary);
    color: white;
    padding: 50px 0 20px;
}

.footer-logo .byte {
    font-size: 32px;
    font-weight: 900;
    color: white;
    line-height: 1;
}

.footer-logo .soluciones {
    font-size: 20px;
    font-weight: 700;
    color: white;
    line-height: 1;
}

.footer-logo .intelligentes {
    font-size: 15px;
    font-weight: 500;
    color: var(--secondary);
    font-style: italic;
    line-height: 1;
    margin-top: 2px;
}

.footer-col h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: var(--secondary);
}

.footer-links {
    list-style: none;
    padding-left: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #ddd;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--secondary);
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #bbb;
    font-size: 0.9rem;
}

/* ============================================
   RESPONSIVE ADICIONAL
   ============================================ */

@media (max-width: 768px) {
    /* Ajustes generales */
    .container {
        padding-left: 20px;
        padding-right: 20px;
    }
    
    /* Ajustar padding de secciones */
    section {
        padding: 40px 0 !important;
    }
    
    /* Botón flotante de WhatsApp en móvil */
    .whatsapp-float-desktop {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
        font-size: 25px;
    }
    
    /* Footer en móvil */
    .footer-section {
        padding: 40px 0 20px;
    }
    
    .footer-col {
        margin-bottom: 30px;
    }
    
    /* Formulario en móvil */
    .contact-section .row {
        margin-top: 20px;
    }
    
    .contact-section .col-lg-5 {
        margin-bottom: 40px;
    }
    
    /* Botones en móvil */
    .btn-lg {
        padding: 10px 20px;
        font-size: 16px;
    }
    
    /* Logo en móvil */
    .mobile-logo::before {
        width: 35px;
        height: 35px;
        font-size: 18px;
    }
    
    .mobile-logo {
        font-size: 22px;
    }
}

/* ============================================
   AJUSTES PARA NAVEGACIÓN SUAVE
   ============================================ */

section[id] {
    scroll-margin-top: 100px;
}

@media (max-width: 992px) {
    section[id] {
        scroll-margin-top: 80px;
    }
}

@media (max-width: 768px) {
    section[id] {
        scroll-margin-top: 70px;
    }
}

/* ============================================
   ESTILOS PARA VALIDACIÓN DE FORMULARIO
   ============================================ */

.is-invalid {
    border-color: #dc3545 !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.is-valid {
    border-color: #198754 !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.invalid-feedback {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875em;
    color: #dc3545;
}

/* ============================================
   ANIMACIONES Y TRANSICIONES
   ============================================ */

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.slide-up {
    animation: slideUp 0.5s ease-out;
}

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

/* ============================================
   UTILIDADES ADICIONALES
   ============================================ */

.text-shadow {
    text-shadow: 1px 1px 3px rgba(0,0,0,0.3);
}

.box-shadow {
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.hover-lift {
    transition: transform 0.3s;
}

.hover-lift:hover {
    transform: translateY(-5px);
}