/* ============================================
   MOMO MANTENCIONES - DISEÑO KINETIC ENGINE 2025
   Inspirado en el Sistema de Diseño Stitch
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    /* --- The Chassis: Surface Hierarchy --- */
    --bg-base: #131313;
    --bg-lowest: #0e0e0e;
    --bg-low: #1b1b1b;
    --bg-default: #1f1f1f;
    --bg-high: #2a2a2a;
    --bg-highest: #353535;
    --bg-bright: #393939;

    /* --- Ignition: Primary Orange --- */
    --accent: #ff8c00;
    --accent-light: #ffb77d;
    --accent-hover: #ea580c;
    --accent-glow: rgba(255, 140, 0, 0.25);
    --accent-soft: rgba(255, 140, 0, 0.08);
    --accent-gradient: linear-gradient(135deg, #ff8c00, #ffb77d);

    /* --- Semantic Colors --- */
    --danger: #ffb4ab;
    --danger-container: #93000a;
    --success: #22c55e;
    --success-soft: rgba(34, 197, 94, 0.1);
    --info: #85cfff;
    --info-container: #00b5fc;

    /* --- Text Palette --- */
    --text-primary: #e2e2e2;
    --text-secondary: #c8c6c6;
    --text-muted: #a48c7a;
    --text-variant: #ddc1ae;

    /* --- Structural --- */
    --border: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(255, 140, 0, 0.3);
    --outline: #564334;
    --outline-ghost: rgba(86, 67, 52, 0.15);

    /* --- Shadows --- */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 16px 48px rgba(14, 14, 14, 0.4);
    --shadow-glow: 0 0 40px rgba(255, 140, 0, 0.12);

    /* --- Typography --- */
    --font-heading: 'Space Grotesk', 'Inter', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* --- Motion --- */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;

    /* --- Radius (Controlled, not bubbly) --- */
    --radius-xs: 4px;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
}

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--bg-base);
    color: var(--text-primary);
    line-height: 1.7;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   TYPOGRAPHY - Editorial Authority
   ============================================ */
h1, h2, h3, h4, h5 {
    font-family: var(--font-heading);
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.03em;
    line-height: 1.2;
    color: var(--text-primary);
}

h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.35rem); }
h4 { font-size: 1.05rem; }

p {
    color: var(--text-secondary);
    line-height: 1.8;
}

a {
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--accent-light);
}

.text-center { text-align: center; }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }
.text-accent { color: var(--accent-light); }

/* ============================================
   NAVIGATION - Top Bar
   ============================================ */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 5%;
    background: var(--bg-lowest);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
}

.navbar.scrolled {
    background: rgba(14, 14, 14, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--shadow-md);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.logo img {
    height: 38px;
    border-radius: var(--radius-xs);
}

.logo span {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    font-weight: 500;
    font-size: 0.92rem;
    position: relative;
    padding: 0.4rem 0;
    color: var(--text-secondary);
    transition: var(--transition);
    letter-spacing: 0.01em;
}

.nav-links a:not(.btn)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s ease;
    border-radius: 2px;
}

.nav-links a:not(.btn):hover::after,
.nav-links a:not(.btn).active::after {
    width: 100%;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-primary);
}

/* ============================================
   HAMBURGER MENU
   ============================================ */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
    background: none;
    border: none;
}

.hamburger span {
    display: block;
    width: 26px;
    height: 2.5px;
    background: var(--text-primary);
    border-radius: 3px;
    transition: var(--transition);
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ============================================
   BUTTONS - Sturdy & Functional
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0.7rem 1.6rem;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.92rem;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    text-align: center;
    white-space: nowrap;
    line-height: 1.5;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background: var(--accent-gradient);
    color: #1a1200;
    box-shadow: 0 4px 16px var(--accent-glow);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--accent-hover), var(--accent));
    box-shadow: 0 6px 24px var(--accent-glow);
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1.5px solid var(--outline);
}

.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent-light);
    background: var(--accent-soft);
}

.btn-outline.active {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-soft);
}

.btn-lg {
    padding: 0.9rem 2rem;
    font-size: 1rem;
    border-radius: var(--radius-md);
}

