/* Custom Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=KoHo:wght@700&family=Kode+Mono:wght@700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Montserrat+Alternates:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');


:root {
    --bg-color: #000000;
    --accent-yellow: #f1b400;
    --grid-color: rgba(241, 180, 0, 0.25);
}

body, html {
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    color: #ffffff;
    font-family: 'KoHo', sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

html {
    scroll-behavior: smooth;
}

/* Header & Navigation */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 80px;
}

.logo img {
    height: 45px;
    width: auto;
    padding-left: 40px;
}

.nav-links a {
    font-family: "Montserrat Alternates", sans-serif;
    font-weight: 200;
    font-style: normal;
    color: var(--accent-yellow);
    text-decoration: none;
    margin-left: 30px;
    font-size: 1.1rem;
    text-transform: capitalize;
    
    /* FIX 1: Use relative so the light stays INSIDE this box */
    position: relative; 
    display: inline-block;
    
    /* FIX 2: Hide the light when it leaves this specific box */
    overflow: hidden; 
    
    /* FIX 3: Remove the old border-bottom so the animated one takes over */
    padding-bottom: 4px; 
}

/* The 'Track' (The dim line that stays still) */
.nav-links a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1.5px;                  /* Matches your original border thickness */
    background: rgba(241, 180, 0, 0.2); 
}

/* The 'Running Light' (The spark that moves) */
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: -100%;                    /* Starts hidden to the left */
    width: 100%;
    height: 1.5px;
    background: linear-gradient(
        90deg, 
        transparent, 
        var(--accent-yellow), 
        #ffffff,                    /* Added a white center for extra "shine" */
        var(--accent-yellow), 
        transparent
    );
    animation: run-light 4s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes run-light {
    0% { left: -100%; }
    50%, 100% { left: 100%; }
}

.nav-links a:hover {
    color: #ffffff;
    text-shadow: 0 0 8px var(--accent-yellow);
}

/* First button (Proyectos) starts immediately */
.nav-links a:nth-child(2)::after {
    animation-delay: 0s;
}

/* Second button (Contacto) starts 1.5 seconds later */
.nav-links a:nth-child(1)::after {
    animation-delay: 5s; 
}





/* Main Home Content Layout */
.hero-container {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 10%;
    margin-top: 40px;
}

.hero-text-wrapper {
    width: 100%;
    max-width: 1100px;
    margin-bottom: -130px; /* Pulls image up to overlap slightly */
    margin-right: 280px;
    z-index: 10;
}

.hero-text-wrapper h1 {
    font-size: clamp(2rem, 5vw, 3.8rem);
    margin: 0;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.text-yellow {
    color: var(--accent-yellow);
}

/* The Image Stage with Grid */
.industrial-stage {
    position: relative;
    width: 100%;
    height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.industrial-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(10%) brightness(0.8);
    /*Creates the feathered oval look */
    -webkit-mask-image: radial-gradient(ellipse 55% 45% at 50% 50%, black 2%, transparent 100%);
    mask-image: radial-gradient(ellipse 55% 45% at 50% 50%, black 2%, transparent 100%);
}

.grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    /* Drawing the thin orange lines */
    /*background-image: 
        linear-gradient(to right, var(--grid-color) 1px, transparent 1px),
        linear-gradient(to bottom, var(--grid-color) 1px, transparent 1px);
    background-size: 100px 80px;
    */
}





/* Footer Tagline */
.tagline {
    font-family: 'Kode Mono', monospace;
    text-align: center;
    max-width: 850px;
    padding: 40px 20px;
    font-size: 1.1rem;
    line-height: 1.5;
    color: #e0e0e0;
}












/* --- SERVICES SECTION LAYOUT --- */
.services-section {
    background-color: var(--bg-color);
    padding: 60px 10%;
    position: relative;
    overflow: hidden;
}

.services-title {
    font-family: 'KoHo', sans-serif;
    font-size: 1.8rem;
    letter-spacing: 2px;
    margin-bottom: 40px;
    color: #fff;
}

/* --- MENU STYLING --- */
.services-menu {
    display: flex;
    justify-content: space-around;
    position: relative;
    border-bottom: 1px solid #ff0000;
    margin-bottom: 60px;
}

