/* ========================================
   ASISCOMEX - Estilos Corporativos
   Colores: Azul (#0056b3, #003d80) y Blanco
   ======================================== */

/* Variables CSS */
:root {
    --color-primary: #0056b3;
    --color-primary-dark: #003d80;
    --color-primary-light: #007bff;
    --color-secondary: #00b4d8;
    --color-accent: #00d4ff;
    --color-white: #ffffff;
    --color-light: #f8f9fa;
    --color-gray: #6c757d;
    --color-dark: #212529;
    --gradient-primary: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    --gradient-hero: linear-gradient(135deg, #0056b3 0%, #003d80 50%, #001f4d 100%);
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.2);
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

/* Reset y Base */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--color-light);
    color: var(--color-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Layout Principal */
.main-container {
    min-height: 100vh;
}

/* Header / Navbar */
.navbar {
    background: var(--gradient-primary);
    padding: 0.75rem 1rem;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: var(--shadow-md);
}

.navbar-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-logo {
    height: 40px;
    filter: brightness(0) invert(1);
}

.navbar-menu {
    display: flex;
    gap: 1rem;
}

.navbar-link {
    color: var(--color-white);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: var(--transition);
    font-weight: 500;
    font-size: 0.9rem;
}

.navbar-link:hover,
.navbar-link.active {
    background: rgba(255, 255, 255, 0.2);
}

/* Hero Section */
.hero-section {
    background: var(--gradient-hero);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6rem 1rem 3rem;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.hero-content {
    text-align: center;
    color: var(--color-white);
    max-width: 900px;
    z-index: 1;
    animation: fadeInUp 1s ease;
}

.hero-logo {
    max-width: 280px;
    margin-bottom: 1.5rem;
}

.hero-title {
    font-size: clamp(1.8rem, 5vw, 3rem);
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: clamp(1rem, 3vw, 1.3rem);
    opacity: 0.95;
    margin-bottom: 2rem;
    line-height: 1.7;
}

.hero-badge {
    display: inline-block;
    background: linear-gradient(135deg, #00d4ff 0%, #00b4d8 100%);
    color: var(--color-dark);
    padding: 0.75rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 2rem;
    animation: pulse 2s infinite;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Botones */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--color-white);
    color: var(--color-primary);
}

.btn-primary:hover {
    background: var(--color-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-outline {
    background: transparent;
    color: var(--color-white);
    border: 2px solid var(--color-white);
}

.btn-outline:hover {
    background: var(--color-white);
    color: var(--color-primary);
}

.btn-accent {
    background: linear-gradient(135deg, #00d4ff 0%, #00b4d8 100%);
    color: var(--color-dark);
}

.btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-large {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
}

.btn-block {
    width: 100%;
}

/* Secciones */
.section {
    padding: 4rem 1rem;
}

.section-dark {
    background: var(--gradient-primary);
    color: var(--color-white);
}

.section-light {
    background: var(--color-white);
}

.section-gray {
    background: var(--color-light);
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 1rem;
    color: inherit;
}

.section-dark .section-title {
    color: var(--color-white);
}

.section-subtitle {
    font-size: 1.1rem;
    opacity: 0.85;
    max-width: 700px;
    margin: 0 auto;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Cards de Servicios */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.service-card {
    background: var(--color-white);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid rgba(0, 86, 179, 0.1);
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-primary);
}

.service-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--color-white);
    font-size: 1.5rem;
}

.service-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--color-primary-dark);
}

.service-card p {
    color: var(--color-gray);
    font-size: 0.95rem;
    margin: 0;
}

/* Features List */
.features-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.features-list li {
    padding: 0.75rem 0;
    padding-left: 2rem;
    position: relative;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.features-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--color-accent);
    font-weight: bold;
}

/* Módulos Grid */
.modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.module-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.module-card h3 {
    color: var(--color-accent);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

/* Formulario de Registro */
.registro-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 4rem 1rem;
}

.registro-container {
    max-width: 600px;
    margin: 0 auto;
}

