/* Variables CSS para consistencia */
:root {
    --primary-color: #007aff; /* Azul de Apple/Samsung */
    --secondary-color: #5ac8fa; /* Azul claro */
    --gris-oscuro: #303030;
    --gris-oscuro_10:#3030301a;
    --dark-text: #1c1c1e; /* Negro casi puro */
    --light-text: #f0f0f0;
    --background-light: #ffffff;
    --background-dark: #f5f5f7; /* Gris claro para secciones */
    --border-color: #e0e0e0;
    --font-family-sans: 'San Francisco', 'Helvetica Neue', 'Segoe UI', sans-serif; /* Fuentes inspiradas en sistemas operativos */
    --header-height: 80px;
    --spacing-unit: 16px;
}

/* Reset Básico y Tipografía */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none;
}

html {
    scroll-behavior: smooth; /* Desplazamiento suave para anclas */
}

body {
    font-family: var(--font-family-sans);
    line-height: 1.6;
    color: var(--dark-text);
    background-color: var(--background-light);
    -webkit-font-smoothing: antialiased; /* Suavizado de fuentes */
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: color 0.3s ease;
}

a:hover {
    color: var(--secondary-color);
}

h1, h2, h3, h4 {
    margin-bottom: var(--spacing-unit);
    font-weight: 700;
    color: var(--dark-text);
}

h1 {
    font-size: 3.2em;
    line-height: 1.1;
    letter-spacing: -0.03em;
}

h2 {
    font-size: 2.5em;
    letter-spacing: -0.02em;
}

h3 {
    font-size: 1.8em;
}

p {
    margin-bottom: var(--spacing-unit);
    font-size: 1.1em;
    line-height: 1.8;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.main-header {
    background-color: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 15px 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
}

.logo-link {
    display: flex;
    align-items: center;
    color: var(--dark-text);
    font-size: 1.6em;
    font-weight: 600;
}

.header-logo {
    height: 40px; /* Ajusta el tamaño del logo */
    margin-right: 10px;
}

.main-nav ul {
    list-style: none;
    display: flex;
}

.main-nav ul li {
    margin-left: 30px;
}

.main-nav ul li a {
    font-weight: 500;
    font-size: 1.05em;
    color: var(--dark-text);
    position: relative;
    padding-bottom: 5px; /* Espacio para el subrayado */
}

.main-nav ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.main-nav ul li a:hover::after,
.main-nav ul li a.active::after {
    width: 100%;
}


/* Secciones Generales */
section {
    padding: 80px 0;
    text-align: center;
}

section:nth-of-type(even) {
    background-color: var(--background-dark);
}

.tagline {
    font-size: 1.3em;
    color: #555;
    margin-bottom: 40px;
    font-weight: 300;
    line-height: 1.5;
}

.cta-button {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--light-text);
    padding: 15px 30px;
    border-radius: 30px;
    font-size: 1.1em;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 4px 15px rgba(0, 122, 255, 0.2);
    margin-top: 20px;
}

.cta-button:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
    color: var(--dark-text);
}

.secondary-cta {
    background-color: #e0e0e0;
    color: var(--dark-text);
    box-shadow: none;
}

.secondary-cta:hover {
    background-color: #d0d0d0;
    color: var(--dark-text);
}


/* Hero Section */
.hero-section {
    background: linear-gradient(0deg, var(--background-light) 0%, var(--background-dark) 100%);
    padding: 80px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 70vh; /* Ocupa al menos el 70% del viewport height */
}

.hero-content {
    max-width: 900px;
    margin: 0 auto;
}

.main-logo {
    max-width: 300px; /* Ajusta el tamaño del logo principal */
    height: auto;
    margin-bottom: 30px;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.08)); /* Sombra suave para el logo */
}
.text-content {
    color: #334155;
    line-height: 1.5;
    margin-bottom: 1rem;
    white-space: pre-wrap;
}

/* ESTILOS CLAVE PARA LA TRANSICIÓN DE CADA LETRA */
/* Estilos iniciales para cada 'span' que contendrá una letra. */
.text-content span.letter-fade-in {
    opacity: 0; /* Inicialmente invisible */
    /* Transición de opacidad para cada letra, dura 0.4 segundos con un efecto suave. */
    transition: opacity 1s ease-out;
    /* Es esencial para que la transición funcione correctamente en caracteres individuales */
    display: inline-block;
}

/* Clase para hacer que una letra individual sea visible. */
.text-content span.show-letter {
    opacity: 1; /* Visible */
}

