/* Variables CSS */
:root {
    --primary-color: #051490; /* Azul brillante */
    --secondary-color: #f8f9fa; /* Gris claro */
    --text-color: #333;
    --heading-color: #222;
    --light-gray: #eee;
    --dark-gray: #555;
    --white: #fff;
    --transition-speed: 0.5s ease-in-out;
}

/* Reset y Estilos Generales */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif; /* Puedes usar Google Fonts para una mejor tipografía */
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white);
    scroll-behavior: smooth; /* Desplazamiento suave para anclas */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Encabezados */
h1, h2, h3 {
    color: var(--heading-color);
    margin-bottom: 20px;
}

h1 {
    font-size: 3.5em;
}

h2 {
    font-size: 2.5em;
    text-align: center;
    margin-bottom: 50px;
    position: relative;
}

h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background-color: var(--primary-color);
    margin: 15px auto 0;
    border-radius: 2px;
}

/* Botones */
.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 12px 25px;
    border-radius: 5px;
    text-decoration: none;
    transition: background-color var(--transition-speed), transform 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1em;
}

.btn:hover {
    background-color: #0056b3; /* Un tono más oscuro de azul */
    transform: translateY(-3px);
}

/* Sección Base */
.section {
    padding: 80px 0;
    overflow: hidden; /* Para ocultar elementos antes de la animación */
}

.section:nth-child(even) {
    background-color: var(--secondary-color);
}

/* Header y Navegación */
.sticky-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: background-color var(--transition-speed), box-shadow var(--transition-speed);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-size: 1.8em;
    font-weight: bold;
    color: var(--primary-color);
}

.nav-links {
    list-style: none;
    display: flex;
}

.nav-links li {
    margin-left: 30px;
}

.nav-links a {
    text-decoration: none;
    color: var(--dark-gray);
    font-weight: 500;
    font-size: 1.1em;
    transition: color 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color);
}

.hamburger-menu {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
}

.hamburger-menu .bar {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--heading-color);
    margin: 5px 0;
    transition: all 0.3s ease;
}

/* Responsive Navbar */
@media (max-width: 768px) {
    .hamburger-menu {
        display: block;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        background-color: var(--white);
        position: absolute;
        top: 70px; /* Ajustar según la altura de tu header */
        left: 0;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
        padding: 20px 0;
        text-align: center;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        margin: 10px 0;
    }

    /* Hamburger menu animation */
    .hamburger-menu.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .hamburger-menu.active .bar:nth-child(2) {
        opacity: 0;
    }
    .hamburger-menu.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
}


/* Sección Hero */
.hero-section {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background-color: var(--secondary-color);
    text-align: center;
    padding-top: 70px; /* Compensar el header fijo */
    position: relative;
}

.hero-content {
    max-width: 600px;
    margin-right: 50px;
    text-align: left;
}

.hero-content h1 {
    font-size: 4em;
    line-height: 1.1;
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 1.3em;
    margin-bottom: 30px;
    color: var(--dark-gray);
}

