/* ============================================
   NEURALDEV — Estilo inspirado en wowrack.com
   Paleta navy + orange, tema claro corporativo
   ============================================ */

/* ─── CSS Variables ─────────────────────────── */
:root {
    --color-navy:          #202945;
    --color-navy-light:    #2d3a5c;
    --color-orange:        #ff7f40;
    --color-orange-hover:  #e66930;
    --color-blue:          #1a9fda;
    --color-cyan:          #00bcd4;
    --color-white:         #ffffff;
    --color-dark:          #34343c;
    --color-gray:          #606060;
    --color-light-gray:    #eceeef;
    --color-pale-blue:     #eaf0f3;
    --color-border:        rgba(0, 0, 0, 0.08);

    --font-primary:   'Montserrat', Arial, sans-serif;
    --font-secondary: 'Nunito', Arial, sans-serif;

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 20px;
    --radius-pill: 50px;

    --transition: 0.3s ease;
    --shadow-card: 0 5px 20px rgba(0, 0, 0, 0.06);
    --shadow-card-hover: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* ─── Reset & Base ─────────────────────────── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-secondary);
    background-color: var(--color-white);
    color: var(--color-dark);
    font-size: 15px;
    font-weight: 300;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--color-dark);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--color-orange);
}

ul {
    list-style: none;
}

/* ─── Container ────────────────────────────── */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ─── Header ───────────────────────────────── */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--color-white);
    border-bottom: 1px solid var(--color-border);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.logo {
    font-family: var(--font-primary);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-navy);
    transition: color var(--transition);
}

.logo span {
    color: var(--color-orange);
}

.logo:hover {
    color: var(--color-orange);
}

.main-nav ul {
    display: flex;
    gap: 28px;
}

.main-nav a {
    font-family: var(--font-primary);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-navy);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 6px 0;
    position: relative;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--color-orange);
}

.main-nav a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--color-orange);
    border-radius: 2px;
}

.btn-cta-header {
    padding: 10px 22px;
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-navy);
    border-radius: 2px;
    transition: var(--transition);
}

/* ─── Buttons ──────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-primary);
    font-weight: 600;
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition);
    padding: 12px 28px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-accent {
    background: var(--color-navy);
    color: var(--color-white);
    border-color: var(--color-navy);
}

.btn-accent:hover {
    background: var(--color-orange);
    border-color: var(--color-orange);
    color: var(--color-white);
}

.btn-outline {
    background: transparent;
    color: var(--color-navy);
    border-color: var(--color-navy);
}

.btn-outline:hover {
    background: var(--color-navy);
    color: var(--color-white);
}

.btn-lg {
    padding: 15px 32px;
    font-size: 1rem;
}

.btn-link {
    color: var(--color-navy);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-link:hover {
    color: var(--color-orange);
}

/* ─── Sections ─────────────────────────────── */
.section {
    padding: 80px 0;
}

.section:nth-child(even) {
    background: var(--color-light-gray);
}

.section-title {
    font-family: var(--font-primary);
    font-size: 2.2rem;
    font-weight: 300;
    text-align: center;
    margin-bottom: 8px;
    color: var(--color-dark);
}

.section-desc {
    text-align: center;
    color: var(--color-gray);
    max-width: 680px;
    margin: 0 auto 48px;
    font-size: 1.05rem;
    font-weight: 300;
}

.highlight {
    color: var(--color-orange);
    font-weight: 400;
}

.section-cta {
    text-align: center;
    margin-top: 48px;
}

.section-cta p {
    color: var(--color-gray);
    margin-bottom: 16px;
}

/* ─── Section Divider (wowrack signature) ──── */
.section-divider {
    height: 5px;
    background: linear-gradient(to right, var(--color-navy) 0%, var(--color-orange) 40%, var(--color-white) 100%);
    opacity: 0.9;
    margin: 0 auto;
    max-width: 80%;
}

/* ─── Hero ──────────────────────────────────── */
.hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 108px;
    position: relative;
    overflow: hidden;
    background: var(--color-navy);
}

body.alert-closed .hero {
    padding-top: 72px;
}

.hero-bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.15;
    pointer-events: none;
    z-index: 0;
}

.hero-content {
    text-align: center;
    position: relative;
    z-index: 2;
}

