/* TESLA Styles v2.1 - Force Refresh */
:root {
    /* TESLA Official Brand Colors */
    --primary-red: #DC2626;
    --primary-red-dark: #991B1B;
    --primary-red-glow: #EF4444;
    --accent-gold: #F59E0B;
    --accent-gold-bright: #FBBF24;

    /* Unified Background - Gris Carbón Animado */
    --bg-dark-1: #2d3748;
    --bg-dark-2: #1a202c;
    --bg-dark-3: #0f1419;

    --text-white: #FFFFFF;
    --text-gray: #E5E7EB;
    --text-dark: #1F2937;
    --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    /* FONDO DINÁMICO ANIMADO */
    background: linear-gradient(135deg, var(--bg-dark-1) 0%, var(--bg-dark-2) 50%, var(--bg-dark-3) 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    color: var(--text-white);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Animación de fondo dinámico */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 110px;
    /* Fix for fixed header covering titles */
}

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

ul {
    list-style: none;
}

/* --- Components --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--primary-red-glow) 100%);
    color: var(--text-white);
    padding: 14px 32px;
    border: 3px solid var(--accent-gold);
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    box-shadow:
        0 4px 20px rgba(220, 38, 38, 0.5),
        0 0 0 2px rgba(245, 158, 11, 0.3);
}

@media (max-width: 768px) {
    .btn-primary {
        padding: 12px 24px;
        font-size: 0.8rem;
        letter-spacing: 0.5px;
    }
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow:
        0 6px 30px rgba(220, 38, 38, 0.7),
        0 0 0 3px rgba(245, 158, 11, 0.5);
    border-color: var(--accent-gold-bright);
    background: linear-gradient(135deg, var(--primary-red-glow) 0%, #F87171 100%);
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: 0.5s;
}

.btn-primary:hover::after {
    left: 100%;
}

.btn-lg {
    padding: 16px 40px;
    font-size: 1rem;
}

@media (max-width: 768px) {
    .btn-lg {
        padding: 14px 32px;
        font-size: 0.9rem;
    }
}

.text-center {
    text-align: center;
}

h1,
h2,
h3 {
    color: var(--text-white);
}

/* --- Header --- */
.header {
    background: rgba(26, 32, 44, 0.95);
    backdrop-filter: blur(12px);
    padding: 15px 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(220, 38, 38, 0.2);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo img {
    height: 100px;
    /* Increased to max size */
    width: auto;
    filter: drop-shadow(0 0 12px rgba(197, 160, 89, 0.6));
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.logo:hover img {
    transform: scale(1.1);
}

.logo-text {
    font-weight: 800;
    font-size: 1.5rem;
    /* Increased size */
    letter-spacing: 0.5px;
    line-height: 1.2;
}

.highlight {
    color: var(--accent-gold);
    font-weight: 300;
    display: block;
    font-size: 0.75rem;
    letter-spacing: 2px;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .logo img {
        height: 65px;
        /* Increased mobile size */
    }

    .logo-text {
        font-size: 1.1rem;
    }

    .hero-title {
        font-size: 2.5rem;
        /* Slightly larger mobile title */
        word-wrap: break-word;
    }

    .hero-subtitle {
        font-size: 1rem;
        letter-spacing: 2px;
    }
}

.nav {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav a:not(.btn-primary) {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    opacity: 0.8;
}

.nav a:not(.btn-primary)::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: -5px;
    left: 0;
    background-color: var(--accent-gold);
    transition: var(--transition);
}

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

.nav a:hover:not(.btn-primary) {
    color: var(--accent-gold);
    opacity: 1;
}

.nav .btn-primary {
    margin-left: 20px;
    /* Separate button from links */
}

/* --- Hero --- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    padding-top: 120px;
    padding-bottom: 50px;
    background: transparent;
}

/* HIGH ENERGY BACKGROUND - Electric/Industrial Vibe */
.hero::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    background:
        conic-gradient(from 0deg at 50% 50%,
            var(--bg-black) 0deg,
            rgba(220, 38, 38, 0.5) 120deg,
            rgba(245, 158, 11, 0.3) 240deg,
            var(--bg-black) 360deg);
    animation: rotateEnergy 15s linear infinite;
    opacity: 0.6;
    z-index: 1;
    filter: blur(50px);
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        repeating-linear-gradient(90deg,
            transparent 0,
            transparent 50px,
            rgba(245, 158, 11, 0.05) 50px,
            rgba(245, 158, 11, 0.05) 51px);
    z-index: 1;
    pointer-events: none;
}

@keyframes rotateEnergy {
    0% {
        transform: rotate(0deg) scale(1);
    }

    50% {
        transform: rotate(180deg) scale(1.1);
    }

    100% {
        transform: rotate(360deg) scale(1);
    }
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1100px;
    width: 90%;
    /* Force visibility immediately, modify animation to start from opacity 0 but stick to 1 */
    animation: fadeInUp 0.8s ease-out forwards;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.6) 0%, transparent 80%);
    padding: 30px;
    border-radius: 20px;
    backdrop-filter: blur(3px);
    margin-top: 20px;
}

