/* --- BRAND & GIF-MATCHED COLOR PALETTE --- */
:root {
    --smartek-blue: #0077b6;     /* Azul de marca 'SMAR' */
    --smartek-yellow: #f5a623;   /* Amarillo/Anaranjado de 'TEK' */

    --primary: #030712;          /* Fondo negro profundo igual al GIF */
    --secondary: #00f0ff;        /* Neón cian de circuitos */
    --accent-blue: #00a8e8;      /* Azul cian intermedio */
    
    --text-dark: #0f172a;
    --text-light: #f8fafc;
    /* Texto secundario de alta legibilidad (plata claro brillante) */
    --text-muted: #e2e8f0;       
    --bg-dark: #030712;
    --bg-card: #0a1120;
    --bg-surface: #060d1e;
    --border-glow: rgba(0, 240, 255, 0.25);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- RESET & GLOBAL --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    line-height: 1.6;
    color: var(--text-light);
    background-color: var(--bg-dark);
}

/* --- TYPOGRAPHY & LAYOUT --- */
h1, h2, h3, h4 {
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--text-light);
}

p {
    margin-bottom: 1rem;
    color: var(--text-muted);
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--text-light);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 70px;
    height: 4px;
    background: linear-gradient(90deg, var(--smartek-blue) 0%, var(--secondary) 50%, var(--smartek-yellow) 100%);
    box-shadow: 0 0 12px var(--secondary);
    border-radius: 2px;
}

/* --- BUTTONS --- */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.btn-primary {
    background-color: var(--secondary);
    color: var(--bg-dark);
    font-weight: 700;
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.4);
}

.btn-primary:hover {
    background-color: var(--smartek-yellow);
    color: var(--bg-dark);
    transform: translateY(-2px);
    box-shadow: 0 0 25px rgba(245, 166, 35, 0.6);
}

.btn-outline {
    background-color: transparent;
    color: var(--secondary);
    border: 2px solid var(--secondary);
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.15);
}

.btn-outline:hover {
    background-color: var(--smartek-blue);
    border-color: var(--smartek-blue);
    color: var(--text-light);
    box-shadow: 0 0 25px rgba(0, 119, 182, 0.6);
}

/* --- HEADER & NAVIGATION --- */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(3, 7, 18, 0.9);
    backdrop-filter: blur(12px);
    z-index: 1000;
    transition: var(--transition);
    border-bottom: 1px solid rgba(0, 240, 255, 0.1);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

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

.logo-img {
    max-height: 50px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 8px rgba(0, 240, 255, 0.3));
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links li a {
    color: var(--text-light);
    font-weight: 500;
    font-size: 1rem;
    transition: var(--transition);
    position: relative;
}

.nav-links li a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--secondary), var(--smartek-yellow));
    box-shadow: 0 0 8px var(--secondary);
    transition: var(--transition);
}

.nav-links li a:hover {
    color: var(--secondary);
}

.nav-links li a:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    cursor: pointer;
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 1.5rem;
}

/* --- HERO SECTION --- */
#hero {
    min-height: 100vh;
    background: radial-gradient(circle at 75% 50%, rgba(0, 240, 255, 0.12) 0%, rgba(3, 7, 18, 1) 70%);
    display: flex;
    align-items: center;
    color: var(--text-light);
    padding: 120px 0 60px 0;
    position: relative;
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 3rem;
    align-items: center;
}

.hero-content {
    text-align: left;
}

.hero-subtitle {
    font-size: 0.95rem;
    color: var(--smartek-yellow);
    letter-spacing: 2px;
    margin-bottom: 1rem;
    text-transform: uppercase;
    font-weight: 600;
}

