/* ===== RESET Y VARIABLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #000000;
    --bg-surface: #0A0A0A;
    --bg-card: #111111;
    --text-primary: #FFFFFF;
    --text-secondary: #CCCCCC;
    --border-subtle: rgba(255, 255, 255, 0.1);
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --header-height: 72px;
}

body {
    font-family: 'Courier New', 'Consolas', monospace;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: none;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1,
h2,
h3,
.logo,
.btn {
    font-family: 'Courier New', 'Consolas', monospace;
    font-weight: 400;
    letter-spacing: 0.05em;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-height);
}

/* ===== HEADER ===== */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(4px);
    border-bottom: 1px solid var(--border-subtle);
    z-index: 1000;
    transition: var(--transition);
}
.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    z-index: 1001;
    transition: opacity 0.2s;
}
.logo:hover {
    opacity: 0.7;
}
.logo-svg {
    height: 48px;
    width: auto;
    display: block;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    align-items: center;
}
.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 400;
    transition: color var(--transition);
    position: relative;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--text-primary);
    transition: width var(--transition);
}
.nav-links a:hover {
    color: white;
}
.nav-links a:hover::after {
    width: 100%;
}

.btn-contacto-header {
    background: transparent !important;
    border: 1px solid #FFFFFF !important;
    color: #FFFFFF !important;
    padding: 0.6rem 1.8rem;
    font-family: 'Courier New', 'Consolas', monospace;
    font-size: 0.9rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all var(--transition);
}
.btn-contacto-header:hover {
    background: #FFFFFF !important;
    color: #000000 !important;
    border-color: #FFFFFF !important;
    font-weight: 700 !important;
}

.menu-toggle {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 2rem;
    cursor: pointer;
    z-index: 1001;
}
.menu-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 999;
    cursor: pointer;
}
.menu-overlay.active {
    display: block;
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        max-width: 280px;
        height: 100dvh;
        background: rgba(0, 0, 0, 0.98);
        flex-direction: column;
        justify-content: center;
        gap: 2rem;
        padding: 2rem 1.5rem;
        transition: right 0.3s ease-in-out;
        border-left: 1px solid var(--border-subtle);
        z-index: 1000;
    }
    .nav-links.active {
        right: 0;
    }
    .nav-links a {
        font-size: 1rem;
    }
    .btn-contacto-header {
        width: fit-content;
        margin-top: 0.5rem;
    }
    .header-inner {
        padding: 0.8rem 1.5rem;
    }
    .logo-svg {
        height: 40px;
    }
}

/* ===== HERO (Index) ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 7rem 2rem 4rem;
    text-align: center;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-subtle);
}
.hero-content {
    max-width: 800px;
    position: relative;
    z-index: 2;
}
.hero-badge {
    display: inline-block;
    border: 1px solid var(--border-subtle);
    padding: 0.4rem 1.2rem;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}
.hero h1 {
    font-size: clamp(2.8rem, 6vw, 4.5rem);
    font-weight: 400;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    letter-spacing: 0.02em;
}
.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 2.5rem;
    line-height: 1.8;
}
.hero-buttons {
    display: flex;
    gap: 1.2rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===== BOTONES GLOBALES ===== */
.btn {
    padding: 0.8rem 2rem;
    font-family: 'Courier New', 'Consolas', monospace;
    font-size: 0.8rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-decoration: none;
    transition: all var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
    border: none;
}
.btn-primary {
    background: var(--text-primary);
    color: var(--bg-primary);
}
.btn-primary:hover {
    background: var(--text-secondary);
    color: var(--bg-primary);
}
.btn-secondary {
    background: transparent;
    border: 1px solid var(--text-secondary);
    color: var(--text-secondary);
}
.btn-secondary:hover {
    background: var(--text-primary);
    color: var(--bg-primary);
    border-color: var(--text-primary);
}

/* ===== SECCIONES GENERALES ===== */
section {
    padding: 5rem 0;
    position: relative;
    border-bottom: 1px solid var(--border-subtle);
}
.section-title {
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 400;
    text-align: center;
    margin-bottom: 1rem;
    color: var(--text-primary);
    letter-spacing: 0.05em;
}
.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1rem;
    max-width: 650px;
    margin: 0 auto 3rem;
    letter-spacing: 0.02em;
}

/* ===== VALORES (Index) ===== */
.valores-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}
.valor-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    padding: 2rem 1.8rem;
    transition: all var(--transition);
}
.valor-card:hover {
    border-color: var(--text-secondary);
    background: var(--bg-surface);
}
.valor-icon {
    font-size: 2.5rem;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    display: block;
}
.valor-card h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    letter-spacing: 0.05em;
    font-weight: 400;
}
.valor-card p {
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 0.9rem;
}