.hero-content h1 {
    font-family: var(--font-primary);
    font-size: 3rem;
    font-weight: 300;
    line-height: 1.25;
    margin-bottom: 16px;
    color: var(--color-white);
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--color-orange);
    font-weight: 500;
    margin-bottom: 12px;
}

.hero-text {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.75);
    max-width: 620px;
    margin: 0 auto 36px;
    font-weight: 300;
}

.hero-ctas {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-ctas .btn-accent {
    background: var(--color-orange);
    border-color: var(--color-orange);
    color: var(--color-white);
}

.hero-ctas .btn-accent:hover {
    background: var(--color-orange-hover);
    border-color: var(--color-orange-hover);
}

.hero-ctas .btn-outline {
    color: var(--color-white);
    border-color: rgba(255, 255, 255, 0.5);
}

.hero-ctas .btn-outline:hover {
    background: var(--color-white);
    color: var(--color-navy);
    border-color: var(--color-white);
}

/* ─── Cards Grid ────────────────────────────── */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.card {
    background: var(--color-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: all var(--transition);
    padding: 0;
}

.card:hover {
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-4px);
}

.card .card-img {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.card .card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    transition: transform 0.5s ease;
}

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

.card .card-body {
    padding: 24px;
}

.card .card-body .card-icon {
    font-size: 2rem;
    margin-bottom: 12px;
}

.card-icon {
    font-size: 2rem;
    margin-bottom: 12px;
}

.card h3 {
    font-family: var(--font-primary);
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 10px;
    color: var(--color-dark);
}

.card p {
    color: var(--color-gray);
    font-size: 0.9rem;
    font-weight: 300;
    line-height: 1.6;
}

/* ─── Tecnología ────────────────────────────── */
.tech-card {
    text-align: center;
    padding: 0;
    background: var(--color-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: all var(--transition);
}

.tech-card:hover {
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-4px);
}

.tech-card-img {
    width: 100%;
    height: 180px;
    overflow: hidden;
}

.tech-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    transition: transform 0.5s ease;
}

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

.tech-card-body {
    padding: 24px;
}

.tech-card-body .card-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.tech-card-body h3 {
    font-family: var(--font-primary);
    font-size: 1.15rem;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--color-dark);
}

.tech-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.tech-tag {
    display: inline-block;
    background: rgba(26, 159, 218, 0.1);
    color: var(--color-blue);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    margin-bottom: 14px;
}

.tech-features {
    margin-top: 14px;
    text-align: left;
}

.tech-features li {
    color: var(--color-gray);
    font-size: 0.85rem;
    font-weight: 300;
    padding: 5px 0;
    padding-left: 18px;
    position: relative;
}

.tech-features li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--color-orange);
}

.tech-extra {
    margin-top: 48px;
    text-align: center;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    padding: 40px;
}

.tech-extra h3 {
    font-family: var(--font-primary);
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 12px;
    color: var(--color-dark);
}

.tech-extra p {
    color: var(--color-gray);
    max-width: 600px;
    margin: 0 auto;
    font-weight: 300;
}

/* ─── Proyectos ─────────────────────────────── */
.proyectos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.proyecto-card {
    background: var(--color-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: all var(--transition);
    display: flex;
    flex-direction: column;
}

.proyecto-card:hover {
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-4px);
}

.proyecto-card-img {
    width: 100%;
    height: 200px;
    overflow: hidden;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.proyecto-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    transition: transform 0.5s ease;
}

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

.proyecto-card-body {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.proyecto-metrica {
    font-family: var(--font-primary);
    font-size: 1.6rem;
    font-weight: 500;
    margin-bottom: 12px;
    color: var(--color-dark);
}

.proyecto-metrica .highlight {
    color: var(--color-orange);
}

.proyecto-card h3 {
    font-family: var(--font-primary);
    font-size: 1.15rem;
    font-weight: 500;
    margin-bottom: 10px;
    color: var(--color-dark);
}

.proyecto-card p {
    color: var(--color-gray);
    font-size: 0.85rem;
    font-weight: 300;
    margin-bottom: 14px;
    flex: 1;
}

.proyecto-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: auto;
}

.tag {
    display: inline-block;
    background: var(--color-navy);
    color: var(--color-white);
    font-family: var(--font-primary);
    font-size: 0.7rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: background var(--transition);
}

