/*
Theme Name: Blue IT
Theme URI: https://blueit.local
Author: Blue IT
Description: Tema a medida para Blue IT Soluciones Informáticas. Servicios, clientes e hitos gestionables desde el panel de WordPress.
Version: 1.0
Text Domain: blue-it
*/

/* --- 1. CONFIGURACIÓN VISUAL & PALETA --- */
:root {
    --bg-base: #050810;
    --bg-surface: #0b0f1e;
    --bg-hover: #111827;

    --brand-primary: #3f7fd1;
    --brand-secondary: #ff4d6d;
    --brand-blue: var(--brand-primary);
    --brand-blue-dark: #23558f;

    --text-main: #e8eaf0;
    --text-sec: #5a6480;

    --font-display: 'Syne', sans-serif;
    --font-body: 'DM Sans', sans-serif;

    --mouse-x: 50%;
    --mouse-y: 50%;
}

html { scroll-behavior: smooth; }
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: var(--font-body);
    background-color: var(--bg-base);
    color: var(--text-main);
    overflow-x: hidden;
    line-height: 1.6;
    display: flex; flex-direction: column; min-height: 100vh;
}

h1, h2, h3, .logo {
    font-family: var(--font-display);
}

/* --- 2. EFECTO LINTERNA / SPOTLIGHT --- */
.spotlight-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none;
    z-index: 0;
    background: radial-gradient(
        600px circle at var(--mouse-x) var(--mouse-y),
        rgba(63, 127, 209, 0.03),
        transparent 40%
    );
}

/* --- 3. FONDO ANIMADO (PARALLAX + ORBS) --- */
#parallax-container {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    z-index: -1; pointer-events: none;
    background:
        radial-gradient(circle at 15% 90%, rgba(255, 77, 109, 0.08), transparent 45%),
        radial-gradient(circle at 85% 10%, rgba(63, 127, 209, 0.05), transparent 45%),
        linear-gradient(to bottom, #050810 0%, #020305 100%);
}

.parallax-layer { position: absolute; width: 100%; height: 100%; }

.floating-obj {
    position: absolute;
    color: var(--text-sec);
    opacity: 0.15;
    font-size: 3rem;
}

.p1 { top: 15%; left: 10%; }
.p2 { top: 25%; right: 15%; font-size: 2rem; }
.p3 { bottom: 20%; left: 20%; }
.p4 { bottom: 40%; right: 10%; font-size: 5rem; }
.p5 { top: 50%; left: 50%; font-size: 4rem; opacity: 0.05; }
.p6 { top: 8%; left: 45%; font-size: 1.8rem; }
.p7 { bottom: 15%; right: 35%; font-size: 2.5rem; }
.p8 { top: 65%; left: 5%; font-size: 2rem; }
.p9 { top: 18%; right: 5%; font-size: 2.2rem; }
.p10 { bottom: 5%; left: 45%; font-size: 3rem; opacity: 0.05; }

/* --- 4. NAVBAR --- */
header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 40px 50px;
    position: fixed; top: 0; width: 100%; z-index: 1000;
    background: linear-gradient(to bottom, rgba(5,8,16,0.9), transparent);
}

.logo {
    font-size: 2rem;
    font-weight: 800;
    display: flex; align-items: center; gap: 10px;
    color: var(--text-main);
    letter-spacing: -1px;
    min-width: 150px;
    text-decoration: none;
}
.logo [data-lucide] {
    color: var(--brand-primary);
    stroke-width: 2.5px;
    width: 28px;
    height: 28px;
    vertical-align: middle;
}
.logo img.custom-logo { max-height: 42px; width: auto; display: block; }

.logo-badge {
    display: flex; align-items: center; justify-content: center;
    width: 38px; height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--brand-blue), var(--brand-blue-dark));
    box-shadow: 0 0 18px rgba(47, 123, 255, 0.45);
    flex-shrink: 0;
}
.logo-badge [data-lucide] {
    color: #ffffff;
    width: 20px;
    height: 20px;
    stroke-width: 2.5px;
}