.hero-title {
    font-size: 3.8rem;
    /* Balanced Desktop Size */
    font-weight: 900;
    margin-bottom: 30px;
    line-height: 1.1;
    text-transform: uppercase;
    text-shadow: 0 4px 30px rgba(138, 12, 12, 0.6);
    /* Gold Gradient Text */
    background: linear-gradient(to right, #ffffff 30%, var(--accent-gold) 50%, #ffffff 70%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shine 4s linear infinite;
    /* Faster animation */
}

@keyframes shine {
    to {
        background-position: 200% center;
    }
}

.hero-subtitle {
    font-size: 1.3rem;
    color: var(--accent-gold);
    margin-bottom: 35px;
    text-transform: uppercase;
    letter-spacing: 4px;
    border-bottom: 1px solid rgba(197, 160, 89, 0.3);
    display: inline-block;
    padding-bottom: 10px;
}

.hero-description {
    font-size: 1.3rem;
    color: var(--text-gray);
    margin-bottom: 50px;
    line-height: 1.8;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero-text {
    font-size: 1.25rem;
    color: var(--text-gray);
    /* Ensure visibility */
    margin-bottom: 60px;
    /* Increased to 60px to prevent overlap */
    line-height: 1.8;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.8);
    /* Better contrast against plasma */
}

/* --- Sections Common --- */
.section {
    padding: 100px 0;
    position: relative;
    background: transparent !important;
    margin-bottom: 40px;
}

@media (max-width: 768px) {
    .section {
        padding: 60px 0;
        margin-bottom: 30px;
    }
}

.section-title {
    font-size: 2.8rem;
    margin-bottom: 15px;
    background: linear-gradient(to right, var(--accent-gold), #fff);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--text-gray);
    margin-bottom: 70px;
}

/* Problem Section */
.problem-section {
    background-color: #080808;
}

.problem-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.problem-list li {
    margin-bottom: 25px;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    border-left: 3px solid var(--primary-red);
    transition: var(--transition);
}

.problem-list li:hover {
    background: rgba(138, 12, 12, 0.1);
    transform: translateX(10px);
}

.problem-list i {
    color: var(--primary-red-glow);
    font-size: 1.4rem;
}

.chaos-box {
    border: 2px dashed rgba(138, 12, 12, 0.3);
    padding: 40px;
    position: relative;
    height: 400px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 15px;
    border-radius: 20px;
    background: radial-gradient(circle, rgba(20, 0, 0, 1) 0%, rgba(0, 0, 0, 0) 70%);
}

.chaos-box span {
    font-size: 0.9rem;
    opacity: 0.4;
    position: absolute;
    animation: float 6s infinite ease-in-out;
}

.chaos-box span:nth-child(1) {
    top: 20%;
    left: 20%;
    animation-delay: 0s;
}

.chaos-box span:nth-child(2) {
    top: 60%;
    left: 70%;
    animation-delay: 1s;
}

.chaos-box span:nth-child(3) {
    top: 70%;
    left: 20%;
    animation-delay: 2s;
}

.chaos-box span:nth-child(4) {
    top: 30%;
    right: 20%;
    animation-delay: 3s;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

.chaos-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-5deg);
    font-weight: 900;
    font-size: 2.5rem;
    color: var(--primary-red-glow);
    text-transform: uppercase;
    border: 4px solid var(--primary-red);
    padding: 15px 30px;
    background-color: rgba(0, 0, 0, 0.8);
    box-shadow: 0 0 30px rgba(255, 0, 0, 0.2);
    white-space: nowrap;
}

/* Grid System for Cards */
.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-top: 50px;
}

