@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&family=Nunito+Sans:ital,opsz,wght@0,6..12,200..1000;1,6..12,200..1000&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900&display=swap');

/* ========== RESET Y VARIABLES ========== */
html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden;
}

* {
    box-sizing: border-box;
}

:root {
    --white: #FFFFFF;
    --black: #000000;
    --blue-primary: #034C8C;
    --blue-dark: #071D39;
    --red-dark: #74001F;
    --red-primary: #E30613;
    --red-accent: #EB3D2A;
}

body {
    font-family: "Poppins", sans-serif;
    line-height: 1.6;
    color: var(--black);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ========== NAVEGACIÓN ========== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--white);
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
    z-index: 1000;
    transition: all 0.3s ease;
}

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

.logo img {
    width: 180px;
    height: auto;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
    margin: 0;
    padding: 0;
}

.nav-links a {
    text-decoration: none;
    color: var(--blue-dark);
    font-weight: 600;
    padding: 0.5rem 0.8rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: inline-block;
    white-space: nowrap;
}

.nav-links a:hover {
    background: var(--red-primary);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(227, 6, 19, 0.4);
}

.nav-links a.active {
    background: var(--blue-primary);
    color: var(--white);
}

.mobile-menu {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
    z-index: 1001;
}

.mobile-menu span {
    width: 25px;
    height: 3px;
    background: var(--blue-dark);
    transition: all 0.3s ease;
    border-radius: 2px;
}

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

.mobile-menu.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* ========== HERO ========== */
.hero-tech {
    background: linear-gradient(135deg, var(--blue-dark) 0%, var(--blue-primary) 50%, var(--red-primary) 100%);
    padding: 100px 0 60px;
    text-align: center;
    color: var(--white);
    position: relative;
    overflow: hidden;
    margin-top: 0;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 2;
}

.hero-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--red-primary), var(--red-accent));
    color: white;
    padding: 12px 24px;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: 600;
    box-shadow: 0 8px 25px rgba(227, 6, 19, 0.3);
    margin-bottom: 1.2rem;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--white), #f0f8ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    opacity: 0.9;
    font-weight: 400;
}

/* ========== PILARES (bloques alternados tipo story-grid) ========== */
.pillar-section {
    padding: 80px 0 20px;
    background: var(--white);
}

.pillar-section.alt-bg {
    background: #f8fafb;
}

.pillar-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    margin-bottom: 3rem;
}

.pillar-grid.reverse .pillar-image {
    order: 1;
}

.pillar-grid.reverse .pillar-content {
    order: 2;
}

.pillar-tag {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 1rem;
    color: var(--white);
}

.pillar-tag.tag-electric {
    background: linear-gradient(135deg, var(--red-primary), var(--red-accent));
}

.pillar-tag.tag-autonomy {
    background: linear-gradient(135deg, var(--blue-primary), var(--blue-dark));
}

.pillar-tag.tag-data {
    background: linear-gradient(135deg, var(--blue-dark), var(--red-dark));
}

.pillar-content h2 {
    font-size: 2.3rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    position: relative;
}

.pillar-content h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--red-primary);
    border-radius: 2px;
}

.pillar-content p {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #555;
    margin-bottom: 1.5rem;
}

.pillar-image {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

.pillar-image a {
    display: block;
    text-decoration: none;
}

.pillar-image img {
    width: 100%;
    height: 380px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

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

/* ========== TARJETAS DE TECNOLOGÍA (dentro de cada pilar) ========== */
.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin: 1rem 0 4rem;
}

.tech-card {
    background: var(--white);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.tech-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--blue-primary), var(--red-primary));
}

.tech-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.15);
}

.tech-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 1.2rem;
    background: linear-gradient(135deg, var(--blue-primary), var(--blue-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.tech-card:hover .tech-icon {
    background: linear-gradient(135deg, var(--red-primary), var(--red-accent));
    transform: scale(1.1);
}

.tech-card h4 {
    color: var(--blue-dark);
    font-size: 1.15rem;
    margin-bottom: 0.6rem;
    font-weight: 600;
}

.tech-card p {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.7;
}

/* ========== CTA ========== */
.cta-section {
    padding: 80px 2rem;
    background: linear-gradient(135deg, #f8fafb 0%, #e8eef2 100%);
    text-align: center;
    position: relative;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1200px;
    height: 5px;
    background: linear-gradient(90deg, var(--blue-primary), var(--red-primary));
    border-radius: 3px;
}

.cta-section h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--blue-dark);
    position: relative;
    padding-bottom: 1.5rem;
}

.cta-section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--red-primary);
    border-radius: 2px;
}

