/* GENERALES */
html { scroll-behavior: smooth; }
body { font-family: 'Arial', sans-serif; margin: 0; padding: 0; color: #333; line-height: 1.6; }

/* CABECERA */
.main-header {
    background: white; padding: 20px 8%;
    display: flex; justify-content: space-between; align-items: center;
}
.main-logo { height: 70px; }
.header-phrase { font-size: 18px; font-weight: bold; color: #ff0000; text-transform: uppercase; }

/* MENU */
.full-menu {
    background: #fff; position: sticky; top: 0; z-index: 1000;
    border-top: 1px solid #eee; border-bottom: 1px solid #ddd;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.full-menu ul { list-style: none; margin: 0; padding: 0; display: flex; }
.full-menu ul li { flex: 1; text-align: center; }
.full-menu ul li a { 
    display: block; padding: 18px 0; text-decoration: none; 
    color: #004a99; font-weight: bold; text-transform: uppercase; font-size: 13px;
    transition: 0.3s;
}
.full-menu ul li a:hover { background: #004a99; color: white; }

/* SECCIONES Y CONTENEDORES */
.container { padding: 80px 10%; scroll-margin-top: 80px; }
.bg-light { background: #f9f9f9; }
.bg-blue { background: #004a99; color: white; }
.text-white { color: white; text-align: center; margin-bottom: 40px; }

/* IDENTIDAD (Misión, Visión, Valores) */
.identidad-grid { display: flex; gap: 20px; margin-top: 40px; }
.identidad-item { 
    flex: 1; padding: 30px; background: #fff; border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15); text-align: center;
    border-top: 4px solid #004a99; transition: transform 0.3s ease;
}
.identidad-item:hover { transform: translateY(-10px); }
.identidad-item h3 { color: #004a99; margin-bottom: 15px; }

/* JUSTIFICADOS PROFESIONALES */
#quienes-somos .intro-text p, 
#quienes-somos .identidad-item p, 
#liderazgo .member p, 
.valores-list li { text-align: justify; }

.valores-list { list-style: none; padding: 0; }
.valores-list li { margin-bottom: 8px; font-size: 14px; }
.valores-list li::before { content: "• "; color: #c5a059; font-weight: bold; }

/* LIDERAZGO */
.team-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.photo-placeholder img { width: 100%; height: 420px; object-fit: cover; border-radius: 10px; }

/* SERVICIOS */
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.s-card { 
    background: white; padding: 25px; border-radius: 8px; color: #333; 
    border-bottom: 4px solid #c5a059; text-align: center; 
}
.service-icon { width: 60px; margin-bottom: 15px; }

/* FORMULARIO Y CONTACTO */
.contact-wrapper { display: grid; grid-template-columns: 1fr 2fr; gap: 40px; }
.social-side { background: #f0f4f8; padding: 30px; border-radius: 10px; text-align: center; }
.social-icons-contact { font-size: 35px; margin: 20px 0; }
.social-icons-contact a { color: #004a99; margin: 0 10px; }

.form-container { background: white; padding: 30px; border: 1px solid #eee; border-radius: 10px; }
.pwork-form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-bottom: 15px; }
input, textarea, select { 
    padding: 12px; border: 1px solid #ddd; width: 100%; 
    box-sizing: border-box; font-size: 14px; border-radius: 4px;
}
.btn-pwork { 
    background: #004a99; color: white; padding: 15px; border: none; 
    width: 100%; font-weight: bold; cursor: pointer; transition: 0.3s;
}
.btn-pwork:hover { background: #003366; }

footer { background: #111; color: #666; text-align: center; padding: 30px; }

/* RESPONSIVE */
@media (max-width: 850px) {
    /* 1. CABECERA: Más aire y orden */
    .main-header {
        flex-direction: column;
        padding: 25px 5%;
    }
    .main-logo {
        height: 65px; /* Logo legible */
        margin-bottom: 12px;
    }
    .header-phrase {
        font-size: 15px;
        letter-spacing: 1px;
        color: #ff0000;
        border-top: 1px solid #eee; /* Línea sutil para separar del logo */
        padding-top: 10px;
        width: 90%;
        text-align: center;
    }

    /* 2. MENÚ: Dos filas de dos botones para que sean fáciles de tocar */
    .full-menu ul {
        flex-wrap: wrap;
    }
    .full-menu ul li {
        width: 50%; 
        border: 0.5px solid #eee;
    }
    .full-menu ul li a {
        padding: 15px 5px;
        font-size: 12px;
    }

    /* 3. SECCIONES: Menos relleno lateral para ganar espacio de lectura */
    .container {
        padding: 50px 6%;
    }

    /* 4. GRIDS: Todo a una sola columna pero con ancho total */
    .identidad-grid, .team-grid, .services-grid, .contact-wrapper, .pwork-form .row {
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

    /* 5. FOTOS Y TARJETAS: Que no se vean gigantes ni pegadas */
    .photo-placeholder img {
        height: 300px; /* Reducimos la altura en móvil para que no sea infinita */
    }
    
    .identidad-item, .s-card {
        width: 100%;
        box-sizing: border-box;
        margin-bottom: 10px;
    }

    /* 6. FORMULARIO: Los inputs al 100% de ancho */
    .pwork-form .row {
        gap: 10px;
    }
}