@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* --- 1. RESET Y CONFIGURACIÓN BASE --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    overflow-x: hidden;
    background-color: #0a0a0a;
    font-size: 62.5%; /* 1rem = 10px */
    font-family: 'Poppins', sans-serif;
    color: white;
    overflow-y: auto !important;
    height: auto !important
}

.page-content {
    width: 100%;
    position: relative;
    overflow: visible; /* Asegúrate de que no diga hidden */
    height: auto;      /* Asegúrate de que no diga 100vh */
}

/* --- 3. NAVBAR ESTILO GLASSMORPHISM --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 8rem;
    display: flex;
    align-items: center;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-container {
    width: 90%;
    max-width: 140rem;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 0.2rem;
    text-transform: uppercase;
    color: #fff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 4rem;
}

.nav-links li a {
    text-decoration: none;
    font-size: 1.4rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.1rem;
    transition: all 0.3s ease;
    position: relative;
}

.nav-links li a::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 0;
    width: 0%;
    height: 1px;
    background: #fff;
    transition: width 0.3s ease;
}

.nav-links li a:hover, 
.nav-links li a.active {
    color: #fff;
}

.nav-links li a:hover::after,
.nav-links li a.active::after {
    width: 100%;
}

/* --- 4. SECCIÓN DE INICIO (HERO SECTION) --- */
.hero-section {
    min-height: 100vh;
    padding: 12rem 2rem 5rem; /* Ajuste para el Navbar */
    display: flex;
    flex-direction: row; /* Contenido e imagen en fila */
    align-items: center;
    justify-content: center;
    gap: 5rem;
    max-width: 140rem;
    margin: 0 auto;
    text-align: left;
}

.hero-content {
    flex: 1;
    max-width: 60rem;
}

.hero-intro {
    font-size: 2rem;
    font-weight: 300;
    letter-spacing: 0.2rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1.5rem;
}

.hero-title {
    font-size: 5.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 2.5rem;
    background: linear-gradient(to right, #ffffff, #d8d8d8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-description {
    font-size: 1.8rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 4rem;
}

.hero-actions {
    display: flex;
    gap: 2rem;
}

.btn {
    display: inline-block;
    padding: 1.5rem 3.5rem;
    border-radius: 5rem;
    text-decoration: none;
    font-size: 1.6rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.primary-btn {
    background: linear-gradient(135deg, #ff4d4d, #ff8a80);
    color: white;
    border: none;
}

.primary-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(255, 77, 77, 0.5);
}

.secondary-btn {
    background: transparent;
    color: rgba(255, 255, 255, 0.8);
    border: 2px solid rgba(255, 255, 255, 0.4);
}

.secondary-btn:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.1);
    border-color: white;
    color: white;
}

.hero-visual {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding-left: 5rem;
}

.hero-image {
    max-width: 100%;
    height: auto;
    border-radius: 2rem;
    box-shadow: 0 30px 60px rgba(0,0,0,0.8);
}

/* --- 5. SECCIÓN PROYECTOS (CARRUSEL) --- */
section.loop-images {
    flex-direction: column;
    gap: 6rem;
    padding-top: 10rem;
}

.projects-header {
    text-align: center;
    animation: fadeInDown 1.5s ease;
}

.projects-header span {
    display: block;
    font-size: 2rem;
    font-weight: 300;
    letter-spacing: 0.6rem;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.9);
}

.projects-header .arrow {
    margin-top: 1.5rem;
    font-size: 2.5rem;
    animation: bounce 2s infinite;
}

.carousel-track {
    --left: -300rem;
    position: relative;
    width: 100%;
    height: 35rem;
}

.carousel-item {
    position: absolute;
    width: 30rem;
    height: 30rem;
    left: 100%;
    perspective: 1000px;
    transform-style: preserve-3d;
    animation: scroll-left var(--time) linear infinite;
    animation-delay: calc(var(--time) / var(--total) * (var(--i) - 1) - var(--time));
}

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 1.5rem;
    transform: rotateY(-35deg);
    transition: all 0.5s ease;
    filter: grayscale(30%);
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

.carousel-item:hover img {
    transform: rotateY(0deg) scale(1.1);
    filter: grayscale(0%);
}

@keyframes scroll-left { to { left: var(--left); } }

.item-overlay {
}

.item-overlay span {
}

.portfolio-link:hover .item-overlay { opacity: 1; }

/* --- 6. SECCIÓN 2: IMAGEN CON MOVIMIENTO (Adaptado) --- */
.section2 {
    height: auto;
    padding: 15rem 0;
}

.image-motion {
    width: 90%;
    max-width: 120rem;
    margin: 0 auto;
}

.image-motion img {
    width: 100%;
    border-radius: 2rem;
    box-shadow: 0 30px 60px rgba(0,0,0,0.8);
}