/* ===== INDUSTRIAS (Index) ===== */
.industrias-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
}
.industria-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    padding: 2rem 1rem;
    transition: all var(--transition);
    cursor: default;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 160px;
}
.industria-card:hover {
    border-color: var(--text-secondary);
    background: var(--bg-card);
}
.industria-icon {
    font-size: 2.5rem;
    color: var(--text-primary);
    margin-bottom: 0.8rem;
    display: block;
}
.industria-card h4 {
    color: var(--text-primary);
    font-weight: 400;
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin: 0;
}

/* ===== SERVICIOS (Index) ===== */
.servicios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}
.servicio-card {
    background: var(--bg-card);
    padding: 2.5rem 2rem;
    border: 1px solid var(--border-subtle);
    transition: all var(--transition);
}
.servicio-card:hover {
    border-color: var(--text-secondary);
    background: var(--bg-surface);
}
.servicio-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.servicio-header i {
    font-size: 2rem;
    color: var(--text-primary);
}
.servicio-card h3 {
    font-size: 1.2rem;
    color: var(--text-primary);
    font-weight: 400;
    letter-spacing: 0.05em;
}
.servicio-card p {
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 0.9rem;
}

/* ===== PROYECTOS (Index) ===== */
.proyectos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}
.proyecto-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    transition: all var(--transition);
    overflow: hidden;
}
.proyecto-card:hover {
    border-color: var(--text-secondary);
    background: var(--bg-surface);
}
.proyecto-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    border-bottom: 1px solid var(--border-subtle);
}
.proyecto-contenido {
    padding: 1.8rem 1.5rem 1.5rem;
}
.proyecto-contenido h3 {
    font-size: 1.1rem;
    font-weight: 400;
    letter-spacing: 0.05em;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}
.proyecto-contenido p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.8;
}

/* ===== CTA (Index) ===== */
.cta-section {
    background: var(--bg-primary);
    text-align: center;
    padding: 5rem 0;
    border-bottom: 1px solid var(--border-subtle);
}
.cta-section h2 {
    font-size: 2.5rem;
    font-weight: 400;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    letter-spacing: 0.05em;
}
.cta-section p {
    color: var(--text-secondary);
    font-size: 1rem;
    max-width: 500px;
    margin: 0 auto 2rem;
    line-height: 1.8;
}

/* ===== CONTACTO (contacto.html) ===== */
.mini-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-subtle);
}
.logo-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    transition: opacity 0.2s;
}
.logo-link:hover {
    opacity: 0.7;
}
.logo-link .logo-svg {
    height: 44px;
    width: auto;
    display: block;
}

.contact-page {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 1rem;
}
.form-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    padding: 2.5rem;
    max-width: 600px;
    width: 100%;
}
.form-card h1 {
    font-size: 2rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    letter-spacing: 0.05em;
}
.form-card p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 0.9rem;
}
.form-group {
    margin-bottom: 1.5rem;
}
.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 400;
    color: var(--text-primary);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}
.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.9rem 1.2rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    font-family: 'Courier New', 'Consolas', monospace;
    font-size: 0.9rem;
    transition: all 0.2s;
}
.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--text-primary);
}
.form-group textarea {
    resize: vertical;
    min-height: 120px;
}
.btn-submit {
    background: var(--text-primary);
    color: var(--bg-primary);
    padding: 1rem 1.8rem;
    font-family: 'Courier New', 'Consolas', monospace;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border: none;
    cursor: pointer;
    width: 100%;
    font-size: 0.9rem;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
}
.btn-submit:hover:not(:disabled) {
    background: var(--text-secondary);
    color: var(--bg-primary);
}
.btn-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.form-message {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.8rem;
    padding: 0.8rem;
    border: 1px solid var(--border-subtle);
}
.success {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border-color: var(--text-primary);
}
.error {
    background: rgba(255, 80, 80, 0.05);
    color: #ff8888;
    border-color: #ff8888;
}

/* ===== FOOTER ===== */
footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border-top: 1px solid var(--border-subtle);
    margin-top: auto;
}
footer span {
    color: var(--text-primary);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 480px) {
    .container {
        padding: 0 1.2rem;
    }
    .industrias-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .servicio-card {
        padding: 1.8rem;
    }
    .proyecto-card img {
        height: 160px;
    }
    .form-card {
        padding: 1.8rem;
    }
    .logo-link .logo-svg {
        height: 36px;
    }
}