.tag:hover {
    background: var(--color-orange);
}

.tag-outline {
    background: transparent;
    color: var(--color-navy);
    border: 1px solid var(--color-navy);
}

.tag-outline:hover {
    background: var(--color-navy);
    color: var(--color-white);
}

.proyecto-resultado {
    background: rgba(26, 159, 218, 0.05);
    border-left: 3px solid var(--color-blue);
    padding: 10px 14px;
    border-radius: 0 6px 6px 0;
    margin: 10px 0;
    font-size: 0.82rem;
    color: var(--color-gray);
    font-weight: 300;
}

.proyecto-resultado strong {
    color: var(--color-navy);
    font-weight: 600;
}

/* ─── Blog ──────────────────────────────────── */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 28px;
}

.blog-card {
    background: var(--color-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: all var(--transition);
    position: relative;
}

.blog-card:hover {
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-4px);
}

.blog-card-link {
    display: block;
    color: inherit;
}

.blog-card-link:hover {
    color: inherit;
}

.blog-card-img {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.blog-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    transition: transform 0.5s ease;
}

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

.blog-card-body {
    padding: 24px;
    position: relative;
    z-index: 2;
}

.blog-card-body .tag {
    display: inline-block;
    margin-bottom: 10px;
}

.blog-card-body time {
    display: block;
    color: var(--color-gray);
    font-size: 0.8rem;
    font-weight: 300;
    margin-bottom: 10px;
}

.blog-card-body h3 {
    font-family: var(--font-primary);
    font-size: 1.05rem;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--color-dark);
    line-height: 1.4;
    transition: color var(--transition);
}

.blog-card-body h3:hover {
    color: var(--color-orange);
}

.blog-card-body .btn-link {
    margin-top: 10px;
}

/* ─── Artículo Individual ───────────────────── */
.articulo-container {
    max-width: 800px;
}

.articulo-header {
    margin-bottom: 32px;
}

.articulo-header h1 {
    font-family: var(--font-primary);
    font-size: 2.2rem;
    font-weight: 400;
    margin: 12px 0;
    color: var(--color-dark);
}

.articulo-meta {
    color: var(--color-gray);
    font-size: 0.9rem;
    font-weight: 300;
    display: flex;
    gap: 16px;
}

.articulo-img {
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 32px;
}

.articulo-contenido {
    color: var(--color-gray);
    font-size: 1rem;
    font-weight: 300;
    line-height: 1.8;
}

.articulo-contenido h2 {
    font-family: var(--font-primary);
    font-size: 1.5rem;
    font-weight: 500;
    margin: 36px 0 16px;
    color: var(--color-dark);
}

.articulo-contenido h3 {
    font-family: var(--font-primary);
    font-size: 1.2rem;
    font-weight: 500;
    margin: 24px 0 12px;
    color: var(--color-dark);
}

.articulo-contenido p {
    margin-bottom: 16px;
}

.articulo-contenido code {
    background: var(--color-light-gray);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.9em;
    color: var(--color-navy);
}

.articulo-nav {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--color-border);
}

.articulo-error {
    text-align: center;
    padding: 80px 0;
}

.articulo-error h1 {
    font-family: var(--font-primary);
    font-size: 2rem;
    font-weight: 500;
    margin-bottom: 12px;
    color: var(--color-dark);
}

.articulo-error p {
    color: var(--color-gray);
    margin-bottom: 24px;
}

/* ─── Contacto ──────────────────────────────── */
.contacto-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 48px;
    align-items: start;
}

.contacto-detalles {
    margin-top: 32px;
}

.contacto-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
}

.contacto-icon {
    font-size: 1.5rem;
    min-width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(32, 41, 69, 0.05);
    border-radius: var(--radius-sm);
}

.contacto-item strong {
    display: block;
    font-size: 0.85rem;
    color: var(--color-gray);
    margin-bottom: 2px;
    font-family: var(--font-primary);
    font-weight: 600;
}

.contacto-item a {
    color: var(--color-navy);
    font-weight: 400;
}

.contacto-item a:hover {
    color: var(--color-orange);
}

