/* --- GOOGLE FONTS --- */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700;900&family=Roboto:wght@400;500&display=swap');

/* --- VARIABLES --- */
:root {
    --primary-color: #0a2540;
    --accent-color: #fbbc05;
    --text-color: #e0e0e0;
    --light-gray-color: #f4f4f4;
    --white-color: #ffffff;
    --header-height: 80px;
}

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

html {
    scroll-behavior: smooth;
}

/* Smooth scroll offset for fixed header */
section[id] {
    scroll-margin-top: calc(var(--header-height) + 20px);
}

body {
    font-family: 'Roboto', sans-serif;
    color: var(--text-color);
    background-color: #1c1c1c;
    line-height: 1.6;
}

h1, h2, h3 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    text-align: center;
    color: var(--white-color);
}

section {
    padding: 6rem 2rem;
    transition: transform 1s ease-out, opacity 1s ease-out;
}

.section--hidden {
    opacity: 0;
    transform: translateY(8rem);
}

.container {
    max-width: 1100px;
    margin: 0 auto;
}

/* --- HEADER & NAVIGATION --- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    height: var(--header-height);
}

.navbar {
    height: 100%;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.logo img {
    height: 50px; /* Ajusta la altura según sea necesario */
    width: auto;
}

.logo-text-wrapper {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.logo-text {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--white-color);
}

.logo-tagline {
    font-family: 'Roboto', sans-serif;
    font-size: 0.6rem;
    color: var(--white-color);
    letter-spacing: 1.5px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-item {
    position: relative;
}

.nav-link {
    text-decoration: none;
    color: var(--white-color);
    font-weight: 500;
    font-family: 'Montserrat', sans-serif;
    position: relative;
    padding-bottom: 5px;
}

.nav-arrow {
    font-size: 0.7rem;
    margin-left: 5px;
    transition: transform 0.3s ease;
}

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

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

.nav-link.active {
    color: var(--accent-color);
}

.dropdown-menu {
    position: absolute;
    top: 110%;
    left: 0;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
    list-style: none;
    padding: 0.5rem 0;
    margin: 0;
    border-radius: 5px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
    z-index: 1001;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown:hover .nav-arrow {
    transform: rotate(180deg);
}

.dropdown-menu li a {
    display: block;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    color: var(--white-color);
    font-family: 'Roboto', sans-serif;
    font-size: 0.9rem;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.dropdown-menu li a:hover {
    background-color: var(--accent-color);
    color: var(--primary-color);
}

.hamburger {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--white-color);
    transition: all 0.3s ease-in-out;
}

/* --- HERO SECTION --- */
.hero {
    padding: 0;
    margin-top: var(--header-height);
    height: calc(100vh - var(--header-height));
}

.slider {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: transform 0.7s ease-in-out;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

/* --- PORTFOLIO SECTION --- */
.portfolio {
    background-color: #282828;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.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%;
    display: block;
    transition: transform 0.4s ease;
}

.portfolio-item:hover img {
    transform: scale(1.1);
}

.portfolio-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(10, 37, 64, 0.9), rgba(10, 37, 64, 0.3));
    color: var(--white-color);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.5rem;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-overlay h3 {
    margin-bottom: 0.5rem;
}

/* --- ABOUT SECTION --- */
.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about-box {
    background-color: #282828;
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
    border: 1px solid #333;
}

.about-content p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-color);
}

.mission-section {
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 2px solid var(--accent-color);
}

.mission-section h3 {
    color: var(--accent-color);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.mission-section p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-color);
}

/* --- OUR WORK SECTION --- */
.work-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.work-image {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.25);
    overflow: hidden;
}

.mini-slider {
    width: 100%;
    height: 100%;
}

.mini-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: transform 0.7s ease-in-out;
}

.mini-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.work-description h3 {
    font-size: 2rem;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
}

.work-description p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    line-height: 1.7;
}

.btn-work {
    display: inline-block;
    margin-top: 1.5rem;
    padding: 0.8rem 1.5rem;
    background-color: var(--accent-color);
    color: var(--primary-color);
    text-decoration: none;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    border-radius: 5px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-work:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(251, 188, 5, 0.3);
}

