:root {
    /* Paleta Formal derivada del logo JomarTec */
    --primary-color: #B84E12; /* Terracota formal */
    --secondary-color: #FF9F1C; /* Oro suave para destaques */
    --dark-bg: #0F1219; /* Negro Premium Profundo */
    --mid-dark-bg: #1B212B; /* Gris oscuro para contraste */
    --text-color: #E0E6ED; /* Gris muy claro para lectura */
    --text-light: #FFFFFF; /* Blanco puro */
    --navbar-height: 80px; /* Altura estándar de navbar */
}

/* RESET GENERAL */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Montserrat', sans-serif; /* Tipografía Premium */
}

html {
    scroll-behavior: smooth;
    font-size: 16px; /* Base 1rem = 16px */
}

body {
    background-color: var(--dark-bg);
    color: var(--text-color);
    line-height: 1.6;
    font-weight: 300;
    padding-top: var(--navbar-height); /* Espacio para el navbar fixed */
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

h1, h2, h3 {
    color: var(--text-light);
    font-weight: 800;
    margin-bottom: 1rem;
}

/* BOTONES GENERALES */
/* 2. Base de los botones */
.btn-primary, .btn-secondary {
    text-decoration: none;
    padding: 14px 28px;
    border-radius: 4px;
    font-weight: 800;
    text-transform: uppercase;
    display: inline-flex; /* Alinea el texto del botón al centro exacto */
    justify-content: center;
    align-items: center;
    letter-spacing: 1px;
    font-size: 0.9rem;
    transition: 0.3s ease;
    text-align: center;
    margin: 0 !important; /* Quitamos márgenes antiguos, el "gap" hace el trabajo */
}

/* 3. Botón Principal (El truco del borde) */
.btn-primary { 
    background-color: var(--primary-color); 
    color: var(--text-light); 
    border: 2px solid transparent; /* ¡TRUCO CLAVE! Iguala la altura con el botón secundario */
}
.btn-primary:hover { 
    background-color: var(--text-light); 
    color: var(--dark-bg); 
}

/* 4. Botón Secundario */
.btn-secondary { 
    border: 2px solid var(--secondary-color); 
    color: var(--secondary-color); 
    background-color: transparent;
}
.btn-secondary:hover { 
    background-color: var(--secondary-color); 
    color: var(--dark-bg); 
}
/* SECCIONES GENERALES */
section {
    padding: 60px 0; /* Padding vertical por defecto para móvil */
}
.section-title { font-size: 2rem; text-align: center; }
.section-subtitle { color: #888; margin-bottom: 40px; font-size: 1.1rem; text-align: center; max-width: 600px; margin-left: auto; margin-right: auto; }

/* NAVBAR (Responsive Móvil Primero) */
.navbar {
    background-color: rgba(5, 5, 5, 0.98);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    height: var(--navbar-height);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    display: flex;
    align-items: center;
}
.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo-img {
    height: 40px; /* Logo más pequeño en móvil */
    width: auto;
}
.menu-toggle {
    display: block; /* Visible por defecto en móvil */
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 1.8rem;
    cursor: pointer;
}
#nav-menu {
    position: absolute;
    top: var(--navbar-height);
    left: 0;
    width: 100%;
    background-color: rgba(5, 5, 5, 0.98);
    display: none; /* Oculto por defecto */
    padding: 20px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
#nav-menu.active {
    display: block; /* Visible cuando se activa */
}
#nav-menu ul {
    list-style: none;
    text-align: center;
}
#nav-menu ul li a {
    color: var(--text-color);
    text-decoration: none;
    display: block;
    padding: 15px 0;
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    transition: 0.3s;
}
#nav-menu ul li a:hover { color: var(--primary-color); }
#nav-menu .btn-nav {
    border-radius: 0; /* Sin bordes redondeados en menú móvil colapsado */
}