.logo-blue {
    color: var(--brand-primary);
    text-shadow: 0 0 18px rgba(63, 127, 209, 0.35);
}

.typing-cursor {
    display: inline-block;
    background-color: var(--brand-primary);
    width: 4px;
    height: 1.8rem;
    margin-left: 5px;
    vertical-align: middle;
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

nav ul { display: flex; list-style: none; gap: 30px; align-items: center; }
nav a {
    text-decoration: none;
    color: var(--text-sec);
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    transition: all 0.3s ease;
}
nav a:hover { color: var(--brand-primary); }

nav a.active-link {
    color: var(--text-main);
    text-shadow: 0 0 15px rgba(63, 127, 209, 0.4);
    border-bottom: 2px solid var(--brand-primary);
}

.btn-nav-portal {
    background: rgba(63, 127, 209, 0.1);
    color: var(--brand-primary) !important;
    border: 1px solid var(--brand-primary);
    padding: 8px 18px;
    border-radius: 4px;
    font-size: 0.85rem !important;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}
.btn-nav-portal:hover {
    background: var(--brand-primary);
    color: var(--bg-base) !important;
    box-shadow: 0 0 15px rgba(63, 127, 209, 0.35);
}

.menu-toggle {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 1.5rem;
    cursor: pointer;
}

/* --- SELECT Y FORMULARIO MSP --- */
.contact-form select.cf-select {
    width: 100%;
    background: var(--bg-hover);
    border: 1px solid rgba(90, 100, 128, 0.2);
    color: var(--text-main);
    padding: 14px;
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 1rem;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233f7fd1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 16px;
    cursor: pointer;
}
.contact-form select.cf-select option {
    background-color: var(--bg-surface);
    color: var(--text-main);
}
.contact-form select.cf-select:focus {
    outline: none;
    border-color: var(--brand-primary);
}

/* RESPONSIVE */
@media (max-width: 992px) {
    .menu-toggle { display: block; z-index: 1001; }
    nav#main-nav {
        position: fixed;
        top: 0; right: -100%;
        width: 280px; height: 100vh;
        background: rgba(11, 15, 30, 0.98);
        backdrop-filter: blur(15px);
        padding: 100px 30px;
        transition: right 0.4s ease;
        box-shadow: -5px 0 25px rgba(0,0,0,0.5);
        z-index: 1000;
    }
    nav#main-nav.nav-open { right: 0; }
    nav ul { flex-direction: column; align-items: flex-start; gap: 25px; }
    nav a { font-size: 1rem; }
    .btn-nav-portal { width: 100%; justify-content: center; }

    .services-grid, .clients-grid { grid-template-columns: repeat(2, 1fr); }
    .timeline-item { width: 100%; text-align: left; padding-left: 70px; }
    .timeline-container::after { left: 30px; }
    .left::after, .right::after { left: 22px; }
    .left { left: 0; } .right { left: 0; }
    .contact-wrapper { grid-template-columns: 1fr; text-align: center; }
    .contact-item { justify-content: center; }
    #scrub-text { font-size: 2.2rem; padding: 0 20px; }
    .section-title { font-size: 2.5rem; }
    header { padding: 20px; }

    .footer-container { flex-direction: column; gap: 20px; text-align: center; }
}

@media (max-width: 600px) {
    .services-grid, .clients-grid { grid-template-columns: 1fr; }
    .contact-form-wrapper { padding: 30px 20px; }
    #scrub-text { font-size: 1.6rem; }
}

/* --- 5. SECCIONES --- */
section {
    padding: 100px 50px;
    min-height: 80vh;
    display: flex; flex-direction: column; justify-content: center;
    position: relative; z-index: 10;
}

