/* ==========================================================================
   1. VARIABLES DE ESTILO Y CONFIGURACIÓN INICIAL
   ========================================================================== */
   :root {
    --primary-dark: #1D1D1F;      /* Negro / Antracita principal */
    --brand-green: #37ca37;       /* Verde corporativo TecnicaIE */
    --bg-white: #FFFFFF;          /* Blanco puro */
    --bg-light: #FAFAFA;          /* Gris muy claro para fondos */
    --text-muted: #6f6f6f;        /* Gris para textos secundarios */
    --border-color: #E5E5E5;      /* Color para líneas y bordes */
    --font-inter: 'Inter', sans-serif;
    --font-space: 'Space Grotesk', sans-serif;
}

/* Reset básico para que todas las pantallas midan igual */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-family: var(--font-inter);
    color: var(--primary-dark);
    background-color: var(--bg-white);
}

body {
    overflow-x: hidden;
}

/* Selección de texto verde */
::selection {
    background-color: var(--brand-green);
    color: #FFFFFF;
}

/* Scrollbar personalizada */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #FFFFFF;
}
::-webkit-scrollbar-thumb {
    background: #E5E5E5;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--brand-green);
}

/* Estilos de texto reutilizables */
.logo-green {
    color: var(--brand-green);
}

.text-muted {
    color: var(--text-muted);
}

/* ==========================================================================
   2. BARRA DE NAVEGACIÓN (HEADER)
   ========================================================================== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    height: 80px;
    z-index: 50;
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-family: var(--font-space);
    font-size: 2rem;
    font-weight: 600;
    letter-spacing: -0.05em;
    text-decoration: none;
    color: var(--primary-dark);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    text-decoration: none;
    color: #515154;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.2s ease;
  
}

.nav-link:hover {
    background-color: var(--brand-green);
    color: #FFFFFF;
}

/* 1. Contenedor invisible con ancho reservado fijo */
.btn-contact-wrapper {
    width: 120px;                /* Espacio total reservado en el menú */
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: flex-start;  /* Alinea el botón a la izquierda de su espacio */
}

/* 2. Botón en estado normal */
.btn-contact {
    text-decoration: none;
    background-color: var(--primary-dark);
    color: #FFFFFF;
    font-size: 0.875rem;
    font-weight: 500;
    height: 34px;
    width: 96px;                /* Ancho inicial (solo texto) */
    padding: 0 16px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    white-space: nowrap;
    overflow: hidden;
    
    /* Transición suave de anchura */
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.3s ease;
}

/* 3. Icono del teléfono en estado normal (Oculto) */
.btn-contact .contact-icon {
    opacity: 0;
    margin-left: 0;
    transform: scale(0.5);
    transition: opacity 0.2s ease, margin-left 0.3s ease, transform 0.3s ease;
}

/* 4. Estado HOVER: El botón se expande hacia la derecha dentro del wrapper */
.btn-contact:hover {
    background-color: #333336;
    width: 120px;                /* Se expande hasta llenar el espacio reservado */
}

.btn-contact:hover .contact-icon {
    opacity: 1;
    margin-left: 10px;
    transform: scale(1);
} 

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--primary-dark);
}

/* ==========================================================================
   3. SECCIÓN HERO (PORTADA)
   ========================================================================== */
.hero-section {
    position: relative;
    min-height: 85vh;
    padding: 120px 24px 80px 24px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    background-image: 
        linear-gradient(var(--border-color) 1px, transparent 1px), 
        linear-gradient(90deg, var(--border-color) 1px, transparent 1px);
    background-size: 40px 40px;
}

.hero-container {
    max-width: 1280px;
    margin: 0 auto;
    width: 100%;
}

.badge-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background-color: #FFFFFF;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    margin-bottom: 32px;
}

.badge-dot {
    width: 8px;
    height: 8px;
    background-color: var(--brand-green);
    border-radius: 50%;
}

.badge-text {
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #515154;
}

.hero-title {
    font-family: var(--font-space);
    font-size: 5rem;
    font-weight: 500;
    line-height: 1.05;
    letter-spacing: -0.04em;
    margin-bottom: 32px;
}

.hero-footer {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 32px;
}