/* ─── Formulario ────────────────────────────── */
.contacto-form {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    padding: 36px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-family: var(--font-primary);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-gray);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-dark);
    font-family: var(--font-secondary);
    font-size: 0.95rem;
    font-weight: 300;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-navy);
    box-shadow: 0 0 0 3px rgba(32, 41, 69, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.btn-submit {
    width: 100%;
}

.contacto-feedback {
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-family: var(--font-primary);
    font-size: 0.85rem;
    font-weight: 500;
    display: none;
    text-align: center;
}

.feedback-success {
    display: block;
    background: rgba(26, 159, 218, 0.1);
    color: var(--color-blue);
    border: 1px solid rgba(26, 159, 218, 0.3);
}

.feedback-error {
    display: block;
    background: rgba(255, 127, 64, 0.08);
    color: var(--color-orange);
    border: 1px solid rgba(255, 127, 64, 0.3);
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ─── Footer ────────────────────────────────── */
.site-footer {
    background: var(--color-navy);
    padding: 60px 0 0;
    color: rgba(255, 255, 255, 0.8);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
    padding-bottom: 40px;
}

.footer-brand h3 {
    font-family: var(--font-primary);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--color-white);
}

.footer-brand h3 span {
    color: var(--color-orange);
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.9rem;
    font-weight: 300;
    margin-bottom: 12px;
    max-width: 300px;
}

.footer-email a {
    color: var(--color-orange);
    font-weight: 400;
}

.footer-email a:hover {
    color: var(--color-white);
}

.footer-social {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
    transition: all var(--transition);
}

.footer-social a:hover {
    background: var(--color-orange);
    color: var(--color-white);
}

.footer-links h4,
.footer-contact h4 {
    font-family: var(--font-primary);
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--color-white);
}

.footer-links ul li {
    margin-bottom: 8px;
}

.footer-links a,
.footer-contact a {
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.9rem;
    font-weight: 300;
}

.footer-links a:hover,
.footer-contact a:hover {
    color: var(--color-orange);
}

.footer-contact p {
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.9rem;
    margin-bottom: 8px;
    font-weight: 300;
}

.footer-cta {
    text-align: center;
}

.footer-cta p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 16px;
    font-size: 0.95rem;
    font-weight: 300;
}

.footer-cta .btn-accent {
    background: var(--color-orange);
    border-color: var(--color-orange);
}

.footer-cta .btn-accent:hover {
    background: var(--color-white);
    border-color: var(--color-white);
    color: var(--color-navy);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px 0;
}

.footer-bottom .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.8rem;
    font-weight: 300;
}

.footer-bottom a {
    color: rgba(255, 255, 255, 0.4);
}

.footer-bottom a:hover {
    color: var(--color-orange);
}

/* ─── 404 ───────────────────────────────────── */
.page-404 {
    text-align: center;
    min-height: 60vh;
    display: flex;
    align-items: center;
}

.error-code {
    font-family: var(--font-primary);
    font-size: 7rem;
    color: var(--color-navy);
    line-height: 1;
    margin-bottom: 16px;
    font-weight: 300;
}

.page-404 h2 {
    font-family: var(--font-primary);
    font-size: 1.8rem;
    font-weight: 500;
    margin-bottom: 12px;
    color: var(--color-dark);
}

.page-404 p {
    color: var(--color-gray);
    margin-bottom: 32px;
    font-weight: 300;
}

/* ═══════════════════════════════════════════════
   ANIMACIONES Y EFECTOS
   ═══════════════════════════════════════════════ */

/* ─── Hero reveal animation ─────────────────── */
.hero-content h1 {
    animation: fadeInUp 0.8s ease-out;
}

.hero-subtitle {
    animation: fadeInUp 0.8s ease-out 0.15s both;
}

.hero-text {
    animation: fadeInUp 0.8s ease-out 0.3s both;
}

.hero-ctas {
    animation: fadeInUp 0.8s ease-out 0.45s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ─── Section reveal on scroll ──────────────── */
.section {
    opacity: 0;
    transform: translateY(20px);
    animation: sectionReveal 0.7s ease-out forwards;
}

.section:nth-child(1) { animation-delay: 0.1s; }
.section:nth-child(2) { animation-delay: 0.2s; }
.section:nth-child(3) { animation-delay: 0.3s; }
.section:nth-child(4) { animation-delay: 0.4s; }

@keyframes sectionReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ─── Button hover effect ───────────────────── */
.btn-accent {
    position: relative;
    overflow: hidden;
}

.btn-accent::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.08);
    opacity: 0;
    transition: opacity var(--transition);
    pointer-events: none;
}