/* --- 6. TEXTO SECUENCIAL (HERO) --- */
.hero-spacer { height: 15vh; }
#scrub-text {
    font-size: 2.8rem;
    text-align: center;
    max-width: 1200px;
    margin: 0 auto 100px auto;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: -1px;
}
.word {
    display: inline-block; opacity: 0.2; filter: blur(4px);
    transition: opacity 0.3s ease, filter 0.3s ease;
    margin-right: 0.2em;
    color: var(--text-sec);
}
.word.active {
    opacity: 1; filter: blur(0); color: var(--text-main);
    text-shadow: 0 0 20px rgba(232, 234, 240, 0.2);
}

/* --- 7. GRID DE SERVICIOS --- */
.services-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
    max-width: 1400px; margin: 0 auto; width: 100%;
}
.flip-card { background: transparent; height: 280px; perspective: 1000px; cursor: pointer; }
.flip-card-inner { position: relative; width: 100%; height: 100%; transition: transform 0.6s; transform-style: preserve-3d; }
.flip-card:hover .flip-card-inner { transform: rotateY(180deg); }

.flip-card-front, .flip-card-back {
    position: absolute; width: 100%; height: 100%; backface-visibility: hidden;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    padding: 30px;
    text-align: center;
    border-radius: 4px;
}

.flip-card-front {
    background-color: var(--bg-surface);
    border: 1px solid rgba(90, 100, 128, 0.2);
    transition: border-color 0.3s;
}
.flip-card:hover .flip-card-front { border-color: var(--brand-primary); }

.flip-card-front h3 {
    font-size: 1.4rem;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--text-main);
}

.flip-card-back {
    background-color: var(--bg-hover);
    transform: rotateY(180deg);
    border: 1px solid var(--brand-primary);
}
.flip-card-back p {
    color: var(--brand-primary);
    font-weight: 500;
    font-size: 1.1rem;
}

/* --- 8. TIMELINE & CLIENTES --- */
.timeline-container { max-width: 1000px; margin: 0 auto; position: relative; padding: 40px 0; }
.timeline-container::after { content: ''; position: absolute; width: 1px; background: var(--text-sec); top: 0; bottom: 0; left: 50%; opacity: 0.3; }

.timeline-item { padding: 10px 40px; position: relative; width: 50%; box-sizing: border-box; }
.timeline-item::after {
    content: ''; position: absolute; width: 16px; height: 16px;
    background: var(--bg-base);
    border: 2px solid var(--brand-primary);
    border-radius: 50%; top: 24px; z-index: 2;
}
.left { left: 0; text-align: right; } .left::after { right: -8px; }
.right { left: 50%; text-align: left; } .right::after { left: -8px; }

.timeline-content {
    padding: 40px;
    background: var(--bg-surface);
    border: 1px solid rgba(90, 100, 128, 0.1);
    border-radius: 4px;
    transition: 0.3s;
}
.timeline-content:hover { border-color: var(--brand-primary); box-shadow: 0 0 20px rgba(63, 127, 209, 0.05); }

.timeline-content h3 { color: var(--text-main); margin-bottom: 15px; font-size: 1.8rem; letter-spacing: -0.5px; }
.timeline-content p { color: var(--text-sec); font-size: 1rem; }

.clients-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; width: 100%; max-width: 1200px; margin: 0 auto; }
.client-box {
    background: var(--bg-surface);
    border: 1px solid rgba(90, 100, 128, 0.1);
    height: 180px;
    display: flex; justify-content: center; align-items: center;
    font-size: 3.5rem;
    color: var(--text-sec);
    transition: 0.4s ease;
    border-radius: 4px;
    overflow: hidden;
}
.client-box img { max-height: 70%; max-width: 70%; object-fit: contain; filter: grayscale(1); opacity: 0.7; transition: 0.4s ease; }
.client-box:hover img { filter: grayscale(0); opacity: 1; }
.client-box:hover {
    color: var(--brand-primary);
    border-color: var(--brand-primary);
    background: var(--bg-hover);
    transform: translateY(-5px);
}

/* --- 9. CONTACTO --- */
.section-title {
    text-align: center; font-size: 4rem; margin-bottom: 80px;
    color: var(--text-main);
    letter-spacing: -2px;
}

