/* 
  Styles for MC Microcomputación - Red Hat Enterprise
  Theme: WebMC + Red Hat (Maven Pro + Red Hat Red)
  Style Reference: Services Enterprise "Gold Standard"
*/

:root {
    --primary: #EE0000;
    --primary-hover: #CC0000;
    --accent: #FF1A1A;
    --accent-light: rgba(238, 0, 0, 0.1);
    --accent-dark: #8B0000;
    --background-dark: #05070a;
    /* Standard MC Dark */
    --surface-dark: rgba(16, 22, 34, 0.4);
    --surface-border: rgba(255, 255, 255, 0.12);
    --text-main: #ffffff;
    --text-muted: #CBD5E1;
    --white: #FFFFFF;
    --surface: rgba(20, 27, 38, 0.6);
    --header-bg: rgba(10, 20, 29, 0.85);
    --header-text: #FFFFFF;
}

/* Global Font Override */
html,
body {
    max-width: 100vw;
    overflow-x: hidden !important;
}

body {
    font-family: 'Maven Pro', sans-serif !important;
    scroll-behavior: smooth;
    background-color: var(--background-dark);
    color: var(--text-main);
    margin: 0;
    padding: 0;
    position: relative;
}

/* Fix for AOS animations causing horizontal overflow */
[data-aos] {
    pointer-events: none;
}

[data-aos].aos-animate {
    pointer-events: auto;
}

.max-w-7xl,
.container {
    max-width: 100% !important;
    width: 100% !important;
}

@media (min-width: 1280px) {
    .max-w-7xl {
        max-width: 80rem !important;
    }
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Maven Pro', sans-serif !important;
    font-weight: 600;
}

/* Glass Header (Modern Transparency) */
.glass-header {
    background: transparent !important;
    border-bottom: 1px solid transparent;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    transform: translateY(0);
    opacity: 1;
}