.hero-content h1 {
    font-size: 4.5em;
    margin-bottom: 20px;
    color: var(--dark-text);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.hero-content .tagline {
    font-size: 1.5em;
    color: #666;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* About Section */
.about-section {
    background-color: var(--background-light);
}

/* Services Section */
.services-section {
    background-color: var(--background-dark);
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    margin-top: 60px;
    text-align: left;
}

.service-item {
    background-color: #fff;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.service-item h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.6em;
}

.service-item p {
    font-size: 1em;
    color: #555;
    line-height: 1.7;
}

/* Portfolio Section (Software Logos) */
.portfolio-section {
    background-color: var(--background-light);
    box-shadow: 
        inset 0 -10px 30px rgba(0, 0, 0, 0.1),
        inset 0 10px 30px rgba(0, 0, 0, 0.1);
}

.software-logos-grid {
    /* display: grid; */
    /* grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); */
    /* grid-template-columns: repeat(4, 1fr); */
    /* grid-gap: 10px; */
    margin: 60px 0;
    /* justify-items: center; */
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.logo-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-self: center;
    text-align: center;
    padding: 20px;
    height: 180px;
    width: 180px;
    background-color: transparent;
    border-radius: 10px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    transition: all 0.3s ease-in-out;
    opacity: 0.5;
}
.logo-item:nth-child(5) {
    grid-column-start: 2;
}

.logo-item:hover {
    transform: translateY(-5px);
    /* box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08); */
    /* box-shadow: 0 5px 20px rgba(0, 0, 0, 0.04); */
    /* background-color: #fff; */
    cursor: pointer;
    opacity: 1;
}

.logo-item img {
    max-width: 120px;
    height: auto;
    margin-bottom: 15px;
    margin: auto;
    filter: grayscale(0); /* Para un look más minimalista */
    transition: filter 0.3s ease;
}

.logo-item:hover img {
    filter: grayscale(0%); /* Color al pasar el mouse */
}

.logo-item p {
    font-size: 0.95em;
    color: #555;
    font-weight: 500;
    margin-bottom: 0;
    /* display: none; */
    position: absolute;
    transform: translateY(80px);
    opacity: 0;
    transition: all 0.3s ease-in-out;
}
.logo-item:hover p {
    opacity: 1;
    transform: translateY(130px);
}


/* Contact Section */
.contact-section {
    background-color: var(--background-dark);
    padding-bottom: 100px;
}

.contact-form {
    max-width: 600px;
    margin: 40px auto 0;
    background-color: #fff;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    text-align: left;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--dark-text);
    font-size: 1.05em;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1em;
    color: var(--dark-text);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
    outline: none;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.contact-form .cta-button {
    width: 100%;
    border: none;
    cursor: pointer;
    font-size: 1.2em;
    padding: 18px 0;
}


/* Footer */
.main-footer {
    background-color: var(--dark-text);
    color: var(--light-text);
    padding: 60px 0 20px;
    font-size: 0.95em;
}

.footer-sections {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto 40px;
    padding: 0 20px;
    text-align: left;
}
.footer-logo {
    height: 30px;
    margin-bottom: 10px;
}
.footer-column h3,
.footer-column h4 {
    color: var(--light-text);
    margin-bottom: 20px;
    font-weight: 600;
}

.footer-column p {
    color: #bbb;
    margin-bottom: 10px;
    line-height: 1.8;
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 10px;
}

.footer-column ul li a {
    color: #bbb;
    transition: color 0.3s ease;
}

.footer-column ul li a:hover {
    color: var(--primary-color);
}
.footer_wp { color: #bbb; }
.footer_wp:hover { color: var(--primary-color); }

.newsletter-form {
    display: flex;
    margin-top: 15px;
}

.newsletter-form input[type="email"] {
    flex-grow: 1;
    padding: 12px 15px;
    border: 1px solid #555;
    border-radius: 8px 0 0 8px;
    background-color: #333;
    color: var(--light-text);
    font-size: 0.9em;
}

.newsletter-form input[type="email"]::placeholder {
    color: #888;
}

.newsletter-form button {
    padding: 12px 20px;
    background-color: var(--primary-color);
    color: var(--light-text);
    border: none;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.newsletter-form button:hover {
    background-color: var(--secondary-color);
}

.social-links {
    margin-top: 20px;
    display: flex;
    gap: 15px;
}
.social-links i { font-size: 20pt; }
.social-links a {
    color: var(--background-dark);
    opacity: 0.5;
    transition: all .3s ease-in-out;
}
.social-links a:hover {
    filter: grayscale(0%) brightness(100%);
    transform: translateY(-3px);
    color: var(--primary-color);
    opacity: 1;
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid #333;
    padding-top: 20px;
    margin-top: 40px;
    color: #999;
}

/* Responsividad Básica */
@media (max-width: 900px) {
    .main-nav ul li {
        margin-left: 20px;
    }

    .hero-content h1 {
        font-size: 3.5em;
    }

    .hero-content .tagline {
        font-size: 1.2em;
    }

    h2 {
        font-size: 2em;
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        padding: 0 20px;
    }

    .main-nav {
        margin-top: 15px;
    }

    .main-nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }

    .main-nav ul li {
        margin: 5px 15px;
    }

    section {
        padding: 60px 0;
    }

    .hero-section {
        padding: 80px 0;
        min-height: auto;
    }

    .hero-content h1 {
        font-size: 2.8em;
    }

    .hero-content .tagline {
        font-size: 1.1em;
    }

    .service-grid,
    .software-logos-grid,
    .footer-sections {
        grid-template-columns: 1fr;
        gap: 25px;
        padding: 0 20px;
    }

    .footer-column {
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }

    .newsletter-form {
        max-width: 350px;
        margin-left: auto;
        margin-right: auto;
    }
}

@media (max-width: 480px) {
    .logo-link {
        font-size: 1.4em;
    }

    .header-logo {
        height: 35px;
    }

    .hero-content h1 {
        font-size: 2.2em;
    }

    .hero-content .tagline {
        font-size: 1em;
    }

    .cta-button {
        padding: 12px 25px;
        font-size: 1em;
    }

    h2 {
        font-size: 1.8em;
    }
    p {
        font-size: 0.95em;
    }

    .form-group label {
        font-size: 1em;
    }
}