.contact-wrapper {
    display: grid; grid-template-columns: 1fr 1fr; gap: 50px;
    background: var(--bg-surface);
    padding: 60px;
    border: 1px solid rgba(90, 100, 128, 0.1);
    border-radius: 4px;
    max-width: 1200px; margin: 0 auto;
    align-items: center;
}

.contact-item { margin-bottom: 20px; font-size: 1.3rem; color: var(--text-sec); display: flex; align-items: center; gap: 15px; }
.contact-item i { color: var(--brand-primary); }
.contact-item a { color: inherit; text-decoration: none; }

.btn-whatsapp-big {
    display: inline-block;
    background: transparent;
    color: var(--brand-primary);
    padding: 18px 40px;
    font-weight: 700;
    border: 1px solid var(--brand-primary);
    border-radius: 4px;
    text-decoration: none;
    margin-top: 20px;
    font-family: var(--font-display);
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: 0.3s;
}
.btn-whatsapp-big:hover {
    background: var(--brand-primary);
    color: var(--bg-base);
    box-shadow: 0 0 20px rgba(63, 127, 209, 0.3);
}

.whatsapp-float {
    position: fixed; bottom: 30px; right: 30px;
    background-color: var(--brand-primary);
    color: var(--bg-base);
    width: 60px; height: 60px; border-radius: 50%;
    display: flex; justify-content: center; align-items: center;
    font-size: 2rem; z-index: 2000; text-decoration: none;
    box-shadow: 0 4px 20px rgba(63, 127, 209, 0.4);
    transition: transform 0.3s;
}
.whatsapp-float:hover { transform: scale(1.1); }

/* --- FORMULARIO DE CONTACTO --- */
.contact-form-wrapper {
    max-width: 700px;
    margin: 50px auto 0 auto;
    background: var(--bg-surface);
    border: 1px solid rgba(90, 100, 128, 0.1);
    border-radius: 4px;
    padding: 50px;
}
.contact-form-title {
    text-align: center;
    margin-bottom: 30px;
    color: var(--text-main);
    font-family: var(--font-display);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 1.3rem;
}
.contact-form .cf-field { margin-bottom: 18px; }
.contact-form label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-sec);
    font-size: 0.9rem;
}
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
    width: 100%;
    background: var(--bg-hover);
    border: 1px solid rgba(90, 100, 128, 0.2);
    color: var(--text-main);
    padding: 14px;
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 1rem;
    resize: vertical;
}
.contact-form input:focus, .contact-form textarea:focus {
    outline: none;
    border-color: var(--brand-primary);
}
.human-check { display: none !important; }
.contact-form .g-recaptcha { transform: scale(1); transform-origin: 0 0; margin-bottom: 10px; }

.contact-form button[type="submit"] {
    background: var(--brand-primary);
    color: #fff;
    border: none;
    padding: 14px 30px;
    border-radius: 4px;
    font-family: var(--font-display);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
}
.contact-form button[type="submit"]:hover { box-shadow: 0 0 20px rgba(63, 127, 209, 0.3); }
.contact-form button[type="submit"]:disabled { opacity: 0.5; cursor: not-allowed; }

.form-msg { margin-top: 15px; font-weight: 600; display: none; }
.form-msg.ok { display: block; color: #4ade80; }
.form-msg.error { display: block; color: var(--brand-secondary); }

.hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; }

.reveal { opacity: 0; transform: translateY(40px); transition: all 0.8s ease; }
.reveal.active { opacity: 1; transform: translateY(0); }

/* --- 10. FOOTER --- */
footer {
    border-top: 1px solid rgba(90, 100, 128, 0.2);
    padding: 50px;
    background-color: var(--bg-surface);
    position: relative;
    z-index: 100;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-logo { font-size: 1.8rem; }

.copyright {
    color: var(--text-sec);
    font-size: 0.9rem;
    font-family: var(--font-body);
}
