/* Variables de Diseño (Colores y Tipografía) */
:root {
    --color-dark: #30302f;
    --color-light: #f2ede0;
    --color-accent: #f7490a;
    --font-main: 'Space Grotesk', sans-serif;
    --header-height: 80px;
}

/* Reset y Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    /* Evita que el header fijo tape los títulos al hacer scroll */
    scroll-padding-top: var(--header-height);
}

body {
    font-family: var(--font-main);
    background-color: var(--color-light);
    color: var(--color-dark);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-padding {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 50px;
    color: var(--color-dark);
}

.highlight {
    color: var(--color-accent);
}

.background-dark {
    background-color: var(--color-dark);
    color: var(--color-light);
}

.background-light {
    background-color: #ffffff;
}

/* Header & Glassmorphism */
header {
    position: fixed;
    top: 0;
    width: 100%;
    height: var(--header-height);
    z-index: 1000;
    transition: all 0.4s ease;
    background: transparent;
}

/* Clase añadida vía JS al hacer scroll */
header.scrolled {
    background: rgba(48, 48, 47, 0.85); /* --color-dark con opacidad */
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--color-dark);
    transition: color 0.4s ease;
}

header.scrolled .logo {
    color: var(--color-light);
}

.logo span {
    color: var(--color-accent);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--color-dark);
    font-weight: 600;
    transition: color 0.3s ease;
}

header.scrolled .nav-links a {
    color: var(--color-light);
}

.nav-links a:hover {
    color: var(--color-accent);
}

.btn-nav {
    background: var(--color-accent);
    color: var(--color-light) !important;
    padding: 8px 20px;
    border-radius: 5px;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--color-dark);
}
header.scrolled .hamburger {
    color: var(--color-light);
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--color-dark);
    
    /* 1. Mantiene el logo atrapado dentro de esta sección */
    position: relative; 
    overflow: hidden;   
}

/* 2. El logo difuminado de fondo */
.hero::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9); /* empieza más pequeño */
    
    width: 60vw; 
    height: 60vh;

    background-image: url('./img/SyC_icon.png'); 
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;

    opacity: 0;
    filter: grayscale(100%) blur(3px);

    z-index: 0;
    pointer-events: none;

    transition: opacity 1s ease-out, transform 1s ease-out;
}

.hero.fade-in.visible::before {
    opacity: 0.168;
    transform: translate(-50%, -50%) scale(1);
}

.hero-content h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 40px auto;
}



.btn-primary {
    display: inline-block;
    background-color: var(--color-accent);
    color: var(--color-light);
    padding: 15px 35px;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 700;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
}

.btn-primary:hover {
    background-color: #d63d08;
    transform: translateY(-2px);
}

/* Stats Section */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    text-align: center;
    padding: 60px 0;
}

.stat-card h2 {
    font-size: 3.5rem;
    color: var(--color-accent);
}

/* Servicios y Proyectos Grids */
.services-grid, .projects-grid, .team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.card, .team-member {
    background: #ffffff;
    padding: 40px 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}

.project-card {
    background: var(--color-light);
    padding: 40px 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}

.card:hover, .project-card:hover, .team-member:hover {
    transform: translateY(-10px);
}

.card-icon {
    font-size: 2.5rem;
    color: var(--color-dark);
    margin-bottom: 20px;
}

.card-accent {
    background: var(--color-dark);
    color: var(--color-light);
}

.card-accent .card-icon {
    color: var(--color-accent);
}

.card h3, .project-card h3 {
    margin-bottom: 15px;
    font-size: 1.4rem;
}

/* Tech Stack */
.tech-grid {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
}

