/* ========== VARIABLES Y ESTILOS GLOBALES ========== */
:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --secondary: #60a5fa;
    --danger: #ef4444;
    --warning: #f59e0b;
    --success: #22c55e;
    --neutral-50: #f9fafb;
    --neutral-100: #f3f4f6;
    --neutral-200: #e5e7eb;
    --neutral-300: #d1d5db;
    --neutral-600: #4b5563;
    --neutral-700: #374151;
    --neutral-900: #111827;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========== LOADER INICIAL ========== */
#page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(120deg, #2563eb 0%, #60a5fa 50%, #1e40af 100%);
    box-shadow: 0 0 80px 0 rgba(37,99,235,0.18);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

#page-loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-logo {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 30px;
    animation: logoFloat 2s ease-in-out infinite;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
}

.loader-spinner {
    width: 54px;
    height: 54px;
    border: 5px solid rgba(255,255,255,0.18);
    border-top: 5px solid var(--primary);
    border-right: 5px solid var(--secondary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    box-shadow: 0 0 18px 0 rgba(37,99,235,0.18);
}
.loader-spinner.improved {
    border-top: 5px solid #2563eb;
    border-right: 5px solid #60a5fa;
    border-bottom: 5px solid #fff;
    border-left: 5px solid #1e40af;
    background: linear-gradient(120deg, #2563eb22 0%, #60a5fa22 100%);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loader-text {
    color: white;
    margin-top: 20px;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-shadow: 0 2px 8px rgba(37,99,235,0.18);
    font-family: 'Poppins', sans-serif;
}
.loader-text.improved {
    font-size: 20px;
    color: #e0f2fe;
    text-shadow: 0 2px 12px #2563eb88;
    letter-spacing: 2px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}
.loader-dots {
    display: inline-block;
    min-width: 18px;
    font-size: 22px;
    font-weight: 700;
    color: #60a5fa;
    vertical-align: middle;
    transition: opacity 0.3s;
}

/* ========== ANIMACIONES DE ENTRADA ========== */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-up.animated {
    opacity: 1;
    transform: translateY(0);
}

body.loading {
    overflow: hidden;
}

.main-content {
    opacity: 0;
    animation: fadeInContent 1s ease forwards;
    animation-delay: 0.3s;
}

@keyframes fadeInContent {
    to {
        opacity: 1;
    }
}

/* ========== ESTILOS ESPECÍFICOS DE PEDIDOS ========== */
.pedidos-hero {
    background: linear-gradient(135deg, rgba(30, 64, 175, 0.95) 0%, rgba(59, 130, 246, 0.9) 100%);
    backdrop-filter: blur(10px);
    padding: 80px 20px;
    text-align: center;
    color: white;
    margin-bottom: 60px;
    position: relative;
}

.pedidos-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('imagenes/logo/logo.jpg') center/cover;
    opacity: 0.08;
    z-index: 0;
}

.pedidos-hero h2 {
    font-family: 'Poppins', sans-serif;
    font-size: 42px;
    margin: 0 0 20px 0;
    font-weight: 600;
    position: relative;
    z-index: 1;
}

.pedidos-hero p {
    font-size: 19px;
    opacity: 0.95;
    margin: 0;
    position: relative;
    z-index: 1;
    font-weight: 400;
}

.pedidos-container {
    max-width: 700px;
    margin: 0 auto;
    padding: 0 20px 80px 20px;
}

.search-card {
    background: white;
    border-radius: 20px;
    padding: 48px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
    border: 1px solid var(--neutral-200);
}

/* ========== MODAL DE IMAGEN ========== */
.image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-modal.show {
    opacity: 1;
}

.image-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.image-modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
}

.image-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: rgba(255, 255, 255, 0.9);
    color: #111;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-weight: bold;
}

.image-modal-close:hover {
    background: white;
    transform: scale(1.1);
}

.image-modal-content img {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 8px;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    color: var(--neutral-900);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    position: relative;
}

