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

/* Base Styles */
body {
    font-family: 'Montserrat', sans-serif;
    margin: 0;
    color:#004b6d;
}


/* -----------------  main menu ------------------------  */
.banner {
    background: url('src-images/iStock-2149088667.jpg') no-repeat center/cover;
    padding: 20px;
    text-align: center;
    position: relative;
    top: 0;
    transition: opacity 0.3s ease;
    height: 455px;
    overflow: hidden;
    z-index: 200;
}

.nav-menu-banner {
    display: flex;
    text-align: left;
    /* justify-content: center; */
    background: transparent;
    position: absolute;
    top: 0;
    width: 100%;
    z-index: 2;
}

.nav-menu-banner ul {
    display: flex;
    list-style: none;
    margin-top: 5px;
    padding: 10px;
    justify-content: flex-start;
}

.nav-menu-banner ul li a {
    text-decoration: none;
    padding: 10px 20px;
    transition: transform 0.3s ease, text-shadow 0.3s ease;
    color: white;
    font-size: 1.3em;
    font-weight: bold;
}

.banner-subtitle {
    color: white;
    margin-top: 150px;
}

.banner-subtitle, .banner-subtitle-small {
    text-align: center;
    margin-right: 20px;
    color: white !important;
    transition: opacity 0.3s ease;
    text-align: center; 
    margin-right: 20px; 
    text-shadow: 3px 3px 5px rgba(0, 0, 0, 0.3), -3px -3px 5px rgba(255, 255, 255, 0.2);
}

/* ---------------- sticky menu  -----------------------  */
.nav-menu-sticky { /*, .nav-menu-banner { */
    display: flex;
    justify-content: center;
    list-style: none;
    margin-top: 5px;
    padding: 10px;
    justify-content: flex-start;    
}

.nav-menu-sticky {
    display: none;
    position: fixed;
    top: 0;
    width: 100%;
    background-color :#004b6d;
    z-index: 1000;
    padding: 10px 0;
}

.nav-menu-sticky ul {
    display: flex;
    justify-content: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-menu-sticky ul li a {
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    font-size: 1em;
}

/*  ---------------    overlay menu   ------------------------ */
.overlay-menu {
    position: fixed;
    top: 0;
    left: 100%;
    background: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: left 0.3s ease;
    background-size: contain;
    width: 100vw;
    height: 100vh;
    background-image: url('src-images/menu-contextual/fondo-contextual-minimalista.png');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
}


#portafolio .proyectos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    .proyecto {
        background-color: #fff;
        box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.1);
        padding: 20px;
        transition: transform 0.3s ease;
        &:hover {
            transform: scale(1.05);
        }
    }
}

div#contacto {
    background-color: #004b6d;
    color: #fff;
    text-align: center;
    padding: 2rem;
    margin-top: 80px;
    form {
        display: flex;
        flex-direction: column;
        align-items: center;
        input, textarea {
            margin: 0.5rem 0;
            padding: 0.5rem;
            width: 80%;
            max-width: 500px;
        }
    }
}

/* -----------------------   seccion de portafolio -----------------------  */

.portfolio-section {
    text-align: center;
    padding: 50px 0;
    
    h2 {
        font-size: 2em;
        margin-bottom: 20px;
        color: #004b6d;
        opacity: 0;
        animation: fadeIn 2s ease forwards;
    }

    .portfolio-gallery {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
        padding: 20px;

        .portfolio-item {
            position: relative;
            overflow: hidden;
            border-radius: 8px;
            box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
            transition: transform 0.3s ease;
            opacity: 0;
            transform: scale(0.9);
            animation: fadeInUp 0.5s ease forwards;
            animation-delay: calc(0.1s * var(--i));
            height: 100%;

            &:hover {
                transform: scale(1.05);
                box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.2);
            }

            img {
                width: 100%;
                display: block;
                border-radius: 8px;

                height: 100%;
                object-fit: cover;
            }

            .portfolio-overlay {
                position: absolute;
                top: 0;
                left: 0;
                /* width: 100%; */
                height: 100%;
                background: rgba(0, 0, 0, 0.6);
                color: #fff;
                display: flex;
                flex-direction: column;
                justify-content: center;
                align-items: center;
                text-align: center;
                padding: 20px;
                opacity: 0;
                transform: translateY(20px);
                transition: opacity 0.3s ease, transform 0.3s ease;
                border-radius: 8px;
            }
            
            &:hover .portfolio-overlay {
                opacity: 1;
                transform: translateY(0);
            }
        }
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}



