/* ==============================================================================
   TST SOLUTIONS - HOJA DE ESTILOS CORPORATIVA
   Paleta: Azul Tecnológico, Gris Oscuro/Navy, Blanco y Negro
   ============================================================================== */

:root {
    --primary-color: #0066cc;
    --primary-hover: #0052a3;
    --secondary-color: #00d4ff;
    --dark-bg: #0a192f;
    --card-bg: #0f172a;
    --card-border: #1e293b;
    --light-bg: #f8fafc;
    --text-dark: #0f172a;
    --text-gray: #475569;
    --text-light: #94a3b8;
    --text-white: #ffffff;
    --border-color: #e2e8f0;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 30px -10px rgba(0, 102, 204, 0.2);
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --transition: all 0.25s ease-in-out;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: #ffffff;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* NAVBAR & HEADER */
.header {
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    background: rgba(10, 25, 47, 0.96);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 14px 0;
    transition: var(--transition);
}

.container-nav {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.brand-logo {
    height: 44px;
    width: auto;
    display: block;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 28px;
    align-items: center;
}

.nav-links a {
    color: var(--text-white);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    padding: 6px 0;
}

.nav-links a:not(.btn-portal):hover {
    color: var(--secondary-color);
}

.nav-links a:not(.btn-portal)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--secondary-color);
    transition: width 0.3s ease;
}

.nav-links a:not(.btn-portal):hover::after {
    width: 100%;
}

/* Botón destacado Acceso Clientes */
.btn-portal {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #0080ff 100%);
    color: #ffffff !important;
    padding: 10px 22px !important;
    border-radius: 30px;
    font-weight: 600 !important;
    box-shadow: 0 4px 14px rgba(0, 102, 204, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: var(--transition) !important;
}

.btn-portal:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 102, 204, 0.6);
    background: linear-gradient(135deg, #0052a3 0%, #0066cc 100%);
}

.portal-icon {
    transition: transform 0.2s ease;
}

.btn-portal:hover .portal-icon {
    transform: translateX(3px);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    gap: 5px;
    padding: 4px;
}

.menu-toggle span {
    width: 26px;
    height: 3px;
    background: white;
    border-radius: 2px;
    transition: var(--transition);
}

/* HERO SECTION */
.hero {
    background-color: #0a192f;
    background-image: linear-gradient(135deg, rgba(10, 25, 47, 0.90) 0%, rgba(3, 7, 18, 0.88) 100%), url('assets/images/fondo.jpg');
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    color: white;
    padding: 90px 0 100px;
    position: relative;
    overflow: hidden;
}

.hero-container {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 50px;
    align-items: center;
    width: 100%;
}

.hero-content {
    width: 100%;
}

.hero-image {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    width: 100%;
}

.hero-badge {
    display: inline-block;
    background: rgba(0, 212, 255, 0.12);
    color: var(--secondary-color);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 20px;
    border: 1px solid rgba(0, 212, 255, 0.3);
    letter-spacing: 0.5px;
}

.hero-content h2 {
    font-size: 46px;
    line-height: 1.2;
    font-weight: 800;
    margin-bottom: 22px;
    letter-spacing: -0.5px;
}

.hero-content p {
    font-size: 18px;
    color: #cbd5e1;
    margin-bottom: 35px;
    line-height: 1.7;
    max-width: 540px;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: var(--transition);
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 14px rgba(0, 102, 204, 0.35);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 102, 204, 0.5);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(4px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: white;
}

.btn-outline {
    background: transparent;
    color: var(--secondary-color);
    border: 1px solid var(--secondary-color);
}

.btn-outline:hover {
    background: rgba(0, 212, 255, 0.1);
}

/* Card Preview in Hero */
.tech-card-preview {
    width: 100%;
    max-width: 480px;
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg), 0 0 40px rgba(0, 102, 204, 0.15);
    overflow: hidden;
}