.hero-description {
    font-size: 1.125rem;
    color: #6E6E73;
    max-width: 580px;
    line-height: 1.6;
    font-weight: 300;
}

/* 1. Botón Principal (Con overflow: hidden para recortar la flecha al salir) */
/* Estado Base del Botón */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 16px 20px;
    background-color: var(--primary-dark);
    color: #FFFFFF;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 15px;
    border: 1px solid transparent; /* Preparamos un borde invisible */
    
    overflow: hidden;
    
    /* Anti-alias para asegurar máxima nitidez en tipografía */
    -webkit-font-smoothing: antialiased;
    backface-visibility: hidden;
    
    /* Transición suave para todos los efectos visuales */
    transition: background-color 0.3s ease, 
                transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), 
                box-shadow 0.3s ease, 
                border-color 0.3s ease;
}

/* Estado HOVER: El botón resalta con sombra verde luminosa y elevación crispada */
.btn-primary:hover {
    background-color: #252528;
    transform: translateY(-3px);                          /* Se eleva 3px sin deformar texto */
    border-color: rgba(55, 202, 55, 0.25);                     /* Borde fino verde corporativo */
    box-shadow: 0 10px 25px -5px rgba(55, 202, 55, 0.25);  /* Sombra / Glow verde elegante */
}


/* 2. Animación de Bucle tipo Jitter */
@keyframes arrowLoop {
    0% {
        transform: translateX(0);
        opacity: 1;
    }
    40% {
        transform: translateX(180%);  /* 1. Sale volando por la derecha */
        opacity: 0;                   /* Se vuelve invisible */
    }
    45% {
        transform: translateX(-180%); /* 2. Teletransporte invisible a la izquierda */
        opacity: 0;
    }
    100% {
        transform: translateX(0);     /* 3. Reaparece y entra desde la izquierda a su sitio */
        opacity: 1;
    }
}

