/* =========================================================
   PALETA / VARIABLES (DARK MODE CINEMÁTICO)
========================================================== */
:root {
    --bg-main: #060a07;      /* Negro profundo con tinte verde */
    --bg-alt: #0a110c;       /* Gris muy oscuro */
    --card-bg: #101812;      /* Fondo de tarjetas */
    
    --green-neon: #4ade80;   /* Verde brillante/holograma */
    --green-dark: #166534;   /* Verde profundo */
    --green-soft: #86efac;
    
    --text-main: #f8fafc;    /* Blanco suave */
    --text-muted: #94a3b8;   /* Gris azulado para textos secundarios */
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-main);
    font-family: 'Outfit', sans-serif;
    color: var(--text-main);
    overflow-x: hidden;
}

/* ==========================================================
   NAVBAR GLASSMORPHISM
========================================================== */
.mainNav {
    background: rgba(6, 10, 7, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 15px 0;
    transition: 0.4s;
    border-bottom: 1px solid rgba(74, 222, 128, 0.1);
}

.mainNav .navbar-brand {
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: 2px;
    color: var(--text-main) !important;
}

.mainNav .nav-link {
    margin-left: 20px;
    font-weight: 400;
    color: var(--text-muted) !important;
    transition: 0.3s;
}

.mainNav .nav-link:hover {
    color: var(--green-neon) !important;
    text-shadow: 0 0 10px rgba(74, 222, 128, 0.4);
}

.custom-toggler {
    border: none;
    color: var(--green-neon);
    font-size: 1.5rem;
}

/* ==========================================================
   HERO SECTION
========================================================== */
.hero-section {
    position: relative;
    padding-top: 160px;
    padding-bottom: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
}

/* Brillo de fondo sutil detrás del título */
.hero-glow {
    position: absolute;
    top: 20%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(22, 101, 52, 0.3) 0%, rgba(6, 10, 7, 0) 70%);
    z-index: 0;
    pointer-events: none;
}

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

.hero-title {
    font-size: clamp(3rem, 8vw, 6rem); /* Responsive fluido */
    font-weight: 800;
    letter-spacing: 4px;
    background: linear-gradient(to right, #ffffff, var(--green-soft));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 15px;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    font-weight: 300;
    color: var(--text-muted);
    max-width: 800px;
    margin: 0 auto 40px auto;
    line-height: 1.6;
}

/* ==========================================================
   BOTONES
========================================================== */
.btn-cta {
    display: inline-flex;
    align-items: center;
    background: rgba(74, 222, 128, 0.1);
    color: var(--green-neon);
    padding: 15px 35px;
    border: 1px solid var(--green-neon);
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(74, 222, 128, 0.1);
}

.btn-cta:hover {
    background: var(--green-neon);
    color: var(--bg-main);
    box-shadow: 0 0 30px rgba(74, 222, 128, 0.4);
    transform: translateY(-3px);
}

/* ==========================================================
   CANVAS ALERCE
========================================================== */
.canvas-wrapper {
    margin-top: 30px;
    position: relative;
}

#alerceCanvas {
    display: block;
    margin: 0 auto;
    max-width: 800px;
    width: 100%;
    height: 600px;
    filter: drop-shadow(0px 10px 30px rgba(22, 101, 52, 0.5)); /* Brillo al arbol */
}

/* ==========================================================
   SECCIONES GENERALES
========================================================== */
.section {
    padding: 100px 0;
}

.bg-alt {
    background-color: var(--bg-alt);
    border-top: 1px solid rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-main);
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--green-neon);
    margin: 15px auto 0 auto;
    border-radius: 2px;
}

.section-text {
    max-width: 700px;
    margin: 0 auto 15px auto;
    font-size: 1.15rem;
    font-weight: 300;
    color: var(--text-muted);
    line-height: 1.7;
}

