﻿* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #1e3a5f;
    --primary-dark: #152b47;
    --secondary: #8b9db0;
    --accent: #4a7ba7;
    --dark: #0f1821;
    --light: #f8f9fa;
    --gray: #6c757d;
    --white: #ffffff;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark);
    overflow-x: hidden;
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(30, 58, 95, 0.98);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 0.8rem 0;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

    nav.scrolled {
        padding: 0.5rem 0;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    }

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    height: 50px;
    transition: all 0.3s ease;
}

nav.scrolled .logo {
    height: 40px;
}

.logo img {
    height: 100%;
    width: auto;
    object-fit: contain;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

    .nav-links a {
        color: var(--white);
        text-decoration: none;
        font-weight: 500;
        font-size: 0.95rem;
        transition: color 0.3s ease;
        position: relative;
        padding: 0.5rem 0;
    }

        .nav-links a::after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 0;
            width: 0;
            height: 2px;
            background: var(--secondary);
            transition: width 0.3s ease;
        }

        .nav-links a:hover::after {
            width: 100%;
        }

        .nav-links a:hover {
            color: var(--secondary);
        }

.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

    .menu-toggle span {
        width: 28px;
        height: 3px;
        background: var(--white);
        transition: all 0.3s ease;
        border-radius: 2px;
    }

/* Hero Section */
.hero {
    margin-top: 70px;
    height: 100vh;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 50%, #0a1929 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

    .hero::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: radial-gradient(circle at 20% 50%, rgba(74, 123, 167, 0.1) 0%, transparent 50%), radial-gradient(circle at 80% 80%, rgba(139, 157, 176, 0.1) 0%, transparent 50%);
        animation: pulse 8s ease-in-out infinite;
    }

    .hero::after {
        content: '';
        position: absolute;
        top: -50%;
        right: -10%;
        width: 800px;
        height: 800px;
        background: radial-gradient(circle, rgba(74, 123, 167, 0.15) 0%, transparent 70%);
        border-radius: 50%;
        animation: float 20s ease-in-out infinite;
    }

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }

    33% {
        transform: translate(-30px, -50px) rotate(120deg);
    }

    66% {
        transform: translate(-20px, 20px) rotate(240deg);
    }
}

.hero-content {
    text-align: center;
    color: var(--white);
    z-index: 1;
    padding: 2rem;
    animation: fadeInUp 1.2s ease;
    max-width: 900px;
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero .subtitle {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    opacity: 0.95;
    font-weight: 300;
}

.hero p {
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
    opacity: 0.85;
    line-height: 1.8;
}

.cta-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-button {
    display: inline-block;
    padding: 1.2rem 3rem;
    background: var(--white);
    color: var(--primary);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    font-size: 1.05rem;
}

    .cta-button:hover {
        transform: translateY(-5px);
        box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
    }

    .cta-button.secondary {
        background: transparent;
        color: var(--white);
        border: 2px solid var(--white);
    }

        .cta-button.secondary:hover {
            background: var(--white);
            color: var(--primary);
        }

/* Section Styles */
.section {
    padding: 6rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease;
}

    .section.visible {
        opacity: 1;
        transform: translateY(0);
    }

.section-title {
    text-align: center;
    font-size: 2.8rem;
    margin-bottom: 1rem;
    color: var(--primary);
    position: relative;
    font-weight: 700;
}

.section-subtitle {
    text-align: center;
    font-size: 1.2rem;
    color: var(--gray);
    margin-bottom: 4rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 2px;
}

/* About Section */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text {
    font-size: 1.1rem;
    line-height: 1.9;
    color: var(--gray);
}

    .about-text h3 {
        color: var(--primary);
        margin-bottom: 1.5rem;
        font-size: 1.8rem;
        font-weight: 600;
    }

    .about-text p {
        margin-bottom: 1.5rem;
    }

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.stat-item {
    text-align: center;
    padding: 1.5rem;
    background: var(--light);
    border-radius: 10px;
    transition: transform 0.3s ease;
}

    .stat-item:hover {
        transform: translateY(-5px);
    }

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    display: block;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--gray);
    margin-top: 0.5rem;
}