.menu-item {
    background: none;
    border: none;
    color: var(--accent-yellow);
    font-family: "Montserrat Alternates", sans-serif;
    font-weight: 200;
    font-size: 0.9rem;
    padding: 15px 0;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 2;
}

.menu-item.active {
    color: #ffffff;
    text-shadow: 0 0 15px var(--accent-yellow);
}

/* --- CONTENT DISPLAY --- */
.services-display {
    position: relative;
    width: 100%;
    min-height: 550px; /* Increased height for better vertical spacing */
}

.service-text-container {
    position: absolute;
    top: 0;
    left: 120px; /* Moves text 50px further left */
    width: 400px; 
    z-index: 5;
}

.service-text-container h3 {
    font-family: 'KoHo', sans-serif;
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #fff;
}

.service-text-container p {
    font-family: 'Montserrat Alternates', sans-serif;
    line-height: 1.6;
    color: #ccc;
}

/* --- THE VIEWPORT (WINDOW) --- */
.service-images-container {
    position: relative;
    width: 100%; /* Spans full width to align images with text */
    height: 550px;
    overflow: hidden;
}

/* --- THE FILMSTRIP --- */
.images-wrapper {
    display: flex;
    height: 100%;
    width: 100%;
    transition: transform 0.8s cubic-bezier(0.45, 0.05, 0.55, 0.95);
}

/* --- INDIVIDUAL SLIDE --- */
.service-slide {
    min-width: 100%;
    height: 100%;
    display: flex;
    align-items: center; /* Align to top to control images with margins */
    justify-content: center; /* Align left to align with text */
    gap: 250px; /* Increased space between images */
    padding-left: 0;
    box-sizing: border-box;
}

/* Left Image - Positioned under text */
.img-equip {
    width: 320px;
    height: 320px !important;
    object-fit: contain;
    flex-shrink: 0;
    margin-top: 180px; /* Pushes equipment down so it is under the text */
}

/* Right Image - Positioned Higher */
.img-exp {
    width: 350px;
    height: 350px !important;
    object-fit: cover;
    flex-shrink: 0;
    margin-top: 0px; /* Keeps the experience image higher */
    border-radius: 10px;
}

/* --- ANIMATIONS & EFFECTS --- */
.fade-text {
    opacity: 1;
    transition: opacity 0.5s ease;
}

.fade-out {
    opacity: 0;
}

.white-shadow-bar {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
    background: linear-gradient(to right, var(--bg-color) 0%, transparent 15%, transparent 85%, var(--bg-color) 100%);
}










/* --- CONTACT SECTION LAYOUT --- */
.contact-section {
    position: relative;
    width: 100%;
    min-height: 100vh; /* Full viewport height */
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    padding: 50px 0;
}

/* --- SEAMLESS BACKGROUND FIX --- */
.contact-footer-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    background-color: #000; /* Fallback */
}

.map-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures image covers entire height of section + footer */
    opacity: 0.4;
    z-index: 0;
}

.contact-container {
    position: relative;
    z-index: 10;
    display: flex;
    gap: 40px;
    width: 90%;
    max-width: 1200px;
    flex-wrap: wrap;
    justify-content: center;
}

.form-column {
    flex: 1;
    min-width: 350px;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.animation-column {
    flex: 1.5;
    min-width: 350px;
    display: flex;
}










/* --- GLASS BOXES COMMON STYLES --- */
.glass-box {
    background: rgba(51, 51, 51, 0.4); /* Darker background for contrast */
    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: box-shadow 0.4s ease, border-color 0.4s ease;
}

.box-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-family: 'KoHo', sans-serif;
    font-size: 1.1rem;
    color: #ccc;
}

/* --- BORDER BEAM EFFECTS --- */
/* Orange Mode (Email/Quote) */
.orange-beam {
    border: 1px solid rgba(241, 180, 0, 0.5);
    box-shadow: 0 0 15px rgba(241, 180, 0, 0.2), inset 0 0 10px rgba(241, 180, 0, 0.1);
}

/* Green Mode (WhatsApp) */
.green-beam {
    border: 1px solid rgba(0, 255, 136, 0.5);
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.2), inset 0 0 10px rgba(0, 255, 136, 0.1);
}

/* --- INPUTS --- */
.pixel-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 12px;
    color: #fff;
    font-family: 'Kode Mono', monospace;
    font-size: 1rem;
    box-sizing: border-box;
    transition: all 0.3s;
}