/* ==========================================================
   CARDS (Servicios & Portfolio)
========================================================== */
.benefit-card, .portfolio-card {
    background: var(--card-bg);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 16px;
    padding: 40px 30px;
    height: 100%;
    text-align: left;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.benefit-card:hover, .portfolio-card:hover {
    transform: translateY(-10px);
    border-color: rgba(74, 222, 128, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), inset 0 0 20px rgba(74, 222, 128, 0.05);
}

.benefit-icon {
    font-size: 2.5rem;
    color: var(--green-neon);
    margin-bottom: 20px;
}

.benefit-card h4 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.benefit-card p {
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: 300;
    margin: 0;
}
/* ==========================================================
   PORTFOLIO (IMÁGENES EN HTML)
========================================================== */
.portfolio-card {
    position: relative;
    border-radius: 16px;
    height: 300px; /* Altura fija para que todas sean iguales */
    overflow: hidden;
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.4s ease;
}

.portfolio-img {
    width: 100%;
    height: 100%;
    object-fit:contain; 
    transition: transform 0.6s ease;
}

.portfolio-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(6, 10, 7, 0.2), rgba(6, 10, 7, 0.9));
    z-index: 1;
}

.portfolio-content {
    position: absolute;
    bottom: 0;
    left: 0;
    padding: 25px;
    z-index: 2; /* Por encima del degradado */
    width: 100%;
}

.portfolio-card:hover {
    transform: translateY(-10px);
    border-color: var(--green-neon);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
}

.portfolio-card:hover .portfolio-img {
    transform: scale(1.1); /* Zoom sutil al pasar el mouse */
}

.card-proximamente {
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px dashed rgba(74, 222, 128, 0.2);
}

/* ==========================================================
   FOOTER & WHATSAPP
========================================================== */
.footer {
    text-align: center;
    padding: 40px 0;
    background: var(--bg-alt);
    border-top: 1px solid rgba(255,255,255,0.05);
    color: var(--text-muted);
    font-size: 0.9rem;
}

.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: #25d366;
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 30px;
    z-index: 999;
    box-shadow: 0 10px 20px rgba(37, 211, 102, 0.3);
    text-decoration: none;
    transition: 0.3s;
}

.whatsapp-float:hover {
    transform: scale(1.1) translateY(-5px);
    color: white;
    box-shadow: 0 15px 25px rgba(37, 211, 102, 0.5);
}

.service-list {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
}

.service-list li {
    margin-bottom: 10px;
    font-size: 0.95rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 10px;
}

.text-green {
    color: var(--green-neon);
}

.benefit-card {
    text-align: center; /* Mantenemos el icono y titulo centrado */
}

.portfolio-card.mj-ferreteria {
    /* Usamos una imagen de herramientas/ferretería de alta calidad */
    background-image: linear-gradient(to bottom, rgba(6, 10, 7, 0.3), rgba(6, 10, 7, 0.9)), 
                  url('../assets/img/home_aapa.png') !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    border: 1px solid rgba(74, 222, 128, 0.2);
}

/* Efecto al pasar el mouse */
.portfolio-card.mj-ferreteria:hover {
    background-image: linear-gradient(to bottom, rgba(74, 222, 128, 0.1), rgba(6, 10, 7, 1)), 
                      url('../assets/img/home_aapa.png') !important;
}
    
/* Brillo en el texto para que resalte sobre el fondo nuevo */
.mj-ferreteria h3 {
    color: #ffffff !important;
    text-shadow: 0 0 15px rgba(74, 222, 128, 0.6);
}

/* PLANES CARDS */
.plan-card {
    background: var(--card-bg);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 20px;
    padding: 40px 25px;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: all 0.4s ease;
    position: relative;
}

.plan-card:hover {
    transform: translateY(-10px);
    border-color: var(--green-neon);
}

.plan-card.featured {
    border: 2px solid var(--green-neon);
    background: linear-gradient(145deg, #101812, #060a07);
    box-shadow: 0 0 30px rgba(74, 222, 128, 0.1);
}

.plan-badge {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--green-neon);
    color: var(--bg-main);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 800;
}

.plan-icon {
    font-size: 2.5rem;
    color: var(--green-neon);
    margin-bottom: 20px;
}

.plan-card h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.plan-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 25px;
}

.plan-list {
    list-style: none;
    padding: 0;
    margin: 0 0 30px 0;
    text-align: left;
    flex-grow: 1; /* Empuja el botón al fondo */
}

.plan-list li {
    margin-bottom: 12px;
    font-size: 0.9rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
}

.plan-list li i {
    color: var(--green-neon);
    font-size: 0.8rem;
}