/*  --------------------------  seccion de servicios  ---------------------- */
.services-section {
    text-align: center;
    padding: 50px 0;

    h2 {
        font-size: 2em;
        margin-bottom: 20px;
        color: #004b6d;
        opacity: 0;
        animation: fadeIn 2s ease forwards;
    }

    .service-list {
        display: flex;
        flex-wrap: wrap;
        gap: 20px;
        justify-content: center;

        .service-item {
            background-color: #fff;
            border: 1px solid #ddd;
            padding: 20px;
            width: 250px;
            box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
            border-radius: 8px;
            transition: transform 0.3s ease, box-shadow 0.3s ease;
            opacity: 0;
            transform: translateY(20px);
            animation: fadeInUp 0.5s ease forwards;
            animation-delay: calc(0.1s * var(--i));

            &:hover {
                transform: translateY(-10px);
                box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.2);
            }
        }
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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



/* ------------------------ about me ----------------------*/
.about-section {
    margin-top: 60px !important;
    background: linear-gradient(145deg, #ffffff, #e6e6e6);
    box-shadow: 10px 10px 20px #d1d1d1, -10px -10px 20px #ffffff;
    border-radius: 12px;
    padding: 40px;
    max-width: 800px;
    margin: auto;

    h2 {
        font-size: 2em;
        text-align: center;
        margin-bottom: 20px;
        color: #004b6d;
        opacity: 1;
        animation: fadeIn 2s ease forwards;
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    }    

    p, ul {
        color: #004b6d;
        line-height: 1.6;
    }

    li {
        padding-left: 10px;
        margin: 8px 0;
    }

    ul.show {
        margin-left: 40px;
    }
}

h2 {
    position: relative;
    display: inline-block;
    padding-bottom: 5px;

    &::after {
        content: '';
        position: absolute;
        left: 0;
        bottom: 0;
        height: 2px;
        width: 100%;
        background-color: #ffa726;
        transform: scaleX(0);
        transform-origin: left;
        transition: transform 0.5s ease;
    }

    &.show::after {
        transform: scaleX(1);
    }
}


/* -----------------  small devices  ------------------------  */
@media (max-width: 768px) {
    .nav-menu-sticky {
        display: none !important;
    }

    .menu {
        position: fixed;
        top: 0;
        left: 100%;
        height: 100%;
        width: 100%;
        background: white(0, 0, 0, 0.9);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transition: left 0.3s ease;
        z-index: 1002;
        background-size: 100% 100vh;
        font-size: 0.7em; 

    }

    .menu.active {
        display: flex;
        opacity: 1;
        visibility: visible;
    }

    .menu-toggle {
        display: block;
    }

    .banner-subtitle {
        font-size: 0.9em;
    }

    .banner-subtitle-small{
        font-size: 0.6em;
    }
    .overlay-menu {
        position: fixed;
        top: 0;
        left: 100%;
        height: 100%;
        width: 100%;
        background: white(0, 0, 0, 0.9);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transition: left 0.3s ease;
        z-index: 1002;
        background-size: 100% 100vh;
        font-size: 0.7em;
        background-color: rgba(0, 0, 0, 0.8); /* Optional overlay background */
    }


    .overlay-menu ul {
        list-style: none;
        text-align: center;
        line-height: 2;
    }

    .overlay-menu ul li a {
        font-size: 1rem; 
        color: #8B4513;
        text-shadow: 2px 2px 4px rgba(139, 69, 19, 0.5);
        font-weight: bold; 
        text-decoration: none;
        transition: color 0.3s ease;
    }
    
    .overlay-menu ul li a:hover {
        color: #A0522D;
        text-shadow: 2px 2px 6px rgba(139, 69, 19, 0.8);
    }
    

    .overlay-menu.active {
        left: 0;
    }

    .hamburger-menu {
        position: fixed;
        top: 15px;
        right: 20px;        
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        cursor: pointer;
        width: 50px;
        height: 50px;
        background-color: red;
        border-radius: 50%;
        transition: background-color 0.3s ease;
        z-index: 1001; 
    }
    
    .hamburger-menu span {
        display: block;
        width: 20px;
        height: 3px;
        background-color: white; 
        margin: 4px 0;
        transition: transform 0.4s ease;
    }
    
    /* Optional hover effect */
    .hamburger-menu:hover {
        background-color: darkred; 
    }
    
    /* --- Animation for 'X' close style when the menu is open  */
    .hamburger-menu.open span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .hamburger-menu.open span:nth-child(2) {
        opacity: 0; 
    }
    
    .hamburger-menu.open span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    .overlay-menu .close-menu {
        position: absolute;
        top: 20px;
        right: 20px;
        background-color: red;
        color: white;
        font-size: 2.5rem;
        border: none;
        border-radius: 50%;
        width: 50px;
        height: 50px;
        display: flex;
        justify-content: center;
        align-items: center;
        cursor: pointer;
        transition: background-color 0.3s ease;
    }
    
    .overlay-menu .close-menu:hover {
        background-color: darkred; 
    }

    .about-section {
        p, ul {
            line-height: 1.2;
        }
    }
    
}

/* ---------------- footer  -------------  */
footer {
    background-color: #1e3a5f; /* Navy blue */
    color: #e0e0e0; /* Light gray for text */
    padding: 2rem 1rem;
    text-align: center;
    font-size: 0.9em;
    margin-top: 150px;
}

.footer-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 20px;
}

.footer-left,
.footer-center,
.footer-right {
    flex: 1;
    min-width: 250px;
    text-align: left;
}

.footer-left h3 {
    color: #ffffff;
    margin-bottom: 10px;
    font-size: 1.5em;
}

.footer-left p {
    line-height: 1.5;
}

.footer-center ul {
    display: flex;
    gap: 15px;
    list-style: none;
    padding: 0;
    justify-content: center;
    margin: 10px 0;
}

.footer-center ul li a {
    color: #e0e0e0;
    font-size: 1.5em;
    transition: color 0.3s ease;
}

.footer-center ul li a:hover {
    color: #ffcc00; /* Subtle yellow for hover */
}

.footer-center p a {
    color: #ffcc00; /* Highlighted email color */
    text-decoration: none;
    font-weight: bold;
}

.footer-center p a:hover {
    color: #ffd633; /* Brighter yellow on hover */
}

.footer-right form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-right input[type="email"] {
    padding: 0.8rem;
    border: none;
    border-radius: 5px;
    font-size: 1em;
    width: 100%;
    color: #1e3a5f;
}

.footer-right button {
    padding: 0.8rem;
    background-color: #ffcc00;
    border: none;
    border-radius: 5px;
    color: #1e3a5f;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.footer-right button:hover {
    background-color: #ffd633;
}

.footer-bottom {
    margin-top: 1rem;
    font-size: 0.8em;
    border-top: 1px solid #e0e0e0;
    padding-top: 10px;
    color: #e0e0e0;
}

/* ------- scroll to top --------   */
#scrollTopBtn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 12px 24px;
    background-color: red ; /* Intense red background */
    color: #fff; /* White font */
    border: none;
    border-radius: 50px;
    cursor: pointer;
    display: none; /* Initially hidden */
    z-index: 1000;
    font-size: 16px;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.3s ease; /* Smooth hover animation */
  }
  #scrollTopBtn:hover {
    background-color: darkred; /* Lighter red on hover */
    transform: scale(1.1); /* Slight enlargement on hover */
  }