@media (max-width: 1024px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .grid-4 {
        grid-template-columns: 1fr;
    }
}

/* Solution Section - Glassmorphism Cards */
.solution-section {
    background-color: var(--bg-black);
    background-image:
        linear-gradient(rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.9)),
        url('assets/header_ref.png');
    /* Subtle texture */
    background-attachment: fixed;
    background-size: cover;
}

.solution-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 30px;
}

.card {
    background: var(--bg-card);
    /* Glass base */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 50px 30px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--accent-gold);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.card:hover::before {
    transform: scaleX(1);
}

.card:hover {
    transform: translateY(-15px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
    background: rgba(40, 40, 40, 0.7);
    border-color: rgba(197, 160, 89, 0.3);
}

.icon-gold {
    font-size: 3.5rem;
    /* Larger */
    color: var(--accent-gold);
    /* Use the new Electric Yellow */
    margin-bottom: 30px;
    /* Electric Glow */
    filter: drop-shadow(0 0 15px rgba(255, 234, 0, 0.6));
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    /* Static charge effect */
    animation: static-charge 4s infinite;
}

.card:hover .icon-gold {
    transform: scale(1.15) rotate(-5deg);
    color: #fff;
    /* Core turns white hot */
    filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.9)) drop-shadow(0 0 40px rgba(255, 100, 0, 0.6));
    /* Red/Gold aura */
    animation: electric-shock 0.3s infinite;
    /* Rapid flicker on hover */
}

@keyframes static-charge {

    0%,
    100% {
        opacity: 1;
        filter: drop-shadow(0 0 15px rgba(255, 215, 0, 0.6));
    }

    95% {
        opacity: 1;
        filter: drop-shadow(0 0 15px rgba(255, 215, 0, 0.6));
    }

    96% {
        opacity: 0.8;
        filter: drop-shadow(0 0 5px rgba(255, 215, 0, 0.3));
    }

    /* Glitch */
    97% {
        opacity: 1;
        filter: drop-shadow(0 0 25px rgba(255, 215, 0, 0.8));
    }

    /* Spike */
}

@keyframes electric-shock {
    0% {
        transform: scale(1.15) rotate(-5deg) translate(0, 0);
    }

    25% {
        transform: scale(1.15) rotate(-5deg) translate(1px, 1px);
    }

    50% {
        transform: scale(1.15) rotate(-5deg) translate(-1px, -1px);
    }

    75% {
        transform: scale(1.15) rotate(-5deg) translate(-1px, 1px);
    }

    100% {
        transform: scale(1.15) rotate(-5deg) translate(2px, -2px);
    }
}

.card h3 {
    margin-bottom: 15px;
    font-size: 1.5rem;
    letter-spacing: 1px;
    color: var(--text-white);
    transition: 0.3s;
}

.card:hover h3 {
    color: var(--accent-gold);
    text-shadow: 0 0 10px rgba(197, 160, 89, 0.5);
}

/* Services Grid Visual */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.service-item {
    background: var(--bg-card);
    padding: 30px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.service-item:hover {
    transform: translateY(-10px);
    border-color: var(--accent-gold);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.service-item h3 {
    color: var(--accent-gold);
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.service-item p {
    color: var(--text-gray);
    font-size: 0.95rem;
}

.services-grid-visual {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.service-card-visual {
    height: 550px;
    /* Increased height for extended content */
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
    background-size: cover;
    background-position: center;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.service-card-visual:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
    border-color: var(--accent-gold);
}

/* Dark overlay for text readability */
/* Dark overlay for text readability */
.service-card-visual .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top,
            rgba(0, 0, 0, 0.75) 0%,
            rgba(0, 0, 0, 0.4) 50%,
            rgba(0, 0, 0, 0.15) 100%);
    opacity: 0.9;
    transition: opacity 0.4s ease;
}

.service-card-visual:hover .overlay {
    opacity: 1;
    background: linear-gradient(to top,
            rgba(0, 0, 0, 0.85) 0%,
            rgba(0, 0, 0, 0.5) 70%,
            rgba(0, 0, 0, 0.2) 100%);
}

/* Content Container */
.service-card-visual .content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 30px;
    z-index: 2;
    transform: translateY(20px);
    transition: transform 0.4s ease;
}

.service-card-visual:hover .content {
    transform: translateY(0);
}

.service-card-visual h3 {
    margin: 0 0 10px 0;
    font-size: 1.5rem;
    color: var(--text-white);
    text-shadow: 0 2px 5px rgba(0, 0, 0, 1);
    line-height: 1.2;
    display: flex;
    align-items: center;
}

.service-card-visual p {
    font-size: 0.95rem;
    color: #ddd;
    line-height: 1.5;
    opacity: 1;
    transform: translateY(0);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 1);
    margin-bottom: 15px;
}