/* Fondo difuminado para página de pedidos */
body.pedidos-page::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('imagenes/logo/logo.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: blur(8px);
    opacity: 0.3;
    z-index: -1;
    pointer-events: none;
}

body.pedidos-page {
    background: transparent;
    position: relative;
    min-height: 100vh;
}

/* ========== HEADER ========== */
header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 24px 20px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-lg);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.logo-section h1 {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    font-size: 28px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-section .subtitle {
    margin: 4px 0 0 0;
    font-size: 13px;
    opacity: 0.9;
    font-weight: 400;
}

/* ========== LOGO IMAGEN (circular y alineado a la izquierda) ========== */
.logo-link { display: inline-block; margin-right: 12px; }
.logo-section { display: flex; align-items: center; gap: 12px; margin-left: -12px; }
.company-logo {
    width: 56px;
    height: 56px;
    display: block;
    object-fit: cover;
    border-radius: 50%;
    box-shadow: var(--shadow-sm);
    border: 2px solid rgba(0,0,0,0.06);
}
.logo-text { display: inline-block; vertical-align: middle; line-height: 1; }

@media (max-width: 768px) {
    .company-logo { width: 44px; height: 44px; }
    .logo-section { margin-left: -8px; }
}

/* ========== BOTONES ========== */
.btn-refresh {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(10px);
}

.btn-refresh:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.15);
}

.btn-refresh:active {
    transform: translateY(0);
}

.refresh-icon {
    display: inline-block;
    font-size: 16px;
    transition: transform 0.6s linear;
}

.btn-refresh:active .refresh-icon {
    animation: spin 0.6s linear;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* ========== CONTENEDOR PRINCIPAL ========== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px 80px 20px;
}

.header-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.header-section h2 {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    font-size: 24px;
    font-weight: 600;
    color: var(--neutral-900);
}

.header-actions {
    display: flex;
    gap: 16px;
    align-items: center;
}

.status-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--neutral-100);
    color: var(--neutral-600);
}

.status-badge.conectado {
    background: #dcfce7;
    color: var(--success);
}

.status-badge.desconectado {
    background: #fee2e2;
    color: var(--danger);
}

.status-badge.cargando {
    background: #fef3c7;
    color: var(--warning);
}

/* ========== GRID DE PEDIDOS ========== */
.pedidos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

/* ========== TARJETAS DE PEDIDO ========== */
.pedido-card {
    background: white;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.06);
    transition: var(--transition);
    border: 1px solid var(--neutral-200);
    overflow: hidden;
    position: relative;
}

.pedido-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 3px;
    width: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
}

.pedido-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    border-color: var(--neutral-300);
}

.pedido-card h3 {
    margin: 0 0 24px 0;
    font-family: 'Poppins', sans-serif;
    color: var(--neutral-900);
    font-size: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--neutral-100);
}

.pedido-card p {
    margin: 16px 0;
    color: var(--neutral-600);
    font-size: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pedido-card strong {
    color: var(--neutral-900);
    font-weight: 600;
    font-size: 14px;
}

.estado-badge {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: auto;
}

.estado-badge.en-proceso {
    background: #fef3c7;
    color: #92400e;
}

.estado-badge.enviado {
    background: #dbeafe;
    color: #0c4a6e;
}

.estado-badge.entregado {
    background: #dcfce7;
    color: #15803d;
}

.estado-badge.cancelado {
    background: #fee2e2;
    color: #7f1d1d;
}

.pedido-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.info-row label {
    color: var(--neutral-600);
    font-weight: 500;
    font-size: 13px;
}

.info-row value {
    color: var(--neutral-900);
    font-weight: 600;
    font-size: 15px;
}

.total-amount {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--neutral-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.total-amount label {
    font-weight: 600;
    color: var(--neutral-900);
}

.total-amount value {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
}

/* ========== LOADING SPINNER ========== */
.loading-spinner {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
    color: var(--neutral-600);
}

.loading-spinner p {
    position: relative;
    font-size: 16px;
    font-weight: 500;
    animation: fadeInOut 1.5s ease-in-out infinite;
}

@keyframes fadeInOut {
    0%, 100% {
        opacity: 0.6;
    }
    50% {
        opacity: 1;
    }
}

/* ========== FOOTER ========== */
footer {
    background: var(--neutral-900);
    color: white;
    padding: 40px 20px;
    position: relative;
    z-index: 1;
    margin-top: 48px;
    width: 100%;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: rgba(255,255,255,0.7);
}

.footer-content p {
    margin: 0;
}

#footer-status-text {
    font-weight: 600;
    color: var(--danger);
}

#footer-status-text.conectado {
    color: var(--success);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .logo-section h1 {
        font-size: 22px;
    }

    .header-section {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .pedidos-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }

    .container {
        padding: 30px 16px 80px 16px;
    }
}