/* ============================================
   CARDS - Tonal Carving (No Borders)
   ============================================ */
.card {
    background: var(--bg-high);
    border-radius: var(--radius-lg);
    padding: 1.8rem;
    transition: var(--transition);
    position: relative;
}

.card:hover {
    background: var(--bg-bright);
    transform: translateY(-2px);
}

/* ============================================
   KPI CARDS - Dashboard Stats
   ============================================ */
.kpi-card {
    text-align: center;
    padding: 2rem 1.5rem;
    background: var(--bg-default);
    border-radius: var(--radius-lg);
}

.kpi-card h3 {
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.6rem;
}

.kpi-value {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.04em;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    text-align: center;
    padding: 5rem 0 4rem;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255, 140, 0, 0.08) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.hero > * {
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-block;
    padding: 0.5rem 1.2rem;
    background: var(--accent-soft);
    color: var(--accent-light);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    letter-spacing: 0.02em;
}

.hero h1 {
    margin-bottom: 1.2rem;
}

.hero p {
    max-width: 600px;
    margin: 0 auto 2rem;
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 3rem;
    flex-wrap: wrap;
}

.hero-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-stat .number {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--accent-light);
    letter-spacing: -0.04em;
}

.hero-stat .label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.3rem;
}

/* ============================================
   MAIN CONTENT
   ============================================ */
main {
    flex: 1;
    padding: 2.5rem 5%;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

/* ============================================
   SECTIONS
   ============================================ */
.section {
    margin-bottom: 4rem;
}

.section-title {
    text-align: center;
    margin-bottom: 0.5rem;
    font-size: clamp(1.5rem, 3vw, 2.2rem);
}

.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    font-size: 1rem;
}

/* ============================================
   GRIDS
   ============================================ */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.2rem;
}

.split-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

/* ============================================
   SERVICE CARDS
   ============================================ */
.service-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: inline-block;
}

/* ============================================
   BENEFITS SECTION
   ============================================ */
.benefits-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.2rem;
}

.benefit-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--bg-default);
    border-radius: var(--radius-lg);
    transition: var(--transition);
}

.benefit-card:hover {
    background: var(--bg-high);
}

.benefit-icon {
    font-size: 1.8rem;
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-soft);
    border-radius: var(--radius-md);
}

.benefit-content h4 {
    margin-bottom: 0.3rem;
    font-size: 1rem;
}

.benefit-content p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0;
}

/* ============================================
   PRODUCTS
   ============================================ */
.product-image {
    width: 100%;
    height: 180px;
    object-fit: contain;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    background: var(--bg-highest);
    padding: 1rem;
}

.product-price {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--accent-light);
    letter-spacing: -0.02em;
}

.product-category {
    font-size: 0.75rem;
    color: var(--text-muted);
    background: var(--bg-default);
    padding: 0.25rem 0.7rem;
    border-radius: 50px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ============================================
   CONTACT SECTION
   ============================================ */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.contact-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--bg-default);
    border-radius: var(--radius-lg);
    transition: var(--transition);
}

.contact-card:hover {
    background: var(--bg-high);
}

.contact-icon {
    font-size: 2rem;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-soft);
    border-radius: var(--radius-md);
    flex-shrink: 0;
}

.contact-info h4 {
    margin-bottom: 0.2rem;
    font-size: 1rem;
}

.contact-info p {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin: 0;
}

.contact-info a {
    color: var(--accent-light);
}

/* ============================================
   FORMS - Industrial Inputs
   ============================================ */
.form-group {
    margin-bottom: 1.2rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 500;
    font-size: 0.85rem;
    color: var(--text-variant);
    letter-spacing: 0.02em;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-highest);
    border: none;
    border-bottom: 2px solid transparent;
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: var(--transition);
    outline: none;
}

.form-control:focus {
    border-bottom-color: var(--accent);
    box-shadow: 0 2px 8px var(--accent-glow);
}

.form-control::placeholder {
    color: var(--text-muted);
}

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