.tech-item {
    background: var(--color-light);
    padding: 15px 25px;
    border-radius: 50px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Metodología */
.methodology-flow {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    text-align: center;
    position: relative;
}

.step {
    max-width: 100%;
}

.step i {
    font-size: 2.5rem;
    color: var(--color-accent);
    margin-bottom: 20px;
}

.flow-arrow {
    font-size: 2rem;
    color: var(--color-accent);
}

/* Equipo */
.member-avatar {
    width: 100px;
    height: 100px;
    background: var(--color-accent);
    color: var(--color-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    border-radius: 50%;
    margin: 0 auto 20px auto;
}

.team-member {
    text-align: center;
}

.team-member .role {
    font-weight: 700;
    color: var(--color-accent);
    margin-bottom: 15px;
}

/* Contacto y Formularios */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.contact-info h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-family: var(--font-main);
    font-size: 1rem;
}

.form-success {
    margin-top: 20px;
    padding: 15px;
    background: #d4edda;
    color: #155724;
    border-radius: 5px;
    border-left: 5px solid #28a745;
    font-weight: 600;
}

.hidden {
    display: none;
}

/* Botón WhatsApp */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 40px;
    right: 40px;
    background-color: #25d366; /* Verde estándar WA */
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.2);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: transform 0.3s ease;
}

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

/* Footer */
footer {
    background: var(--color-dark);
    color: var(--color-light);
    padding: 30px 0;
    text-align: center;
}

/* --- Animaciones --- */
.fade-in {
    opacity: 1;
    transform: none;
}

.js-enabled .fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: none;
}

/* --- Responsive Design --- */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .contact-container {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .hamburger {
        display: block;
    }

    .nav-links {
        position: absolute;
        top: var(--header-height);
        left: -100%;
        flex-direction: column;
        background: var(--color-dark);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        padding: 20px 0;
        box-shadow: 0 10px 10px rgba(0,0,0,0.1);
    }

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

    .nav-links a {
        color: var(--color-light);
        display: block;
        padding: 10px 0;
    }
    
    .methodology-flow {
        flex-direction: column;
        align-items: center;
    }

    .step {
        width: 100%;
        max-width: 300px;
    }

    .flow-arrow {
        transform: rotate(90deg);
        font-size: 1.5rem;
    }

    /* El header debe estar oscuro siempre en móvil si el menú está abierto */
    header.menu-active {
        background: var(--color-dark);
    }
}

/* --- SUBPAGINAS) --- */
/* --- Estilos para la tarjeta de proyecto como enlace (index.html) --- */
.project-link {
    text-decoration: none;
    color: inherit;
    display: block; /* Hace que toda el área sea clickeable */
}

.project-link .project-card {
    position: relative;
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

.project-link:hover .project-card {
    border-color: var(--color-accent);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px var(--color-shadow);
}

.project-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.project-card-header h4 {
    margin-bottom: 0;
}

.project-card-header i {
    color: var(--color-accent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-link:hover .project-card-header i {
    opacity: 1; /* El icono aparece al hacer hover */
}

.btn-text {
    display: inline-block;
    margin-top: 20px;
    font-weight: 700;
    color: var(--color-accent);
    font-size: 0.9rem;
}

/* --- Estilos para la subpágina del Proyecto (proyecto-prospectiva.html) --- */
.project-detail-page {
    background-color: var(--color-light);
}

.project-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 50px;
}

.badge {
    background-color: var(--color-dark);
    color: var(--color-light);
    padding: 5px 15px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: inline-block;
    margin-bottom: 20px;
}

.lead-text {
    font-size: 1.3rem;
    color: #555;
}

.project-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.meta-card {
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px var(--color-shadow);
    border-top: 4px solid var(--color-accent);
}

.meta-card i {
    font-size: 2rem;
    color: var(--color-dark);
    margin-bottom: 15px;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tech-tags span {
    background: var(--color-light);
    color: var(--color-dark);
    padding: 5px 15px;
    border-radius: 5px;
    font-size: 0.9rem;
    font-weight: 600;
}

.feature-list {
    list-style: none;
}

.feature-list li {
    margin-bottom: 15px;
    font-size: 1.1rem;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.feature-list i {
    color: var(--color-accent);
    margin-top: 5px;
}

.result-box {
    background: var(--color-dark);
    color: var(--color-light);
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 20px;
    border-left: 5px solid var(--color-accent);
}

.result-box h4 {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--color-accent);
}