/* ========== SCROLL BAR ========== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--neutral-100);
}

::-webkit-scrollbar-thumb {
    background: var(--neutral-300);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--neutral-400);
}

/* ========== BOTÓN NUEVO PEDIDO ========== */
.btn-nuevo {
    background: linear-gradient(135deg, var(--secondary) 0%, #059669 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: var(--shadow-md);
}

.btn-nuevo:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

.btn-nuevo:active {
    transform: translateY(0);
}

.btn-nuevo span {
    font-size: 18px;
    font-weight: bold;
}

/* ========== MODAL ========== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease-in-out;
}

.modal.show {
    display: flex;
    justify-content: center;
    align-items: center;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background-color: white;
    border-radius: 12px;
    box-shadow: var(--shadow-xl);
    width: 90%;
    max-width: 400px;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid var(--neutral-200);
}

.modal-header h2 {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    font-size: 20px;
    font-weight: 600;
    color: var(--neutral-900);
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--neutral-600);
    transition: var(--transition);
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: var(--neutral-900);
    background: var(--neutral-100);
    border-radius: 6px;
}

.modal-body {
    padding: 24px;
}

/* Ajustes específicos para la fila de total y botones en el modal de detalle */
.modal-body .row-flex {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}
.modal-body .row-flex label {
    min-width: 110px;
    margin: 0;
}
.modal-body input[type="number"] {
    padding: 8px;
    border-radius: 6px;
    border: 1px solid var(--neutral-300);
    width: 160px;
    max-width: 48%;
    box-sizing: border-box;
}
.modal-body #btn-save-total {
    padding: 8px 12px;
    white-space: nowrap;
}

/* ========== FORMULARIO ========== */
#form-nuevo-pedido {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 600;
    color: var(--neutral-900);
    font-size: 14px;
}

.form-group input {
    padding: 12px 14px;
    border: 1px solid var(--neutral-300);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: var(--transition);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-group input::placeholder {
    color: var(--neutral-300);
}

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 12px;
}

.btn-cancelar {
    background: var(--neutral-100);
    color: var(--neutral-900);
    border: 1px solid var(--neutral-300);
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: var(--transition);
}

.btn-cancelar:hover {
    background: var(--neutral-200);
    border-color: var(--neutral-400);
}

.btn-crear {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
}

.btn-crear:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-crear:active {
    transform: translateY(0);
}

/* ========== RESPONSIVE MODAL ========== */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
    }

    .header-actions {
        flex-direction: column;
        width: 100%;
    }

    .btn-nuevo {
        width: 100%;
        justify-content: center;
    }
}