/* Feature Lists in Services */
.service-features {
    list-style: none;
    padding: 0;
    margin: 0;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease 0.1s;
    height: 0;
    overflow: hidden;
}

.service-card-visual:hover .service-features {
    opacity: 1;
    transform: translateY(0);
    height: auto;
    margin-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 15px;
}

.service-features li {
    font-size: 0.9rem;
    color: #ccc;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.service-features li i {
    color: var(--accent-gold);
    font-size: 0.8rem;
}

/* Process Section Timeline - Circuit Style */
.process-section {
    background: radial-gradient(circle at center, #111, #000);
    padding: 120px 0;
    position: relative;
    overflow: hidden;
}

/* Background Circuit Traces (Decoration) */
.process-section::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-gold), transparent);
    opacity: 0.2;
    z-index: 0;
}

.timeline {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 30px;
    margin-top: 80px;
    position: relative;
    z-index: 2;
}

/* Connecting Line (The Wire) */
.timeline::after {
    content: '';
    position: absolute;
    top: 40px;
    /* Aligned with circle center */
    left: 50px;
    right: 50px;
    height: 4px;
    background: rgba(197, 160, 89, 0.2);
    z-index: -1;
    border-radius: 4px;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.8);
}

/* The Energy Pulse travelling the wire */
.timeline::before {
    content: '';
    position: absolute;
    top: 40px;
    left: 50px;
    height: 4px;
    width: 100px;
    /* Length of pulse */
    background: var(--accent-gold);
    box-shadow: 0 0 20px var(--accent-gold);
    /* Glow */
    border-radius: 4px;
    z-index: 0;
    animation: travel-pulse 4s linear infinite;
}

@keyframes travel-pulse {
    0% {
        left: 50px;
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        left: calc(100% - 150px);
        opacity: 0;
    }
}

.timeline-item {
    flex: 1;
    min-width: 210px;
    /* Reduced to fit on tablets (1024px) */
    position: relative;
    text-align: center;
    background: linear-gradient(145deg, rgba(15, 15, 15, 0.9), rgba(5, 5, 5, 0.95));
    padding: 40px 15px;
    /* Slightly reduced padding */
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    /* Subtle border */
    transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.timeline-item:hover {
    transform: translateY(-15px) scale(1.02);
    border-color: var(--accent-gold);
    background: linear-gradient(145deg, rgba(25, 20, 5, 0.9), rgba(10, 5, 0, 0.95));
    box-shadow: 0 20px 40px rgba(197, 160, 89, 0.15);
    /* Gold glow */
}

/* Step Number Neon */
.timeline-number {
    background: #000;
    width: 80px;
    height: 80px;
    border: 2px solid var(--accent-gold);
    /* Base border */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 900;
    color: var(--accent-gold);
    margin: -80px auto 30px auto;
    /* Pull up to overlap line */
    position: relative;
    z-index: 2;
    background-color: var(--bg-black);
    box-shadow: 0 0 15px rgba(197, 160, 89, 0.2);
    transition: 0.4s;
    text-shadow: 0 0 5px var(--accent-gold);
}

.timeline-item:hover .timeline-number {
    color: #fff;
    background: var(--accent-gold);
    box-shadow: 0 0 30px var(--accent-gold), 0 0 60px var(--primary-red);
    border-color: #fff;
    transform: scale(1.1);
}

.timeline-content h3 {
    color: var(--text-white);
    margin-bottom: 15px;
    font-size: 1.4rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.timeline-content p {
    font-size: 0.95rem;
    color: var(--text-gray);
    line-height: 1.6;
}

/* Mobile Fixes for Timeline */
@media (max-width: 768px) {
    .timeline {
        flex-direction: column;
        gap: 50px;
        margin-top: 40px;
    }

    .timeline::after {
        width: 4px;
        height: 100%;
        left: 50%;
        top: 0;
        transform: translateX(-50%);
    }

    .timeline::before {
        /* Vertical pulse */
        width: 4px;
        height: 100px;
        left: 50%;
        top: 0;
        animation: travel-pulse-vert 4s linear infinite;
        transform: translateX(-50%);
    }

    .timeline-number {
        margin: 0 auto 20px auto;
    }

    /* Reset margin */

    @keyframes travel-pulse-vert {
        0% {
            top: 0;
            opacity: 0;
        }

        10% {
            opacity: 1;
        }

        90% {
            opacity: 1;
        }

        100% {
            top: 90%;
            opacity: 0;
        }
    }
}

/* Updated Experience Section */
.experience-section {
    background-color: #050505;
    background-image: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.02) 0px, transparent 1px, transparent 40px);
    border-top: 1px solid #222;
    border-bottom: 1px solid #222;
    padding: 100px 0;
}