.btn-accent:hover::after {
    opacity: 1;
}

/* ─── Card hover effect ─────────────────────── */
.card,
.tech-card,
.proyecto-card,
.servicio-card {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* ─── Newsletter CTA ────────────────────────── */
.newsletter-cta {
    background: var(--color-navy);
    border-radius: var(--radius-lg);
    padding: 70px 60px;
    text-align: center;
    margin: 40px 0;
    position: relative;
    overflow: hidden;
}

.newsletter-cta::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -20%;
    width: 60%;
    height: 160%;
    background: radial-gradient(circle, rgba(255, 127, 64, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.newsletter-cta h2 {
    font-family: var(--font-primary);
    font-size: 2.2rem;
    font-weight: 500;
    line-height: 1.3;
    color: var(--color-white);
    margin-bottom: 14px;
    position: relative;
    z-index: 1;
}

.newsletter-cta p {
    color: rgba(255, 255, 255, 0.7);
    max-width: 500px;
    margin: 0 auto 24px;
    font-size: 1rem;
    font-weight: 300;
    position: relative;
    z-index: 1;
}

.newsletter-cta .btn-accent {
    background: var(--color-orange);
    border-color: var(--color-orange);
    font-size: 1rem;
    padding: 15px 36px;
    position: relative;
    z-index: 1;
}

.newsletter-cta .btn-accent:hover {
    background: var(--color-white);
    border-color: var(--color-white);
    color: var(--color-navy);
}

.newsletter-cta .btn-outline {
    color: var(--color-white);
    border-color: rgba(255, 255, 255, 0.4);
    position: relative;
    z-index: 1;
}

.newsletter-cta .btn-outline:hover {
    background: var(--color-white);
    color: var(--color-navy);
    border-color: var(--color-white);
}

/* ─── Servicio Card ─────────────────────────── */
.servicio-card {
    background: var(--color-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: all var(--transition);
}

.servicio-card:hover {
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-4px);
}

.servicio-card-img {
    width: 100%;
    height: 180px;
    overflow: hidden;
}

.servicio-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    transition: transform 0.5s ease;
}

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

.servicio-card-body {
    padding: 24px;
    text-align: center;
}

.servicio-card-body .card-icon {
    font-size: 2rem;
    margin-bottom: 12px;
}

.servicio-card-body h3 {
    font-family: var(--font-primary);
    font-size: 1.15rem;
    font-weight: 500;
    margin-bottom: 10px;
    color: var(--color-dark);
}

.servicio-card-body p {
    color: var(--color-gray);
    font-size: 0.85rem;
    font-weight: 300;
    line-height: 1.6;
}

/* ─── Featured card ─────────────────────────── */
.featured-card {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

.featured-card .proyecto-card-img {
    height: 350px;
    border-radius: var(--radius-md) 0 0 var(--radius-md);
}

.featured-card .proyecto-card-body {
    padding: 40px;
    justify-content: center;
}

.featured-card .proyecto-card-body h3 {
    font-size: 1.5rem;
    font-weight: 400;
}

/* ─── Load More button ──────────────────────── */
.btn-load-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-primary);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-navy);
    background: transparent;
    border: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: color var(--transition);
    padding: 0;
}

.btn-load-more:hover {
    color: var(--color-orange);
}

/* ─── Highlight underline ───────────────────── */
.highlight {
    position: relative;
}

.section-title .highlight::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--color-orange);
    opacity: 0.6;
}

/* ─── Smooth page transition ────────────────── */
.site-main {
    animation: mainFadeIn 0.5s ease-out;
}

@keyframes mainFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ─── Alert Bar ─────────────────────────────── */
.alert-bar {
    background: var(--color-orange);
    color: var(--color-white);
    padding: 8px 0;
    font-family: var(--font-primary);
    font-size: 0.85rem;
    font-weight: 500;
    position: relative;
    z-index: 1001;
    transition: all 0.3s ease;
}

.alert-bar .container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.alert-bar.collapsed {
    padding: 0;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
}