.tech-card-header {
    background: #1e293b;
    padding: 12px 18px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid #334155;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}
.dot.red { background: #ef4444; }
.dot.yellow { background: #f59e0b; }
.dot.green { background: #10b981; }

.tech-card-title {
    font-size: 13px;
    font-weight: 600;
    color: #94a3b8;
    margin-left: 6px;
}

.tech-card-body {
    padding: 24px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 16px;
    font-size: 14px;
}

.stat-label {
    color: #94a3b8;
}

.stat-value {
    color: #f8fafc;
    font-weight: 600;
}

.stat-value.highlight {
    color: var(--secondary-color);
}

.stat-bar {
    width: 100%;
    height: 8px;
    background: #1e293b;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 18px;
}

.stat-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 4px;
}

/* SECTION TITLES */
.section-header {
    text-align: center;
    max-width: 760px;
    margin: 0 auto 50px;
}

.section-tag {
    display: inline-block;
    color: var(--primary-color);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.section-title {
    font-size: 34px;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.section-subtitle {
    font-size: 16px;
    color: var(--text-gray);
    line-height: 1.6;
}

/* SERVICIOS SECTION */
.servicios {
    padding: 85px 0;
    background: #ffffff;
}

.servicios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 30px;
}

.servicio-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 34px 28px;
    transition: var(--transition);
    position: relative;
    display: flex;
    flex-direction: column;
}

.servicio-card:hover {
    transform: translateY(-6px);
    border-color: #cbd5e1;
    box-shadow: 0 16px 30px rgba(0, 102, 204, 0.08);
}

.servicio-icon {
    width: 58px;
    height: 58px;
    background: #eff6ff;
    color: var(--primary-color);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 22px;
    border: 1px solid #dbeafe;
    transition: var(--transition);
}

.servicio-card:hover .servicio-icon {
    background: var(--primary-color);
    color: white;
}

.servicio-card h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.servicio-card p {
    font-size: 15px;
    color: var(--text-gray);
    line-height: 1.65;
}

/* POR QUE ELEGIRNOS */
.por-que {
    padding: 85px 0;
    background: var(--light-bg);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.por-que-content {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 50px;
    align-items: center;
}

.por-que-text h2 {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 25px;
    color: var(--text-dark);
}

.features-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.features-list li {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.feature-icon {
    width: 26px;
    height: 26px;
    background: #dbeafe;
    color: var(--primary-color);
    font-weight: bold;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
    margin-top: 2px;
}

.features-list h4 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.features-list p {
    font-size: 14px;
    color: var(--text-gray);
}

.por-que-highlight {
    background: linear-gradient(135deg, #0a192f 0%, #1e293b 100%);
    padding: 40px;
    border-radius: var(--radius-md);
    color: white;
    box-shadow: var(--shadow-md);
}

.highlight-box h3 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 15px;
}

.highlight-box p {
    color: #cbd5e1;
    font-size: 15px;
    margin-bottom: 25px;
    line-height: 1.7;
}

/* PROYECTOS SECTION */
.proyectos {
    padding: 85px 0;
    background: #ffffff;
}

.proyectos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.proyecto-card {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 30px;
    position: relative;
}

.proyecto-badge {
    display: inline-block;
    background: #e0f2fe;
    color: #0284c7;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.proyecto-card h3 {
    font-size: 19px;
    font-weight: 700;
    margin-bottom: 10px;
}

.proyecto-card p {
    font-size: 14px;
    color: var(--text-gray);
    margin-bottom: 20px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress {
    height: 100%;
    background: var(--primary-color);
    border-radius: 4px;
}

.progress-text {
    font-size: 12px;
    color: var(--text-gray);
    font-weight: 600;
}

/* CONTACTO SECTION */
.contacto {
    padding: 85px 0;
    background: #f1f5f9;
}

.contacto-content {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 50px;
}

.contacto-info {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.info-item {
    display: flex;
    gap: 16px;
    background: white;
    padding: 22px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.info-icon {
    font-size: 26px;
}

.info-item h4 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 5px;
}

.info-item p a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.info-item p a:hover {
    text-decoration: underline;
}

.contacto-form-wrapper {
    background: white;
    padding: 35px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.contacto-form .form-group {
    margin-bottom: 18px;
}

.contacto-form label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 6px;
}

.contacto-form input,
.contacto-form textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-family: inherit;
    transition: var(--transition);
}

.contacto-form input:focus,
.contacto-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.15);
}

.form-alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    margin-bottom: 18px;
    line-height: 1.5;
}

.form-alert.success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.form-alert.error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.btn-submit {
    width: 100%;
    padding: 14px;
    font-size: 16px;
}

/* FOOTER */
.footer {
    background: #0a192f;
    color: #94a3b8;
    padding: 70px 0 25px;
    border-top: 1px solid #1e293b;
}

.footer-content {
    display: grid;
    grid-template-columns: 1.3fr 0.8fr 0.9fr 1.4fr;
    gap: 40px;
    margin-bottom: 50px;
}

.footer-logo {
    max-width: 180px;
    height: auto;
    display: block;
    margin-bottom: 14px;
}

.footer-tagline {
    font-size: 12px;
    color: var(--secondary-color);
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 14px;
}

.footer-desc {
    font-size: 14px;
    line-height: 1.6;
}

.footer-section h4 {
    color: white;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 18px;
}

.footer-section ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-section ul li a {
    color: #94a3b8;
    text-decoration: none;
    font-size: 14px;
    transition: var(--transition);
}

.footer-section ul li a:hover {
    color: var(--secondary-color);
    padding-left: 4px;
}

.footer-portal-link {
    color: var(--secondary-color) !important;
    font-weight: 600;
}

.security-text {
    font-size: 13px;
    color: #94a3b8;
    margin-bottom: 15px;
    line-height: 1.5;
}

.badges-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.security-badge {
    height: 42px;
    width: auto;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.security-badge:hover {
    transform: translateY(-2px);
}

.footer-bottom {
    border-top: 1px solid #1e293b;
    padding-top: 25px;
    text-align: center;
    font-size: 13px;
    color: #64748b;
}

/* WIDGET FLOTANTE DE WHATSAPP CON ROBOT ASISTENTE */
.whatsapp-widget-container {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.whatsapp-tooltip {
    background: #ffffff;
    border-radius: var(--radius-md);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border: 1px solid #e2e8f0;
    width: 290px;
    padding: 16px;
    margin-bottom: 14px;
    animation: tooltipSlideUp 0.5s ease-out;
    position: relative;
    transform-origin: bottom right;
}

@keyframes tooltipSlideUp {
    from {
        opacity: 0;
        transform: translateY(15px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.tooltip-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.bot-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    animation: botBounce 2.5s infinite ease-in-out;
}

@keyframes botBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

.bot-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-dark);
}

.tooltip-close {
    margin-left: auto;
    background: none;
    border: none;
    font-size: 18px;
    color: #94a3b8;
    cursor: pointer;
    line-height: 1;
}

.tooltip-close:hover {
    color: var(--text-dark);
}

.tooltip-msg {
    font-size: 13px;
    color: var(--text-gray);
    line-height: 1.5;
    margin-bottom: 12px;
}

.tooltip-btn {
    display: block;
    text-align: center;
    background: #25d366;
    color: white;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    padding: 8px 12px;
    border-radius: 6px;
    transition: var(--transition);
}

.tooltip-btn:hover {
    background: #1eb956;
}

.whatsapp-btn {
    width: 60px;
    height: 60px;
    background: #25d366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
    position: relative;
    transition: var(--transition);
    cursor: pointer;
    text-decoration: none;
}

.whatsapp-btn:hover {
    transform: scale(1.08);
    background: #1eb956;
}

.whatsapp-pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid #25d366;
    animation: pulseWave 2s infinite;
}

@keyframes pulseWave {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(1.5); opacity: 0; }
}

/* RESPONSIVE DESIGN */
@media (max-width: 992px) {
    .hero-container,
    .por-que-content,
    .contacto-content {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        background: #0a192f;
        flex-direction: column;
        padding: 30px;
        gap: 20px;
        border-bottom: 1px solid #1e293b;
        transform: translateY(-120%);
        transition: transform 0.3s ease;
    }

    .nav-links.active {
        transform: translateY(0);
    }

    .hero-content h2 {
        font-size: 34px;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }
}