/* CTA Section */
.cta-section {
    background: url('assets/header_ref.png') no-repeat center center/cover;
    position: relative;
    padding: 180px 0;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.9));
}

.cta-section .container {
    position: relative;
    z-index: 2;
}

/* Footer */
.footer {
    background-color: #020202;
    padding-top: 80px;
    border-top: 1px solid #1a1a1a;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 60px;
    flex-wrap: wrap;
    gap: 30px;
}

.footer-logo p {
    color: var(--text-gray);
    margin-top: 10px;
}

.footer-bottom {
    background-color: #000;
    padding: 30px;
    color: #444;
    font-size: 0.8rem;
    border-top: 1px solid #111;
}

/* Floating Chatbot Widget */
#chatbot-widget {
    position: fixed;
    bottom: 100px;
    /* Above FAB */
    right: 30px;
    width: 380px;
    height: 550px;
    background: rgba(18, 18, 18, 0.95);
    backdrop-filter: blur(15px);
    border: 1px solid var(--accent-gold);
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
    z-index: 2000;
    flex-direction: column;
    overflow: hidden;
    transform-origin: bottom right;
    transition: var(--transition);
}

.chatbot-hidden {
    opacity: 0;
    transform: scale(0.9) translateY(20px);
    pointer-events: none;
    display: flex;
    /* keep display flex for structure, hide with opacity/events */
}

/* Floating Action Button (FAB) */
.chatbot-fab {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 75px;
    height: 75px;
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--primary-red-glow) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 5px 20px rgba(220, 38, 38, 0.6),
        0 0 0 3px rgba(245, 158, 11, 0.3);
    cursor: pointer;
    z-index: 2001;
    transition: var(--transition);
    animation: pulse-red 2s infinite, float-avatar 3s ease-in-out infinite;
    overflow: hidden;
    border: 4px solid var(--accent-gold);
}

.chatbot-fab img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    animation: breathe 3s ease-in-out infinite;
}

.chatbot-fab i {
    display: none;
}

/* Animations */
@keyframes float-avatar {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-6px);
    }
}

@keyframes breathe {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.08);
    }
}

@keyframes pulse-red {

    0%,
    100% {
        box-shadow:
            0 5px 20px rgba(220, 38, 38, 0.6),
            0 0 0 3px rgba(245, 158, 11, 0.3);
    }

    50% {
        box-shadow:
            0 8px 30px rgba(220, 38, 38, 0.9),
            0 0 0 5px rgba(245, 158, 11, 0.5);
    }
}

.chatbot-fab:hover {
    transform: scale(1.1) translateY(-5px);
    animation: none;
    box-shadow:
        0 10px 40px rgba(220, 38, 38, 1),
        0 0 0 5px rgba(245, 158, 11, 0.6);
    border-color: var(--accent-gold-bright);
}

.chatbot-header {
    background: linear-gradient(90deg, var(--primary-red) 0%, #4a0000 100%);
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
    color: var(--text-white);
}

.chatbot-body {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.message {
    padding: 12px 18px;
    border-radius: 8px;
    max-width: 85%;
    font-size: 0.95rem;
    line-height: 1.5;
}

.message.bot {
    background-color: rgba(255, 255, 255, 0.08);
    border-left: 3px solid var(--accent-gold);
    color: var(--text-white);
}

.chatbot-input {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    gap: 10px;
    background: rgba(0, 0, 0, 0.3);
}

.chatbot-input input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 12px;
    border-radius: 6px;
    outline: none;
}

.chatbot-input input:focus {
    border-color: var(--accent-gold);
}

.chatbot-input button {
    background-color: var(--accent-gold);
    color: black;
    border: none;
    padding: 0 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 700;
    transition: 0.3s;
}

.chatbot-input button:hover {
    background-color: white;
}

/* Scroll Animations - Fixed to be visible by default */
.fade-in-up {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 15px;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .nav {
        gap: 15px;
        flex-wrap: wrap;
        justify-content: center;
    }

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

    #chatbot-widget {
        width: 100%;
        height: 100%;
        right: 0;
        bottom: 0;
        border-radius: 0;
    }

    .chatbot-fab {
        bottom: 20px;
        right: 20px;
        width: 60px;
        height: 60px;
    }
}