small.text-muted {
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* ============================================
   TABLES - Data Display
   ============================================ */
.table-container {
    overflow-x: auto;
    border-radius: var(--radius-md);
    background: var(--bg-default);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

thead {
    background: var(--bg-highest);
}

th {
    text-align: left;
    padding: 0.9rem 1.2rem;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    font-family: var(--font-body);
}

td {
    padding: 0.85rem 1.2rem;
    color: var(--text-secondary);
}

tbody tr {
    transition: var(--transition-fast);
}

tbody tr:hover {
    background: var(--bg-bright);
}

/* ============================================
   TABS - Section Navigation
   ============================================ */
.tabs {
    display: flex;
    gap: 0;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.tab-btn {
    padding: 0.8rem 1.4rem;
    background: none;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 0.88rem;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
    border-bottom: 2px solid transparent;
    position: relative;
}

.tab-btn:hover {
    color: var(--text-secondary);
}

.tab-btn.active {
    color: var(--accent-light);
    border-bottom-color: var(--accent);
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

/* ============================================
   BADGES
   ============================================ */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.badge-success {
    background: var(--success-soft);
    color: var(--success);
}

.badge-danger {
    background: rgba(255, 180, 171, 0.1);
    color: var(--danger);
}

.badge-info {
    background: rgba(133, 207, 255, 0.1);
    color: var(--info);
}

/* ============================================
   ALERTS
   ============================================ */
.alert {
    padding: 1rem 1.2rem;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.alert-danger {
    background: rgba(147, 0, 10, 0.15);
    color: var(--danger);
}

.hidden {
    display: none !important;
}

/* ============================================
   FLEX UTILITIES
   ============================================ */
.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mb-2 { margin-bottom: 1rem; }
.mt-2 { margin-top: 1rem; }

/* ============================================
   LOGIN PAGE
   ============================================ */
.login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 70vh;
    padding: 2rem;
}

.login-card {
    background: var(--bg-high);
    border-radius: var(--radius-xl);
    padding: 3rem 2.5rem;
    max-width: 420px;
    width: 100%;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent-gradient);
}

/* ============================================
   WHATSAPP FLOATING BUTTON
   ============================================ */
.whatsapp-float {
    position: fixed;
    bottom: 28px;
    right: 28px;
    background: #25D366;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(37, 211, 102, 0.35);
    z-index: 999;
    transition: var(--transition);
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 24px rgba(37, 211, 102, 0.5);
}

.whatsapp-float svg {
    width: 30px;
    height: 30px;
    fill: #fff;
}

/* ============================================
   FOOTER
   ============================================ */
footer {
    background: var(--bg-lowest);
    padding: 2rem 5%;
    text-align: center;
    margin-top: auto;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1rem;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: var(--transition);
}

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

.footer-content {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ============================================
   OVERLAY
   ============================================ */
.overlay {
    display: none;
}

/* ============================================
   ANIMATIONS
   ============================================ */
.animate-fade-up {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   SCROLLBAR - Industrial
   ============================================ */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-base);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-highest);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 968px) {
    .hamburger {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: rgba(14, 14, 14, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 5rem 2rem 2rem;
        gap: 0;
        transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        border-left: 1px solid var(--border);
        z-index: 1000;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links a {
        padding: 1rem 0;
        font-size: 1.1rem;
        border-bottom: 1px solid var(--border);
        width: 100%;
    }

    .nav-links a:not(.btn)::after {
        display: none;
    }

    .nav-links .btn {
        margin-top: 1rem;
        width: 100%;
        text-align: center;
        justify-content: center;
    }

    .overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.6);
        z-index: 999;
    }

    .overlay.active {
        display: block;
    }

    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero {
        padding: 4rem 0 3rem;
    }

    .hero-stats {
        gap: 1.5rem;
    }

    .hero-stat .number {
        font-size: 1.8rem;
    }

    .split-layout {
        grid-template-columns: 1fr;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .benefits-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    main {
        padding: 1.5rem 4%;
    }

    .card {
        padding: 1.5rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .grid-3 {
        grid-template-columns: 1fr;
    }

    .whatsapp-float {
        bottom: 20px;
        right: 20px;
        width: 52px;
        height: 52px;
    }

    .whatsapp-float svg {
        width: 28px;
        height: 28px;
    }
}
