/* ===== ARREGLO SCROLL HORIZONTAL - CRÍTICO ===== */
html {
    overflow-x: hidden;
    max-width: 100vw;
}

body {
    overflow-x: hidden;
    max-width: 100vw;
    width: 100%;
    position: relative;
}

/* Forzar que TODO esté dentro del viewport */
* {
    max-width: 100vw;
}

/* Excepciones que SÍ pueden usar 100% de su contenedor */
img, svg, video, 
input, textarea, select, button {
    max-width: 100% !important;
}

/* Hero específico */
.hero {
    overflow: hidden !important;
    max-width: 100vw;
}

.hero-background,
.hero-gradient {
    max-width: 100vw;
    overflow: hidden;
}

/* Secciones */
section {
    overflow-x: hidden;
    max-width: 100vw;
}

/* Cookie banner */
.cookie-banner {
    max-width: 100vw;
    overflow-x: hidden;
}

.cookie-content {
    max-width: 100%;
    padding: 1rem;
}

/* Stats del hero */
.hero-stats {
    max-width: 100%;
    overflow-x: hidden;
}

/* Grids en móvil */
@media (max-width: 768px) {
    .services-grid,
    .process-grid,
    .testimonials-grid,
    .portfolio-grid,
    .tech-grid,
    .hero-stats {
        grid-template-columns: 1fr !important;
        gap: 1.5rem;
    }
    
    /* Reducir padding en móvil */
    section {
        padding-left: 5% !important;
        padding-right: 5% !important;
    }
    
    nav {
        padding: 1rem 5% !important;
    }
}

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #ec4899;
    --accent: #8b5cf6;
    --success: #10b981;
    --warning: #f59e0b;
    --dark: #0f172a;
    --dark-light: #1e293b;
    --dark-lighter: #334155;
    --text: #f1f5f9;
    --text-muted: #94a3b8;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--dark);
    color: var(--text);
    overflow-x: hidden;
    line-height: 1.6;
}

/* ===== LOADING SCREEN ===== */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--dark);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loading-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

.loader {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(99, 102, 241, 0.1);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* ===== COOKIE BANNER ===== */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(30, 41, 59, 0.98);
    backdrop-filter: blur(20px);
    padding: 1.5rem;
    box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.3);
    z-index: 9998;
    transform: translateY(100%);
    transition: transform 0.5s ease;
}

.cookie-banner.show {
    transform: translateY(0);
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.cookie-text {
    flex: 1;
    min-width: 300px;
}

.cookie-text h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.cookie-text p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.cookie-text a {
    color: var(--primary);
    text-decoration: underline;
}

.cookie-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.cookie-btn {
    padding: 0.7rem 1.5rem;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.cookie-accept {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}

.cookie-accept:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(99, 102, 241, 0.4);
}

.cookie-settings {
    background: transparent;
    color: var(--text);
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.cookie-settings:hover {
    background: rgba(99, 102, 241, 0.1);
}

/* ===== WHATSAPP FLOAT BUTTON ===== */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    color: white;
    box-shadow: 0 10px 30px rgba(37, 211, 102, 0.4);
    cursor: pointer;
    z-index: 999;
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
    text-decoration: none;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 15px 40px rgba(37, 211, 102, 0.6);
}

@keyframes pulse {

    0%,
    100% {
        box-shadow: 0 10px 30px rgba(37, 211, 102, 0.4);
    }

    50% {
        box-shadow: 0 10px 40px rgba(37, 211, 102, 0.7);
    }
}

/* ===== HEADER & NAVIGATION ===== */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    transition: all 0.3s ease;
}

