@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;700&display=swap');

/* ===== VARIABLES ===== */
:root {
    --primary-color: #000000;
    --secondary-color: #ffffff;
    --background-color: #ffffff;
    --text-color: #333333;
    --hover-color: #f5f5f5;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    --border-radius: 8px;
}

/* ===== RESET ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ===== NAVBAR MINIMALISTA Y FIJO ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    background: #ffffff;
    z-index: 3000;
    padding: 0;
    margin: 0;
    border: none;
    border-radius: 0;
    box-shadow: none;
}

.navbar-inner {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    width: 100%;
    height: 56px;
    padding: 0 1.2rem;
    box-sizing: border-box;
    background: #ffffff;
}

.navbar-logo {
    flex: 1;
    display: flex;
    align-items: center;
}

.navbar-hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 38px;
    height: 38px;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    cursor: pointer;
    position: relative;
    z-index: 3001;
    transition: none;
}

.navbar-hamburger .bar {
    width: 24px;
    height: 3px;
    background: #000000;
    margin: 3px 0;
    border-radius: 0;
    box-shadow: none;
    transition: all 0.35s cubic-bezier(0.4,0,0.2,1);
    display: block;
}

.navbar-hamburger.active .bar:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.navbar-hamburger.active .bar:nth-child(2) {
    opacity: 0;
}

.navbar-hamburger.active .bar:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

/* Menú desplegable */
.navbar-menu {
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    width: 100%;
    background: #ffffff;
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 1.2rem 0.5rem 1.5rem 0.5rem;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.5s cubic-bezier(0.4,0,0.2,1), opacity 0.3s;
    z-index: 2999;
}

.navbar-menu.active {
    height: calc(100vh - 56px);
    max-height: none;
    opacity: 1;
    overflow-y: auto;
    overflow-x: hidden;
}
/* Bloquear scroll del body cuando el menú está abierto */
body.menu-open {
    overflow: hidden;
    touch-action: none;
}

/* Secciones del menú */
.navbar-section {
    margin-bottom: 1.2rem;
}

.navbar-header {
    width: 100%;
    background: #ffffff;
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 0.8rem 1.2rem;
    font-size: 1.1rem;
    font-family: 'Poppins', sans-serif;
    color: #000000;
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: none;
    outline: none;
}

.navbar-header.active {
    background: #ffffff;
}

.navbar-arrow {
    font-size: 1.1em;
    margin-left: 0.5em;
    transition: transform 0.3s;
    color: #000000;
}

.navbar-header.active .navbar-arrow {
    transform: rotate(180deg);
}

/* Contenido de cada sección (acordeón) */
.navbar-content {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s cubic-bezier(0.4,0,0.2,1), opacity 0.3s;
    background: #ffffff;
    border-radius: 0;
    box-shadow: none;
    margin-top: 0.2rem;
    padding: 0 0.5rem;
}

.navbar-content.active {
    opacity: 1;
    max-height: none;
    padding-bottom: 1.2rem;
    overflow: visible;
}

/* ===== PROYECTOS - GALERÍAS ===== */
.project-category {
    margin-bottom: 2.5rem;
    padding: 0;
}

.category-title-wrapper {
    padding: 1rem 3rem 0 3rem;
}

.category-title {
    font-size: 1.4rem;
    font-weight: 300;
    font-family: 'Poppins', sans-serif;
    margin-bottom: 1rem;
    padding-left: 0;
    color: var(--text-color);
}

/* Contenedor independiente que rompe el padding del nav-menu */
.gallery-wrapper {
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    width: 100vw;
    display: flex;
    align-items: center;
    gap: 0;
    padding: 0;
    margin-bottom: 1rem;
}

.gallery-viewport {
    flex: 1;
    overflow: hidden;
    border-radius: 0;
    background: transparent;
    padding: 0;
    position: relative;
}

.gallery-track {
    display: flex;
    gap: 0.8rem;
    transition: transform var(--transition);
    will-change: transform;
}

.gallery-img {
    flex: none;
    height: 200px;
    object-fit: cover;
    border-radius: 0;
    border: 1px solid rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all var(--transition);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.gallery-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.15);
    background: rgba(255, 255, 255, 0.95);
    color: var(--text-color);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.gallery-btn.prev {
    left: 12px;
}

.gallery-btn.next {
    right: 12px;
}

.gallery-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-50%) scale(1.15);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    border-color: rgba(0, 0, 0, 0.25);
}

.gallery-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: translateY(-50%);
}

