/* --- RESET & GLOBALES --- */
* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Roboto', sans-serif; }

:root {
    --primary: #003366; /* Azul Oscuro */
    --accent: #00a8cc;  /* Azul Tecnológico */
    --text: #333;
    --bg-light: #f4f7f6;
    --white: #ffffff;
}

body { color: var(--text); line-height: 1.6; }
body.bg-gray-page { background-color: #eaeff2; }

.container { width: 90%; max-width: 1200px; margin: 0 auto; }
a { text-decoration: none; }
ul { list-style: none; }

/* --- NAVBAR --- */
nav { background: var(--white); box-shadow: 0 2px 10px rgba(0,0,0,0.05); position: sticky; top: 0; z-index: 1000; }
.nav-container { display: flex; justify-content: space-between; align-items: center; padding: 15px 0; }
.logo { font-size: 1.4rem; font-weight: 900; color: var(--primary); letter-spacing: -1px; }
.logo span { color: var(--accent); }
.nav-links { display: flex; gap: 25px; align-items: center; }
.nav-links a { color: var(--text); font-weight: 500; font-size: 0.9rem; transition: 0.3s; }
.nav-links a:hover { color: var(--accent); }
.btn-nav { padding: 8px 20px; background: var(--primary); color: white !important; border-radius: 4px; font-weight: 700 !important; font-size: 0.85rem !important; }

/* --- HERO HOME --- */
header:not(.mini-header) {
    height: 85vh;
    background: url('imagenes/hero_tech.jpg') no-repeat center center/cover;
    position: relative; display: flex; align-items: center;
}
.overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(to right, rgba(0,51,102,0.9), rgba(0,51,102,0.6)); }
.hero-content { position: relative; z-index: 2; color: white; max-width: 700px; }
header h1 { font-size: 3rem; line-height: 1.1; margin-bottom: 20px; }
header h1 span { color: var(--accent); }
header p { font-size: 1.1rem; margin-bottom: 30px; opacity: 0.9; }

.btn-primary { display: inline-block; padding: 12px 25px; background: var(--accent); color: white; border-radius: 4px; font-weight: 700; border: none; cursor: pointer; transition: 0.3s; }
.btn-outline { display: inline-block; padding: 12px 25px; background: transparent; color: white; border: 2px solid white; border-radius: 4px; font-weight: 700; transition: 0.3s; margin-left: 10px; }

/* --- SECCIONES HOME (Index.html) --- */
.stats { background: var(--accent); padding: 40px 0; color: white; }
.stats-grid { display: flex; justify-content: space-around; text-align: center; }
.about { padding: 80px 0; }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; }
.about-img img { width: 100%; border-radius: 10px; box-shadow: 0 15px 30px rgba(0,0,0,0.1); }
.services { background: var(--bg-light); padding: 80px 0; }
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; margin-top: 40px; }

/* CORRECCIÓN TARJETAS HOME: Aquí estaba el problema, faltaba controlar la imagen */
.service-card { 
    background: white; 
    border-radius: 8px; 
    overflow: hidden; 
    box-shadow: 0 5px 15px rgba(0,0,0,0.05); 
    text-align: center; 
    transition: 0.3s; 
    /* Quitamos padding general para que la imagen toque los bordes arriba */
    padding-bottom: 30px; 
}
.service-card:hover { transform: translateY(-5px); }

/* Esta es la clase que faltaba para frenar el tamaño de la imagen */
.img-box {
    height: 200px;
    width: 100%;
    overflow: hidden;
}
.img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Esto evita que se deforme */
}

.card-content { padding: 20px; position: relative; }
/* Icono flotante */
.service-card i.icon { 
    font-size: 1.5rem; color: white; background: var(--accent); 
    width: 50px; height: 50px; line-height: 50px; border-radius: 50%;
    margin: -45px auto 15px; /* Truco para que suba sobre la imagen */
    display: block; position: relative; z-index: 2;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.service-card h3 { color: var(--primary); margin-bottom: 10px; }
.service-card a { color: var(--accent); font-weight: 700; margin-top: 15px; display: inline-block; }


/* --- PÁGINA SERVICIOS (Servicios.html) --- */

.mini-header {
    height: 250px; 
    background: url('imagenes/hero_tech.jpg') no-repeat center center/cover;
    position: relative; display: flex; align-items: center; justify-content: center; text-align: center;
    margin-bottom: -40px;
}
.mini-header .container { position: relative; z-index: 2; color: white; }
.mini-header h1 { font-size: 2.5rem; margin-bottom: 5px; }

.services-wrapper {
    width: 90%; max-width: 1000px; margin: 0 auto; padding-bottom: 60px; position: relative; z-index: 10;
}

/* LA TARJETA PERFECTA DE DETALLE */
.detail-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
    margin-bottom: 40px;
    display: flex; 
    height: 400px; 
    overflow: hidden; 
}

.detail-content {
    flex: 1; padding: 40px; display: flex; flex-direction: column; justify-content: center;
}
.detail-image {
    flex: 1; height: 100%;
}
.detail-image img {
    width: 100%; height: 100%; object-fit: cover; 
}
.detail-card.reverse { flex-direction: row-reverse; }

.icon-label { color: var(--accent); font-weight: 700; font-size: 0.8rem; margin-bottom: 10px; letter-spacing: 1px; }
.detail-content h2 { font-size: 2rem; color: var(--primary); margin-bottom: 15px; line-height: 1.1; }
.detail-content p { font-size: 0.95rem; color: #555; margin-bottom: 20px; }

.feature-list { margin-bottom: 25px; }
.feature-list li { margin-bottom: 8px; font-size: 0.9rem; color: #444; }
.feature-list i { color: var(--accent); margin-right: 8px; }

.btn-link { color: var(--primary); font-weight: 700; font-size: 0.9rem; border-bottom: 2px solid var(--accent); padding-bottom: 2px; align-self: flex-start; }

/* CTA & FOOTER */
.cta { padding: 80px 0; background: var(--primary); color: white; text-align: center; }
.contact-form { background: white; padding: 30px; max-width: 400px; margin: 30px auto 0; border-radius: 8px; display: flex; flex-direction: column; gap: 10px; }
.contact-form input, select { padding: 12px; border: 1px solid #ddd; border-radius: 4px; }
footer { background: #002244; color: white; padding: 20px 0; text-align: center; font-size: 0.9rem; opacity: 0.9; }

/* RESPONSIVE */
@media (max-width: 768px) {
    .detail-card, .detail-card.reverse { flex-direction: column; height: auto; } 
    .detail-image { height: 250px; }
    .hero-content h1 { font-size: 2.5rem; }
    .nav-links { display: none; }
    .stats-grid { flex-direction: column; gap: 20px; }
    .about-grid { grid-template-columns: 1fr; }
}