/* --- Model TESLA (New Visual Grid) --- */
.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

@media (max-width: 1024px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .grid-4 {
        grid-template-columns: 1fr;
    }
}

.model-card-visual {
    height: 480px;
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    background-size: cover;
    background-position: center;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.model-card-visual:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
    border-color: var(--accent-gold);
}

.model-card-visual .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top,
            rgba(0, 0, 0, 0.75) 0%,
            rgba(0, 0, 0, 0.5) 60%,
            rgba(0, 0, 0, 0.2) 100%);
    opacity: 0.85;
    transition: all 0.4s ease;
}

.model-card-visual:hover .overlay {
    background: linear-gradient(to top,
            rgba(0, 0, 0, 0.85) 0%,
            rgba(0, 0, 0, 0.6) 50%,
            rgba(0, 0, 0, 0.3) 100%);
}

.model-card-visual .content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 25px;
    z-index: 2;
}

.model-card-visual .icon-box {
    margin-bottom: 15px;
    transform: translateY(0);
    transition: transform 0.4s ease;
}

.model-card-visual h3 {
    font-size: 1.4rem;
    color: var(--text-white);
    margin-bottom: 10px;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 1);
}

.model-card-visual p {
    font-size: 0.95rem;
    color: #e0e0e0;
    line-height: 1.5;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 1);
    opacity: 1;
    /* Always visible to ensure readability */
}


/* --- Marquee / Carousel Styles --- */
.marquee-container {
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    padding: 20px 0;
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.marquee-content {
    display: inline-block;
    animation: scroll-left 40s linear infinite;
}

.marquee-content span {
    display: inline-block;
    margin: 0 40px;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 2px;
    opacity: 0.6;
    transition: all 0.3s ease;
    cursor: default;
}

.marquee-content span:hover {
    opacity: 1;
    transform: scale(1.1);
    text-shadow: 0 0 15px currentColor;
}

/* Specific text styles */
.highlight-text span {
    color: var(--accent-gold);
}

.client-text span {
    color: #fff;
    font-family: 'Inter', sans-serif;
}

/* Reverse Scroll Variant */
.reverse-scroll {
    animation: scroll-right 45s linear infinite;
}

/* Animation Keyframes */
@keyframes scroll-left {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

@keyframes scroll-right {
    0% {
        transform: translateX(-50%);
    }

    100% {
        transform: translateX(0);
    }
}

/* Pause on hover */
.marquee-container:hover .marquee-content {
    animation-play-state: paused;
}

/* ===== THEME TOGGLE BUTTON ===== */
.theme-toggle {
    background: none;
    border: 2px solid var(--accent-gold);
    color: var(--accent-gold);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    font-size: 1.1rem;
}

.theme-toggle:hover {
    background: var(--accent-gold);
    color: #000;
    transform: rotate(180deg) scale(1.1);
}

/* ===== HIGH CONTRAST MODE ===== */
/* Maintains dark theme but increases contrast for better visibility */
[data-contrast="high"] {
    --bg-black: #000000;
    --bg-card: rgba(40, 40, 40, 0.95);
    --text-white: #ffffff;
    --text-gray: #e0e0e0;
    --accent-gold: #ffd700;
    --primary-red: #ff1a1a;
}

[data-contrast="high"] body {
    background-color: #000000;
    color: #ffffff;
}

[data-contrast="high"] .header {
    background-color: rgba(0, 0, 0, 0.98);
    border-bottom: 2px solid var(--accent-gold);
}

[data-contrast="high"] .card {
    background: rgba(50, 50, 50, 0.95);
    border: 2px solid var(--accent-gold);
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.3);
}

[data-contrast="high"] .card:hover {
    background: rgba(60, 60, 60, 1);
    border-color: #fff;
    box-shadow: 0 8px 30px rgba(255, 215, 0, 0.5);
}

[data-contrast="high"] .service-card-visual .overlay,
[data-contrast="high"] .model-card-visual .overlay {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.98) 20%, rgba(0, 0, 0, 0.85) 60%, rgba(0, 0, 0, 0.4) 100%);
}

