:root {
    --primary-color: #2563eb;
    --text-color: #1f2937;
    --bg-color: #ffffff;
    --bg-alt-color: #f3f4f6;
    --white: #ffffff;
    --border-color: #d1d5db;
}

/* Desplazamiento suave al hacer clic en el menú */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 70px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: system-ui, -apple-system, sans-serif;
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.6;
}

.container {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.container.column {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
}

.logo img {
    display: block;
    width: auto;
    height: 40px;
}

/* Menú de Navegación */
.site-header {
    background: #191497;
    color: #ffffff;
    padding: 1rem 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-menu a {
    margin-left: 1.5rem;
    text-decoration: none;
    color: #ffffff;
    font-weight: 600;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.nav-menu a:hover {
    color: #ffffff;
}

/* Estilos de las Secciones */
.section {
    padding: 6rem 0;
    min-height: 60vh;
    display: flex;
    align-items: center;
}

.hero {
    position: relative;
    isolation: isolate;
    background-color: #eff6ff;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: url("images/cableado-rack.png") center / cover no-repeat;
    opacity: 0.4;
}

.hero > .container {
    position: relative;
    z-index: 1;
}

.dark-bg {
    background-color: var(--bg-alt-color);
}

h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

p {
    font-size: 1.2rem;
    max-width: 600px;
}

.partners-grid {
    width: 100%;
    max-width: 900px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 1rem;
}

.partners-grid img {
    width: 100%;
    height: 100px;
    padding: 1rem;
    object-fit: contain;
    background: var(--white);
    border-radius: 0.5rem;
}

.services-grid {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-top: 1rem;
}

.service-card {
    overflow: hidden;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    color: var(--text-color);
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(31, 41, 55, 0.06);
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.service-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.16);
    transform: translateY(-4px);
}

.service-card img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.service-card span {
    display: block;
    padding: 0.9rem 0.75rem;
    font-size: 1rem;
    font-weight: 700;
}

.service-detail {
    min-height: calc(100vh - 142px);
    background: #eff6ff;
}

.service-detail-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 3rem;
    width: 100%;
    align-items: center;
}

.service-detail-content img {
    width: 100%;
    max-height: 440px;
    object-fit: cover;
    border-radius: 0.5rem;
    box-shadow: 0 12px 25px rgba(31, 41, 55, 0.14);
}

.service-detail-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
}

.service-detail-copy h2 {
    margin-bottom: 0;
}

.service-detail-copy p {
    max-width: 540px;
}

.back-link {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
}

.back-link:hover {
    text-decoration: underline;
}

/* Sección de Contacto (Grid de 2 columnas) */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
    width: 100%;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-intro {
    margin-bottom: 1rem;
}

.info-item strong {
    display: block;
    font-size: 1.1rem;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.info-item p, .info-item a {
    font-size: 1.05rem;
    color: var(--text-color);
    text-decoration: none;
}

.info-item a:hover {
    text-decoration: underline;
}

/* Formulario */
.contact-form-container {
    background: var(--bg-alt-color);
    padding: 2.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
    font-size: 0.95rem;
}

.form-group input, 
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
}

.form-group input:focus, 
.form-group textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Botones */
.btn {
    display: inline-block;
    background: var(--primary-color);
    color: var(--white);
    padding: 0.75rem 1.5rem;
    border-radius: 0.375rem;
    text-decoration: none;
    font-weight: 600;
    margin-top: 1rem;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}

.btn:hover {
    background: #1d4ed8;
}

.btn-submit {
    margin-top: 0.5rem;
    text-align: center;
}

/* Footer */
.site-footer {
    background: #111827;
    color: var(--white);
    padding: 1.5rem 0;
    text-align: center;
}

.site-footer .container {
    justify-content: center;
}

/* Responsive para pantallas móviles */
@media (max-width: 768px) {
    .container {
        width: 90%;
    }

    .site-header .container {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.75rem;
    }

    .nav-menu {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem 1rem;
    }

    .nav-menu a {
        margin-left: 0;
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .partners-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .service-detail-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    
    .contact-form-container {
        padding: 1.5rem;
    }
}

/* Ajustes para la página de Gracias */
.thanks-main {
    min-height: calc(100vh - 140px);
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-alt-color);
    padding: 3rem 0;
}

.thanks-card {
    background: var(--white);
    padding: 3rem 2rem;
    border-radius: 0.75rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    text-align: center;
    max-width: 550px;
    margin: 0 auto;
    border: 1px solid var(--border-color);
}

.thanks-icon {
    width: 70px;
    height: 70px;
    background-color: #dcfce7;
    color: #16a34a;
    font-size: 2.2rem;
    font-weight: bold;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem auto;
}

.thanks-card h2 {
    color: var(--text-color);
    font-size: 2rem;
    margin-bottom: 1rem;
}

.thanks-card p {
    margin: 0 auto 1.5rem auto;
    color: #4b5563;
    font-size: 1.1rem;
}

.thanks-card .btn {
    margin-top: 0.5rem;
}