.cta-section p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: #555;
}

.cta-btn {
    display: inline-block;
    background: var(--red-primary);
    color: white;
    padding: 1rem 2.5rem;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(227, 6, 19, 0.3);
}

.cta-btn:hover {
    background: var(--red-dark);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(227, 6, 19, 0.5);
}

/* ========== WHATSAPP FLOTANTE ========== */
.whatsapp-float {
    position: fixed;
    bottom: 25px;
    left: 25px;
    width: 60px;
    height: 60px;
    background: #25d366;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    transition: all 0.3s ease;
    z-index: 999;
    text-decoration: none;
}

.whatsapp-float:hover {
    background: #128c7e;
    transform: scale(1.1);
}

/* ========== FOOTER ========== */
.footer {
    background: var(--blue-dark);
    color: var(--white);
    padding: 3rem 2rem 1.5rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 2.5rem;
}

.footer-section h3 {
    color: var(--white);
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    font-weight: 600;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--red-primary);
    border-radius: 2px;
}

.footer-section p,
.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    line-height: 1.8;
    transition: color 0.3s ease;
    margin-bottom: 0.8rem;
    font-size: 14px;
    display: block;
}

.footer-section a:hover {
    color: var(--red-primary);
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section ul li {
    margin-bottom: 0.8rem;
}

.footer-logo {
    width: 200px;
    height: auto;
    margin-bottom: 1rem;
    display: block;
}

.footer-anniversary {
    width: 80px;
    height: auto;
    display: block;
}

.footer-social {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.footer-social a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--blue-primary);
    color: var(--white);
    font-size: 1rem;
    transition: all 0.3s ease;
    text-decoration: none;
    margin: 0;
}

.footer-social a:hover {
    background: var(--white);
    color: var(--red-primary);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(227, 6, 19, 0.3);
}

/* ========== BACK TO TOP ========== */
.back-to-top {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 60px;
    height: 60px;
    background: var(--red-primary);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    box-shadow: 0 5px 20px rgba(227, 6, 19, 0.3);
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    z-index: 998;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--red-dark);
    transform: translateY(-5px);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1300px) {
    .search-bar { width: 200px; }
    .nav-links { gap: 1.5rem; }
}

@media (max-width: 1200px) {
    .logo img { width: 180px; }
    .nav-links { gap: 1.2rem; }
    .nav-links a { padding: 0.4rem 0.7rem; font-size: 0.95rem; }
    .search-bar { width: 180px; padding: 0.6rem 0.9rem; }
}

@media (max-width: 1100px) {
    .nav-links { gap: 1rem; }
    .nav-links a { padding: 0.3rem 0.6rem; font-size: 0.9rem; }
    .search-bar { width: 160px; }
}
@media (max-width: 1024px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 50%;
        transform: translateX(-50%);
        width: 90%;
        background: var(--white);
        flex-direction: column;
        padding: 2rem;
        box-shadow: 0 5px 25px rgba(0,0,0,0.15);
        border-radius: 15px;
        text-align: center;
        gap: 0.5rem;
        align-items: center;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links a {
        display: inline-block;
        width: auto;
        padding: 0.8rem 1.5rem;
    }

    .mobile-menu {
        display: flex;
    }

    .pillar-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .pillar-grid .pillar-image,
    .pillar-grid.reverse .pillar-image {
        order: -1;
    }

    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-container {
        padding: 1rem;
    }

    .logo img {
        width: 150px;
    }

    .hero-tech {
        padding: 100px 0 50px;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .pillar-content h2 {
        font-size: 1.9rem;
    }

    .pillar-section {
        padding: 60px 0 10px;
    }

    .cta-section {
        padding: 60px 1.5rem;
    }

    .cta-section h2 {
        font-size: 2rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .footer-section h3::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .footer-logo,
    .footer-anniversary {
        margin: 0 auto 1rem;
    }

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

    .whatsapp-float,
    .back-to-top {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
        bottom: 20px;
    }

    .whatsapp-float {
        left: 20px;
    }

    .back-to-top {
        right: 20px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .pillar-content h2 {
        font-size: 1.6rem;
    }

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

    .container {
        padding: 0 1rem;
    }
}