.pixel-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.1);
}

textarea.pixel-input {
    height: 120px;
    resize: none;
}

/* --- TOGGLE SWITCH (Email/WA) --- */
.toggle-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.8rem;
    font-family: 'Kode Mono', monospace;
}

.toggle-label { transition: color 0.3s; color: var(--accent-yellow); }
.toggle-label.dim { color: #00ff88; }
.toggle-label.active-green { color: #00ff88; }

.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: transparent;
    border: 2px solid var(--accent-yellow);
    transition: .4s;
    border-radius: 34px;
}
.slider:before {
    position: absolute;
    content: "";
    height: 14px; width: 14px;
    left: 4px; bottom: 3px;
    background-color: var(--accent-yellow);
    transition: .4s;
    border-radius: 50%;
}
/* WhatsApp State */
input:checked + .slider { border-color: #00ff88; }
input:checked + .slider:before {
    transform: translateX(24px);
    background-color: #00ff88;
}

/* --- TOPIC SWITCH (Quote/Contact) --- */
.topic-switch {
    position: relative;
    background: rgba(0,0,0,0.3);
    border-radius: 5px;
    display: flex;
    overflow: hidden;
    border: 1px solid #555;
}
.topic-switch input { display: none; }
.topic-switch label {
    padding: 5px 15px;
    cursor: pointer;
    z-index: 2;
    font-size: 0.8rem;
    transition: color 0.3s;
}
.topic-slider {
    position: absolute;
    top: 0; bottom: 0; left: 0;
    width: 50%;
    background: var(--accent-yellow); /* Yellow/Orange */
    z-index: 1;
    transition: transform 0.3s ease;
    opacity: 0.6;
}
/* Logic for Topic Slider */
#topic-contact:checked ~ .topic-slider {
    transform: translateX(100%);
    background: #ff4d4d; /* Reddish for Contact */
}

/* --- BUTTON --- */
.btn-container {
    display: flex;
    justify-content: flex-end;
    margin-top: 15px;
}
.send-btn {
    background: transparent;
    border: 1px solid var(--accent-yellow);
    color: var(--accent-yellow);
    padding: 8px 30px;
    font-family: 'Kode Mono', monospace;
    font-size: 1rem;
    cursor: pointer;
    border-radius: 5px;
    transition: all 0.3s;
}
.send-btn:hover {
    background: var(--accent-yellow);
    color: #000;
    box-shadow: 0 0 15px var(--accent-yellow);
}














/* --- PIXEL ART ANIMATION BOX --- */
.animation-box {
    width: 100%;
    height: 89%;
    display: flex;
    flex-direction: column;
}

.anim-header {
    text-align: center;
    color: #fff;
    font-family: 'KoHo', sans-serif;
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.text-red { color: #ff4d4d; font-weight: bold; }

.pixel-art-scene {
    flex-grow: 1;
    position: relative;
    width: 100%;
    height: 300px;
    margin-top: 20px;
}

/* Position Actors in Triangle */
.pixel-actor {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    z-index: 5;
}

.server-pos { top: 0%; left: 50%; transform: translateX(-50%); }
.user-pos { bottom: 10%; left: 15%; }
.team-pos { bottom: 10%; right: 15%; }

.pixel-icon {
    width: 60px;
    height: 60px;
}

.pixel-label {
    font-family: 'Kode Mono', monospace;
    font-size: 0.7rem;
    color: #888;
    letter-spacing: 1px;
}

/* Icon Specifics */
.server-icon { animation: server-glow 2s infinite; }
@keyframes server-glow {
    0%, 100% { filter: drop-shadow(0 0 5px #00ff88); }
    50% { filter: drop-shadow(0 0 15px #00ff88); }
}

.phone-hand-icon svg { filter: drop-shadow(0 0 8px rgba(255, 77, 77, 0.4)); }

/* --- DATA STREAMS --- */
.stream {
    position: absolute;
    z-index: 2;
}

/* User -> Server (Diagonal Up-Right) */
.stream-user-to-server {
    top: 50%;
    left: 30%;
    width: 100px;
    height: 100px;
    transform: rotate(-45deg);
}

/* Server -> Team (Diagonal Down-Right) */
.stream-server-to-team {
    top: 50%;
    right: 30%;
    width: 100px;
    height: 100px;
    transform: rotate(45deg);
}

.packet {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    opacity: 0;
}

.packet.yellow { background: var(--accent-yellow); box-shadow: 0 0 10px var(--accent-yellow); }
.packet.red { background: #ff4d4d; box-shadow: 0 0 10px #ff4d4d; }

/* Packet Animations */
.stream .packet:nth-child(1) { animation: triangle-flow 2s infinite 0s; }
.stream .packet:nth-child(2) { animation: triangle-flow 2s infinite 1s; }

@keyframes triangle-flow {
    0% { transform: translateX(0); opacity: 0; }
    20% { opacity: 1; }
    80% { opacity: 1; }
    100% { transform: translateX(120px); opacity: 0; }
}



/* Enhanced Phone Icon Styling */
.team-pos .pixel-icon {
    width: 65px;  /* Slightly larger to show detail */
    height: 65px;
}

/* Make the screen look "Active" when a message arrives */
.team-pos svg rect[fill="#222"] {
    animation: screen-flicker 4s infinite;
}

@keyframes screen-flicker {
    0%, 75% { fill: #222; }
    80% { fill: #333; }
    85% { fill: #222; }
    90% { fill: #333; }
    100% { fill: #222; }
}

/* Adjust Team Position for the larger icon */
.team-pos {
    bottom: 20px; 
    right: 8%;
}









/* ANIMATIONS */
/* Stream 1: User -> Server */
.stream-1 .packet:nth-child(1) { animation: flow 2s infinite 0s; }
.stream-1 .packet:nth-child(2) { animation: flow 2s infinite 0.3s; }
.stream-1 .packet:nth-child(3) { animation: flow 2s infinite 0.6s; }

/* Stream 2: Server -> Team */
.stream-2 .packet { background-color: #ff4d4d; }
.stream-2 .packet:nth-child(1) { animation: flow 2s infinite 1s; }
.stream-2 .packet:nth-child(2) { animation: flow 2s infinite 1.3s; }

@keyframes flow {
    0% { transform: translateX(0); opacity: 0; }
    20% { opacity: 1; }
    80% { opacity: 1; }
    100% { transform: translateX(60px); opacity: 0; }
}

/* Server Pulse */
.server-icon { animation: pulse 2s infinite; }
@keyframes pulse {
    0%, 40% { box-shadow: 0 0 10px #00ff88; }
    50% { box-shadow: 0 0 25px #00ff88, inset 0 0 10px #00ff88; }
    60%, 100% { box-shadow: 0 0 10px #00ff88; }
}


















/* --- FOOTER --- */
.copyright {
    color: #bcbcbc;
    font-size: 0.8rem;
    font-family: 'Montserrat Alternates', sans-serif;
    font-weight: 300;
}


/* --- FOOTER UPDATES --- */
.main-footer {
    position: relative;
    z-index: 10;
    background: rgba(75, 75, 75, 0.4);
    backdrop-filter: blur(6px);
    border-top: 1px solid rgba(255,255,255,0.1);
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center; /* Centers the container contents */
    padding: 0 5%;
}

.footer-center {
    flex: 1;
    text-align: center;
}

.footer-right {
    position: absolute;
    right: 0px;
}

.creator-img {
    height: 55px; /* Adjust based on your image size */
    transition: transform 0.3s ease;
}

.creator-img:hover {
    transform: scale(1.05);
}











/* --- TOAST NOTIFICATION --- */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(20, 20, 20, 0.95);
    border: 1px solid #e1ff00;
    border-left: 5px solid #00bf06;
    padding: 15px 25px;
    display: flex;
    align-items: center;
    gap: 15px;
    border-radius: 5px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.5);
    z-index: 9999;
    
    transform: translateX(150%); /* Hidden by default */
    transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.toast.show {
    transform: translateX(0);
}

.toast-icon {
    width: 30px; height: 30px;
    background: #fdd300;
    color: #fff;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    font-family: 'Kode Mono', monospace;
}

.toast-body h4 {
    margin: 0;
    color: #fff;
    font-size: 0.9rem;
    font-family: 'KoHo', sans-serif;
}
.toast-body p {
    margin: 3px 0 0 0;
    color: #aaa;
    font-size: 0.8rem;
}

/* --- RESPONSIVE ADJUSTMENTS --- */