/* ===== Variables y reset ===== */
:root {
    --color-primary: #0f172a;
    --color-primary-light: #1e293b;
    --color-accent: #0ea5e9;
    --color-accent-hover: #0284c7;
    --color-text: #334155;
    --color-text-light: #64748b;
    --color-bg: #f8fafc;
    --color-white: #ffffff;
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --radius: 8px;
    --transition: 0.2s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    color: var(--color-text);
    line-height: 1.6;
    background: var(--color-white);
}

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

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

/* ===== Header ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--color-white);
    box-shadow: var(--shadow-sm);
}

.header-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary);
    letter-spacing: -0.02em;
    transition: color 0.2s;
}

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

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

.nav-list a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--color-text);
}

.nav-list a:hover {
    color: var(--color-accent);
}

.search-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0.5rem;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* ===== Hero Slider ===== */
.hero-slider {
    position: relative;
    height: 85vh;
    min-height: 500px;
    margin-top: 60px;
    overflow: hidden;
}

.hero-slider .slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 0;
}

.hero-slider .slide.active {
    opacity: 1;
    z-index: 1;
}

.slide-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.85) 0%, rgba(30, 41, 59, 0.75) 50%, rgba(15, 23, 42, 0.9) 100%);
}

.slide-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    animation: slideUp 0.8s ease-out;
}

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

.hero-slider .slide-content h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
    color: var(--color-white);
    text-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

.hero-slider .slide-content p {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 2rem;
    max-width: 600px;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 50px;
    height: 50px;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 2rem;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}

.slider-btn:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: translateY(-50%) scale(1.05);
}

.slider-prev { left: 1.5rem; }
.slider-next { right: 1.5rem; }

.slider-dots {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    gap: 0.5rem;
}

.slider-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.slider-dot.active {
    background: var(--color-accent);
    transform: scale(1.2);
}

/* ===== Botones ===== */
.btn {
    display: inline-block;
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius);
    transition: all var(--transition);
    cursor: pointer;
    border: none;
}

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

.btn-primary:hover {
    background: var(--color-accent-hover);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--color-primary);
    color: var(--color-white);
}

.btn-secondary:hover {
    background: var(--color-primary-light);
}

/* ===== Secciones ===== */
.section {
    padding: 5rem 2rem;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
}

.section h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 1rem;
}

.section-intro {
    font-size: 1.125rem;
    color: var(--color-text-light);
    max-width: 720px;
    margin-bottom: 3rem;
}

.section-link {
    display: inline-block;
    margin-top: 2rem;
    font-weight: 600;
    color: var(--color-accent);
}

.section-link:hover {
    text-decoration: underline;
}

/* ===== Cards ===== */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

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

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

.card-image {
    height: 180px;
}

.card-content {
    padding: 1.5rem;
}

.card-tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-accent);
    margin-bottom: 0.5rem;
}

.card h3, .card h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
}

.card-date {
    font-size: 0.875rem;
    color: var(--color-text-light);
    margin-bottom: 0.75rem;
}

.card-link {
    font-weight: 600;
    color: var(--color-accent);
}

.card-link:hover {
    text-decoration: underline;
}

.card-compact .card-content {
    padding: 1.5rem;
}

.card-compact p {
    font-size: 0.95rem;
    color: var(--color-text-light);
    margin-bottom: 0.75rem;
}

/* ===== Servicios ===== */
.servicios {
    background: var(--color-bg);
}

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

.service-item {
    background: var(--color-white);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
}

.service-item:hover {
    box-shadow: var(--shadow-md);
    border-left: 4px solid var(--color-accent);
}

.service-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.service-item h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
}

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

/* ===== Industrias ===== */
.industries-list {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 3rem;
}

.industry-link {
    padding: 0.5rem 1rem;
    background: var(--color-bg);
    border-radius: var(--radius);
    font-weight: 500;
    transition: all var(--transition);
}

.industry-link:hover {
    background: var(--color-accent);
    color: var(--color-white);
}

.case-studies h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 1.5rem;
}

/* ===== Trabajo ===== */
.trabajo {
    background: var(--color-primary);
    color: var(--color-white);
}

.trabajo .section-intro {
    color: rgba(255, 255, 255, 0.85);
}

.trabajo h2 {
    color: var(--color-white);
}

.jobs-highlights {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.job-card {
    background: rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: var(--radius);
    transition: background var(--transition);
}

.job-card:hover {
    background: rgba(255, 255, 255, 0.15);
}

.job-card h4 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.job-card p {
    font-size: 0.95rem;
    opacity: 0.9;
}

.trabajo .btn-secondary {
    background: var(--color-white);
    color: var(--color-primary);
}

.trabajo .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.9);
}

/* ===== Acerca de ===== */
.about-features {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.about-feature h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
}

.about-feature p {
    color: var(--color-text-light);
}

/* ===== Prensa ===== */
.prensa {
    background: var(--color-bg);
}