header.scrolled {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    cursor: pointer;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.logo:hover {
    transform: scale(1.05);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(99, 102, 241, 0.5);
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    list-style: none;
}

.nav-links a {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.cta-button {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    white-space: nowrap;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text);
    margin: 3px 0;
    transition: 0.3s;
}

/* ===== HERO SECTION ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 2rem 5%;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    z-index: 0;
}

.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    z-index: 0;
    object-fit: cover;
}

.hero-video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.85) 0%, rgba(30, 41, 59, 0.75) 50%, rgba(15, 23, 42,
                0.85) 100%);
    z-index: 1;
}

.hero-gradient {
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.3;
    animation: float 8s ease-in-out infinite;
}

.gradient-1 {
    background: var(--primary);
    top: -100px;
    left: -100px;
}

.gradient-2 {
    background: var(--secondary);
    bottom: -100px;
    right: -100px;
    animation-delay: -4s;
}

.gradient-3 {
    background: var(--accent);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -2s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(30px, 30px);
    }
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 900px;
}

.hero-badge {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 50px;
    margin-bottom: 2rem;
    font-size: 0.9rem;
    animation: fadeInUp 1s ease;
}

.hero-badge i {
    margin-right: 0.5rem;
}

.hero-title {
    font-size: 4rem;
    font-weight: 900;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    animation: fadeInUp 1s ease 0.1s backwards;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary), var(--secondary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.3rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    animation: fadeInUp 1s ease 0.2s backwards;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 1s ease 0.3s backwards;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(99, 102, 241, 0.5);
}

.btn-secondary {
    background: transparent;
    color: var(--text);
    padding: 1rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    border: 2px solid var(--primary);
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-secondary:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 4rem;
    margin-top: 4rem;
    animation: fadeInUp 1s ease 0.4s backwards;
}

.hero-stat {
    text-align: center;
}

.hero-stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    display: block;
}

.hero-stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== SCROLL ANIMATIONS ===== */
.animate-on-scroll {
    opacity: 0;
    transition: all 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.animate-on-scroll.animate-in {
    opacity: 1;
}

.slide-up {
    transform: translateY(100px) scale(0.9);
}

.slide-up.animate-in {
    transform: translateY(0) scale(1);
}

.slide-left {
    transform: translateX(-100px) rotate(-5deg);
}

.slide-left.animate-in {
    transform: translateX(0) rotate(0deg);
}

.slide-right {
    transform: translateX(100px) rotate(5deg);
}

.slide-right.animate-in {
    transform: translateX(0) rotate(0deg);
}

.zoom-in {
    transform: scale(0.5) rotate(-10deg);
    filter: blur(10px);
}

.zoom-in.animate-in {
    transform: scale(1) rotate(0deg);
    filter: blur(0);
}

.flip-in {
    transform: perspective(1000px) rotateY(90deg);
}

.flip-in.animate-in {
    transform: perspective(1000px) rotateY(0deg);
}

.bounce-in {
    transform: scale(0);
}

.bounce-in.animate-in {
    animation: bounceIn 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    transform: scale(1);
}

@keyframes bounceIn {
    0% {
        transform: scale(0);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

.glow-on-appear.animate-in {
    animation: glowPulse 1.5s ease-in-out;
}

@keyframes glowPulse {

    0%,
    100% {
        box-shadow: 0 0 0 rgba(99, 102, 241, 0);
    }

    50% {
        box-shadow: 0 0 40px rgba(99, 102, 241, 0.6);
    }
}

/* ===== TECH STACK SECTION ===== */
.tech-stack {
    padding: 6rem 5%;
    background: var(--dark-light);
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.tech-item {
    background: rgba(99, 102, 241, 0.05);
    padding: 2rem 1rem;
    border-radius: 15px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.tech-item:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--primary);
    transform: translateY(-5px) rotate(2deg);
}

.tech-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.tech-name {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* ===== SERVICES SECTION ===== */
.services {
    padding: 8rem 5%;
    background: var(--dark);
    position: relative;
}

.section-title {
    text-align: center;
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 1.2rem;
    margin-bottom: 5rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
    max-width: 1400px;
    margin: 0 auto;
}

.service-card {
    background: rgba(30, 41, 59, 0.5);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2.5rem;
    border: 1px solid rgba(99, 102, 241, 0.1);
    transition: all 0.4s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(236, 72, 153, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.service-card:hover::before {
    opacity: 1;
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    box-shadow: 0 20px 60px rgba(99, 102, 241, 0.3);
}

.service-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text);
    position: relative;
    z-index: 1;
}

.service-card p {
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.service-features {
    list-style: none;
    position: relative;
    z-index: 1;
}

.service-features li {
    color: var(--text-muted);
    padding: 0.5rem 0;
    font-size: 0.9rem;
}

.service-features li i {
    color: var(--success);
    margin-right: 0.5rem;
}

/* ===== PROCESS SECTION ===== */
.process {
    padding: 8rem 5%;
    background: var(--dark-light);
}

.process-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
}

.process-step {
    text-align: center;
    position: relative;
}

.process-number {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 800;
    margin: 0 auto 1.5rem;
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
}

.process-step h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.process-step p {
    color: var(--text-muted);
}

/* ===== TESTIMONIALS SECTION ===== */
.testimonials {
    padding: 8rem 5%;
    background: var(--dark);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
    max-width: 1400px;
    margin: 0 auto;
}

.testimonial-card {
    background: rgba(30, 41, 59, 0.5);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2.5rem;
    border: 1px solid rgba(99, 102, 241, 0.1);
    transition: all 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.testimonial-stars {
    color: var(--warning);
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.testimonial-text {
    color: var(--text);
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.testimonial-avatar {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 600;
}

.testimonial-info h4 {
    font-size: 1rem;
    margin-bottom: 0.2rem;
}

.testimonial-info p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* ===== FAQ SECTION ===== */
.faq {
    padding: 8rem 5%;
    background: var(--dark-light);
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: rgba(30, 41, 59, 0.5);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(99, 102, 241, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-question {
    padding: 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    transition: all 0.3s ease;
}

.faq-question:hover {
    background: rgba(99, 102, 241, 0.1);
}

.faq-icon {
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    color: var(--text-muted);
}

.faq-answer-content {
    padding: 0 1.5rem 1.5rem;
    line-height: 1.8;
}

.faq-item.active .faq-answer {
    max-height: 500px;
}

/* ===== CONTACT FORM SECTION ===== */
.contact-form-section {
    padding: 8rem 5%;
    background: var(--dark);
}

.contact-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: center;
}

.contact-info h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.contact-info p {
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-detail {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.contact-detail-icon {
    width: 50px;
    height: 50px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary);
}

.contact-form {
    background: rgba(30, 41, 59, 0.5);
    backdrop-filter: blur(10px);
    padding: 3rem;
    border-radius: 20px;
    border: 1px solid rgba(99, 102, 241, 0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text);
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 10px;
    color: var(--text);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-submit {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.form-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4);
}

/* ===== PORTFOLIO SECTION ===== */
.portfolio {
    padding: 8rem 5%;
    background: var(--dark-light);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
    max-width: 1400px;
    margin: 0 auto;
}

.portfolio-item {
    position: relative;
    height: 400px;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    background: var(--dark-light);
}

.portfolio-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.8), rgba(236, 72, 153, 0.8));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.portfolio-item:hover::before {
    opacity: 1;
}

.portfolio-bg {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    transition: transform 0.3s ease;
    color: var(--primary);
}

.portfolio-item:hover .portfolio-bg {
    transform: scale(1.1);
}

.portfolio-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.95), transparent);
    transform: translateY(100%);
    transition: transform 0.3s ease;
    z-index: 2;
}

.portfolio-item:hover .portfolio-info {
    transform: translateY(0);
}

.portfolio-info h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.portfolio-info p {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.portfolio-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.portfolio-tag {
    padding: 0.3rem 0.8rem;
    background: rgba(99, 102, 241, 0.2);
    border-radius: 20px;
    font-size: 0.8rem;
}

/* ===== CTA SECTION ===== */
.cta-section {
    padding: 8rem 5%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    text-align: center;
}

.cta-section h2 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.cta-section p {
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
    opacity: 0.9;
}

.btn-white {
    background: white;
    color: var(--primary);
    padding: 1rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    transition: all 0.3s ease;
}

.btn-white:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

/* ===== FOOTER ===== */
footer {
    background: var(--dark-light);
    padding: 4rem 5% 2rem;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-section h3 {
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.footer-section p,
.footer-section a {
    color: var(--text-muted);
    text-decoration: none;
    display: block;
    margin-bottom: 0.8rem;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--primary);
}

.footer-section p i {
    margin-right: 0.5rem;
    color: var(--primary);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.social-links a:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(99, 102, 241, 0.1);
    color: var(--text-muted);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 968px) {
    .contact-container {
        grid-template-columns: 1fr;
    }

    .cta-button {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background: var(--dark-light);
        flex-direction: column;
        padding: 5rem 2rem;
        transition: right 0.3s ease;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
    }

    .nav-links.active {
        right: 0;
    }

    .menu-toggle {
        display: flex;
        z-index: 1001;
        margin-left: auto;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .hero-stats {
        flex-direction: column;
        gap: 2rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .logo {
        font-size: 1.4rem;
    }

    nav {
        padding: 1rem 5%;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 1.2rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .cookie-content {
        flex-direction: column;
    }

    .cookie-buttons {
        width: 100%;
    }

    .cookie-btn {
        flex: 1;
    }
}

/* ============================================ */
/* ===== LEGAL PAGES STYLES ===== */
/* ============================================ */

.legal-content {
    max-width: 900px; /* Ancho máximo para que el texto sea fácil de leer */
    margin: 150px auto 80px; /* Centrado y con margen superior para el header fijo */
    padding: 3rem 4rem; /* Relleno interno */
    background: var(--dark-light); /* Fondo oscuro claro, igual que otras secciones */
    border-radius: 20px; /* Bordes redondeados */
    border: 1px solid rgba(99, 102, 241, 0.1); /* Borde sutil */
    color: var(--text-muted); /* Color de texto por defecto */
}

.legal-content h2 {
    font-size: 2.5rem; /* Tamaño del título principal */
    font-weight: 800;
    color: var(--text); /* Color de texto principal */
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--primary); /* Línea inferior con color primario */
    padding-bottom: 1rem;
}

.legal-content h3 {
    font-size: 1.5rem; /* Tamaño de los subtítulos */
    font-weight: 700;
    color: var(--text);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.legal-content p,
.legal-content li {
    line-height: 1.9; /* Mayor interlineado para facilitar la lectura */
    margin-bottom: 1rem;
}

.legal-content ul {
    list-style-position: inside; /* Viñetas dentro del bloque de texto */
    padding-left: 1rem;
}

.legal-content a {
    color: var(--primary); /* Enlaces con el color primario */
    text-decoration: underline;
}

.legal-content a:hover {
    color: var(--secondary); /* Cambio de color al pasar el ratón */
}

/* Ajustes para móviles */
@media (max-width: 768px) {
    .legal-content {
        margin: 120px 20px 60px;
        padding: 2rem;
    }
    .legal-content h2 {
        font-size: 2rem;
    }
}

/* Arreglar colores de enlaces en sección de contacto */
.legal-content a {
    color: var(--primary) !important;
}

/* Botón de presupuesto - forzar color blanco */
.btn-primary,
a.btn-primary {
    color: white !important;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    padding: 1rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    transition: all 0.3s ease;
}

.btn-primary:hover,
a.btn-primary:hover {
    color: white !important;
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(99, 102, 241, 0.5);
}

/* Enlaces de contacto (teléfono y email) - color morado */
.legal-content p a[href^="tel"],
.legal-content p a[href^="mailto"] {
    color: var(--primary) !important;
    text-decoration: none;
}

.legal-content p a[href^="tel"]:hover,
.legal-content p a[href^="mailto"]:hover {
    text-decoration: underline;
}

/* Arreglar spacing del hero */
.hero {
    min-height: 100vh;
    padding-top: 120px; /* Aumentado de lo que tenías */
}

.hero-badge {
    margin-top: 2rem; /* Añadir espacio arriba */
}

/* Ajuste específico móvil */
@media (max-width: 768px) {
    .hero {
        padding-top: 100px;
    }
}

/* Igualar altura de las cartas de servicios */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
    max-width: 1400px;
    margin: 0 auto;
    align-items: stretch; /* IMPORTANTE: iguala alturas */
}

.service-card {
    display: flex;
    flex-direction: column;
    min-height: 450px; /* Altura mínima */
    height: 100%; /* Ocupa todo el alto disponible */
}

.service-card p {
    flex-grow: 1; /* El párrafo crece para empujar el contenido al fondo */
}

.service-features {
    margin-top: auto; /* Empuja las características al fondo */
}

/* Blog cards con altura igual */
.services-grid .service-card {
    display: flex;
    flex-direction: column;
    min-height: 400px;
}

.services-grid .service-card h3 {
    min-height: 60px; /* Reserva espacio para títulos largos */
}

.services-grid .service-card p:last-of-type {
    flex-grow: 1; /* Crece para empujar el botón abajo */
}

.services-grid .service-card span {
    margin-top: auto; /* Botón siempre al fondo */
}