/* 3. Disparar la animación al hacer HOVER */
.btn-primary:hover .iconify {
    animation: arrowLoop 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* ==========================================================================
   4. BANDA DE ESPECIFICACIONES TÉCNICAS
   ========================================================================== */
.specs-bar {
    background-color: var(--bg-light);
    border-bottom: 1px solid var(--border-color);
}

.specs-grid {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}

.spec-item {
    padding: 24px 32px;
    border-right: 1px solid var(--border-color);
}

.spec-item:last-child {
    border-right: none;
}

.spec-label {
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.spec-value {
    display: block;
    font-family: var(--font-space);
    font-size: 1rem;
    font-weight: 500;
}

/* ==========================================================================
   5. SECCIÓN DE MÉTRICAS (EXPERIENCIA ACUMULADA)
   ========================================================================== */
.metrics-section {
    padding: 80px 24px;
    border-bottom: 1px solid var(--border-color);
}

.section-container {
    max-width: 1280px;
    margin: 0 auto;
}

.section-header {
    margin-bottom: 48px;
}

.section-tag {
    font-family: monospace;
    font-size: 0.75rem;
    color: var(--brand-green);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    display: block;
    margin-bottom: 8px;
}

.section-title {
    font-family: var(--font-space);
    font-size: 2.25rem;
    font-weight: 500;
    letter-spacing: -0.03em;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.metric-card {
    padding: 32px 24px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-light);
    border-radius: 12px;
}

.metric-number {
    display: block;
    font-family: var(--font-space);
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.metric-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 4px;
}

.metric-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* ==========================================================================
   6. SECCIÓN DE SERVICIOS
   ========================================================================== */
.services-section {
    padding: 80px 24px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.service-card {
    padding: 40px;
    border-right: 1px solid var(--border-color);
    transition: background-color 0.3s ease;
}

.service-card:last-child {
    border-right: none;
}

.service-card:hover {
    background-color: var(--bg-light);
}

.service-number {
    display: block;
    font-family: monospace;
    font-size: 0.875rem;
    color: var(--brand-green);
    margin-bottom: 24px;
}

.service-icon {
    margin-bottom: 24px;
    color: var(--primary-dark);
}

.service-title {
    font-family: var(--font-space);
    font-size: 1.35rem;
    font-weight: 500;
    margin-bottom: 12px;
    line-height: 1.3;
}

.service-card:hover .service-title {
    color: var(--brand-green);
}

.service-desc {
    font-size: 0.875rem;
    color: #6E6E73;
    line-height: 1.6;
    font-weight: 300;
}

/* ==========================================================================
   7. SECCIÓN PORTAFOLIO
   ========================================================================== */
.portfolio-section {
    background-color: #0F0F0F;
    color: #FFFFFF;
    padding: 80px 24px;
}

.portfolio-container {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.portfolio-tag {
    color: var(--brand-green);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    display: block;
    margin-bottom: 12px;
}

.portfolio-title {
    font-family: var(--font-space);
    font-size: 2.5rem;
    font-weight: 500;
    letter-spacing: -0.03em;
    margin-bottom: 16px;
    max-width: 550px;
}

.portfolio-desc {
    color: #A1A1A6;
    font-size: 1rem;
    font-weight: 300;
    max-width: 500px;
}

.portfolio-card-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    padding: 24px 32px;
    border: 1px solid #262626;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    text-decoration: none;
    min-width: 300px;
    transition: all 0.3s ease;
}

.portfolio-card-btn:hover {
    background-color: var(--brand-green);
    border-color: var(--brand-green);
}

.portfolio-card-title {
    display: block;
    font-family: var(--font-space);
    font-size: 1.25rem;
    font-weight: 500;
    color: #FFFFFF;
}

.portfolio-card-btn:hover .portfolio-card-title {
    color: #000000;
}

.portfolio-card-subtitle {
    font-size: 0.75rem;
    color: #86868B;
}

.portfolio-card-btn:hover .portfolio-card-subtitle {
    color: rgba(0, 0, 0, 0.7);
}

.portfolio-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
}

.portfolio-card-btn:hover .portfolio-card-icon {
    background-color: rgba(0, 0, 0, 0.2);
    color: #000000;
}

/* ==========================================================================
   8. FOOTER / PIE DE PÁGINA
   ========================================================================== */
.site-footer {
    background-color: var(--bg-light);
    border-top: 1px solid var(--border-color);
    padding: 64px 24px 32px 24px;
}

.footer-container {
    max-width: 1280px;
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-bottom: 48px;
}

.footer-text {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-top: 12px;
}

.footer-col-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 16px;
}

.footer-person-name {
    font-size: 0.875rem;
    font-weight: 500;
}

.footer-person-title {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.footer-link-col {
    font-family: monospace;
    font-size: 0.75rem;
    color: var(--brand-green);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.footer-link-col:hover {
    text-decoration: underline;
}

.footer-contact-link {
    color: #515154;
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s ease;
}

.footer-contact-link:hover {
    color: var(--brand-green);
}

.social-links {
    display: flex;
    gap: 12px;
}

.social-btn {
    padding: 8px;
    background-color: var(--border-color);
    border-radius: 8px;
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.social-btn:hover {
    background-color: var(--brand-green);
    color: #FFFFFF;
}

.legal-notices {
    border-top: 1px solid var(--border-color);
    padding-top: 24px;
    font-size: 0.9rem;
    color: var(--brand-green);
    line-height: 1.6;
    transition: .2s ease;
}

.legal-notices p {
    margin-bottom: 8px;
}

.legal-link {
    color: #1d1d1f;
    text-decoration: none;
    transition: .2s ease;

}

.legal-link:hover span:first-child{
    color: var(--brand-green);
    text-decoration: underline;

}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    margin-top: 24px;
    padding-top: 24px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ==========================================================================
   9. ADAPTABILIDAD A PANTALLAS MÓVILES (RESPONSIVE DESIGN)
   ========================================================================== */
@media (max-width: 900px) {
    .hero-title {
        font-size: 3.2rem;
    }

    .hero-footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .specs-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .spec-item {
        border-bottom: 1px solid var(--border-color);
    }

    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .services-grid {
        grid-template-columns: 1fr;
    }
    .service-card {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }

    .portfolio-container {
        flex-direction: column;
        align-items: flex-start;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .nav-links {
        display: none; /* Ocultar menú en móvil para Fase 2 */
    }

    .mobile-menu-btn {
        display: block;
    }
}

@media (max-width: 600px) {
    .specs-grid,
    .metrics-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }
}