.press-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.press-item {
    background: var(--color-white);
    padding: 1.5rem 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.press-item h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
}

.press-date {
    font-size: 0.875rem;
    color: var(--color-text-light);
    margin-bottom: 0.5rem;
}

.press-item p:last-of-type {
    font-size: 0.95rem;
    color: var(--color-text);
}

/* ===== Newsletter ===== */
.newsletter {
    padding: 4rem 2rem;
    background: var(--color-primary);
    color: var(--color-white);
    text-align: center;
}

.newsletter h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.newsletter p {
    opacity: 0.9;
    margin-bottom: 1.5rem;
}

.newsletter-form {
    display: flex;
    gap: 0.5rem;
    max-width: 480px;
    margin: 0 auto;
    flex-wrap: wrap;
    justify-content: center;
}

.newsletter-form input {
    flex: 1;
    min-width: 200px;
    padding: 0.875rem 1rem;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
}

.newsletter-form .btn {
    flex-shrink: 0;
}

/* ===== Footer ===== */
.footer {
    background: var(--color-primary);
    color: var(--color-white);
    padding: 4rem 2rem 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-col h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.footer-col ul {
    list-style: none;
}

.footer-col a {
    display: block;
    padding: 0.25rem 0;
    opacity: 0.85;
}

.footer-col a:hover {
    opacity: 1;
}

.footer-social {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.footer-social a {
    opacity: 0.85;
}

.footer-social a:hover {
    opacity: 1;
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
}

.footer-bottom .logo {
    color: var(--color-white);
    margin-bottom: 0.5rem;
}

.footer-bottom p {
    font-size: 0.875rem;
    opacity: 0.8;
}

/* ===== Páginas de artículos ===== */
.article-page {
    padding-top: 80px;
    min-height: 100vh;
}

.article {
    max-width: 720px;
    margin: 0 auto;
    padding: 3rem 2rem 4rem;
}

.article-back {
    display: inline-block;
    font-size: 0.9rem;
    color: var(--color-accent);
    margin-bottom: 1rem;
}

.article-back:hover {
    text-decoration: underline;
}

.article-tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-accent);
    margin-bottom: 0.5rem;
}

.article h1 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1.3;
    margin-bottom: 0.5rem;
}

.article-meta {
    font-size: 0.9rem;
    color: var(--color-text-light);
    margin-bottom: 2rem;
}

.article-hero {
    height: 280px;
    background-size: cover;
    background-position: center;
    border-radius: var(--radius);
    margin-bottom: 2rem;
}

.article-body {
    font-size: 1.05rem;
    line-height: 1.8;
}

.article-body .lead {
    font-size: 1.2rem;
    color: var(--color-text-light);
    margin-bottom: 2rem;
}

.article-body h2 {
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--color-primary);
    margin: 2rem 0 1rem;
}

.article-body p {
    margin-bottom: 1rem;
}

.article-body ul,
.article-body ol {
    margin: 1rem 0 1.5rem 1.5rem;
}

.article-body li {
    margin-bottom: 0.5rem;
}

.article-cta {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-bg);
}

.article-cta a {
    color: var(--color-accent);
    font-weight: 600;
}

.article-cta a:hover {
    text-decoration: underline;
}

/* ===== Más onda - animaciones ===== */
.card {
    animation: fadeInUp 0.6s ease backwards;
}

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

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

.service-item {
    animation: fadeInUp 0.5s ease backwards;
}

.service-item:nth-child(1) { animation-delay: 0.05s; }
.service-item:nth-child(2) { animation-delay: 0.1s; }
.service-item:nth-child(3) { animation-delay: 0.15s; }
.service-item:nth-child(4) { animation-delay: 0.2s; }
.service-item:nth-child(5) { animation-delay: 0.25s; }
.service-item:nth-child(6) { animation-delay: 0.3s; }

.btn-primary {
    box-shadow: 0 4px 14px rgba(14, 165, 233, 0.4);
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(14, 165, 233, 0.5);
}

.section-link {
    transition: transform 0.2s ease;
}

.section-link:hover {
    transform: translateX(4px);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .nav {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background: var(--color-white);
        padding: 2rem;
        box-shadow: var(--shadow-lg);
        transform: translateY(-120%);
        transition: transform 0.3s ease;
    }

    .nav.nav-open {
        transform: translateY(0);
        display: block;
    }

    .nav-list {
        flex-direction: column;
        gap: 1rem;
    }

    .menu-toggle {
        display: block;
    }

    .hero-slider {
        height: 70vh;
        min-height: 450px;
    }

    .slider-btn {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }

    .slider-prev { left: 0.5rem; }
    .slider-next { right: 0.5rem; }

    .section {
        padding: 3rem 1.5rem;
    }

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

    .newsletter-form {
        flex-direction: column;
    }

    .newsletter-form input {
        min-width: 100%;
    }
}