.btn-plan {
    background: rgba(255,255,255,0.05);
    color: var(--text-main);
    padding: 12px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    border: 1px solid rgba(255,255,255,0.1);
    transition: 0.3s;
    text-align: center;
}

.btn-plan:hover {
    background: var(--green-neon);
    color: var(--bg-main);
    border-color: var(--green-neon);
}

.featured .btn-plan {
    background: var(--green-neon);
    color: var(--bg-main);
}

/* SECCIÓN PROCESO */
.process-wrapper {
    position: relative;
    padding: 40px 0;
}

/* Línea de fondo neón */
.process-line {
    position: absolute;
    top: 100px;
    left: 10%;
    right: 10%;
    height: 2px;
    background: linear-gradient(to right, transparent, var(--green-neon), transparent);
    z-index: 1;
    opacity: 0.3;
}

.col-md-2-custom {
    flex: 0 0 auto;
    width: 20%; /* 5 pasos = 20% cada uno */
}

.step-item {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 0 15px;
}

.step-number {
    width: 60px;
    height: 60px;
    background: var(--bg-alt);
    border: 2px solid var(--green-neon);
    color: var(--green-neon);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 20px auto;
    font-weight: 800;
    font-size: 1.2rem;
    box-shadow: 0 0 20px rgba(74, 222, 128, 0.2);
    transition: 0.4s;
}

.step-item:hover .step-number {
    background: var(--green-neon);
    color: var(--bg-main);
    box-shadow: 0 0 30px rgba(74, 222, 128, 0.6);
    transform: scale(1.1);
}

.step-item h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.step-item p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Responsive: en móviles se ponen uno debajo del otro */
@media (max-width: 992px) {
    .col-md-2-custom { width: 100%; }
    .process-line { display: none; }
    .step-item { margin-bottom: 40px; }
}

/* STACK TECNOLÓGICO */
.stack-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.stack-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    filter: grayscale(1); 
    /* Quitamos la opacidad de aquí para que GSAP la maneje */
}

.stack-item i {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: var(--text-main);
}

.stack-item span {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.stack-item:hover {
    filter: grayscale(0); /* Recuperan color */
    opacity: 1;
    transform: translateY(-5px);
    border-color: var(--green-neon);
    background: rgba(74, 222, 128, 0.05);
    box-shadow: 0 0 20px rgba(74, 222, 128, 0.1);
}

.stack-item:hover i {
    color: var(--green-neon);
    text-shadow: 0 0 10px rgba(74, 222, 128, 0.5);
}

/* Hace que el enlace se comporte como un bloque y no herede estilos de texto */
.portfolio-wrapper-link {
    text-decoration: none;
    display: block;
    color: inherit;
}

/* Opcional: añade un efecto visual para que el usuario sepa que es clickeable */
.portfolio-card {
    transition: transform 0.3s ease;
    cursor: pointer;
}

.portfolio-card:hover {
    transform: scale(1.02); /* Se agranda un poquito al pasar el mouse */
}

/* Estilo para el "botón" visual */
.btn-fake {
    display: inline-block;
    background-color: #007bff;
    color: white;
    padding: 10px 25px;
    border-radius: 8px;
    font-weight: bold;
    margin-top: 15px;
}

/* ==========================================================
   KEEP IN TOUCH & SOCIALS
========================================================== */
.contact-card {
    display: block;
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    padding: 40px;
    text-decoration: none;
    color: var(--text-main);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.contact-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    display: block;
    transition: transform 0.4s ease;
}

.contact-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.contact-card p {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 25px;
}

.btn-contact {
    display: inline-block;
    padding: 8px 25px;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    font-weight: 600;
    transition: 0.3s;
}

/* Efectos específicos para Instagram */
.instagram:hover {
    border-color: var(--green-neon);
    box-shadow: 0 10px 30px rgba(228, 64, 95, 0.15);
}

.instagram:hover .contact-icon {
    color:var(--green-neon);
    transform: scale(1.1) rotate(-5deg);
}

.instagram:hover .btn-contact {
    background:var(--green-neon);
    border-color: var(--green-neon);
    color: white;
}

/* Efecto hover general */
.contact-card:hover {
    transform: translateY(-10px);
}

.email:hover .contact-icon {
    color: var(--green-neon);
}

.email:hover .btn-contact {
    background: var(--green-neon);
    color: var(--bg-main);
}