/* ========== NOTIFICACIÓN ========== */
.notificacion {
    position: fixed;
    bottom: -100px;
    right: 20px;
    background: linear-gradient(135deg, var(--secondary) 0%, #059669 100%);
    color: white;
    padding: 16px 20px;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    z-index: 2000;
    max-width: 300px;
    font-weight: 500;
    transition: bottom 0.3s ease-out;
}

.notificacion.show {
    bottom: 100px;
}

/* ========== PÁGINA DE PRESENTACIÓN (empresa.html) ========== */
.hero {
    display: grid;
    grid-template-columns: 1fr 160px;
    gap: 24px;
    align-items: center;
    background: linear-gradient(180deg, rgba(99,102,241,0.04), transparent 60%);
    padding: 28px;
    border-radius: 12px;
    margin-bottom: 32px;
}

.hero-inner h2 {
    margin: 0 0 12px 0;
    font-family: 'Poppins', sans-serif;
    font-size: 28px;
    color: var(--neutral-900);
}

.hero .lead {
    margin: 0 0 18px 0;
    color: var(--neutral-600);
    max-width: 650px;
}

.hero-visual {
    font-size: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.services {
    margin-top: 8px;
}

.services h3 {
    font-family: 'Poppins', sans-serif;
    margin-bottom: 16px;
}

/* ========== SERVICIOS MEJORADOS ========== */
.services-section {
    margin: 80px 0;
    padding: 0;
    text-align: center;
}

.services-section h2 {
    font-family: 'Poppins', sans-serif;
    font-size: 32px;
    margin-bottom: 8px;
    color: var(--neutral-900);
}

.services-subtitle {
    color: var(--neutral-600);
    font-size: 16px;
    margin-bottom: 32px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
}

.service-card {
    background: white;
    border-radius: 12px;
    padding: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid var(--neutral-200);
    transition: var(--transition);
    overflow: hidden;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.12);
    border-color: var(--neutral-300);
}

.service-icon {
    font-size: 28px;
    margin-bottom: 8px;
}

.service-card h4 {
    margin: 6px 0 8px 0;
}

.btn-service {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 12px;
    transition: var(--transition);
    margin-top: 12px;
}

.btn-service:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

/* ========== MINIATURAS EN SERVICIOS ========== */
.services-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 10px;
    text-align: center;
    letter-spacing: 1px;
}
.services-subtitle {
    font-size: 1.1rem;
    color: var(--neutral-600);
    text-align: center;
    margin-bottom: 30px;
}
.services-grid.improved {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    gap: 32px;
    margin-top: 20px;
}
.service-card.improved {
    background: var(--neutral-50);
    border-radius: 18px;
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: transform 0.25s, box-shadow 0.25s;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    border: 2px solid var(--neutral-200);
    position: relative;
}
.service-card.improved:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}
.service-thumb img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-bottom: 1px solid var(--neutral-200);
}
.service-body {
    padding: 22px 18px 18px 18px;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.service-icon {
    font-size: 2.2rem;
    margin-bottom: 10px;
    color: var(--primary);
    background: var(--neutral-100);
    border-radius: 50%;
    padding: 10px;
    box-shadow: var(--shadow-sm);
}
.service-card.improved h4 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--neutral-900);
    text-align: center;
}
.service-card.improved p {
    font-size: 1rem;
    color: var(--neutral-700);
    text-align: center;
    margin-bottom: 16px;
}
.btn-service-subtle {
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 8px 18px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
    text-decoration: none;
    box-shadow: var(--shadow-sm);
}
.btn-service-subtle:hover {
    background: var(--primary-dark);
}
.service-thumb {
    width: 100%;
    height: 160px;
    overflow: hidden;
    border-radius: 10px 10px 6px 6px;
    margin-bottom: 12px;
    background: var(--neutral-100);
}

.service-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.service-body {
    padding: 20px 24px 28px 24px;
}

.service-card .service-icon {
    font-size: 24px;
    margin-right: 8px;
    display: inline-block;
}

.service-card h4 {
    margin: 8px 0 12px 0;
    font-size: 17px;
    font-weight: 600;
    color: var(--neutral-900);
}

.service-card p {
    font-size: 14px;
    line-height: 1.6;
    color: var(--neutral-600);
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .service-thumb { height: 120px; }
}

.contacto {
    margin-top: 28px;
    padding: 18px;
    background: white;
    border-radius: 12px;
    border: 1px solid var(--neutral-200);
    box-shadow: var(--shadow-sm);
}

/* ========== SECCIÓN QUIÉNES SOMOS ========== */
.about-section {
    background: linear-gradient(135deg, rgba(99,102,241,0.03), rgba(16,185,129,0.03));
    padding: 80px 0;
    margin: 80px 0;
    border-radius: 0;
}

.about-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

