/* =========================================================
   Laboratori Analític Valls — hoja de estilos
   Identidad visual corporativa: azul marino, franjas planas
   de color, tarjetas limpias con foto y cabeceras de sección
   con migas de pan, al estilo de laboratorios acreditados.
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&display=swap');

:root{
    /* Color */
    --ink:            #0F2438;   /* pie de página */
    --text-primary:   #29343D;
    --text-secondary: #647079;
    --bg-color:       #F5F7F8;
    --surface-color:  #FFFFFF;

    --azul-banner:    #163E63;   /* franja de cabecera de sección */
    --accent-blue:    #1C5D96;   /* enlaces, títulos de tarjeta, botones */
    --accent-blue-dark: #144569;
    --accent-teal:    #3E8F93;
    --accent-teal-light: #A9C9C5;
    --accent-lime:    #A7CC3C;

    --line-color:     #E1E6E8;
    --shadow-sm:      0 1px 2px rgba(15, 36, 56, 0.06), 0 4px 14px rgba(15, 36, 56, 0.05);

    --font-head: 'IBM Plex Sans', 'Segoe UI', Arial, sans-serif;
    --font-body: 'IBM Plex Sans', 'Segoe UI', Arial, sans-serif;
}

*, *::before, *::after{ box-sizing: border-box; }

html{ scroll-behavior: smooth; }