.hero-title {
    font-size: 3.8rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    background: linear-gradient(135deg, #ffffff 0%, var(--secondary) 60%, var(--smartek-yellow) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-desc {
    font-size: 1.15rem;
    margin-bottom: 2.5rem;
    color: var(--text-muted);
    max-width: 600px;
}

.hero-btns {
    display: flex;
    gap: 1rem;
    justify-content: flex-start;
}

/* --- HERO GIF SHOWCASE CARD --- */
.hero-media {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-gif-card {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 24px;
    padding: 15px;
    background: rgba(10, 17, 32, 0.6);
    border: 1px solid rgba(0, 240, 255, 0.3);
    box-shadow: 0 0 50px rgba(0, 240, 255, 0.25);
    backdrop-filter: blur(12px);
    animation: float 6s ease-in-out infinite;
}

.hero-gif {
    width: 100%;
    max-width: 360px;
    height: auto;
    border-radius: 16px;
    display: block;
    mix-blend-mode: screen;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-15px);
    }
}

/* --- FLIP CARD ANIMATION & LAYOUT --- */
.flip-card {
    background-color: transparent;
    height: 380px;
    perspective: 1000px;
    transition: transform 0.3s ease;
}

.flip-card:hover {
    transform: translateY(-6px);
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
    border-radius: 16px;
}

@media (hover: hover) {
    .flip-card:hover .flip-card-inner {
        transform: rotateY(180deg);
    }
}

.flip-card-inner.flipped {
    transform: rotateY(180deg) !important;
}

.flip-card-front, .flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 16px;
    overflow: hidden;
}

.flip-card-front {
    background-color: var(--bg-card);
    border: 1px solid rgba(0, 240, 255, 0.2);
}

.flip-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.flip-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem 1rem;
    background: linear-gradient(to top, rgba(3, 7, 18, 0.95) 0%, rgba(3, 7, 18, 0.6) 60%, transparent 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.flip-card-overlay h3 {
    font-size: 1.25rem;
    color: #ffffff;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.flip-card-back {
    transform: rotateY(180deg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem 1.5rem;
    box-sizing: border-box;
}

.service-card.flip-card-back, .feature-card.flip-card-back {
    background-color: var(--bg-card);
    border: 1px solid rgba(0, 240, 255, 0.25);
    box-shadow: 0 0 25px rgba(0, 240, 255, 0.15);
}

/* Círculo del ícono en el reverso */
.service-icon {
    width: 60px;
    height: 60px;
    min-width: 60px;
    min-height: 60px;
    flex-shrink: 0;
    background-color: rgba(0, 240, 255, 0.1);
    color: var(--secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    border: 1px solid rgba(0, 240, 255, 0.3);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.2);
    transition: var(--transition);
}

.service-icon i {
    color: var(--secondary) !important;
}

.flip-card:hover .service-icon {
    border-color: var(--smartek-yellow) !important;
    box-shadow: 0 0 15px rgba(245, 166, 35, 0.5) !important;
}

.flip-btn {
    background: rgba(0, 240, 255, 0.15);
    border: 1px solid var(--secondary);
    color: var(--secondary);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.flip-btn:hover {
    background: var(--secondary);
    color: var(--bg-dark);
    box-shadow: 0 0 12px var(--secondary);
}

@media (hover: hover) and (pointer: fine) {
    .flip-card-front .flip-btn {
        pointer-events: none;
    }
    
    .flip-back-btn {
        display: none !important;
    }
}

@media (hover: none), (pointer: coarse) {
    .flip-btn {
        display: inline-flex !important;
        pointer-events: auto;
    }
}

/* --- ABOUT SECTION --- */
#about {
    padding: 100px 0;
    background-color: var(--bg-surface);
    border-top: 1px solid rgba(0, 240, 255, 0.08);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-img {
    width: 100%;
    border-radius: 16px;
    border: 1px solid rgba(0, 240, 255, 0.2);
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.15);
}

.about-text h3 {
    font-size: 2rem;
    color: var(--secondary);
    margin-bottom: 1rem;
}

.about-text p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.about-text strong {
    color: var(--smartek-yellow);
}

/* --- SERVICES SECTION --- */
#services {
    padding: 100px 0;
    background-color: var(--bg-dark);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.service-card h3 {
    font-size: 1.3rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

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

/* --- WHY CHOOSE US SECTION --- */
#why-us {
    padding: 100px 0;
    background-color: var(--bg-surface);
    border-top: 1px solid rgba(0, 240, 255, 0.08);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    text-align: center;
}

.feature-item h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.feature-item p {
    color: var(--text-muted);
}

/* --- CONTACT SECTION --- */
#contact {
    padding: 100px 0;
    background-color: var(--bg-dark);
}

/* --- ENLACES INTERACTIVOS DE CONTACTO --- */
.contact-link {
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition);
}

