:root {
    --primary-color: #e53935;
    --primary-dark: #c62828;
    --secondary-color: #1e293b;
    --text-color: #475569;
    --light-bg: #f8fafc;
    --white: #ffffff;
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--secondary-color);
    font-weight: 700;
    line-height: 1.2;
}

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

a:hover {
    color: var(--primary-dark);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}



/* --- Topbar --- */
.topbar {
    background-color: var(--secondary-color);
    color: rgba(255,255,255,0.85);
    padding: 8px 0;
    font-size: 13px;
}

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

.topbar-info span {
    margin-right: 20px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.topbar-social a {
    color: rgba(255,255,255,0.8);
    margin-left: 15px;
    transition: color 0.3s;
}
.topbar-social a:hover { color: var(--white); }

/* --- Navbar --- */
.navbar {
    background: var(--white);
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.07);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo img {
    height: 60px;
    width: auto;
    filter: none !important;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 32px;
}

.nav-links li a {
    color: var(--secondary-color);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 13px;
    position: relative;
    letter-spacing: 0.5px;
}

.nav-links li a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

.nav-links li a:hover::after {
    width: 100%;
}

.nav-btn {
    background: var(--primary-color);
    color: var(--white);
    padding: 10px 22px;
    border-radius: 4px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.5px;
    transition: background 0.3s;
}

/* --- Nav Toggle (Solo móvil) --- */
@media (min-width: 993px) {
    .nav-toggle {
        display: none !important;
    }
}

.nav-toggle {
    background: transparent !important;
    border: none !important;
    outline: none !important;
    padding: 0 !important;
    margin: 0 !important;
    color: var(--secondary-color);
    font-size: 28px;
    cursor: pointer;
    box-shadow: none !important;
    appearance: none !important;
    -webkit-appearance: none !important;
}

.nav-btn:hover {
    background: var(--primary-dark);
    color: var(--white);
}

/* --- Hero Section --- */
.hero {
    height: 80vh;
    min-height: 580px;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 0;
    overflow: hidden;
    background: transparent;
}

.video-background {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 0 !important; /* Base layer */
    overflow: hidden !important;
    background: #000 !important;
}

.video-foreground {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
}

.video-foreground iframe {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    width: 150vw !important;
    height: 150vh !important;
    min-width: 266.67vh !important;
    min-height: 84.375vw !important;
    transform: translate(-50%, -50%) !important;
    pointer-events: none !important;
    border: none !important;
}

.hero-overlay {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 60, 130, 0.5) !important;
    z-index: 1 !important; /* Above video */
}

.hero .container {
    position: relative !important;
    z-index: 2 !important;
    text-align: left;
}

.hero-content {
    color: var(--white);
    max-width: 750px;
    animation: fadeInUp 1.5s ease-out forwards;
}

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

.hero-subtitle {
    color: var(--primary-color);
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 15px;
    display: block;
}

.hero-title {
    font-size: 3.8rem;
    color: var(--white);
    margin-bottom: 25px;
    font-weight: 800;
    line-height: 1.1;
}

.hero-text {
    font-size: 1.1rem;
    margin-bottom: 40px;
    opacity: 0.9;
}

.btn-primary {
    display: inline-block;
    background: var(--primary-color);
    color: var(--white);
    padding: 16px 36px;
    font-size: 15px;
    font-weight: 700;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border: none;
    transition: background 0.3s ease;
}

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

/* --- Features (Overlapping) --- */
.features-wrapper {
    margin-top: -80px;
    position: relative;
    z-index: 10;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.feature-card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    transition: var(--transition);
    border-bottom: 4px solid transparent;
}

.feature-card:hover {
    transform: translateY(-10px);
    border-bottom-color: var(--primary-color);
}

.feature-icon {
    font-size: 40px;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.feature-title {
    font-size: 1.2rem;
    margin-bottom: 15px;
}

/* --- About Section --- */
.about {
    padding: 100px 0;
    background: var(--white);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-img {
    position: relative;
}

.about-img img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.about-badge {
    position: absolute;
    bottom: -30px;
    right: -30px;
    background: var(--primary-color);
    color: var(--white);
    padding: 30px;
    border-radius: 50%;
    width: 150px;
    height: 150px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    border: 5px solid var(--white);
}

.about-badge span {
    font-size: 2rem;
    font-weight: 700;
}

.section-subtitle {
    color: var(--primary-color);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    display: block;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 20px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--primary-color);
}

.about-list {
    list-style: none;
    margin-top: 30px;
}

.about-list li {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    font-weight: 500;
    color: var(--secondary-color);
}

.about-list li i {
    color: var(--primary-color);
    background: rgba(229, 57, 53, 0.1);
    padding: 10px;
    border-radius: 50%;
}

/* --- Services Area --- */
.services {
    padding: 100px 0;
    background: var(--light-bg);
    text-align: center;
}

.services .section-title::after {
    left: 50%;
    transform: translateX(-50%);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 60px;
}

.service-card {
    background: var(--white);
    padding: 50px 30px;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.03);
    transition: var(--transition);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0;
    background: var(--primary-color);
    transition: var(--transition);
    z-index: 0;
}

.service-card:hover::before {
    height: 100%;
}

.service-card:hover * {
    color: var(--white);
    position: relative;
    z-index: 1;
}

.service-card i {
    font-size: 50px;
    color: var(--primary-color);
    margin-bottom: 25px;
    transition: var(--transition);
    position: relative;
    z-index: 1;
}

/* --- Footer --- */
.footer {
    background: var(--secondary-color);
    color: rgba(255,255,255,0.7);
    padding: 80px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 50px;
    margin-bottom: 60px;
}

.footer-logo {
    background: var(--white);
    padding: 10px;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 20px;
}

.footer-logo img {
    height: 50px;
}

.footer h4 {
    color: var(--white);
    font-size: 1.2rem;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 10px;
}

.footer h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--primary-color);
}

.footer-links {
    list-style: none;
}

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

.footer-links a {
    color: rgba(255,255,255,0.7);
}

.footer-links a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.footer-contact li {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.footer-contact i {
    color: var(--primary-color);
    font-size: 1.2rem;
}

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

@media(max-width: 992px) {
    .topbar { display: none; } /* Hide topbar on small mobile to save space */
    
    .features-grid, .about-grid, .services-grid, .footer-grid {
        grid-template-columns: 1fr;
    }
    .features-wrapper {
        margin-top: 40px;
    }
    .hero-title {
        font-size: 2.5rem;
    }
    
    .nav-toggle {
        display: block !important;
        order: 2;
    }
    
    .navbar .container {
        height: 70px;
    }

    .nav-links {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: var(--white);
        flex-direction: column;
        align-items: center;
        padding-top: 50px;
        transition: var(--transition);
        box-shadow: 0 10px 15px rgba(0,0,0,0.1);
        z-index: 999;
    }

    .nav-links.active {
        left: 0;
    }

    .nav-btn {
        display: none; /* Opcional: ocultar el botón de contacto en móvil si hay poco espacio */
    }
}