body{
    margin: 0;
    font-family: var(--font-body);
    color: var(--text-primary);
    background: var(--surface-color);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3{
    font-family: var(--font-head);
    color: var(--text-primary);
    line-height: 1.2;
    margin: 0 0 18px 0;
    font-weight: 700;
    letter-spacing: -0.005em;
}

h1{ font-size: clamp(1.9rem, 3.6vw, 2.6rem); }
h2{ font-size: clamp(1.4rem, 2.4vw, 1.85rem); }
h3{ font-size: 1.1rem; }

p{ margin: 0 0 16px 0; }

a{ color: inherit; }

img{ max-width: 100%; display: block; }

::selection{ background: var(--accent-teal-light); color: var(--ink); }

:focus-visible{
    outline: 2px solid var(--accent-blue);
    outline-offset: 3px;
    border-radius: 2px;
}

@media (prefers-reduced-motion: reduce){
    *{ animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------------------------------------------------------
   Contenedor general
   --------------------------------------------------------- */
main{
    max-width: 1140px;
    margin: 0 auto;
    padding: 60px 24px 90px;
    text-align: center;
}

main > h1{ max-width: 760px; margin-left: auto; margin-right: auto; }
main > p{ max-width: 700px; margin-left: auto; margin-right: auto; color: var(--text-secondary); font-size: 1.02rem; }

/* ---------------------------------------------------------
   Cabecera / navegación
   --------------------------------------------------------- */
header{
    background: var(--surface-color);
    padding: 0 32px;
    position: sticky;
    top: 0;
    z-index: 40;
    border-bottom: 1px solid var(--line-color);
}

header hr{ display: none; }

header > .logo,
header > nav{
    max-width: 1220px;
    margin: 0 auto;
}

header .logo{
    display: flex;
    align-items: center;
    height: 74px;
}

header .logo h2{
    margin: 0;
    font-size: 1.02rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    display: flex;
    align-items: center;
    gap: 12px;
}

.marca-icono{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    min-width: 38px;
    background: var(--azul-banner);
    color: #fff;
    font-family: var(--font-head);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    border-radius: 5px;
}

nav{
    display: flex;
    justify-content: center;
    padding-bottom: 0;
}

nav ul{
    list-style: none;
    display: flex;
    gap: 4px;
    margin: 0;
    padding: 0 0 16px 0;
    flex-wrap: wrap;
}

nav a{
    text-decoration: none;
    color: var(--text-primary);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    padding: 8px 14px;
    border-radius: 4px;
    transition: color 0.15s ease, background 0.15s ease;
}

nav a:hover{
    color: var(--accent-blue);
    background: var(--bg-color);
}

/* ---------------------------------------------------------
   Cabecera de sección interior (banner + migas de pan)
   Usada en Servicios / Instalaciones / Contacto
   --------------------------------------------------------- */
.banner-interior{
    background: var(--azul-banner);
    color: #fff;
    text-align: center;
    padding: 44px 24px 32px;
    margin-bottom: 0;
}

.banner-interior h1{
    color: #fff;
    text-transform: uppercase;
    font-size: clamp(1.6rem, 3vw, 2.15rem);
    letter-spacing: 0.02em;
    margin-bottom: 12px;
}

.migas-pan{
    font-size: 0.85rem;
    color: #B9CBDA;
}

.migas-pan a{ text-decoration: none; color: #B9CBDA; }
.migas-pan a:hover{ color: #fff; }
.migas-pan .actual{ color: #fff; }

/* ---------------------------------------------------------
   Hero (portada)
   --------------------------------------------------------- */
.hero-inicio{
    position: relative;
    margin: 0 0 90px 0;
    padding: 120px 24px 100px;
    text-align: center;
    color: #fff;
    background:
        linear-gradient(180deg, rgba(11,32,52,0.88) 0%, rgba(11,32,52,0.94) 100%),
        url('img/fondo-inicio.jpg') center / cover no-repeat;
    overflow: hidden;
}

.hero-inicio h1,
.hero-inicio p{
    position: relative;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

.hero-inicio h1{ color: #fff; text-transform: none; }

.hero-inicio p{
    color: #C6D3DE;
    font-size: 1.1rem;
}

/* Micro-animación de entrada: un único momento orquestado al cargar */
@keyframes entradaHero{
    from{ opacity: 0; transform: translateY(16px); }
    to{ opacity: 1; transform: translateY(0); }
}

.hero-inicio h1{ animation: entradaHero 0.7s ease both; animation-delay: 0.05s; }
.hero-inicio p{ animation: entradaHero 0.7s ease both; animation-delay: 0.2s; }
.hero-inicio .btn-enviar{ animation: entradaHero 0.7s ease both; animation-delay: 0.35s; }

/* ---------------------------------------------------------
   Botón principal
   --------------------------------------------------------- */
.btn-enviar{
    display: inline-block;
    position: relative;
    background: var(--accent-blue);
    color: #fff;
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    text-align: center;
    border: none;
    border-radius: 4px;
    padding: 15px 28px;
    width: 100%;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.15s ease;
}

.btn-enviar:hover{
    background: var(--accent-blue-dark);
    transform: translateY(-1px);
}

/* ---------------------------------------------------------
   Tarjetas de valor (portada)
   --------------------------------------------------------- */
main section div[style*="grid-template-columns"] > div{
    text-align: left;
}

/* ---------------------------------------------------------
   Catálogo de servicios
   --------------------------------------------------------- */
.servicios-destacados{ text-align: left; }
.servicios-destacados > h2{ text-align: left; }

.specialties-grid{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 26px;
    margin-top: 32px;
}

.specialty-card{
    background: var(--surface-color);
    border: 1px solid var(--line-color);
    border-radius: 4px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.specialty-card:hover{
    box-shadow: 0 4px 10px rgba(15,36,56,0.12), 0 10px 24px rgba(15,36,56,0.08);
    transform: translateY(-2px);
}

.specialty-card img{
    width: 100%;
    height: 165px;
    object-fit: cover;
}

.specialty-card .contenido-tarjeta{
    padding: 20px 22px 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.specialty-card h3{
    font-size: 1.02rem;
    margin-bottom: 8px;
    color: var(--accent-blue);
    font-weight: 700;
}

.specialty-card p{ color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 0; }

/* Sectores de actuación */
.sectors-grid{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1px;
    background: var(--line-color);
    border: 1px solid var(--line-color);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 10px;
}

.sector-item{
    background: var(--surface-color);
    padding: 22px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    font-weight: 500;
}

.sector-icon{
    font-size: 1.3rem;
    width: 42px;
    height: 42px;
    min-width: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-color);
    border-radius: 4px;
}

/* ---------------------------------------------------------
   Laboratorio en cifras — franjas planas de color corporativo
   --------------------------------------------------------- */
.cifras-section{
    margin-top: 100px;
}

.cifras-grid{
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}

.cifra-item{
    padding: 46px 24px;
    text-align: left;
    color: #fff;
}

.cifra-item:nth-child(4n+1){ background: var(--azul-banner); }
.cifra-item:nth-child(4n+2){ background: var(--accent-teal); }
.cifra-item:nth-child(4n+3){ background: var(--accent-teal-light); color: var(--ink); }
.cifra-item:nth-child(4n+4){ background: var(--accent-lime); color: var(--ink); }

.cifra-numero{
    display: block;
    font-family: var(--font-head);
    font-size: 2.3rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.cifra-label{
    margin: 6px 0 0;
    font-size: 0.92rem;
    opacity: 0.92;
}

@media (max-width: 820px){
    .cifras-grid{ grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px){
    .cifras-grid{ grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------
   Cómo trabajamos (proceso)
   --------------------------------------------------------- */
.proceso-section{
    background: var(--bg-color);
    padding: 70px 24px;
    margin-top: 0;
}

.proceso-cabecera{
    max-width: 640px;
    margin: 0 auto 40px;
    text-align: center;
}

.proceso-cabecera p{ color: var(--text-secondary); margin: 0; }

.proceso-grid{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 34px;
    max-width: 1100px;
    margin: 0 auto;
    text-align: left;
}

.proceso-numero{
    display: block;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1rem;
    color: var(--accent-blue);
    margin-bottom: 10px;
}

.proceso-item p{
    color: var(--text-secondary);
    font-size: 0.92rem;
    margin: 0;
}

/* ---------------------------------------------------------
   Preguntas frecuentes
   --------------------------------------------------------- */
.faq-section{
    max-width: 920px;
    margin: 100px auto 0;
    padding: 0 24px;
    text-align: left;
}

.faq-section > h2{ margin-bottom: 44px; text-align: center; }

.faq-item{
    display: flex;
    gap: 46px;
    padding: 30px 0;
    border-bottom: 1px solid var(--line-color);
    align-items: flex-start;
}

.faq-item:first-of-type{ padding-top: 0; }

.faq-item:nth-child(even){ flex-direction: row-reverse; }

.faq-pregunta{
    flex: 1;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-primary);
    margin: 0;
}

.faq-respuesta{
    flex: 1;
    color: var(--text-secondary);
    font-size: 0.92rem;
    margin: 0;
}

.faq-respuesta strong{ color: var(--accent-blue); font-weight: 700; }

@media (max-width: 720px){
    .faq-item, .faq-item:nth-child(even){
        flex-direction: column;
        gap: 10px;
    }
}

/* ---------------------------------------------------------
   Formulario de contacto
   --------------------------------------------------------- */
.contenedor-contacto{
    max-width: 640px;
    margin: 50px auto 0;
    background: var(--surface-color);
    border: 1px solid var(--line-color);
    border-radius: 6px;
    box-shadow: var(--shadow-sm);
    padding: 40px 38px;
    text-align: left;
}

.formulario-premium{
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.grupo-input{
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: left;
}

.grupo-input label{
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

.grupo-input input,
.grupo-input select,
.grupo-input textarea{
    font-family: var(--font-body);
    font-size: 0.95rem;
    padding: 11px 13px;
    border: 1px solid var(--line-color);
    border-radius: 4px;
    background: var(--bg-color);
    color: var(--text-primary);
    width: 100%;
}

.grupo-input input:focus,
.grupo-input select:focus,
.grupo-input textarea:focus{
    outline: none;
    border-color: var(--accent-blue);
    background: #fff;
}

.grupo-input textarea{ resize: vertical; min-height: 105px; }

.formulario-premium .btn-enviar{ margin-top: 6px; }

/* ---------------------------------------------------------
   Instalaciones / mapa
   --------------------------------------------------------- */
.mapa-contenedor{ box-shadow: var(--shadow-sm); }

/* ---------------------------------------------------------
   Pie de página
   --------------------------------------------------------- */
footer{
    background: var(--ink);
    color: #A9BAC5;
    padding: 56px 24px 28px;
    margin-top: 100px;
    text-align: center;
}

footer .info-contacto p{
    margin: 6px 0;
    font-size: 0.95rem;
    color: #D5E0E7;
}

footer .info-contacto strong{ color: #fff; }

footer .certificaciones p{
    max-width: 640px;
    margin: 24px auto 0;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.12);
    font-size: 0.82rem;
    color: #83959F;
}

footer .copyright p{
    margin-top: 20px;
    font-size: 0.78rem;
    color: #63737C;
}

/* ---------------------------------------------------------
   Responsive
   --------------------------------------------------------- */
@media (max-width: 640px){
    main{ padding: 40px 18px 60px; }
    .hero-inicio{ padding: 80px 20px 70px; }
    .contenedor-contacto{ padding: 30px 20px; }
    nav ul{ gap: 2px; }
    nav a{ padding: 8px 10px; font-size: 0.78rem; }
}