/* --- CONTACT SECTION --- */
.contact {
    background-color: #282828;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    background-color: #1c1c1c;
    padding: 2.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.1rem;
}

.contact-item i {
    color: var(--accent-color);
    font-size: 1.5rem;
    width: 30px;
    text-align: center;
}

.contact-item a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-item a:hover {
    color: var(--accent-color);
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 0.8rem;
    margin-bottom: 1rem;
    border: 1px solid #444;
    border-radius: 5px;
    font-family: 'Roboto', sans-serif;
    font-size: 1rem;
    background-color: #333;
    color: var(--white-color);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: #999;
}

.contact-form button {
    width: 100%;
    padding: 1rem;
    background-color: var(--primary-color);
    color: var(--white-color);
    border: none;
    border-radius: 5px;
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.contact-form button:hover {
    background-color: var(--accent-color);
    color: var(--primary-color);
}

/* --- FOOTER --- */
.footer {
    background-color: #282828;
    color: var(--white-color);
    padding: 3rem 2rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
    max-width: 1100px;
    margin: 0 auto;
}

.social-links {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.social-links a {
    color: var(--white-color);
    font-size: 1.5rem;
    transition: color 0.3s ease, transform 0.3s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
}

.social-links a:hover {
    color: var(--accent-color);
    transform: scale(1.1);
    background-color: rgba(251, 188, 5, 0.2);
}

/* --- WHATSAPP FLOAT BUTTON --- */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 40px;
    right: 30px; /* Posicionado en la esquina derecha */
    background-color: #25D366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 6px rgba(0,0,0,0.4);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: transform 0.3s ease;
    opacity: 1; /* Asegura que estén visibles por defecto */
    visibility: visible;
}

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

/* --- MENSAJE ESTÁTICO PARA WHATSAPP --- */
/* Este es un nuevo estilo para que aparezca un mensaje similar al de "Platica con nosotros" */
.whatsapp-float::after {
    content: 'Platica con nosotros';
    position: absolute;
    right: 80px; /* Aumenta el espacio entre el texto y el botón */
    top: 50%;
    transform: translateY(-50%);
    background-color: var(--accent-color);
    color: var(--primary-color);
    padding: 10px 20px;
    border-radius: 20px;
    white-space: nowrap;
    font-size: 15px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(0,0,0,0.25);
    animation: float-bounce 2s ease-in-out infinite; /* Aplica la animación de flotar */
}

/* --- PORTFOLIO PAGE STYLES --- */
.main-content {
    margin-top: var(--header-height);
}

.hero-section {
    background: linear-gradient(135deg, var(--primary-color), #1a3a5c);
    padding: 4rem 2rem;
    text-align: center;
    color: var(--white-color);
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 900;
}

.hero-content p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Portfolio sections now display all content */
section {
    padding: 4rem 2rem;
    background-color: #1c1c1c;
}

section:nth-child(even) {
    background-color: #282828;
}

.projects-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    margin-top: 3rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.project-card {
    background-color: #282828;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: row;
    align-items: center;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.4);
}

.project-image {
    width: 40%;
    height: 250px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f8f8;
    border-radius: 8px 0 0 8px;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

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

/* Image Slider Styles */
.image-slider {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.slider-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    cursor: pointer;
}

.slider-img.active {
    opacity: 1;
}

.project-info {
    padding: 2rem;
    width: 60%;
    flex: 1;
}

.project-info h3 {
    color: var(--accent-color);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.project-details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.detail-item {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    font-size: 0.95rem;
    line-height: 1.5;
}

.detail-item i {
    color: var(--accent-color);
    font-size: 1.1rem;
    margin-top: 0.2rem;
    min-width: 20px;
}

.detail-item span {
    color: var(--text-color);
}

.industria-card {
    border: 2px solid var(--accent-color);
}

.industria-card .project-info h3 {
    color: var(--white-color);
    font-size: 1.8rem;
}

/* --- IMAGE MODAL STYLES --- */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    animation: zoomIn 0.3s ease;
}

.close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: var(--white-color);
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 2001;
    transition: color 0.3s ease;
}

.close:hover {
    color: var(--accent-color);
}

#caption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: var(--white-color);
    padding: 10px 0;
    height: 150px;
    font-family: 'Montserrat', sans-serif;
    font-size: 1.1rem;
}

