:root {
    --primary: #0f172a;
    --primary-light: #1e293b;
    --accent: #f59e0b;
    --accent-hover: #fbbf24;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --bg-body: #0b0f19;
    --card-bg: #131c2e;
    --border-color: rgba(255, 255, 255, 0.08);
    --transition: all 0.25s ease-in-out;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
}

/* Top Bar */
.top-bar {
    background-color: #070a12;
    padding: 0.5rem 5%;
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.top-bar-left, .top-bar-right {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.top-bar a {
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition);
}

.top-bar a:hover {
    color: var(--accent);
}

/* Navbar */
.navbar {
    background-color: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    border-bottom: 1px solid var(--border-color);
}

.logo {
    font-weight: 800;
    font-size: 1.3rem;
    color: var(--text-main);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.logo span {
    color: var(--accent);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a:not(.btn-cta) {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
}

.nav-links a:not(.btn-cta):hover {
    color: var(--accent);
}

/* --- BOTONES MEJORADOS --- */
.btn-cta {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #0b0f19;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-cta:hover {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.5);
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: var(--transition);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
}

/* Hero Section */
.hero {
    padding: 6rem 8%;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.90), rgba(15, 23, 42, 0.75)), url('ele1.jpg') center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    text-align: left;
    min-height: 75vh;
    border-bottom: 1px solid var(--border-color);
}

.hero-content {
    max-width: 700px;
}

.hero-badge {
    display: inline-block;
    background: rgba(245, 158, 11, 0.15);
    color: var(--accent);
    padding: 0.35rem 0.85rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 1.2rem;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.hero h1 {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 1.2rem;
    letter-spacing: -0.02em;
}

.hero h1 span {
    color: var(--accent);
}

.hero p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    justify-content: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Services Section */
.services {
    padding: 5rem 5%;
    background-color: var(--bg-body);
}

.section-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 3.5rem auto;
}

.section-subtitle {
    color: var(--accent);
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    display: block;
    margin-bottom: 0.5rem;
}

.section-header h2 {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.service-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2.5rem 2rem;
    transition: var(--transition);
}

.service-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: 0 10px 30px -10px rgba(245, 158, 11, 0.15);
}

.service-icon {
    font-size: 2.2rem;
    margin-bottom: 1.2rem;
    display: inline-block;
}

.service-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.service-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Features Section */
.features-section {
    padding: 5rem 5%;
    background-color: #070a12;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.features-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.features-text h2 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -0.01em;
}

.features-text p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.check-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.check-list li {
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-main);
}

.features-image-wrapper {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

.features-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    min-height: 320px;
}

.image-caption-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.95), transparent);
    padding: 2rem 1.25rem 1.25rem 1.25rem;
}

.image-caption-overlay .title {
    color: var(--accent);
    font-weight: 700;
    font-size: 0.95rem;
    display: block;
    margin-bottom: 0.2rem;
}

.image-caption-overlay .desc {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* CTA Banner */
.cta-banner {
    padding: 5rem 5%;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.cta-banner-content {
    max-width: 700px;
    margin: 0 auto;
}

.cta-banner h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.cta-banner p {
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-size: 1.05rem;
}

/* Footer */
footer {
    background-color: #070a12;
    padding: 3rem 5% 1.5rem 5%;
    border-top: 1px solid var(--border-color);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    margin-bottom: 2.5rem;
}

.footer-col h4 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 1.2rem;
    color: var(--text-main);
}

.footer-col ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.footer-col a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
}

.footer-col a:hover {
    color: var(--accent);
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* =========================================================
   MEDIA QUERIES / ADAPTACIÓN MÓVIL (CORRECCIÓN DE RUPTURAS)
   ========================================================= */

@media (max-width: 900px) {
    .features-container {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
}

@media (max-width: 768px) {
    /* 1. Barra superior: apilar elementos en vertical para evitar desbordes */
    .top-bar {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
        padding: 0.6rem 1rem;
    }

    .top-bar-left, .top-bar-right {
        justify-content: center;
        gap: 1rem;
        font-size: 0.75rem;
        flex-wrap: wrap;
    }

    /* 2. Navbar principal: apilar logo y elementos de navegación */
    .navbar {
        flex-direction: column;
        gap: 0.8rem;
        padding: 0.8rem 1rem;
    }

    .nav-links {
        gap: 1rem;
        flex-wrap: wrap;
        justify-content: center;
        font-size: 0.85rem;
    }

    /* 3. Hero Section: corregir márgenes excesivos en pantallas pequeñas */
    .hero {
        padding: 4rem 5%;
        text-align: center;
        justify-content: center;
    }

    .hero-content {
        max-width: 100%;
    }

    .hero h1 {
        font-size: 2.2rem; /* Tamaño optimizado para móviles */
        line-height: 1.2;
    }

    .hero-buttons {
        justify-content: center;
    }
}