.about-image {
    width: 100%;
    height: 500px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    position: relative;
}

    .about-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.5s ease;
    }

    .about-image:hover img {
        transform: scale(1.1);
    }

/* Services Section */
.services {
    background: var(--light);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

.service-card {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.4s ease;
    text-align: center;
    position: relative;
    overflow: hidden;
}

    .service-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 5px;
        background: linear-gradient(90deg, var(--primary), var(--accent));
        transform: scaleX(0);
        transition: transform 0.4s ease;
    }

    .service-card:hover::before {
        transform: scaleX(1);
    }

    .service-card:hover {
        transform: translateY(-15px);
        box-shadow: 0 25px 50px rgba(30, 58, 95, 0.2);
    }

.service-icon {
    width: 90px;
    height: 90px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 2.5rem;
    transition: all 0.4s ease;
}

.service-card:hover .service-icon {
    transform: rotateY(360deg);
    border-radius: 50%;
}

.service-card h3 {
    margin-bottom: 1rem;
    color: var(--primary);
    font-size: 1.4rem;
    font-weight: 600;
}

.service-card p {
    color: var(--gray);
    line-height: 1.7;
    font-size: 1rem;
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
}

.project-card {
    position: relative;
    height: 350px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: all 0.4s ease;
}

    .project-card:hover {
        transform: translateY(-10px);
        box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25);
    }

.project-image {
    width: 100%;
    height: 100%;
    position: relative;
}

    .project-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.5s ease;
    }

.project-card:hover .project-image img {
    transform: scale(1.15);
}

.project-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(30, 58, 95, 0.95), transparent);
    padding: 2.5rem;
    color: var(--white);
    transform: translateY(100%);
    transition: transform 0.4s ease;
}

.project-card:hover .project-overlay {
    transform: translateY(0);
}

.project-overlay h3 {
    font-size: 1.5rem;
    margin-bottom: 0.8rem;
    font-weight: 600;
}

.project-overlay p {
    font-size: 1rem;
    line-height: 1.6;
    opacity: 0.9;
}

/* Clients Section */
.clients {
    background: var(--primary);
    color: var(--white);
}

    .clients .section-title {
        color: var(--white);
    }

    .clients .section-subtitle {
        color: rgba(255, 255, 255, 0.8);
    }

.clients-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2.5rem;
    align-items: center;
}

.client-logo {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 160px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: all 0.4s ease;
    font-weight: 600;
    color: var(--primary);
    font-size: 1.3rem;
    position: relative;
    overflow: hidden;
}

    .client-logo::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(139, 157, 176, 0.2), transparent);
        transition: left 0.5s ease;
    }

    .client-logo:hover::before {
        left: 100%;
    }

    .client-logo:hover {
        transform: translateY(-10px);
        box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    }

/* Contact Section */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.contact-item {
    display: flex;
    align-items: start;
    gap: 1.5rem;
    padding: 1.5rem;
    background: var(--light);
    border-radius: 15px;
    transition: all 0.3s ease;
}

    .contact-item:hover {
        background: var(--white);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        transform: translateX(10px);
    }

.contact-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.8rem;
    flex-shrink: 0;
}

.contact-details h3 {
    margin-bottom: 0.5rem;
    color: var(--primary);
    font-size: 1.3rem;
    font-weight: 600;
}