[data-contrast="high"] .service-card-visual h3,
[data-contrast="high"] .model-card-visual h3 {
    color: #ffffff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 1);
}

[data-contrast="high"] .service-card-visual p,
[data-contrast="high"] .model-card-visual p {
    color: #f0f0f0;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 1);
}

[data-contrast="high"] .section-title {
    color: #ffffff;
    text-shadow: 0 0 20px var(--accent-gold);
}

[data-contrast="high"] .btn-primary {
    border: 2px solid var(--accent-gold);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
}

[data-contrast="high"] .btn-primary:hover {
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.7);
    background: var(--accent-gold);
    color: #000;
}

[data-contrast="high"] .chatbot-widget {
    background: rgba(0, 0, 0, 0.98);
    border: 2px solid var(--accent-gold);
}

[data-contrast="high"] .message.bot {
    background-color: rgba(255, 215, 0, 0.15);
    border-left: 3px solid var(--accent-gold);
    color: #ffffff;
}

[data-contrast="high"] .footer {
    background-color: #000000;
    border-top: 2px solid var(--accent-gold);
}

/* ===== IMPROVED MOBILE RESPONSIVENESS ===== */
@media (max-width: 768px) {

    /* Header improvements */
    .header-container {
        flex-direction: column;
        gap: 15px;
        padding: 15px 10px;
    }

    .logo {
        justify-content: center;
    }

    .logo img {
        height: 60px;
    }

    .logo-text {
        font-size: 1rem;
        text-align: center;
    }

    .nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
        width: 100%;
    }

    .nav a:not(.btn-primary) {
        font-size: 0.8rem;
    }

    .nav .btn-primary {
        margin-left: 0;
        padding: 10px 20px;
        font-size: 0.75rem;
    }

    .theme-toggle {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }

    /* Hero section mobile */
    .hero {
        min-height: 70vh;
        padding-top: 180px;
        padding-bottom: 30px;
    }

    .hero-content {
        width: 95%;
        padding: 20px;
    }

    .hero-title {
        font-size: 1.8rem !important;
        margin-bottom: 20px;
    }

    .hero-subtitle {
        font-size: 0.9rem;
        letter-spacing: 2px;
        margin-bottom: 20px;
    }

    .hero-text {
        font-size: 0.95rem;
        margin-bottom: 30px;
    }

    .btn-lg {
        padding: 14px 25px;
        font-size: 0.9rem;
    }

    /* Grids mobile */
    .grid-4,
    .services-grid-visual,
    .services-grid,
    .solution-cards {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }

    .service-card-visual,
    .model-card-visual {
        height: 400px;
    }

    /* Section spacing */
    .section {
        padding: 60px 0;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .section-subtitle {
        font-size: 1rem;
        margin-bottom: 40px;
    }

    /* Problem grid */
    .problem-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .chaos-box {
        height: 300px;
    }

    .chaos-overlay {
        font-size: 1.5rem;
        padding: 10px 20px;
    }

    /* Chatbot mobile full-screen */
    #chatbot-widget {
        width: 100%;
        height: 100%;
        right: 0;
        bottom: 0;
        border-radius: 0;
    }

    .chatbot-fab {
        bottom: 20px;
        right: 20px;
        width: 60px;
        height: 60px;
    }

    /* Footer mobile */
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }

    /* Marquee mobile */
    .marquee-content span {
        font-size: 1rem;
        margin: 0 20px;
    }
}

/* Tablet adjustments */
@media (min-width: 769px) and (max-width: 1024px) {
    .hero-title {
        font-size: 2.5rem;
    }

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

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

/* Partner logos in marquee */
.partner-logo {
    height: 60px;
    width: auto;
    max-width: 180px;
    object-fit: contain;

    transition: var(--transition);
}

.partner-logo:hover {
    transform: scale\(1.1\);
}

[data-contrast="high"] .partner-logo {
    filter: brightness\(1.2\) contrast\(1.3\);
}

[data-contrast="high"] .partner-logo:hover {
    transform: scale\(1.1\);
}

/* Partner text styling */
.partner-text {
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-shadow: 0 0 10px currentColor;
    transition: var(--transition);
}

.partner-text:hover {
    transform: scale(1.15);
    text-shadow: 0 0 20px currentColor;
}

[data-contrast="high"] .partner-text {
    font-size: 1.3rem;
    text-shadow: 0 0 15px currentColor;
}

/* HD Image Quality Improvements */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    filter: contrast(1.05) brightness(1.02);
}

