/* Custom Styles */
:root {
    --primary-color: #0071B9;
    --secondary-color: #003399;
    --text-dark: #333333;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Montserrat', sans-serif;
    color: var(--text-dark);
    overflow-x: hidden;
}

/* Scroll adjustment for fixed navbar */
section[id] {
    scroll-margin-top: 100px;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0);
    }
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Navbar */
.navbar {
    background-color: var(--primary-color);
    padding: 1rem 0 1.5rem 0;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 2vw), 0 100%);
}

.navbar-brand img {
    height: 45px;
}

.nav-link {
    color: #ffffff !important;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    padding-bottom: 5px;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: #ffffff;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Hero Section */
.hero {
    position: relative;
    background-color: #000;
    /* Fondo negro para transiciones fluidas */
    padding: 180px 0 120px;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #ffffff;
}

/* Hacer la transición del carrusel más suave */
.carousel-fade .carousel-item {
    transition: opacity 1.2s ease-in-out;
}



.hero .container {
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-weight: 600;
    font-size: 32px;
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.hero p {
    font-weight: 400;
    font-size: 18px;
    margin-bottom: 30px;
}

.btn-custom {
    background-color: var(--secondary-color);
    color: #ffffff;
    font-weight: 600;
    padding: 12px 35px;
    border: none;
    border-radius: 50px;
    text-transform: uppercase;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: inline-block;
}

/* Animaciones exclusivas para el primer slide del carrusel */
.carousel-item:first-child h1 {
    animation: fadeInUp 1s ease-out forwards;
}

.carousel-item:first-child p {
    opacity: 0;
    animation: fadeInUp 1s ease-out 0.3s forwards;
}

.carousel-item:first-child .btn-custom {
    opacity: 0;
    animation: fadeInUp 1s ease-out 0.6s forwards;
}

.btn-custom:hover {
    background-color: #002266;
    color: #ffffff;
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* Info Section */
.info-section {
    padding: 60px 0;
    background-color: #ffffff;
}

.info-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.info-icon img {
    height: 70px;
    animation: float 4s ease-in-out infinite;
}

.info-text h2 {
    font-weight: 600;
    font-size: 20px;
    color: var(--text-dark);
    margin-bottom: 5px;
}

.info-text p {
    font-weight: 400;
    font-size: 16px;
    color: var(--text-dark);
    margin: 0;
}

/* Projects Section */
.projects-section {
    padding: 80px 0;
    background-color: #f4f6f9;
}

.projects-section h2 {
    font-weight: 600;
    color: var(--primary-color);
}

.project-card {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    background-color: #000;
}

.project-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    transition: transform 0.5s ease;
    display: block;
}

.project-card:hover .project-img {
    transform: scale(1.05);
}

.project-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 40px 20px 20px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85), transparent);
}

/* Clients Section */
.clients-section {
    padding: 60px 0;
    background-color: #ffffff;
}

.clients-section h2 {
    font-weight: 600;
    color: var(--primary-color);
}

.clients-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 50px;
    flex-wrap: wrap;
}

.client-logo {
    width: 160px;
    height: 60px;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.6;
    transition: all 0.4s ease;
}

.client-logo:hover {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.05);
}

/* Contact Section */
.contact-section {
    background-image: url('../img/formback.webp');
    background-size: cover;
    background-position: center;
    padding: 80px 0 130px;
    /* Increased bottom padding to ensure image goes deep under the footer */
    position: relative;
}

.contact-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.3);
}

.form-wrapper {
    background-color: rgba(255, 255, 255, 0.85);
    /* Leve transparencia */
    backdrop-filter: blur(8px);
    /* Mejora de legibilidad por la transparencia */
    -webkit-backdrop-filter: blur(8px);
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 2;
    max-width: 450px;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.form-wrapper:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.form-wrapper h3 {
    font-weight: 600;
    font-size: 20px;
    margin-bottom: 25px;
    color: var(--text-dark);
}

.form-group {
    margin-bottom: 15px;
}

.form-label {
    font-weight: 400;
    font-size: 14px;
    margin-bottom: 5px;
}

.form-control {
    font-size: 14px;
    border-radius: 0;
    border: 1px solid #ddd;
    padding: 10px;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: none;
}

.btn-submit {
    background-color: var(--primary-color);
    color: #ffffff;
    font-weight: 600;
    padding: 12px 30px;
    border: none;
    border-radius: 50px;
    transition: all 0.4s ease;
    width: 100%;
    max-width: 200px;
    display: block;
    margin: 20px auto 0;
}

.btn-submit:hover {
    background-color: var(--secondary-color);
    color: #ffffff;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 113, 185, 0.3);
}

/* Footer */
footer {
    background-color: var(--primary-color);
    padding: 80px 0 30px;
    text-align: center;
    color: #ffffff;
    clip-path: polygon(0 5vw, 100% 0, 100% 100%, 0 100%);
    margin-top: -5vw;
    /* Add negative margin to overlap the contact section completely */
    position: relative;
    z-index: 10;
}

footer .footer-logo {
    height: 50px;
    margin-bottom: 20px;
}

footer .footer-contact img {
    height: 16px;
    width: 16px;
    margin-bottom: 0;
    vertical-align: middle;
    transition: transform 0.3s ease;
}

footer .footer-contact {
    font-weight: 400;
    font-size: 14px;
    cursor: default;
}

footer .footer-contact:hover img {
    transform: scale(1.2) rotate(-10deg);
}

footer a {
    color: #ffffff;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .info-content {
        flex-direction: column;
        text-align: center;
    }
}

/* Floating WhatsApp Button */
.floating-whatsapp {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: #20BA5A;
    border-radius: 50%;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.3);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.floating-whatsapp:hover {
    transform: scale(1.1);
}

.floating-whatsapp img {
    width: 35px;
    height: 35px;
}