/* HERO (Mobile First) */
.hero {
    background: linear-gradient(180deg, var(--dark-bg) 60%, #050505 100%);
    color: var(--text-color);
    padding: 80px 0; /* Menos espacio vertical en móvil */
    text-align: center;
}
/*.hero h1 { font-size: 2rem; line-height: 1.2; }
/*.hero p { font-size: 1.1rem; margin-bottom: 30px; opacity: 0.9; }
/*.hero-actions a {
/*    width: 100%; /* Botones full width en móvil */
/*    margin: 10px 0;
/*}
/* 5. Simetría del texto (Evita renglones desiguales) */
.hero h1, .hero p {
    text-wrap: balance; /* Balancea las palabras para que el párrafo se vea cuadrado/simétrico */
    margin-left: auto;
    margin-right: auto;
}
/* SERVICES (Mobile Grid First) */
.services { background-color: var(--mid-dark-bg); text-align: center; }
.services-grid {
    display: grid;
    grid-template-columns: 1fr; /* Una columna por defecto en móvil */
    gap: 30px;
}
.service-card {
    background: var(--dark-bg);
    padding: 40px 25px;
    border-radius: 10px;
    box-shadow: 0 5px 10px rgba(0,0,0,0.2);
    text-align: left;
    position: relative;
    border-top: 4px solid transparent;
}
.service-card .icon { font-size: 2rem; color: var(--primary-color); margin-bottom: 20px; }
.service-card h3 { font-size: 1.3rem; margin-bottom: 10px; }
.service-card p { font-size: 0.95rem; }

/* Tarjeta Destacada (Terracota top border) */
.service-card.featured { border-top-color: var(--primary-color); }
.service-card .tag {
    display: inline-block;
    background: rgba(184, 78, 18, 0.1);
    color: var(--secondary-color);
    font-size: 0.8rem;
    padding: 4px 10px;
    border-radius: 4px;
    margin-top: 15px;
    font-weight: 800;
    text-transform: uppercase;
}

/* ABOUT */
.about { background-color: var(--dark-bg); }
.about-text h2 { font-size: 2rem; text-align: center; }
.about-text p { font-size: 1rem; margin-bottom: 15px; text-align: justify; }

/* CONTACT */
.contact { background-color: #050505; text-align: center; }
.contact-wrapper { width: 100%; max-width: 600px; margin: 0 auto; }
.contact-form input, .contact-form select, .contact-form textarea {
    width: 100%;
    padding: 14px;
    margin-bottom: 15px;
    border: 1px solid rgba(255,255,255,0.05);
    background: rgba(255,255,255,0.03);
    color: #fff;
    border-radius: 4px;
}

/* --- SOLUCIÓN PARA LA LISTA DESPLEGABLE --- */
.contact-form select option {
    background-color: #0F1219; /* Fuerza el fondo oscuro */
    color: #FFFFFF; /* Fuerza el texto blanco */
}
/* ------------------------------------------ */

.contact-form textarea { height: 120px; resize: none; }
.contact-form button { width: 100%; }

/* =========================================
   FOOTER CORPORATIVO
   ========================================= */
.footer {
    background-color: #050505; /* El negro más profundo de la paleta */
    color: #A0AABF; /* Gris neutro para no competir con el texto principal */
    padding: 60px 0 0 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.9rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h4 {
    color: var(--text-light);
    font-size: 1.1rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 2px;
    background-color: var(--primary-color); /* Toque terracota formal */
}

/* Colores oficiales de la marca JomarTec */
.brand-jo {
    color: #FFD000; /* Amarillo vibrante */
    font-weight: 800;
}

.brand-mar {
    color: #FF6A00; /* Naranja corporativo */
    font-weight: 800;
}

.brand-tec {
    color: #E52121; /* Rojo profundo */
    font-weight: 800;
}

/* Ajuste para el contenedor del logo en el footer */
.footer-logo {
    font-size: 1.6rem;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 15px;
    letter-spacing: 0.5px;
}

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

.footer-ruc {
    margin-top: 15px;
    color: var(--text-light);
    font-size: 0.85rem;
}

/* Enlaces Rápidos */
.footer-col ul {
    list-style: none;
}
.footer-col ul li {
    margin-bottom: 12px;
}
.footer-col ul li a {
    color: #A0AABF;
    text-decoration: none;
    transition: 0.3s ease;
}
.footer-col ul li a:hover {
    color: var(--secondary-color);
    padding-left: 5px;
}

/* Información de Contacto */
.footer-contact-info li {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}
.footer-contact-info li i {
    color: var(--primary-color);
    margin-right: 15px;
    font-size: 1.1rem;
}

/* Redes Sociales */
.social-links {
    margin-top: 25px;
    display: flex;
    gap: 15px;
}
.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    background-color: rgba(255,255,255,0.05);
    color: var(--text-light);
    border-radius: 50%;
    text-decoration: none;
    transition: 0.3s;
}
.social-links a:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
}

/* Copyright Bottom */
.footer-bottom {
    background-color: #010203; /* Aún más oscuro para cerrar la página */
    text-align: center;
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.02);
    font-size: 0.8rem;
}

