:root {
    --primary: rgb(70, 213, 193);
    /* Neon Cyan */
    --secondary: #0066ff;
    /* Deep Blue */
    --dark-bg: #050508;
    /* Almost Black */
    --card-bg: #0f1016;
    /* Dark Card */
    --text-main: #ffffff;
    --text-muted: #a0a0b0;
    --font-heading: 'Orbitron', sans-serif;
    --font-body: 'Rajdhani', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--dark-bg);
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 18px;
    line-height: 1.6;
    overflow-x: hidden;
}

#main-content {
    opacity: 0;
    transition: opacity 1s ease-in;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 5px var(--primary);
    }

    50% {
        box-shadow: 0 0 20px var(--primary), 0 0 10px var(--primary);
    }

    100% {
        box-shadow: 0 0 5px var(--primary);
    }
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    position: absolute;
    width: 100%;
    top: 0;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 1.2rem;
    font-weight: 700;
    font-family: var(--font-heading);
}

.brand-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.brand-item>span {
    display: block;
    margin-bottom: 6px;
    line-height: 1;
}

.brand-sep {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin: 0 6px;
}

.brand-logo {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    margin-top: 6px;
    border: none;
    background: transparent;
}

/* Lower GM logo slightly to align with D-TECH */
.logo .brand-item:nth-child(1) .brand-logo {
    margin-top: 20px;
}

/* Make D-TECH logo 50% larger than default */
.logo .brand-item:nth-child(3) .brand-logo {
    width: 84px;
    height: 84px;
}

/* Base Buttons */
button,
.cta-btn-large,
.cta-btn-small {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 10px 20px;
    font-family: var(--font-heading);
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.cta-btn-small:hover {
    background: var(--primary);
    color: #000;
    box-shadow: 0 0 15px var(--primary);
}

.cta-btn-large {
    background: var(--primary);
    color: #000;
    font-weight: 700;
    padding: 15px 40px;
    font-size: 1.2rem;
    margin-top: 30px;
}

.cta-btn-large:hover {
    background: #fff;
    box-shadow: 0 0 30px var(--primary);
    transform: scale(1.05);
}

/* Hero Section */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: -2;
    filter: brightness(0.6) contrast(1.2);
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, transparent 0%, var(--dark-bg) 90%);
    z-index: -1;
}

.hero-content {
    max-width: 900px;
    padding: 0 20px;
    animation: fadeIn 1.5s ease-out;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    text-shadow: 0 0 20px rgba(0, 243, 255, 0.5);
}

.hero-content p {
    font-size: 1.5rem;
    color: var(--text-muted);
}

/* Services */
.services {
    padding: 100px 20px;
    background-color: var(--dark-bg);
}

/* About Section */
.about-section {
    padding: 80px 20px;
    background-color: var(--dark-bg);
}

.about-section .container {
    max-width: 1000px;
    margin: 0 auto;
}

.about-section p {
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 16px;
}

.about-section h3 {
    color: var(--primary);
    margin-top: 12px;
    margin-bottom: 8px;
}

/* Highlight brands inside about section */
.about-section .brand-gm,
.about-section .brand-dtech {
    color: var(--primary);
    font-weight: 700;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.services h2,
.differentiators h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 60px;
    color: var(--text-main);
    border-bottom: 2px solid var(--primary);
    display: inline-block;
    padding-bottom: 10px;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 9px;
}

/* Desktop layout: 2 items on first row centered, 3 items on second row centered */
@media (min-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 9px;
        align-items: start;
    }

    .service-card {
        justify-self: center;
        width: 260px;
    }

    .service-card:nth-child(1) {
        grid-column: 2;
        grid-row: 1;
    }

    .service-card:nth-child(2) {
        grid-column: 4;
        grid-row: 1;
    }

    .service-card:nth-child(3) {
        grid-column: 1;
        grid-row: 2;
    }

    .service-card:nth-child(4) {
        grid-column: 3;
        grid-row: 2;
    }

    .service-card:nth-child(5) {
        grid-column: 5;
        grid-row: 2;
    }
}

.service-card {
    background: var(--card-bg);
    padding: 20px;
    border: 1px solid #2a2a35;
    text-align: center;
    transition: transform 0.3s ease, border-color 0.3s ease;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
    min-height: 180px;
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(0, 243, 255, 0.1);
}

.service-card img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 50%;
    margin-bottom: 12px;
    filter: drop-shadow(0 0 10px var(--primary));
}

.service-card h3 {
    font-size: 1.2rem;
    color: var(--primary);
    margin-bottom: 15px;
}

/* Differentiators */
.differentiators {
    padding: 80px 20px;
    background: linear-gradient(180deg, var(--dark-bg) 0%, #0c0d12 100%);
    border-top: 1px solid #222;
}

.diff-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    text-align: center;
}

.diff-item h3 {
    font-size: 2rem;
    color: #fff;
    margin-bottom: 10px;
}

/* Footer */
footer {
    padding: 50px 20px;
    background: #020203;
    border-top: 1px solid #1a1a20;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 40px;
}