.alert-cta {
    color: var(--color-white);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.alert-cta:hover {
    color: var(--color-navy);
}

.alert-close {
    background: none;
    border: none;
    color: var(--color-white);
    font-size: 1.3rem;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    opacity: 0.7;
    transition: opacity var(--transition);
}

.alert-close:hover {
    opacity: 1;
}

/* ─── Stats Counters Strip ──────────────────── */
.stats-strip {
    background: var(--color-navy);
    padding: 70px 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    text-align: center;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.stat-icon {
    color: rgba(255, 255, 255, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px;
}

.stat-number {
    font-family: var(--font-primary);
    font-size: 3rem;
    font-weight: 500;
    color: var(--color-white);
    line-height: 1.1;
}

.stat-label {
    font-family: var(--font-primary);
    font-size: 1rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ─── Clients / Tech Carousel ───────────────── */
.clients-section {
    background: var(--color-white);
    padding: 60px 0 80px;
}

.clients-carousel-track {
    overflow: hidden;
    mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
}

.clients-carousel {
    display: flex;
    gap: 48px;
    animation: scrollClients 30s linear infinite;
    width: max-content;
    padding: 20px 0;
}

.client-logo {
    font-family: var(--font-primary);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-gray);
    white-space: nowrap;
    padding: 12px 24px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-light-gray);
    transition: all var(--transition);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.client-logo:hover {
    color: var(--color-orange);
    border-color: var(--color-orange);
}

@keyframes scrollClients {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ─── Mobile Nav Transition ─────────────────── */
@media (max-width: 768px) {
    .main-nav {
        display: block;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--color-white);
        border-bottom: 1px solid var(--color-border);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transition: max-height 0.35s ease, opacity 0.35s ease, padding 0.35s ease;
        padding: 0 24px;
        pointer-events: none;
    }

    [data-theme="dark"] .main-nav {
        background: #0f1525;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 16px;
    }

    .main-nav a {
        font-size: 0.9rem;
    }

    .main-nav.open {
        max-height: 400px;
        opacity: 1;
        padding: 16px 24px;
        pointer-events: auto;
    }

    .menu-toggle.open span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .menu-toggle.open span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.open span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }
}

/* ─── Form Validation Errors ────────────────── */
.form-group .form-error {
    display: none;
    font-size: 0.78rem;
    color: var(--color-orange);
    margin-top: 4px;
    font-weight: 400;
}

.input-error {
    border-color: var(--color-orange) !important;
    box-shadow: 0 0 0 3px rgba(255, 127, 64, 0.1) !important;
}

/* ═══════════════════════════════════════════════
   DARK MODE
   ═══════════════════════════════════════════════ */
[data-theme="dark"] {
    --color-navy:          #1b2540;
    --color-navy-light:    #263152;
    --color-white:         #0f1525;
    --color-dark:          #e0e0e0;
    --color-gray:          #8890a4;
    --color-light-gray:    #1a1f35;
    --color-pale-blue:     #1e2746;
    --color-border:        rgba(255, 255, 255, 0.08);
    --shadow-card:         0 4px 16px rgba(0, 0, 0, 0.3);
    --shadow-card-hover:   0 8px 30px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] body {
    background-color: var(--color-white);
}

[data-theme="dark"] .site-header {
    background: #0f1525;
    border-bottom-color: var(--color-border);
}

[data-theme="dark"] .main-nav a {
    color: var(--color-dark);
}

[data-theme="dark"] .logo {
    color: var(--color-dark);
}

[data-theme="dark"] .menu-toggle span {
    background: var(--color-dark);
}

[data-theme="dark"] .card,
[data-theme="dark"] .tech-card,
[data-theme="dark"] .proyecto-card,
[data-theme="dark"] .servicio-card,
[data-theme="dark"] .blog-card {
    background: #1e2746;
}

[data-theme="dark"] .tech-extra,
[data-theme="dark"] .contacto-form {
    background: #1e2746;
}

[data-theme="dark"] .form-group input,
[data-theme="dark"] .form-group textarea {
    background: #0f1525;
    color: var(--color-dark);
}

[data-theme="dark"] .btn-outline {
    border-color: rgba(255, 255, 255, 0.3);
    color: var(--color-dark);
}

[data-theme="dark"] .btn-outline:hover {
    background: var(--color-dark);
    color: #0f1525;
    border-color: var(--color-dark);
}

[data-theme="dark"] .btn-link {
    color: var(--color-dark);
}

[data-theme="dark"] .btn-link:hover {
    color: var(--color-orange);
}

[data-theme="dark"] .tag-outline {
    border-color: rgba(255, 255, 255, 0.3);
    color: var(--color-dark);
}

[data-theme="dark"] .tag-outline:hover {
    background: var(--color-dark);
    color: #0f1525;
}

[data-theme="dark"] .proyecto-resultado {
    background: rgba(26, 159, 218, 0.08);
}

[data-theme="dark"] .tech-tag {
    background: rgba(26, 159, 218, 0.15);
}

[data-theme="dark"] .client-logo {
    background: #1e2746;
    border-color: var(--color-border);
    color: var(--color-gray);
}

[data-theme="dark"] .client-logo:hover {
    color: var(--color-orange);
    border-color: var(--color-orange);
}

[data-theme="dark"] .stats-strip {
    background: #141c33;
}

[data-theme="dark"] .alert-bar {
    background: #cc6620;
}

[data-theme="dark"] .hero {
    background: #0a0f1a;
}

[data-theme="dark"] .newsletter-cta {
    background: #141c33;
}

[data-theme="dark"] .site-footer {
    background: #0a0f1a;
}

[data-theme="dark"] .footer-bottom {
    border-top-color: rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] .section-divider {
    background: linear-gradient(to right, var(--color-navy) 0%, var(--color-orange) 40%, #0f1525 100%);
}

[data-theme="dark"] .testimonio-card {
    background: #1e2746;
}

[data-theme="dark"] .contacto-icon {
    background: rgba(255, 255, 255, 0.05);
}

/* ═══════════════════════════════════════════════
   THEME TOGGLE
   ═══════════════════════════════════════════════ */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--color-border);
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    color: var(--color-navy);
    transition: all var(--transition);
    margin-left: 4px;
}

.theme-toggle:hover {
    background: var(--color-navy);
    color: var(--color-white);
    border-color: var(--color-navy);
}

[data-theme="dark"] .theme-toggle {
    color: var(--color-dark);
    border-color: var(--color-border);
}

[data-theme="dark"] .theme-toggle:hover {
    background: var(--color-orange);
    border-color: var(--color-orange);
    color: var(--color-white);
}

[data-theme="light"] .icon-moon { display: inline; }
[data-theme="light"] .icon-sun  { display: none;  }
[data-theme="dark"]  .icon-moon { display: none;  }
[data-theme="dark"]  .icon-sun  { display: inline; }

/* ═══════════════════════════════════════════════
   SCROLL INDICATOR (HERO)
   ═══════════════════════════════════════════════ */
.scroll-indicator {
    position: absolute;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    color: rgba(255, 255, 255, 0.5);
    animation: scrollBounce 2s ease-in-out infinite;
    cursor: pointer;
}

.scroll-indicator svg {
    display: block;
}

@keyframes scrollBounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50%      { transform: translateX(-50%) translateY(8px); }
}