.gallery-btn:disabled:hover {
    background: rgba(255, 255, 255, 0.95);
    transform: translateY(-50%);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-color: rgba(0, 0, 0, 0.15);
}

/* ===== SERVICES CONTENT ===== */
.services-content {
    padding: 0;
}

.services-text {
    margin-bottom: 2rem;
    padding: 1rem 3rem;
}

.services-text p {
    margin-bottom: 1rem;
    text-align: justify;
    line-height: 1.7;
    font-family: 'Poppins', sans-serif;
    font-weight: 300;
}

.services-text ul {
    list-style: disc inside;
    padding-left: 1.5rem;
}

.services-text ul li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
    font-family: 'Poppins', sans-serif;
    font-weight: 300;
}

.services-profile {
    /* Eliminar flex y estilos generales, se maneja por bloques específicos */
    display: block;
}


/* --- Desktop profile: text left, image right, image full --- */
.profile-desktop {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    justify-content: center;
    gap: 3rem;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto 2rem auto;
}
.profile-text-desktop {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2rem 2.5rem 2rem 3rem;
    font-size: 1.15rem;
    text-align: left;
}
.profile-text-desktop p {
    margin-bottom: 1.2rem;
    text-align: left;
    line-height: 1.7;
    font-family: 'Poppins', sans-serif;
}
.profile-image-desktop {
    flex: 1 1 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 2rem 3rem 2rem 0;
}
.img-migue-desktop {
    width: 100%;
    max-width: 980px;
    height: 480px;
    object-fit: contain;
    object-position: center;
    border-radius: 0;
    border: none;
    
}

/* --- Mobile profile: stacked, as before --- */
.profile-mobile {
    display: block;
}
.profile-text {
    width: 100%;
    padding: 0 3rem 0 3rem;
    margin-bottom: 2rem;
}
.profile-text p {
    margin-bottom: 1rem;
    text-align: justify;
    line-height: 1.7;
    font-family: 'Poppins', sans-serif;
    font-weight: 300;
}
.profile-image {
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    width: 100vw;
    margin-top: 0;
    margin-bottom: 2rem;
    order: -1;
}
.profile-image img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    object-position: center;
    border-radius: 0;
    border: none;
}

/* --- Responsive: mostrar solo el bloque correspondiente --- */
@media (max-width: 1024px) {
    .profile-desktop { display: none !important; }
    .profile-mobile { display: block !important; }
}
@media (min-width: 1025px) {
    .profile-desktop { display: flex !important; }
    .profile-mobile { display: none !important; }
}

/* ===== HERO CAROUSEL ===== */
.hero-carousel {
    position: relative;
    width: 100%;
    min-height: 100vh;
    height: 100vh;
    background: transparent;
    margin-top: 56px;
}

.logo-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    pointer-events: none;
}

.hero-logo {
       max-width: 240px;
    height: auto;
    filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.3));
}

.carousel-container {
    position: relative;
    width: 100%;
    height: 100vh;
    background: transparent;
}

/* Mobile Carousel - Solo en Mobile */
.mobile-carousel {
    display: block;
}

/* Desktop Carousel - Solo en Desktop */
.desktop-carousel {
    display: none;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    background: transparent;
}

.carousel-slide.active {
    opacity: 1;
}

.hero-img {
    width: 100%;
    height: 100vh;
    object-fit: cover;
    filter: brightness(0.7);
    background: transparent;
}

/* Media Query para mostrar/ocultar carruseles */
@media (min-width: 768px) {
    .mobile-carousel {
        display: none;
    }
    
    .desktop-carousel {
        display: block;
    }
}

/* ===== FOOTER ===== */
.footer {
    padding: 2.5rem 1rem 1.5rem 1rem;
    margin-top: 2rem;
    background: #ffffff;
    border: none;
    box-shadow: none;
}

.footer-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.social-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.2rem;
    margin-bottom: 1rem;
}

.social-link {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
        border-radius: 50%;
        border: 1.5px solid #e5e5e5;
        background: #fff;
        overflow: hidden;
        box-shadow: 0 1px 4px 0 rgba(0,0,0,0.04);
        transition: box-shadow 0.25s cubic-bezier(0.4,0,0.2,1), transform 0.18s cubic-bezier(0.4,0,0.2,1), border-color 0.18s cubic-bezier(0.4,0,0.2,1);
}