.registro-card {
    background: var(--color-white);
    border-radius: var(--border-radius);
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
    border-top: 4px solid var(--color-primary);
}

.registro-header {
    text-align: center;
    margin-bottom: 2rem;
}

.registro-header h2 {
    color: var(--color-primary-dark);
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.registro-header p {
    color: var(--color-gray);
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--color-dark);
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: var(--transition);
    background: var(--color-white);
}

.form-control:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(0, 86, 179, 0.1);
}

.form-control.is-invalid {
    border-color: #dc3545;
}

.form-check {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.form-check-input {
    width: 20px;
    height: 20px;
    margin-top: 0.2rem;
    cursor: pointer;
    accent-color: var(--color-primary);
}

.form-check-label {
    font-size: 0.9rem;
    color: var(--color-gray);
    cursor: pointer;
}

.form-check-label a {
    color: var(--color-primary);
    text-decoration: underline;
}

.validation-message {
    color: #dc3545;
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

/* Alertas */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Premio Section */
.premio-section {
    background: var(--gradient-primary);
    padding: 3rem 1rem;
    text-align: center;
    color: var(--color-white);
}

.premio-badge {
    display: inline-block;
    background: linear-gradient(135deg, #ffd700 0%, #ffb700 100%);
    color: var(--color-dark);
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.2rem;
    animation: pulse 2s infinite;
    margin-bottom: 1rem;
}

.premio-text {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Footer */
.footer {
    background: var(--color-primary-dark);
    color: var(--color-white);
    padding: 2rem 1rem;
    text-align: center;
}

.footer-logo {
    height: 35px;
    margin-bottom: 1rem;
    filter: brightness(0) invert(1);
}

.footer-contact {
    margin: 1rem 0;
}

.footer-contact a {
    color: var(--color-accent);
    text-decoration: none;
    margin: 0 0.5rem;
}

.footer-copyright {
    font-size: 0.85rem;
    opacity: 0.8;
    margin-top: 1rem;
}

/* Animaciones */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.animate-fade-in {
    animation: fadeInUp 0.6s ease forwards;
}

/* Iconos SVG inline */
.icon {
    width: 24px;
    height: 24px;
    display: inline-block;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar {
        padding: 0.5rem 1rem;
    }

    .navbar-logo {
        height: 32px;
    }

    .navbar-menu {
        gap: 0.5rem;
    }

    .navbar-link {
        padding: 0.4rem 0.75rem;
        font-size: 0.85rem;
    }

    .hero-section {
        padding: 5rem 1rem 2rem;
        min-height: auto;
    }

    .hero-logo {
        max-width: 200px;
    }

    .hero-cta {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 280px;
    }

    .section {
        padding: 3rem 1rem;
    }

    .registro-card {
        padding: 1.5rem;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .modules-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero-badge {
        font-size: 0.9rem;
        padding: 0.5rem 1.5rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .form-control {
        padding: 0.75rem;
    }

    .btn {
        padding: 0.75rem 1.5rem;
    }
}

/* Loading spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: currentColor;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Blazor específico */
#blazor-error-ui {
    background: #dc3545;
    bottom: 0;
    display: none;
    left: 0;
    padding: 1rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
    color: white;
    text-align: center;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
}

.blazor-error-boundary {
    background: #ffdddd;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #dc3545;
}

/* Scroll suave en anclas */
html {
    scroll-padding-top: 80px;
}

/* Por qué elegirnos */
.porque-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.porque-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
    transition: var(--transition);
}

.porque-card:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-3px);
}

.porque-card p {
    margin: 0;
    font-size: 1rem;
    line-height: 1.6;
}

/* Tecnología Section */
.tech-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.tech-feature {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: var(--color-white);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}

.tech-feature-icon {
    width: 40px;
    height: 40px;
    background: var(--color-primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.tech-feature h4 {
    margin: 0 0 0.25rem 0;
    font-size: 1rem;
    color: var(--color-primary-dark);
}

.tech-feature p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--color-gray);
}