.footer-brand h4 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.copyright {
    text-align: center;
    margin-top: 40px;
    color: #444;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        padding: 12px 16px;
        background: rgba(5, 5, 8, 0.9);
        backdrop-filter: blur(4px);
        z-index: 200;
    }

    .logo {
        align-items: center;
        gap: 8px;
        flex-wrap: wrap;
    }

    .brand-logo {
        width: 28px;
        height: 28px;
    }

    .logo .brand-item:nth-child(3) .brand-logo {
        width: 42px;
        height: 42px;
    }

    /* ensure GM doesn't stay pushed down on small screens */
    .logo .brand-item:nth-child(1) .brand-logo {
        margin-top: 0;
    }

    /* prevent hero from being covered by fixed navbar */
    .hero {
        padding-top: 72px;
        min-height: calc(100vh - 72px);
        height: auto;
    }

    .hero-content h1 {
        font-size: 1.6rem;
        line-height: 1.15;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .diff-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }
}

/* Hide contact form container on phones */
@media (max-width: 768px) {
    .contact-form-container {
        display: none !important;
    }

    .contact-section {
        display: none !important;
    }
}

/* Extra small phones: reduce hero heading and ensure logos visible */
@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 1.2rem;
    }

    .hero-content p {
        font-size: 0.95rem;
    }

    .logo {
        z-index: 300;
    }

    .logo img {
        display: block;
        opacity: 1 !important;
        visibility: visible !important;
    }

    .brand-logo {
        width: 26px;
        height: 26px;
    }

    .logo .brand-item:nth-child(3) .brand-logo {
        width: 39px;
        height: 39px;
    }
}

@media (max-width: 1024px) and (min-width: 769px) {
    .brand-logo {
        width: 44px;
        height: 44px;
    }

    .logo .brand-item:nth-child(3) .brand-logo {
        width: 66px;
        height: 66px;
    }

    .logo .brand-item:nth-child(1) .brand-logo {
        margin-top: 12px;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-content p {
        font-size: 1.1rem;
    }

    .diff-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}

/* Floating WhatsApp Button */
.float-wsp {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: #000;
    border-radius: 50%;
    box-shadow: 0 0 15px #0f0;
    z-index: 1000;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #0f0;
}

.float-wsp:hover {
    transform: scale(1.1);
    box-shadow: 0 0 25px #0f0;
}

.float-wsp img {
    width: 35px;
    height: 35px;
    object-fit: contain;
}

@media (max-width: 768px) {
    .float-wsp {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
    }

    .float-wsp img {
        width: 30px;
        height: 30px;
    }

}

.brand-gm {
    color: rgb(70, 213, 193);
}

.brand-dtech {
    color: #ffffff;
}

/* Contact Section */
.contact-section {
    padding: 100px 20px;
    background-color: var(--dark-bg);
}

.contact-form-container {
    max-width: 700px;
    margin: 0 auto;
    background: var(--card-bg);
    padding: 40px;
    border-radius: 10px;
    border: 1px solid #2a2a35;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.contact-form-container:hover {
    border-color: var(--primary);
    box-shadow: 0 0 30px rgba(0, 243, 255, 0.1);
}

.contact-form .form-group {
    margin-bottom: 25px;
    text-align: left;
}

.contact-form label {
    display: block;
    font-family: var(--font-heading);
    color: var(--primary);
    margin-bottom: 10px;
    font-size: 1.1rem;
    letter-spacing: 1px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 15px;
    background: #050508;
    border: 1px solid #2a2a35;
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 1.1rem;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.2);
    background: #08080c;
}

.contact-form .form-submit {
    text-align: center;
    margin-top: 20px;
}

/* Form placeholders */
.contact-form ::placeholder {
    color: #444;
}

@media (max-width: 768px) {
    .contact-form-container {
        padding: 20px;
    }
}

/* Authorized Overlay */
#authorized-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--dark-bg);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9998;
    /* Below loading but above content */
    opacity: 1;
    transition: opacity 1s ease-out;
}

/* Loading Screen */
#loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--dark-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.5s ease-out;
    transition: opacity 1s ease-out;
}

#protocol-messages {
    text-align: center;
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 1.2rem;
    line-height: 1.6;
    white-space: pre-line;
}

/* Estilo de la línea láser */
.laser-escaneo {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--primary);
    /* Azul tecnológico / Cyan match */
    box-shadow: 0 0 15px var(--primary), 0 0 30px var(--primary);
    /* Efecto de brillo */
    z-index: 10000;
    pointer-events: none;
    /* Para que no interfiera con los clics */
    animation: moverLaser 2s infinite linear alternate;
}

/* Animación para que suba y baje */
@keyframes moverLaser {
    0% {
        top: 0;
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        top: 100%;
        opacity: 0;
    }
}

.authorized {
    font-size: 25vh;
    color: var(--primary);
}

@media (max-width: 768px) {
    .authorized {
        font-size: 13vw;
    }
}