/* Efecto de resplandor radial animado en hover */
.social-link::before {
    content: '';
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    z-index: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.55s cubic-bezier(0.4,0,0.2,1), box-shadow 0.55s cubic-bezier(0.4,0,0.2,1), background 0.55s cubic-bezier(0.4,0,0.2,1);

}

.social-link img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    padding: 0;
    transition: transform 0.18s cubic-bezier(0.4,0,0.2,1), filter 0.18s cubic-bezier(0.4,0,0.2,1);
    filter: grayscale(0.15) brightness(0.98);
}

.social-link:hover {
    background: #fff;
        box-shadow: 0 2px 8px 0 rgba(0,0,0,0.08);
        transform: scale(1.08);
        border-color: #bdbdbd;
        z-index: 2;
}
.social-link.whatsapp:hover {
    border-color: #25D36633;
}
.social-link.gmail:hover {
    border-color: #EA433533;
}
.social-link.instagram:hover {
    border-color: #26262622;
}

.social-link:hover img {
    transform: scale(1.10);
    filter: grayscale(0) brightness(1.04);
    transition: transform 0.18s cubic-bezier(0.4,0,0.2,1), filter 0.18s cubic-bezier(0.4,0,0.2,1);
}

.tooltip {
    position: absolute;
    bottom: -35px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color);
    color: var(--secondary-color);
    padding: 0.3rem 0.6rem;
    border-radius: 0;
    font-size: 0.8rem;
    font-family: 'Poppins', sans-serif;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
}

.social-link:hover .tooltip {
    opacity: 1;
}

.footer-divider {
    height: 1px;
    background: rgba(0, 0, 0, 0.1);
    margin: 1.5rem 0;
}

.footer-text {
    color: var(--text-color);
    font-size: 0.9rem;
    font-family: 'Poppins', sans-serif;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .gallery-wrapper {
        position: relative;
        left: 50%;
        right: 50%;
        margin-left: -50vw;
        margin-right: -50vw;
        width: 100vw;
        padding: 0;
        margin-bottom: 1rem;
        gap: 0;
    }
    
    .gallery-btn {
        width: 32px;
        height: 32px;
        font-size: 1.1rem;
    }
    
    .gallery-img {
        width: 135px;
        height: 95px;
    }
    
    .gallery-track {
        gap: 0.7rem;
    }
    
    .category-title {
        font-size: 1.3rem;
    }
}

@media (max-width: 768px) {
    .navbar-inner {
        height: 48px;
        padding: 0 0.5rem;
    }
    
    .navbar-menu {
        top: 48px;
        padding: 1rem 0.2rem 1.2rem 0.2rem;
    }
    .navbar-menu.active {
        height: calc(100vh - 48px);
    }
    
    .navbar-header {
        font-size: 1rem;
        padding: 0.7rem 1rem;
    }
    
    .hero-carousel {
        margin-top: 48px;
    }
    
    .img-migue {
        width: 100vw;
        height: auto;
        max-width: 100vw;
        max-height: 100vh;
        object-fit: contain;
        object-position: center;
        border-radius: 0;
        border: none;
        margin: 0;
        padding: 0;
        box-sizing: border-box;
        background: #fff;
        display: block;
    }
    
    .project-category {
        margin-bottom: 2rem;
        padding: 0;
    }
    
    .category-title-wrapper {
        padding: 1rem 1rem 0 1rem;
    }
    
    .category-title {
        font-size: 1.2rem;
        margin-bottom: 0.8rem;
        padding-left: 0;
    }
    
    .services-text {
        padding: 1rem 2rem;
    }
    
    .profile-text {
        padding: 0 2rem 0 2rem;
        margin-bottom: 2rem;
    }
    
    .services-profile {
        flex-direction: column;
        gap: 0;
    }
    
    .profile-image {
        position: relative;
        left: 50%;
        right: 50%;
        margin-left: -50vw;
        margin-right: -50vw;
        width: 100vw;
        margin-top: 0;
        margin-bottom: 2rem;
        align-self: stretch;
        order: -1;
    }
    
    /* Carrusel estático para mobile */
    .gallery-wrapper {
        position: relative;
        left: 50%;
        right: 50%;
        margin-left: -50vw;
        margin-right: -50vw;
        width: 100vw;
        gap: 0.5rem;
        padding: 0;
        margin-bottom: 1rem;
    }
    
    .gallery-viewport {
        position: relative;
        height: 280px;
        overflow: hidden;
        border-radius: 0;
        background: transparent;
        padding: 0;
        box-shadow: none;
    }
    
    .gallery-track {
        position: relative;
        height: 100%;
        width: 100%;
        gap: 0;
    }
    
    .gallery-img {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
        opacity: 0;
        transform: translateX(100%);
        transition: all 0.4s ease-in-out;
        border-radius: 0;
    }
    
    .gallery-img.active {
        opacity: 1;
        transform: translateX(0);
        z-index: 2;
    }
    
    .gallery-img.prev {
        opacity: 0;
        transform: translateX(-100%);
        z-index: 1;
    }
    
    /* Botones de navegación para carrusel - transparentes */
    .gallery-btn {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        z-index: 10;
        background: rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(4px);
        border: 1px solid rgba(255, 255, 255, 0.2);
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
        color: rgba(255, 255, 255, 0.9);
        transition: all 0.2s ease;
        border-radius: 50%;
    }
    
    .gallery-btn:hover {
        background: rgba(255, 255, 255, 0.2);
        color: rgba(255, 255, 255, 1);
        transform: translateY(-50%) scale(1.05);
    }
    
    .gallery-btn.prev {
        left: 8px;
    }
    
    .gallery-btn.next {
        right: 8px;
    }
    
    .profile-image img {
        width: 100%;
        height: 250px;
        object-fit: cover;
        object-position: center;
        border-radius: 0;
        border: none;
    }
    
    .hero-logo {
           max-width: 190px;
    }
    
    .social-links {
        gap: 1.5rem;
    }
    
    .social-link {
        width: 45px;
        height: 45px;
        border-radius: 14px;
    }
    .social-link img {
        width: 28px;
        height: 28px;
    }
}