.hero-image {
    max-width: 500px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

@media (max-width: 992px) {
    .hero-section {
        flex-direction: column;
        text-align: center;
    }
    .hero-content {
        margin-right: 0;
        margin-bottom: 40px;
        text-align: center;
    }
    .hero-content h1 {
        font-size: 3em;
    }
    .hero-content p {
        font-size: 1.1em;
    }
    .hero-image {
        max-width: 80%;
    }
}

/* Sección Acerca de mí */
.about-section .about-content {
    display: flex;
    align-items: center;
    gap: 50px;
    flex-wrap: wrap;
    justify-content: center;
}

.about-section .profile-image {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.about-section .about-text {
    flex: 1;
    min-width: 300px;
}

/* Sección Servicios */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.service-item {
    background-color: var(--white);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.service-item .icon-large {
    font-size: 3em;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.service-item h3 {
    font-size: 1.5em;
    margin-bottom: 15px;
    color: var(--heading-color);
}

.service-item p {
    font-size: 1em;
    color: var(--dark-gray);
}

/* Sección Proyectos (Portafolio) */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.portfolio-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.portfolio-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.portfolio-item .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 123, 255, 0.8); /* Primary color con opacidad */
    color: var(--white);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.5s ease;
    text-align: center;
}

.portfolio-item:hover .overlay {
    opacity: 1;
}

.portfolio-item:hover img {
    transform: scale(1.05);
}

.overlay h3 {
    color: var(--white);
    margin-bottom: 10px;
}

.overlay p {
    font-size: 0.9em;
    margin-bottom: 20px;
}

.view-project-btn {
    background-color: var(--white);
    color: var(--primary-color);
    padding: 8px 15px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.view-project-btn:hover {
    background-color: var(--light-gray);
}

/* Sección Testimonios */
.testimonial-slider {
    display: flex;
    overflow-x: auto; /* Para permitir el desplazamiento en caso de muchos testimonios */
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 20px; /* Espacio para la barra de desplazamiento si aparece */
    gap: 20px;
    justify-content: center; /* Centrar si hay pocos */
}

.testimonial-item {
    flex: 0 0 450px; /* Ancho fijo para cada testimonio */
    background-color: var(--white);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    text-align: center;
    scroll-snap-align: center;
    min-width: 300px; /* Ancho mínimo para móviles */
}

.testimonial-item p {
    font-style: italic;
    margin-bottom: 20px;
    font-size: 1.1em;
    color: var(--dark-gray);
}

.testimonial-item cite {
    display: block;
    font-weight: bold;
    color: var(--primary-color);
}

@media (max-width: 768px) {
    .testimonial-item {
        flex: 0 0 90%; /* Ajustar el ancho para móviles */
    }
}


/* Sección Contacto */
.contact-content {
    display: flex;
    gap: 50px;
    flex-wrap: wrap;
    justify-content: center;
}

.contact-form {
    flex: 2;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    background-color: var(--white);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.contact-form input,
.contact-form textarea {
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid var(--light-gray);
    border-radius: 5px;
    font-size: 1em;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.2);
}

.contact-form .btn {
    align-self: flex-start;
}

.contact-info {
    flex: 1;
    min-width: 250px;
    background-color: var(--white);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.contact-info h3 {
    margin-bottom: 20px;
    color: var(--heading-color);
}

.contact-info p {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    color: var(--dark-gray);
}

.contact-info p i {
    margin-right: 10px;
    color: var(--primary-color);
    font-size: 1.2em;
}

.social-links {
    margin-top: 20px;
    display: flex;
    gap: 15px;
}

.social-links a {
    color: var(--primary-color);
    font-size: 1.8em;
    transition: color 0.3s ease, transform 0.3s ease;
}

.social-links a:hover {
    color: #0056b3;
    transform: scale(1.1);
}

/* Footer */
footer {
    background-color: var(--heading-color);
    color: var(--white);
    text-align: center;
    padding: 25px 0;
    font-size: 0.9em;
}

/* Animaciones CSS (se añadirán con JS) */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* Animaciones específicas */
.fade-in {
    opacity: 0;
    transition: opacity 1s ease-out;
}
.fade-in.animated {
    opacity: 1;
}

.slide-in-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.slide-in-left.animated {
    opacity: 1;
    transform: translateX(0);
}

.slide-in-right {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.slide-in-right.animated {
    opacity: 1;
    transform: translateX(0);
}

.scale-in {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.scale-in.animated {
    opacity: 1;
    transform: scale(1);
}

.zoom-in {
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.zoom-in.animated {
    opacity: 1;
    transform: scale(1);
}

.slide-in-bottom {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.slide-in-bottom.animated {
    opacity: 1;
    transform: translateY(0);
}

/* Add this to your css/style.css file */

.client-logos {
    text-align: center;
    margin-top: 50px;
}

.client-logos h3 {
    margin-bottom: 30px;
    font-size: 1.8em;
    color: #333; /* Adjust as per your design */
}

.logo-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px; /* Space between logos */
    align-items: center;
}

.client-logo {
    max-width: 120px; /* Adjust size as needed */
    height: auto;
    filter: grayscale(100%); /* Optional: make logos grayscale */
    opacity: 0.7; /* Optional: reduce opacity */
    transition: all 0.3s ease;
}

.client-logo:hover {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.05);
}
/* Retrasos para animaciones secuenciales */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; }
.delay-6 { transition-delay: 0.5s; }
/* Añade más .delay-X si necesitas más */

/* Media Queries para Responsividad general */
@media (max-width: 768px) {
    h1 {
        font-size: 2.8em;
    }
    h2 {
        font-size: 2em;
        margin-bottom: 30px;
    }
    .section {
        padding: 60px 0;
    }
    .hero-content {
        padding: 0 15px;
    }
    .hero-image {
        max-width: 90%;
    }
    .about-section .about-content {
        flex-direction: column;
        gap: 30px;
    }
    .about-section .profile-image {
        width: 200px;
        height: 200px;
    }
    .services-grid, .portfolio-grid, .contact-content {
        grid-template-columns: 1fr;
    }
    .service-item, .portfolio-item, .contact-form, .contact-info {
        margin: 0 auto;
        max-width: 450px; /* Limita el ancho en pantallas pequeñas */
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 2em;
    }
    .btn {
        padding: 10px 20px;
        font-size: 0.9em;
    }
    .navbar {
        padding: 10px 15px;
    }
    .logo {
        font-size: 1.5em;
    }
}