/* Modal Navigation Styles */
.modal-navigation {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 2002;
    pointer-events: none;
}

.nav-btn {
    background-color: rgba(0, 0, 0, 0.5);
    color: var(--white-color);
    border: none;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
    padding: 15px 20px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
    pointer-events: auto;
}

.nav-btn:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.image-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.7);
    color: var(--white-color);
    padding: 8px 16px;
    border-radius: 20px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    z-index: 2002;
}

.project-img {
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.project-img:hover {
    opacity: 0.8;
}

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

@keyframes zoomIn {
    from { transform: scale(0.5); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* --- RESPONSIVE DESIGN --- */
@media (max-width: 768px) {
    h2 {
        font-size: 2rem;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: var(--header-height);
        flex-direction: column;
        background-color: rgba(0, 0, 0, 0.9);
        backdrop-filter: blur(10px);
        width: 100%;
        text-align: center;
        transition: left 0.3s ease-in-out;
        gap: 0;
        padding: 2rem 0;
    }

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

    .nav-item {
        margin: 0.5rem 0;
        width: 100%;
    }

    .nav-item.dropdown {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .dropdown-menu {
        position: static;
        display: block;
        opacity: 1;
        visibility: visible;
        transform: none;
        background: none;
        backdrop-filter: none;
        box-shadow: none;
        min-width: 0;
        padding: 0.5rem 0 0 0;
        border-radius: 0;
        width: 100%;
    }

    .dropdown-menu li a {
        color: #ccc;
        font-size: 0.9em;
    }

    .dropdown-menu li a:hover {
        background-color: transparent;
        color: var(--accent-color);
    }

    .hamburger {
        display: block;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }
    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .work-content {
        grid-template-columns: 1fr;
    }

    .contact-content {
        grid-template-columns: 1fr;
        padding: 1.5rem;
        text-align: center;
    }

    .contact-content > .logo {
        justify-self: center;
    }

    .contact-info {
        align-items: center;
        text-align: center;
    }

    .contact-item {
        justify-content: center;
        flex-wrap: wrap;
        text-align: center;
        word-break: break-word;
        max-width: 100%;
    }

    .contact-item a {
        word-break: break-all;
        max-width: 100%;
        display: block;
    }

    .about-box {
        padding: 2rem;
    }

    .about-content p {
        font-size: 1rem;
    }

    .mission-section h3 {
        font-size: 1.3rem;
    }

    .mission-section p {
        font-size: 1rem;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    /* Portfolio responsive styles */
    .hero-content h1 {
        font-size: 2rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        max-width: 100%;
        margin: 3rem 1rem;
    }

    .project-card {
        margin: 0;
        flex-direction: column;
    }

    .project-image {
        width: 100%;
        height: 200px;
        border-radius: 8px 8px 0 0;
    }

    .project-info {
        padding: 1.5rem;
        width: 100%;
    }

    .detail-item {
        font-size: 0.9rem;
    }

    /* Hero section mobile adjustments */
    .hero {
        margin-top: var(--header-height);
        height: calc(100vh - var(--header-height));
    }

    .slider {
        padding: 10px;
    }

    .slide {
        top: 10px;
        left: 10px;
        width: calc(100% - 20px);
        height: calc(100% - 20px);
    }

    /* Ocultar el mensaje de WhatsApp en móvil para no ocupar espacio */
    .whatsapp-float::after {
        display: none;
    }
}
/* Keyframes para el efecto de flotar/rebotar */
@keyframes float-bounce {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-5px); /* Se mueve 5px hacia arriba */
    }
    100% {
        transform: translateY(0px);
    }
}


.hide-on-bottom {
    opacity: 0;
    visibility: hidden;
    pointer-events: none; /* Para que no se puedan clickear cuando están ocultos */
    transition: opacity 0.3s ease, visibility 0.3s ease;
}