.about-text h2 {
    font-family: 'Poppins', sans-serif;
    font-size: 32px;
    margin-bottom: 16px;
    color: var(--neutral-900);
}

.about-text p {
    color: var(--neutral-600);
    line-height: 1.8;
    margin-bottom: 20px;
    font-size: 16px;
}

.about-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin: 24px 0;
}

.feature {
    display: flex;
    align-items: center;
    gap: 10px;
    background: white;
    padding: 12px 16px;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}

.feature-icon {
    font-size: 18px;
    color: var(--secondary);
    font-weight: bold;
}

.about-cta {
    font-size: 16px;
    color: var(--primary);
    margin-top: 24px;
}

/* ========== CARRUSEL DE CLIENTES ========== */
.clients-section {
    margin: 80px 0;
    padding: 60px 0;
    background: white;
    overflow: hidden;
}

.clients-carousel {
    position: relative;
    width: 100%;
    overflow: hidden;
    padding: 20px 0;
}

.clients-track {
    display: flex;
    gap: 60px;
    animation: scrollClients 30s linear infinite;
    width: fit-content;
}

.client-logo {
    flex-shrink: 0;
    width: 180px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    transition: var(--transition);
}

.client-logo:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.client-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: var(--transition);
}

.client-logo:hover img {
    filter: grayscale(0%);
    opacity: 1;
}

@keyframes scrollClients {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.clients-carousel:hover .clients-track {
    animation-play-state: paused;
}

@media (max-width: 768px) {
    .client-logo {
        width: 140px;
        height: 80px;
    }
    
    .clients-track {
        gap: 40px;
    }
}

/* ========== SECCIÓN CTA ========== */
.cta-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 80px 20px;
    border-radius: 0;
    text-align: center;
    margin: 80px 0 0 0;
    color: white;
}

.cta-section h2 {
    font-family: 'Poppins', sans-serif;
    font-size: 32px;
    margin-bottom: 8px;
}

.cta-section p {
    font-size: 16px;
    margin-bottom: 24px;
    opacity: 0.95;
}

.btn-lg {
    display: inline-block;
    font-size: 16px !important;
    padding: 14px 32px !important;
}

.nav-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    position: relative;
}
.nav-burger {
    /* eliminado hamburguesa */
}
.nav-burger span {
    /* eliminado hamburguesa */
}
.nav-links {
    /* eliminado hamburguesa */
}

@media (max-width: 900px) {
    /* eliminado hamburguesa */
}

.nav-link {
    color: white;
    text-decoration: none;
    background: rgba(255,255,255,0.08);
    padding: 8px 12px;
    border-radius: 8px;
    font-weight: 600;
}

.lead .btn-crear {
    margin-top: 12px;
}

@media (max-width: 768px) {
    .hero { grid-template-columns: 1fr; }
    .hero-visual { font-size: 48px; margin-top: 8px; }
}

/* ========== NAVBAR BLANCA (para empresa.html) ========== */
.white-nav {
    background: white !important;
    color: var(--neutral-900) !important;
    box-shadow: 0 4px 12px rgba(16,24,40,0.06);
}

.white-nav .nav-link {
    background: transparent;
    color: var(--neutral-900);
    padding: 8px 10px;
}

.nav-link.nav-dark:hover {
    background: var(--neutral-100);
    color: var(--neutral-900);
}

/* ========== CARRUSEL / GALERÍA ========== */
.carousel {
    position: relative;
    overflow: hidden;
    border-radius: 0;
    background: linear-gradient(135deg, rgba(99,102,241,0.03), rgba(16,185,129,0.02));
    margin: 0 auto 80px auto;
    max-width: 100%;
    width: 100%;
    height: 650px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.08);
}

.carousel-track {
    display: flex;
    transition: transform 600ms cubic-bezier(.22,.98,.36,1);
    height: 100%;
}

.carousel-slide {
    min-width: 100%;
    padding: 48px 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
    height: 100%;
}

.slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0,0,0,0.65), rgba(30,64,175,0.4));
    z-index: 1;
}