.glass-header-active {
    background: rgba(16, 22, 34, 0.85) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header-hidden {
    transform: translateY(-100%);
    opacity: 0;
}

.glass-header-active {
    background: rgba(0, 0, 0, 0.9) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.glass-header-active .nav-link {
    color: white !important;
}

.glass-header-active .header-logo {
    filter: brightness(0) invert(1);
}

.nav-link {
    color: white;
    opacity: 0.8;
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: var(--primary);
    opacity: 1;
}

.header-logo {
    filter: brightness(0) invert(1);
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    color: var(--white);
    padding: 0.875rem 1.75rem;
    border-radius: 0.5rem;
    font-weight: 800;
    font-size: 0.875rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 24px -6px rgba(238, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Video Card (Stitch style) */
.video-card {
    position: relative;
    aspect-ratio: 16/9;
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid var(--surface-border);
    background: var(--surface);
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.5);
    cursor: pointer;
}

.video-card:hover .play-button {
    transform: scale(1.1);
    background: var(--white);
    color: var(--primary);
}

/* Roadmap (Stitch style) */
.roadmap-card {
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: 1rem;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.roadmap-progress {
    height: 4px;
    background: var(--surface-border);
    border-radius: 9999px;
    position: relative;
    margin-top: 2rem;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, #fff 50%, var(--primary) 100%);
    background-size: 200% 100%;
    border-radius: 9999px;
    box-shadow: 0 0 20px var(--primary), 0 0 40px rgba(238, 0, 0, 0.4);
    animation: led-pulse 8s linear infinite;
}

@keyframes led-pulse {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* Authority Tiles */
.tile-authority {
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.tile-authority:hover {
    background: var(--accent-light);
}

.tile-icon {
    margin-bottom: 1.5rem;
    color: var(--primary);
    display: flex;
    justify-content: center;
    align-items: center;
    width: 6rem;
    height: 6rem;
    margin-left: auto;
    margin-right: auto;
    overflow: hidden;
}

.tile-icon span {
    font-size: 3.5rem !important;
    display: block;
}

.tile-title {
    color: var(--white);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.tile-text {
    color: var(--text-muted);
    font-size: 0.875rem;
    line-height: 1.5;
}

/* Badges */
.badge-accent {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(238, 0, 0, 0.1);
    border: 1px solid rgba(238, 0, 0, 0.2);
    border-radius: 9999px;
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Check Icons */
.icon-check {
    width: 1.5rem;
    height: 1.5rem;
    background: rgba(238, 0, 0, 0.15);
    color: var(--primary);
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Solution Cards */
.card-solution {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--surface-border);
    padding: 1.75rem;
    border-radius: 1rem;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.card-solution:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 20px 40px -20px rgba(238, 0, 0, 0.3);
}

.card-icon {
    width: 2.5rem;
    height: 2.5rem;
    background: var(--accent-light);
    color: var(--primary);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.card-link {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin-top: auto;
}

/* Tension Cards (Por qué MC) */
.tension-card {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    border: 1px solid var(--surface-border);
    padding: 2rem;
    border-radius: 1.5rem;
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
}

.tension-card:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
}

.tension-icon {
    font-size: 5rem;
    color: var(--primary);
    opacity: 0.07;
    position: absolute;
    bottom: -1rem;
    right: -1rem;
    pointer-events: none;
    line-height: 1;
}

/* Production Real Specific Shading fix */
.card-production-real {
    background: linear-gradient(135deg, var(--surface-dark) 0%, rgba(238, 0, 0, 0.15) 100%) !important;
    border: 1px solid var(--primary) !important;
    box-shadow: 0 15px 35px rgba(238, 0, 0, 0.2);
}

/* Form Container */
.form-container {
    background: rgba(16, 22, 34, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid var(--surface-border);
    padding: 3rem;
    border-radius: 2rem;
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.8);
}

.input-group label {
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
}

.input-group input,
.input-group select,
.input-group textarea {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid var(--surface-border);
    padding: 0.75rem 1rem !important;
    border-radius: 0.75rem;
    color: white !important;
    width: 100%;
    font-size: 0.875rem !important;
    transition: all 0.3s ease;
}

.input-group textarea {
    height: auto !important;
    padding: 1.25rem !important;
    min-height: 120px;
}

.input-group input:focus,
.input-group select:focus {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.08) !important;
}

.input-group select option {
    background-color: #141b26 !important;
    /* surface-dark */
    color: white !important;
}

.btn-submit {
    width: 100%;
    background: var(--primary);
    color: white;
    padding: 1.25rem;
    border-radius: 0.75rem;
    font-weight: 900;
    transition: all 0.3s ease;
}

.btn-submit:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 15px 30px -5px rgba(238, 0, 0, 0.4);
}

/* FAQ Redesign */
.accordion-item {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--surface-border);
    border-radius: 1rem;
    overflow: hidden;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.accordion-item:hover {
    border-color: var(--primary);
    background: rgba(238, 0, 0, 0.01);
}

.accordion-item summary {
    padding: 1.5rem;
    font-weight: 700;
    color: white;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.accordion-item summary::after {
    content: '\e5cf';
    font-family: 'Material Symbols Outlined';
    color: var(--primary);
    transition: transform 0.3s ease;
}

.accordion-item[open] summary::after {
    transform: rotate(180deg);
}

.accordion-content {
    padding: 0 1.5rem 1.5rem 1.5rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* HubSpot-style Interactive Specs Module */
.specs-module {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--surface-border);
    border-radius: 1.5rem;
    overflow: hidden;
}

.spec-selector {
    border-bottom: 1px solid var(--surface-border);
}

.spec-btn {
    padding: 1.5rem;
    font-weight: 700;
    color: var(--text-muted);
    transition: all 0.3s ease;
    border-bottom: 2px solid transparent;
}

.spec-btn.active {
    color: white;
    border-bottom-color: var(--primary);
    background: rgba(238, 0, 0, 0.15);
}

.spec-content-pane {
    display: none;
    padding: 2.5rem;
    animation: fadeIn 0.4s ease;
}

.spec-content-pane.active {
    display: block !important;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading Hub */
#loading-hub {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: opacity 0.5s ease;
    opacity: 0;
    pointer-events: none;
}

#loading-hub.is-active {
    display: flex !important;
    opacity: 1;
    pointer-events: auto;
}

/* Ensure material symbols in loading hub pulse correctly */
#loading-hub span.material-symbols-outlined {
    font-size: 3rem;
}

/* Back to Top */
#back-to-top {
    left: 2rem !important;
    /* Standardized to left-8 */
    bottom: 110px !important;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#back-to-top:not(.opacity-0) {
    animation: btt-slide-in 0.5s ease forwards;
}

@keyframes btt-slide-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Brand Logos Trust Bar */
.brand-logo {
    filter: grayscale(1) brightness(1.7) contrast(0.7) opacity(0.6) !important;
    height: 1.4rem !important;
    max-width: 110px !important;
    object-fit: contain !important;
    transition: all 0.3s ease !important;
}

.brand-logo:hover {
    opacity: 1 !important;
    filter: grayscale(0) brightness(1) contrast(1) !important;
}

/* Utilities */
.glass {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Animations */
.scale-in-on-scroll {
    opacity: 0;
    transform: scale(0.95);
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.scale-in-on-scroll.active {
    opacity: 1;
    transform: scale(1);
}

/* Laser Sweep VFX */
.laser-sweep-container {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.laser-sweep-line {
    position: absolute;
    top: -50%;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom,
            transparent 0%,
            rgba(238, 0, 0, 0.05) 45%,
            rgba(238, 0, 0, 0.2) 50%,
            rgba(238, 0, 0, 0.05) 55%,
            transparent 100%);
    animation: laserSweep 8s linear infinite;
    z-index: 1;
}

@keyframes laserSweep {
    0% {
        transform: translateY(-100%);
        opacity: 0;
    }

    20% {
        opacity: 0.15;
    }

    80% {
        opacity: 0.15;
    }

    100% {
        transform: translateY(100vh);
        opacity: 0;
    }
}