.contact-link:hover {
    color: var(--secondary);
    text-decoration: underline;
}

/* --- ESTILO PARA ÍCONOS CLICKABLES DE CONTACTO --- */
.info-icon-link {
    text-decoration: none;
    display: inline-block;
    transition: var(--transition);
}

.info-icon-link:hover .info-icon {
    color: var(--secondary); /* Cambia a azul cian al pasar el cursor */
    transform: scale(1.15);  /* Crece ligeramente para indicar interactividad */
}

.contact-subtitle {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 3.5rem auto;
    font-size: 1.2rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.contact-subtitle span {
    color: var(--smartek-yellow);
    font-weight: 600;
    display: inline-block;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-info {
    background-color: var(--bg-card);
    color: var(--text-light);
    padding: 3rem;
    border-radius: 16px;
    border: 1px solid rgba(0, 240, 255, 0.2);
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.1);
}

.contact-info h3 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--secondary);
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.info-icon {
    font-size: 1.5rem;
    color: var(--smartek-yellow);
}

.info-text h4 {
    margin-bottom: 0.2rem;
    font-size: 1.1rem;
}

.info-text p {
    color: var(--text-muted);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
    color: var(--text-light);
}

.form-control {
    padding: 12px 15px;
    background-color: var(--bg-card);
    border: 1px solid rgba(0, 240, 255, 0.2);
    border-radius: 8px;
    font-size: 1rem;
    color: var(--text-light);
    transition: var(--transition);
}

.form-control::placeholder {
    color: #94a3b8;
}

.form-control:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.3);
}

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

/* --- FOOTER --- */
footer {
    background-color: #010308;
    color: var(--text-light);
    padding: 3rem 0;
    text-align: center;
    border-top: 1px solid rgba(0, 240, 255, 0.15);
}

.footer-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.logo-img-footer {
    max-height: 65px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 12px rgba(0, 240, 255, 0.4));
}

.footer-text {
    color: var(--text-muted);
    font-size: 0.95rem;
    max-width: 600px;
    margin: 0 auto 2rem;
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* --- RESPONSIVE DESIGN --- */
@media (max-width: 992px) {
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    /* Mueve la animación del GIF a la parte superior en móviles */
    .hero-media {
        order: -1;
        margin-bottom: 1.5rem;
    }
    
    .hero-content {
        order: 1;
        text-align: center;
    }
    
    .hero-desc {
        margin: 0 auto 2.5rem auto;
    }
    
    .hero-btns {
        justify-content: center;
    }
    
    .hero-title {
        font-size: 2.8rem;
    }
    
    .hero-gif {
        max-width: 280px;
    }
    
    .about-grid, .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .about-img {
        order: -1;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background-color: rgba(3, 7, 18, 0.98);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transition: var(--transition);
    }
    .nav-links.active {
        left: 0;
    }
    .hamburger {
        display: block;
    }
    .hero-title {
        font-size: 2.4rem;
    }
    .hero-btns {
        flex-direction: column;
    }
}

/* --- FORM ALERT INTERACTIVE MESSAGE --- */
.form-alert {
    padding: 1rem 1.25rem;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 1.5rem;
    animation: alertFadeIn 0.4s ease-out;
}

.form-alert.success {
    background: rgba(0, 240, 255, 0.1);
    border: 1px solid var(--secondary);
    color: var(--secondary);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.25);
}

.form-alert.error {
    background: rgba(245, 166, 35, 0.1);
    border: 1px solid var(--smartek-yellow);
    color: var(--smartek-yellow);
    box-shadow: 0 0 20px rgba(245, 166, 35, 0.25);
}

@keyframes alertFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}