/* --- ESTILOS DEL FOOTER --- */
.main-footer {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(20px);
    padding: 80px 20px 40px;
    border-top: 1px solid rgba(255,255,255,0.1);
    text-align: center;
}

.footer-promo {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.1), rgba(142, 68, 173, 0.1));
    border: 1px dashed #00d4ff;
    padding: 40px;
    border-radius: 20px;
    max-width: 800px;
    margin: 0 auto 50px;
}

.footer-promo h3 {
    font-size: 2.2rem;
    color: #00d4ff;
    margin-bottom: 10px;
}

.footer-promo p {
    font-size: 1.8rem;
    line-height: 1.6;
}

.footer-brand .brand-name {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 3px;
    margin-bottom: 5px;
}

.footer-brand .by-damian {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 30px;
}

.footer-legal {
    font-size: 1.1rem;
    color: #444;
}

/* Ajuste móvil */
@media (max-width: 768px) {
    .title-large { font-size: 3.5rem; }
    .subtitle-large { font-size: 1.4rem; }
    .footer-promo p { font-size: 1.5rem; }
}

.text-content {
    max-width: 800px;
    margin: 0 auto 5rem;
    text-align: center;
    line-height: 1.8;
    color: #ddd;
}

.features {
    display: flex;
    justify-content: center; /* Centra las tarjetas de contacto */
    flex-wrap: wrap;
    gap: 20px;
    width: 100%;
}

.feature {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(1.5rem);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 5rem 3rem;
    border-radius: 3rem;
    transition: 0.4s;
}

.feature:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-1.5rem);
    border-color: rgba(255, 255, 255, 0.3);
}

.feature-icon { font-size: 4rem; margin-bottom: 2rem; display: block; }
.feature h3 { font-size: 2.2rem; margin-bottom: 1.5rem; color: #fff; }
.feature p { font-size: 1.4rem; color: #aaa; line-height: 1.6; }

/* --- BOTÓN FLOTANTE WHATSAPP --- */
.whatsapp-float {
    position: fixed;
    bottom: 40px;
    right: 40px;
    width: 65px;
    height: 65px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.3);
    z-index: 2000; /* Por encima de todo, incluso del navbar */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    animation: pulse-wa 2s infinite;
}

.whatsapp-float img {
    width: 35px;
    height: 35px;
}

.whatsapp-float:hover {
    transform: scale(1.1) translateY(-5px);
    background-color: #20ba5a;
    box-shadow: 0 15px 30px rgba(37, 211, 102, 0.5);
}

/* Tooltip (Etiqueta de texto al costado) */
.tooltip-wa {
    position: absolute;
    right: 80px;
    background-color: white;
    color: #333;
    padding: 8px 15px;
    border-radius: 10px;
    font-size: 1.4rem;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.whatsapp-float:hover .tooltip-wa {
    opacity: 1;
    visibility: visible;
    right: 90px;
}

/* Animación de Pulso */
@keyframes pulse-wa {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
    70% { box-shadow: 0 0 0 20px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* Ajuste para móviles */
@media (max-width: 768px) {
    .whatsapp-float {
        bottom: 25px;
        right: 25px;
        width: 55px;
        height: 55px;
    }
    .tooltip-wa {
        display: none; /* Ocultamos el texto en móvil para no tapar contenido */
    }
}

/* --- 8. ANIMACIONES VARIAS --- */
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- 9. RESPONSIVE --- */
@media (max-width: 992px) {
    .hero-section {
        flex-direction: column;
        text-align: center;
        padding-top: 10rem;
    }
    .hero-content { max-width: 100%; }
    .hero-title { font-size: 4.5rem; }
    .hero-description { font-size: 1.6rem; }
    .hero-actions { justify-content: center; }
    .hero-visual { padding-left: 0; margin-top: 4rem; }
    .image-motion { width: 95%; }
    .section3 .title { font-size: 5rem; }
}

@media (max-width: 768px) {
    .navbar { height: 6rem; }
    .logo { font-size: 1.4rem; }
    .nav-links { gap: 2rem; }
    .nav-links li a { font-size: 1.2rem; }
    .hero-title { font-size: 3.5rem; }
    .hero-description { font-size: 1.4rem; }
    .btn { padding: 1.2rem 2.5rem; font-size: 1.4rem; }
    .carousel-track { height: 28rem; }
    .carousel-item { width: 25rem; height: 25rem; }
    .projects-header span { font-size: 1.6rem; }
    .section3 .title { font-size: 3.5rem; }
    .section3 .subtitle { font-size: 1.4rem; }
}

@media (max-width: 480px) {
    .nav-links { gap: 1rem; }
    .nav-links li a { font-size: 1rem; }
    .hero-title { font-size: 3rem; }
    .hero-actions { flex-direction: column; align-items: center; }
}