.service-card-visual img,
.model-card-visual img {
    opacity: 0.95;
    filter: contrast(1.1) brightness(1.05) saturate(1.1);
}

/* PILI Chatbot Messages Styling */
.chat-message {
    margin: 15px 0;
    display: flex;
    animation: fadeIn 0.3s ease;
}

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

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

.chat-message.user {
    justify-content: flex-end;
}

.chat-message.pili {
    justify-content: flex-start;
}

.message-content {
    max-width: 70%;
    padding: 12px 16px;
    border-radius: 18px;
    line-height: 1.4;
    white-space: pre-wrap;
}

.chat-message.user .message-content {
    background: var(--accent-gold);
    color: #000;
    border-bottom-right-radius: 4px;
}

.chat-message.pili .message-content {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-white);
    border-bottom-left-radius: 4px;
}

.chat-message.loading .message-content {
    animation: pulse 1.5s ease-in-out infinite;
}

/* Option buttons as Grid (2 Columns) */
.chat-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 12px 0;
    padding: 0 5px;
}

.option-button {
    background: linear-gradient(135deg, #2D3748 0%, #1A202C 100%);
    border: 1px solid rgba(245, 158, 11, 0.4);
    color: #fff;
    padding: 14px 12px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 56px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

/* Shine Effect */
.option-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: 0.5s;
}

.option-button:hover::before {
    left: 100%;
}

.option-button:hover {
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
    border-color: #FCD34D;
    color: #000;
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 20px rgba(245, 158, 11, 0.3);
    font-weight: 800;
}

.option-button:active {
    transform: scale(0.98);
}

/* Date Picker override - Force High Contrast */
/* Date Picker Override - High Visibility */
.chat-datepicker-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    margin: 10px 0;
}

.chat-datepicker-label {
    font-size: 0.9rem;
    color: #cbd5e0;
    text-align: center;
    font-weight: 500;
}

.chat-datepicker {
    color-scheme: light;
    /* Forces white calendar popup */
    background-color: #ffffff !important;
    color: #000000 !important;
    font-weight: bold;
    font-size: 1.1rem;
    /* Larger text */
    padding: 15px;
    /* Bigger touch target */
    border-radius: 12px;
    border: 2px solid #F59E0B;
    /* Gold border */
    width: 100%;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(245, 158, 11, 0.2);
    font-family: 'Inter', sans-serif;
}

.chat-datepicker:focus {
    outline: none;
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.6);
    transform: scale(1.02);
    transition: all 0.2s ease;
}

/* WhatsApp button */
.chat-whatsapp {
    margin: 20px 0;
    text-align: center;
}

.whatsapp-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #25D366;
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.whatsapp-button:hover {
    background: #128C7E;
    transform: scale(1.05);
}

.whatsapp-button i {
    font-size: 1.3rem;
}

/* Chatbot messages container */
#chatbot-messages {
    padding: 20px;
    overflow-y: auto;
    max-height: calc(100% - 140px);
}

#chatbot-messages::-webkit-scrollbar {
    width: 6px;
}

#chatbot-messages::-webkit-scrollbar-thumb {
    background: var(--accent-gold);
    border-radius: 3px;
}

/* CHAT OPTION BUTTONS - CRITICAL STYLES */
.chat-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 12px 0;
    padding: 0 5px;
}

.option-button {
    background: linear-gradient(135deg, #2D3748 0%, #1A202C 100%);
    border: 1px solid rgba(245, 158, 11, 0.4);
    color: #fff;
    padding: 14px 12px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 56px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

/* Shine Effect */
.option-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: 0.5s;
}

.option-button:hover::before {
    left: 100%;
}

.option-button:hover {
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
    border-color: #FCD34D;
    color: #000;
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 20px rgba(245, 158, 11, 0.3);
    font-weight: 800;
}

.option-button:active {
    transform: scale(0.98);
}