@media (max-width: 480px) {
    .navbar-inner {
        height: 48px;
        padding: 0 0.5rem;
    }
    
    .navbar-menu {
        top: 48px;
        padding: 1rem 0.2rem 1.2rem 0.2rem;
    }
    
    .navbar-header {
        font-size: 1rem;
        padding: 0.7rem 1rem;
    }
    
    .hero-carousel {
        margin-top: 48px;
    }
    
    .category-title-wrapper {
        padding: 1rem 0.8rem 0 0.8rem;
    }
    
    .category-title {
        font-size: 1.1rem;
        margin-bottom: 0.6rem;
        padding-left: 0;
    }
    
    .services-text {
        padding: 0.8rem 1.5rem;
    }
    
    .profile-text {
        padding: 0 1.5rem 0 1.5rem;
        margin-bottom: 2rem;
    }
    
    .profile-image {
        position: relative;
        left: 50%;
        right: 50%;
        margin-left: -50vw;
        margin-right: -50vw;
        width: 100vw;
        margin-top: 0;
        margin-bottom: 2rem;
    }
    
    .profile-image img {
        height: 200px;
    }
    
    .gallery-viewport {
        height: 250px;
        padding: 0;
        border-radius: 0;
        position: relative;
        overflow: hidden;
        background: transparent;
        box-shadow: none;
    }
    
    .gallery-track {
        position: absolute;
        width: 100%;
        height: 100%;
    }
    
    .gallery-img {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
        opacity: 0;
        transition: opacity 0.3s ease-in-out;
        border-radius: 0;
    }
    
    .gallery-img.active {
        opacity: 1;
        z-index: 2;
    }
    
    .gallery-btn {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        z-index: 10;
        background: rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(4px);
        border: 1px solid rgba(255, 255, 255, 0.2);
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
        width: 36px;
        height: 36px;
        border-radius: 50%;
        font-size: 1rem;
        color: rgba(255, 255, 255, 0.9);
        transition: all 0.2s ease;
    }
    
    .gallery-btn:hover {
        background: rgba(255, 255, 255, 0.2);
        color: rgba(255, 255, 255, 1);
        transform: translateY(-50%) scale(1.05);
    }
    
    .gallery-btn.prev {
        left: 6px;
    }
    
    .gallery-btn.next {
        right: 6px;
    }
    
    .gallery-wrapper {
        position: relative;
        left: 50%;
        right: 50%;
        margin-left: -50vw;
        margin-right: -50vw;
        width: 100vw;
        gap: 0.4rem;
        padding: 0;
        margin-bottom: 1rem;
    }
    
    .project-category {
        margin-bottom: 1.5rem;
    }
    
    .hero-logo {
        max-width: 190px;
    }
    
    .social-link {
        width: 40px;
        height: 40px;
        border-radius: 12px;
    }
    .social-link img {
        width: 24px;
        height: 24px;
    }
}