/* ═══════════════════════════════════════════════
   TESTIMONIALS CAROUSEL
   ═══════════════════════════════════════════════ */
.testimonios {
    background: var(--color-pale-blue);
    padding: 80px 0;
}

[data-theme="dark"] .testimonios {
    background: #1a1f35;
}

.testimonios-carousel {
    position: relative;
    max-width: 750px;
    margin: 0 auto;
    overflow: hidden;
}

.testimonios-track {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.testimonio-card {
    min-width: 100%;
    padding: 40px;
    text-align: center;
    background: var(--color-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
}

.testimonio-quote {
    font-family: var(--font-secondary);
    font-size: 1.15rem;
    font-weight: 400;
    line-height: 1.7;
    color: var(--color-dark);
    margin-bottom: 28px;
    position: relative;
}

.testimonio-quote::before {
    content: '"';
    font-family: var(--font-primary);
    font-size: 4rem;
    color: var(--color-orange);
    opacity: 0.3;
    position: absolute;
    top: -20px;
    left: -10px;
    line-height: 1;
}

.testimonio-author {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    text-align: left;
}

.testimonio-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(32, 41, 69, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-navy);
    flex-shrink: 0;
}

.testimonio-author strong {
    display: block;
    font-family: var(--font-primary);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-dark);
}