/* Responsive Grid para Tablets y Desktop */
@media screen and (min-width: 768px) {
    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr; /* La columna de la marca ocupa más espacio */
    }
}


/* WHATSAPP FLOAT - Ajustado para móvil */
.whatsapp-float {
    position: fixed;
    width: 50px; /* Ligeramente más pequeño en móvil */
    height: 50px;
    bottom: 20px; /* Más cerca del borde inferior */
    right: 20px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 24px;
    box-shadow: 2px 2px 6px rgba(0,0,0,0.3);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: transform 0.3s;
}
.whatsapp-float:hover { transform: scale(1.1); }

/* =========================================
   MEDIA QUERIES (Puntos de Quiebre)
   ========================================= */

/* Tablets (Dispositivos > 768px) */
@media screen and (min-width: 768px) {
    /* GENERAL */
    section { padding: 100px 0; }
    .section-title { font-size: 2.5rem; }
    .section-subtitle { margin-bottom: 60px; }

    /* NAVBAR */
    .logo-img { height: 50px; }
    .menu-toggle { display: none; } /* Ocultar hamburger */
    #nav-menu {
        position: static; /* Restaurar flujo normal */
        background: none;
        width: auto;
        display: flex !important; /* Asegurar visibilidad */
        border: none;
        padding: 0;
    }
    #nav-menu ul { display: flex; text-align: left; align-items: center; }
    #nav-menu ul li a {
        display: inline-block;
        padding: 0;
        margin-left: 20px;
        font-size: 0.85rem;
    }
    .btn-nav {
        background: var(--primary-color);
        color: var(--text-light) !important;
        padding: 8px 18px !important;
        border-radius: 4px !important;
    }

    /* HERO */
    .hero { padding: 150px 0 100px 0; }
    .hero h1 { font-size: 3rem; }
    .hero p { font-size: 1.25rem; max-width: 750px; }
   /* 1. Contenedor de Botones - Centrado perfecto con Flexbox */
.hero-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px; /* Crea un espacio exacto entre los botones */
    flex-wrap: wrap; /* Permite que en móviles se apilen bien */
    margin-top: 30px;
}

    /* SERVICES */
    .services-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 columnas en tablets */
    }
    .service-card .icon { font-size: 2.2rem; }
    .service-card h3 { font-size: 1.4rem; }

    /* ABOUT */
    .about-text h2 { text-align: left; font-size: 2.5rem; }
}

/* Desktop Pequeño (Dispositivos > 992px) */
@media screen and (min-width: 992px) {
    /* SERVICES */
    .services-grid {
        grid-template-columns: repeat(3, 1fr); /* 3 columnas en desktop */
        gap: 40px;
    }
    .service-card { padding: 50px 35px; }
    
    /* WHATSAPP FLOAT */
    .whatsapp-float {
        width: 60px; height: 60px;
        bottom: 40px; right: 40px;
        font-size: 30px;
    }
}