.contact-details p {
    color: var(--gray);
    line-height: 1.6;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.8rem;
    background: var(--light);
    padding: 3rem;
    border-radius: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

    .form-group label {
        font-weight: 600;
        color: var(--primary);
        font-size: 1rem;
    }

    /* Estilos para los <asp:TextBox> */
    .form-group input,
    .form-group textarea {
        padding: 1.2rem;
        border: 2px solid #e0e0e0;
        border-radius: 12px;
        font-family: inherit;
        font-size: 1rem;
        transition: all 0.3s ease;
        background: var(--white);
        width: 100%; /* Asegura que los controles ASP ocupen todo el ancho */
    }

        .form-group input:focus,
        .form-group textarea:focus {
            outline: none;
            border-color: var(--primary);
            box-shadow: 0 0 0 4px rgba(30, 58, 95, 0.1);
        }

    .form-group textarea {
        min-height: 160px;
        resize: vertical;
    }

/* Estilo para el <asp:Button> */
.submit-button {
    padding: 1.3rem 2.5rem;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: var(--white);
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 25px rgba(30, 58, 95, 0.3);
    width: 100%; /* El botón también ocupará todo el ancho */
}

    .submit-button:hover {
        transform: translateY(-3px);
        box-shadow: 0 15px 35px rgba(30, 58, 95, 0.4);
    }

/* Footer */
footer {
    background: var(--primary-dark);
    color: var(--white);
    padding: 4rem 2rem 2rem;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
}

.footer-top {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-about h3 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.footer-about p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.7;
}

.footer-links h4 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
    color: var(--secondary);
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.7rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
}

    .footer-links a:hover {
        color: var(--white);
    }

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-link {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

    .social-link:hover {
        background: var(--accent);
        transform: translateY(-5px);
    }

.footer-bottom {
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

/* Scroll Progress Bar */
.scroll-progress {
    position: fixed;
    top: 0; /* Ajustado para estar en el borde superior */
    left: 0;
    width: 0%;
    height: 4px;
    background: linear-gradient(90deg, var(--accent), var(--secondary)); /* Color cambiado para combinar */
    z-index: 9999; /* Asegura que esté por encima de todo */
    transition: width 0.1s ease;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Responsive */
@media (max-width: 1024px) {
    .footer-top {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
        z-index: 10; /* Asegura que el botón de menú esté visible */
    }

    .nav-links {
        position: absolute;
        top: 0; /* Cubre toda la pantalla */
        left: 0;
        right: 0;
        height: 100vh; /* Ocupa toda la altura */
        background: var(--primary);
        flex-direction: column;
        padding: 6rem 2rem 2rem; /* Más padding superior para dejar espacio */
        gap: 2rem; /* Más espacio entre enlaces */
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none;
        transition: all 0.4s cubic-bezier(0.77, 0, 0.175, 1);
        align-items: center; /* Centra los enlaces */
        justify-content: center; /* Centra los enlaces */
    }

        .nav-links.active {
            transform: translateY(0);
            opacity: 1;
            pointer-events: all;
        }

        .nav-links li {
            width: 100%;
            text-align: center;
        }

        .nav-links a {
            font-size: 1.5rem; /* Texto más grande para menú móvil */
        }

    .hero {
        height: auto;
        padding: 8rem 0 4rem 0; /* Más padding superior por el navbar */
        margin-top: 0; /* El margen ya no es necesario */
    }

        .hero h1 {
            font-size: 2.5rem;
        }

        .hero .subtitle {
            font-size: 1.2rem;
        }

        .hero p {
            font-size: 1rem;
        }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .cta-button {
        width: 100%;
        max-width: 300px;
    }

    .about-content,
    .contact-container {
        grid-template-columns: 1fr;
    }

    .about-image {
        grid-row: 1; /* Pone la imagen primero en móvil */
        height: 300px; /* Reduce la altura en móvil */
    }

    .section {
        padding: 4rem 1.5rem;
    }

    .section-title {
        font-size: 2.2rem;
    }

    .stats {
        grid-template-columns: 1fr;
    }

    .footer-top {
        grid-template-columns: 1fr;
    }

    .projects-grid,
    .services-grid {
        grid-template-columns: 1fr;
    }
}

/* --- ESTILOS PARA LOS MENSAJES DEL FORMULARIO --- */
.alert-success {
    padding: 1rem;
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    border-radius: 12px;
    margin-top: 1rem;
    text-align: center;
    font-weight: 600;
}

.alert-danger {
    padding: 1rem;
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 12px;
    margin-top: 1rem;
    text-align: center;
    font-weight: 600;
}