.testimonio-author span {
    font-size: 0.82rem;
    color: var(--color-gray);
    font-weight: 300;
}

.testimonios-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 28px;
}

.testimonios-dots .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    background: var(--color-border);
    cursor: pointer;
    transition: all var(--transition);
    padding: 0;
}

.testimonios-dots .dot.active {
    background: var(--color-orange);
    transform: scale(1.3);
}

/* ═══════════════════════════════════════════════
   BACK TO TOP
   ═══════════════════════════════════════════════ */
.back-to-top {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 999;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: var(--color-navy);
    color: var(--color-white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: all 0.3s ease;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--color-orange);
    box-shadow: 0 6px 24px rgba(255, 127, 64, 0.3);
}

/* ═══════════════════════════════════════════════
   CAROUSEL HOVER PAUSE
   ═══════════════════════════════════════════════ */
.clients-carousel-track:hover .clients-carousel {
    animation-play-state: paused;
}

/* ═══════════════════════════════════════════════
   BUTTON RIPPLE EFFECT
   ═══════════════════════════════════════════════ */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple-effect {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: scale(0);
    animation: rippleAnim 0.6s ease-out;
    pointer-events: none;
}

@keyframes rippleAnim {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* ═══════════════════════════════════════════════
   CARD HOVER GLOW
   ═══════════════════════════════════════════════ */
.card:hover,
.tech-card:hover,
.proyecto-card:hover,
.servicio-card:hover,
.blog-card:hover {
    box-shadow: 0 10px 30px rgba(32, 41, 69, 0.12), 0 0 0 1px var(--color-orange);
}

[data-theme="dark"] .card:hover,
[data-theme="dark"] .tech-card:hover,
[data-theme="dark"] .proyecto-card:hover,
[data-theme="dark"] .servicio-card:hover,
[data-theme="dark"] .blog-card:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 0 1px var(--color-orange);
}

/* ─── Responsive ────────────────────────────── */
@media (max-width: 968px) {
    .hero-content h1 {
        font-size: 2.4rem;
    }

    .contacto-wrapper {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .featured-card {
        grid-template-columns: 1fr;
    }

    .featured-card .proyecto-card-img {
        height: 240px;
        border-radius: var(--radius-md) var(--radius-md) 0 0;
    }

    .newsletter-cta {
        padding: 40px 24px;
    }

    .newsletter-cta h2 {
        font-size: 1.6rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px 24px;
    }
}

@media (max-width: 768px) {
    .header-inner {
        height: 64px;
    }

    .theme-toggle {
        margin-left: auto;
        margin-right: 8px;
    }

    .btn-cta-header {
        display: none;
    }

    .menu-toggle {
        display: flex;
    }

    .hero {
        min-height: 70vh;
    }

    .hero-content h1 {
        font-size: 1.9rem;
    }

    .section-title {
        font-size: 1.7rem;
    }

    .cards-grid,
    .blog-grid,
    .proyectos-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-brand p {
        max-width: 100%;
    }

    .footer-social {
        justify-content: center;
    }

    .footer-bottom .container {
        flex-direction: column;
        gap: 8px;
    }

    .testimonio-card {
        padding: 28px 24px;
    }

    .testimonio-quote {
        font-size: 1.05rem;
    }

    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 1.5rem;
    }

    .hero-ctas {
        flex-direction: column;
        align-items: center;
    }

    .hero-ctas .btn {
        width: 100%;
    }

    .section {
        padding: 50px 0;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .newsletter-cta {
        padding: 30px 20px;
    }

    .newsletter-cta h2 {
        font-size: 1.3rem;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 32px 16px;
    }

    .stat-number {
        font-size: 2.2rem;
    }

    .clients-carousel {
        gap: 24px;
        animation-duration: 20s;
    }

    .testimonio-card {
        padding: 24px 18px;
    }

    .testimonio-quote {
        font-size: 0.95rem;
    }

    .testimonio-quote::before {
        font-size: 3rem;
        top: -14px;
    }

    .testimonio-author {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }

    .scroll-indicator {
        bottom: 18px;
    }
}