.slide-inner {
    max-width: 1000px;
    text-align: center;
    position: relative;
    z-index: 2;
    margin: 0 auto;
    width: 100%;
    padding: 0 60px;
}

.carousel-slide h2 {
    font-size: 42px;
    margin: 0 0 16px 0;
    font-family: 'Poppins', sans-serif;
    color: white;
    text-shadow: 0 2px 12px rgba(0,0,0,0.4);
    font-weight: 700;
}

.carousel-slide p {
    color: rgba(255,255,255,0.95);
    font-size: 18px;
    text-shadow: 0 1px 6px rgba(0,0,0,0.3);
    margin-bottom: 24px;
    line-height: 1.6;
}

.btn-cta {
    display: inline-block;
    background: white;
    color: var(--neutral-900);
    padding: 14px 32px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    font-size: 16px;
}

.btn-cta:hover {
    background: var(--neutral-100);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

/* ========== BOTONES CORPORATIVOS ========== */
.btn-nav-subtle {
    color: var(--neutral-700);
    text-decoration: none;
    padding: 10px 18px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 15px;
    transition: var(--transition);
    background: transparent;
    border: 1px solid transparent;
}

.btn-nav-subtle:hover {
    background: var(--neutral-100);
    color: var(--neutral-900);
}

.btn-nav-primary {
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 15px;
    transition: var(--transition);
    background: var(--primary);
    border: 1px solid var(--primary);
}

.btn-nav-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37,99,235,0.3);
}

.btn-service-subtle {
    display: inline-block;
    background: transparent;
    color: var(--primary);
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    font-size: 14px;
    border: 1.5px solid var(--primary);
}

.btn-service-subtle:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37,99,235,0.2);
}

.btn-cta-primary {
    display: inline-block;
    background: white;
    color: var(--primary);
    padding: 16px 40px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    font-size: 17px;
    box-shadow: 0 4px 16px rgba(255,255,255,0.2);
}

.btn-cta-primary:hover {
    background: var(--neutral-50);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(255,255,255,0.3);
}

.btn-search-primary {
    background: var(--primary);
    color: white;
    border: none;
    padding: 14px 32px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: 0 2px 8px rgba(37,99,235,0.15);
}

.btn-search-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37,99,235,0.25);
}

.btn-cancelar-subtle {
    background: transparent;
    color: var(--neutral-600);
    border: 1.5px solid var(--neutral-300);
    padding: 14px 28px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    transition: var(--transition);
}

.btn-cancelar-subtle:hover {
    background: var(--neutral-50);
    color: var(--neutral-900);
    border-color: var(--neutral-400);
}

.corporate-header {
    background: white;
    box-shadow: 0 2px 16px rgba(0,0,0,0.04);
}

.carousel-dots {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.carousel-dots button {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    background: rgba(17,24,39,0.15);
    transition: background 200ms;
    cursor: pointer;
}

.carousel-dots button.active {
    background: var(--primary);
}

@media (max-width: 768px) {
    .carousel-slide { padding: 28px 18px; }
    .carousel-slide h2 { font-size: 22px; }
    .carousel { height: 450px; }
    .carousel-slide p { font-size: 14px; }
}

@media (max-width: 480px) {
    .carousel { height: 350px; }
    .carousel-slide h2 { font-size: 18px; }
    .carousel-slide p { font-size: 12px; }
    .carousel-btn {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    .carousel-prev { left: 6px; }
    .carousel-next { right: 6px; }
}

/* ========== BOTONES PREV/NEXT ========== */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(99,102,241,0.75);
    color: white;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    transition: all 300ms;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-prev {
    left: 16px;
}

.carousel-next {
    right: 16px;
}

.carousel-btn:hover {
    background: var(--primary);
    transform: translateY(-50%) scale(1.1);
    box-shadow: var(--shadow-lg);
}

.carousel-btn:active {
    transform: translateY(-50%) scale(0.98);
}

@media (max-width: 768px) {
    .carousel-btn {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
    
    .carousel-prev { left: 8px; }
    .carousel-next { right: 8px; }
}