/*
Theme Name: GRAFCAN Child Theme GeneratePress v.33
Theme URI: https://generatepress.com
Description: Child Theme para migración Grafcan (Ex-Divi) a GeneratePress.
Author: Tu Nombre / AI Assistant
Template: generatepress
Version: 1.5.0
Text Domain: grafcan-child
*/

/* ==========================================================================
   0. TIPOGRAFÍA LOCAL (Fuentes Corporativas)
   ========================================================================== */
@font-face {
    font-family: 'League Spartan';
    src: url('fonts/LeagueSpartan-VariableFont_wght.ttf') format('truetype');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Overpass';
    src: url('fonts/Overpass-VariableFont_wght.ttf') format('truetype');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Overpass';
    src: url('fonts/Overpass-Italic-VariableFont_wght.ttf') format('truetype');
    font-weight: 100 900;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Overpass Mono';
    src: url('fonts/OverpassMono-VariableFont_wght.ttf') format('truetype');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

/* ==========================================================================
   1. VARIABLES CORPORATIVAS
   ========================================================================== */
:root {
    /* Colores */
    --grafcan-blue-dark: #1f3864;    /* Azul oscuro corporativo */
    --grafcan-blue-light: #8dc8e0;   /* Azul claro */    
    --grafcan-grey-bg: #f7f8f9;      /* Fondos */
    --grafcan-text: #070c0f;         /* #55555e; Texto general */ 
    --grafcan-white: #ffffff;
    --grafcan-border: rgba(0, 0, 0, 0.1);
    
    /* Footer Colors */
    --grafcan-footer-bg: #4d4842;    /* Gris oscuro footer widgets */
    --grafcan-copyright-bg: #1f3864; /* Azul oscuro copyright */
    
    /* Fuentes */
    --font-headings: 'League Spartan', sans-serif;
    --font-body: 'Overpass', sans-serif;
}

/* ==========================================================================
   2. ESTILOS GENERALES BASE
   ========================================================================== */
body {
    color: var(--grafcan-text);
    font-family: var(--font-body);
    font-size: 15px; /* 17 */
    line-height: 1.6;
	background-color: var(--grafcan-white) !important;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-headings);
    color: var(--grafcan-blue-dark);
    font-weight: 500;
    line-height: 1.2em;
    text-transform: none;
}

h1 { font-size: 25px; margin-bottom: 20px; } /* font-size: 42px 37; */  
h2 { font-size: 22px; margin-bottom: 20px; } /* font-size: 35px; 30 */
h3 { font-size: 20px; margin-bottom: 20px; } /* font-size: 29px; 24 */
h4 { font-size: 18px; } /* font-size: 24px; 20*/

a {
    color: var(--grafcan-blue-light);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover { color: var(--grafcan-blue-dark); }

hr {
    background-color: var(--grafcan-border);
    height: 1px;
    margin: 40px 0;
    border: 0;
}

b, strong {
    font-weight: 500;
}

/* Corrección peso fuente H1 en CPTs */ 
.page.type-page .entry-title,
.noticia.type-noticia .entry-title,
.hemeroteca.type-hemeroteca .entry-title,
.encomienda.type-encomienda .entry-title,
.empleo.type-empleo .entry-title,
.concurso.type-concurso .entry-title,
.transparencia.type-transparencia .entry-title {
    font-weight: 400;
}

/* ==========================================================================
   3. ESTRUCTURA COMÚN (Header, Submenú)
   ========================================================================== */

/* Fondo del Header con efecto blend-mode */
.site-header {
    background-color: #1f3864 !important; /* #344b73 Azul base */ 
    background-image: url('/files/divi-header-img-bg-grafcan-30-opacity-grises-1.png') !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    background-attachment: fixed !important; /* Efecto Parallax */
    background-size: cover !important;
    background-blend-mode: soft-light; /* Mezcla mágica */
    border-bottom: none;
    position: relative;
    z-index: 50;
    padding-top: 10px; /* 25px */
    padding-bottom: 10px; /* 25px */
}

/* Widget Buscador Base */
.header-widget { 
    float: none; 
    margin-top: 0; 
}
.header-widget .search-form {
	display: flex; 
	padding-top: 10px;
}
.header-widget .search-field {
    border-radius: 20px 0 0 20px;
    border: 1px solid rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.15);
    padding: 8px 15px;
    font-family: var(--font-body);
    color: #fff;
}
.header-widget .search-field::placeholder { color: rgba(255,255,255,0.7); }
.header-widget .search-submit {
    border-radius: 0 20px 20px 0;
    background-color: rgba(255,255,255,0.2);
    color: white;
    border: none;
    padding: 0 15px;
}
.header-widget .search-submit:hover { background-color: var(--grafcan-blue-light); }


/* --- ESTILOS DE FUENTE PARA TODOS LOS MENÚS --- */
.main-navigation a,
.grafcan-secondary-nav a {
    font-family: 'Overpass', Helvetica, Arial, Lucida, sans-serif !important;
    font-weight: 700 !important;
    font-size: 17px !important;
    color: #FFFFFF; /* Color base blanco */
    text-transform: none !important; 
}

/* ==========================================================================
   ESTADOS ACTIVOS DE MENÚ (Padres e Hijos) - CORRECCIÓN
   ========================================================================== */

/* 1. MENÚ PRINCIPAL (Dark Blue Background) */
/* Resalta el enlace si es la página actual O si es un ancestro (padre) de la actual */

.main-navigation .main-nav ul li.current-menu-item > a,
.main-navigation .main-nav ul li.current-menu-ancestor > a,
.main-navigation .main-nav ul li.current-page-ancestor > a, /* <--- CLAVE PARA HIJOS */
.main-navigation .main-nav ul li.current_page_item > a,
.main-navigation .main-nav ul li.current_page_parent > a {
    color: var(--grafcan-blue-light) !important; /* Azul Claro */
    font-weight: 800 !important; /* Opcional: un poco más de peso */
}
/* TRANSPARENCIA */
.main-navigation .main-nav ul li.current-menu-item > a,
.main-navigation .main-nav ul li.current-menu-ancestor > a,
.main-navigation .main-nav ul li.current-transparencia-ancestor > a, /* <--- CLAVE PARA HIJOS */
.main-navigation .main-nav ul li.current_page_item > a,
.main-navigation .main-nav ul li.current_page_parent > a {
    color: var(--grafcan-blue-light) !important; /* Azul Claro */
    font-weight: 800 !important; /* Opcional: un poco más de peso */
}


/* 2. SUBMENÚ CONTEXTUAL (Light Blue Background) */
/* Resalta el enlace del hijo activo en la barra secundaria */

.grafcan-secondary-nav ul li.current-menu-item > a,
.grafcan-secondary-nav ul li.current_page_item > a {
    color: var(--grafcan-blue-dark) !important; /* Azul Oscuro para contraste */
    text-decoration: none !important; /* Subrayado para mayor claridad */
    font-weight: 800 !important;
}

/* Asegurar que los no activos del submenú sean blancos o el color por defecto */
.grafcan-secondary-nav ul li:not(.current-menu-item) > a {
   /* color: #ffffff !important;  (Ya está definido en la base, pero por seguridad) */
}


/* --- SUBMENÚS CONTEXTUALES (Barra Azul Clara) --- */
.grafcan-submenu-wrapper {
    background-color: var(--grafcan-blue-light) !important;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    width: 100%;
    clear: both;
    display: block;
    position: relative;
    z-index: 30;
}

/* Contenedor interno del submenú */
.grafcan-submenu-wrapper .grid-container {
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

/* Lista horizontal del submenú (Base Desktop) */
.grafcan-secondary-nav ul,
.grafcan-secondary-nav .grafcan-submenu-items,
.grafcan-secondary-nav .menu {
    list-style: none;
    margin: 0;
    padding: 0px 0px 5px 0px;
    display: flex !important; /* Forzar flex para que sea horizontal en PC */
    flex-direction: row;
    justify-content: flex-start; 
    flex-wrap: wrap; 
    align-items: center;
}

.grafcan-secondary-nav li {
    margin: 0;
    float: none; 
    display: inline-block;
}

.grafcan-secondary-nav li a {
    display: block;
    padding: 10px 15px 0 0; /* 10px 20px 10px 0 */
    margin-right: 15px; 
    text-decoration: none;
    transition: background 0.3s;
    line-height: 1.4;
}

.grafcan-secondary-nav ul li:first-child a {
    padding-left: 0;
}

.grafcan-secondary-nav li a:hover {
    background-color: transparent;
    color: var(--grafcan-blue-dark) !important; 
    text-decoration: underline;
}

/* AJUSTE CONTENIDO AL CONTENEDOR */
.separate-containers .comments-area, .separate-containers .inside-article, .separate-containers .page-header, .separate-containers .paging-navigation {
    padding: 40px 0px 40px 0px;
}


/* ==========================================================================
   4. LÓGICA ESPECÍFICA POR DISPOSITIVO (Desktop vs Móvil)
   ========================================================================== */

/* --- ESCRITORIO (PC > 768px) --- */
@media (min-width: 769px) {
    
    /* CABECERA (Logo + Buscador) */
    .inside-header {
        max-width: 1400px; 
        margin-left: auto; 
        margin-right: auto;
        padding-left: 100px; /* Alineación con el menú */
        padding-right: 100px;
        box-sizing: border-box;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .site-logo {
        margin-left: 0 !important; /* 80px */
        padding-left: 0 !important;
    }
    .site-logo img {
        padding-left: 0 !important;
        margin-left: 0 !important;
    }

    /* MENÚ PRINCIPAL ESCRITORIO */
    .main-navigation {
        background-color: #1f3864 !important;
        font-family: var(--font-headings);
        width: 100%;
        z-index: 40;
    }
	.main-navigation ul ul {
		background-color: #1f3864;
	}		

    /* Contenedor interno del menú */
    .main-navigation .inside-navigation {
        max-width: 1400px;
        margin-left: auto;
        margin-right: auto;
        padding-right: 400px;
        box-sizing: border-box;
        justify-content: flex-start;
    }
    
    .nav-below-header .main-navigation .inside-navigation.grid-container {
        padding-left: 20px !important; /* 100px */
    }
	/*.grafcan-submenu-wrapper .grafcan-secondary-nav {
		padding-left: 20px !important; /* 100px *
	}*/

    /* Lista horizontal */
    .main-navigation .main-nav > ul {
        display: flex !important; /* Forzar flex para asegurar horizontalidad */
        flex-direction: row;
        justify-content: flex-start;
        flex-wrap: wrap;
		padding-top: 5px;
        padding-left: 0 !important;
        margin-left: 0 !important;
    }

    .main-navigation .main-nav ul li a {
        text-shadow: 0 1px 2px rgba(0,0,0,0.3);
        padding-left: 10px; 
        padding-right: 10px;
		line-height: 50px !important;
    }

    .main-navigation .main-nav > ul > li:first-child > a {
        padding-left: 0 !important;
    }

    /* SUBMENÚ ESCRITORIO */
    .grafcan-submenu-wrapper .grid-container {
        padding-left: 20px !important;
        padding-right: 20px !important; /* 100 > 80 */
        max-width: 1400px;
    }
    
    .grafcan-secondary-nav li a {
        margin-right: 4px; /* 8px */
    }
}

/* --- MÓVIL (Tablet/Phone <= 768px) --- */
@media (max-width: 768px) {
    
    /* CABECERA APILADA */
    .inside-header {
        flex-direction: column;
        justify-content: center;
        height: auto;
        padding-left: 20px !important; 
        padding-right: 20px !important;
        margin-left: auto !important; 
        padding-bottom: 20px; 
    }

    /* LOGO CENTRADO */
    .site-logo {
        text-align: center;
        width: 100%;
        display: block;
        margin: 0 auto;
    }
    .site-logo img {
        padding-left: 0 !important;
        margin-left: auto !important;
        margin-right: auto !important;
        display: block;
        max-width: 100%; 
        height: auto;
    }

    /* WIDGET BUSCADOR CENTRADO DEBAJO DEL LOGO */
    .header-widget {
        margin-top: 15px;
        width: 90%; 
        max-width: 400px;
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }
    .header-widget .search-form {
        justify-content: center;
        width: 100%;
    }
    .header-widget .search-field {
        width: 100%;
        background: rgba(255,255,255,0.3);
        border-radius: 20px 0 0 20px;
    }

    /* --- MENÚ MÓVIL: LÓGICA --- */
    
    .main-navigation {
        background-color: #1f3864 !important;
    }

    /* Botón Hamburguesa */
    .main-navigation .menu-toggle {
        text-align: center;
        width: 100%;
        display: block;
        margin: 0 auto;
        font-weight: 500; /* 700 */
        color: #fff;
    }

    /* LISTA DEL MENÚ */
    .main-navigation .main-nav > ul {
        display: none; /* Inicialmente oculto, JS lo abre */
        background-color: #1f3864 !important;
        padding-left: 0 !important;
        margin-left: 0 !important;
    }

    .main-navigation.toggled .main-nav > ul {
        display: block !important;
    }

    .main-navigation .main-nav ul li {
        display: block;
        width: 100%;
        text-align: center;
        margin-bottom: 0 !important;
    }

    .main-navigation .main-nav ul li a {
        color: #ffffff !important;
		display: block;
        padding-top: 8px !important; 
        padding-bottom: 8px !important;
        padding-left: 20px !important;
        padding-right: 20px !important;
        border-bottom: none !important;
        border-top: none !important;
        line-height: 1.2 !important;
    }

    /* Flecha desplegable */
    .main-navigation .menu-item-has-children .dropdown-menu-toggle {
        padding-top: 8px !important;
        padding-bottom: 8px !important;
        float: none !important; 
        display: inline-block;
    }

    /* --- SUBMENÚS DESPLEGABLES MÓVIL --- */
    .main-navigation .main-nav ul ul {
        display: none;
        visibility: hidden;
        opacity: 0;
        height: 0;
        background-color: rgba(0,0,0,0.15);
    }
    
    .main-navigation .main-nav ul ul.toggled-on {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        height: auto !important;
        position: relative !important;
        margin-bottom: 10px !important;
    }
    
    /* ESTILO ITEMS SUBMENÚ MÓVIL (Indentación) */
    .main-navigation .main-nav ul ul li a {
        font-size: 16px !important;
        opacity: 0.9;
        padding-top: 6px !important;
        padding-bottom: 6px !important;
        /* CAMBIO: Sangría aumentada para jerarquía */
        padding-left: 50px !important; 
    }

    .main-navigation .main-nav ul .toggled-on {
        display: block !important;
    }
    
    /* FOOTER MÓVIL */
    .grafcan-footer-grid { flex-direction: column; margin-right: 0; }
    .grafcan-col-1, .grafcan-col-2, .grafcan-col-3 { width: 100%; padding-right: 0; margin-bottom: 40px; text-align: center; }
    .sellos-certificados ul, .grafcan-social-icons { justify-content: center; }
    .grafcan-copyright-content { flex-direction: column; gap: 10px; }
    .legal-menu-items { display: block; border-top: 1px solid rgba(255,255,255,0.1); padding-top: 10px; margin-top: 10px; }
    .legal-menu-items li { border: none; padding: 5px 0; display: block; }
    
    .hero-slider-section { height: 300px; }
    .hide-on-mobile { display: none !important; }
    .site-header { background-position: center top !important; }
    
    /* Tablas Responsive */
	/*.greswd-table td {padding: 0 !important; }*/
    .greswd-table th { display: none; }
    .greswd-table tr { margin-bottom: 20px; display: block; border: 1px solid #ddd; }
    .greswd-table td { display: block; text-align: right; padding-left: 50%; position: relative; border-bottom: 1px solid #eee; }
    /*.greswd-table td:before { content: attr(data-th); position: absolute; left: 10px; width: 45%; text-align: left; font-weight: bold; color: var(--grafcan-blue-dark);padding-right: 10px; }
	/*.greswd-table td:after { padding-right: 10px; }*/
	
	/* --- CORRECCIÓN TABLAS RESPONSIVE (FLEXBOX) --- */
	.greswd-table td { 
		padding: 12px 15px !important; 
		display: flex !important;       /* Usamos Flex para alinear título y contenido */
		flex-direction: row;            /* Uno al lado del otro */
		justify-content: space-between; /* Espaciado entre ellos */
		align-items: baseline;          /* Alinear texto base */
		text-align: left !important;    /* Forzamos alineación izquierda para leer mejor */
		height: auto !important;        /* Altura automática para que crezca según el texto */
		border-bottom: 1px solid #eee;
	}

	.greswd-table td:before { 
		content: attr(data-th); 
		position: relative !important;  /* IMPORTANTE: Quitamos absolute */
		left: auto !important;
		width: 35% !important;          /* Ancho fijo para el título */
		min-width: 120px;               /* Mínimo para que no se rompa el título */
		font-weight: bold; 
		color: var(--grafcan-blue-dark);
		padding-right: 15px; 
		flex-shrink: 0;                 /* Evita que el título se aplaste */
	}

	/* Ajuste opcional: Si el contenido es muy largo, que ocupe el resto */
	.greswd-table td > * {
		flex-grow: 1;
	}	
	
}


/* ==========================================================================
   5. HERO SLIDER (Diseño Actualizado: Título | Texto)
   ========================================================================== */
.hero-slider-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    /* margin-bottom: 40px;  <-- Eliminado si ya aplicaste el fix de la home */
}

.hero-slider-section {
    position: relative;
    height: 260px; /* 280 320 400 */
    width: 100%;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    z-index: 1;
    display: flex;
    align-items: flex-end; /* Alinea la caja de texto abajo */
}
.hero-slide.active { opacity: 1; z-index: 2; }

/* Caja semitransparente de fondo */
.hero-slide-content {
    width: 100%;
    background: rgba(150, 156, 163, 0.61);  /* rgba(77, 72, 66, 0.60); /* rgba(77, 72, 66, 0.9); Un poco más opaco para legibilidad */
    color: #fff;
    padding: 20px 20px; /*30px 20px 2 Más padding vertical */
    position: relative;
    bottom: 23px; /* 40 */
    
    /* Centrar el contenedor interno */
    display: flex;
    justify-content: center;
}

/* Contenedor Flex para Título y Texto */
.hero-slide-text {
    display: flex;
    align-items: center; /* Centrado vertical de la línea y texto */
    justify-content: center;
    max-width: 1200px; /* Ancho máximo para que no se desparrame en pantallas grandes */
    width: 100%;
    gap: 30px; /* Espacio entre la línea y el texto */
}

/* TÍTULO (Izquierda) */
.hero-slide-text h2 {
    font-family: var(--font-headings);
    color: #fff;
    font-size: 28px; /* Un poco más grande */
    margin: 0;
    /*text-transform: uppercase; */ 
    font-weight: 500; /* 700 */ /* 800 Más peso */
    
    /* Configuración de columnas */
    flex: 0 0 35%; /* Ocupa el 35% del ancho */
    text-align: right; /* Texto alineado a la derecha (pegado a la línea) */
    
    /* LA LÍNEA BLANCA SEPARADORA */
    border-right: 2px solid #fff;
    padding-right: 30px; /* Espacio hasta la línea */
    line-height: 1.2;
}

/* PÁRRAFO (Derecha) */
.hero-slide-text p {
    font-family: var(--font-body);
    margin: 0;
    font-size: 18px; /* Un poco más grande para leer mejor */
    color: #fff; /* Blanco puro mejor que #ddd para contraste */
    line-height: 1.5;
    
    /* Configuración de columnas */
    flex: 1; /* Ocupa el resto del espacio */
    text-align: left; /* Texto alineado a la izquierda */
}

/* Puntos de navegación */
.hero-slider-dots {
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    gap: 10px;
}

.hero-slider-dot {
    width: 12px;
    height: 12px;
    background-color: rgba(255,255,255,0.5);
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s;
}
.hero-slider-dot.active {
    background-color: #fff;
    transform: scale(1.2);
}

/* --- RESPONSIVE (Móvil) --- */
/* En pantallas pequeñas, volvemos a apilar uno encima del otro */
@media (max-width: 768px) {
    .hero-slider-section {
        height: 300px; /* Un poco más bajo en móvil */
    }
    
    .hero-slide-content {
        bottom: 0; /* Pegado abajo en móvil */
        padding: 20px;
    }

    .hero-slide-text {
        flex-direction: column; /* Apilar verticalmente */
        gap: 10px;
    }

    .hero-slide-text h2 {
        text-align: center;
        border-right: none; /* Quitar línea lateral */
        border-bottom: 2px solid rgba(255,255,255,0.5); /* Poner línea abajo suave */
        padding-right: 0;
        padding-bottom: 10px;
        font-size: 22px;
        flex: auto;
    }

    .hero-slide-text p {
        text-align: center;
        font-size: 15px;
    }
}

/* ==========================================================================
   6. TABLAS DE DATOS
   ========================================================================== */
.greswd-table-responsive {
    overflow-x: auto;
    margin-bottom: 30px;
    border: 1px solid #eee;
}

.greswd-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    font-family: var(--font-body);
    font-size: 15px;
}

.greswd-table th {
    background-color: var(--grafcan-blue-dark);
    color: #fff;
    font-family: var(--font-headings);
    font-weight: 400; /* bold */
	font-size: 19px; /* 16 */
    padding: 12px;
    text-align: left;
}

.greswd-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #eee;
    color: #666;
}

.greswd-table tr:nth-child(even) { background-color: #f9f9f9; }
.greswd-table tr:hover { background-color: #f1f7fa; }

.div_mostrar_concursos form, 
.div_mostrar_encomiendas form,
.div_mostrar_empleo form {
    background: #f2f2f2;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    font-family: var(--font-body);
}

.concurso-ficha, .empleo-ficha, .encomienda-ficha {
    background: #f7f8f9;
    padding: 20px;
    border-left: 5px solid var(--grafcan-blue-dark);
    margin-bottom: 30px;
}


/* ==========================================================================
   7. SECCIÓN "PROYECTOS" (Grid de Iconos SVG)
   ========================================================================== */
.proyectos-contenido {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px;
    text-align: center;
    padding: 40px 0;
}

.proyectos-elemento a.apartados-proyectos {
    display: block;
    padding: 20px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 5px;
    transition: all 0.3s ease;
    height: 100%;
    color: var(--grafcan-blue-dark);
    font-family: var(--font-headings);
}

.proyectos-elemento a.apartados-proyectos:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transform: translateY(-5px);
    border-color: var(--grafcan-blue-light);
}

.proyectos-elemento svg {
    width: 60px;
    height: 60px;
    margin-bottom: 15px;
    fill: var(--grafcan-blue-dark);
}

.proyectos-elemento p.b {
    font-weight: bold;
    margin: 0;
    line-height: 1.2;
}

.separador-proyectos hr {
    border-top: 2px solid var(--grafcan-blue-light);
    opacity: 0.5;
}


/* ==========================================================================
   8. ELEMENTOS UI
   ========================================================================== */
.generate-back-to-top,
.generate-back-to-top:visited {
    background-color: var(--grafcan-blue-light);
    color: #fff;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    line-height: 50px;
    bottom: 20px;
    right: 20px;
    font-size: 20px;
    opacity: 0;
    transition: opacity 0.3s, background-color 0.3s;
}
.generate-back-to-top:hover { background-color: var(--grafcan-blue-dark); }
.generate-back-to-top__show { opacity: 1; }

.bigimage, .gridareaproyimg, .bigimage-slider_noticias {
    cursor: zoom-in;
    transition: opacity 0.2s;
}

.gridareaproyimg-wrapper, 
.bigimage-wrapper-slider_noticias {
    background-color: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100000;
    cursor: zoom-out;
}

.gridareaproyimg-wrapper p, 
.cerrar-message {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 18px;
    font-family: var(--font-headings);
    font-weight: bold;
    color: #333;
    background: #fff;
    padding: 5px 15px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}


/* ==========================================================================
   9. FOOTER 100% PERSONALIZADO
   ========================================================================== */
.grafcan-custom-footer-wrapper {
    /*background-color: var(--grafcan-footer-bg) !important;*/
	background-color: #56595d;
	
	
    color: #ddd;
    padding: 20px 20px 0px 20px; /* 40px 20px 20px 20px; */
    font-family: var(--font-body);
    clear: both;
    width: 100%;
}

.site-info {
    /*background-color: var(--grafcan-copyright-bg) !important;*/
	/*background-color: var(--grafcan-footer-bg) !important;*/
	background-color: #56595d;
}
.inside-site-info {
    padding: 0px 40px;
}

.grafcan-footer-grid {
    display: flex;
    flex-wrap: wrap;
    margin-right: -60px;
    justify-content: space-between;
}
/*
.grafcan-col-1,
.grafcan-col-2,
.grafcan-col-3 {
    width: 33.333%;
    padding-right: 20px;
    box-sizing: border-box;
    margin-bottom: 20px;
}
*/
.grafcan-col-1,
.grafcan-col-2,
.grafcan-col-3 {
    width: 40%;
    padding-right: 20px;
    box-sizing: border-box;
    margin-bottom: 5px; /* 20px */
}

.grafcan-col-2,
.grafcan-col-3 {
    width: 25%;
    padding-right: 20px;
    box-sizing: border-box;
    margin-bottom: 5px; /* 20px */
}

.grafcan-footer-title, .footer-tit {
    color: #ffffff;
    font-family: var(--font-headings);
    /*font-weight: bold;*/
    font-size: 16px; /* 18px */
    margin-bottom: 0px; /* 15px */
}

.grafcan-footer-title {
    border-bottom: 2px solid white;
    display: inline-block;
    padding-bottom: 5px;
    margin-bottom: 5px; /* 20px */
}

.footer-eval-link {
	margin-bottom: 10px; /* 20px */
}

.footer-text {
    margin-bottom: 10px; /* 15px */
    font-size: 14px;
    line-height: 1.2; /* 1.4 */
}

.grafcan-custom-footer-wrapper a {
    color: var(--grafcan-blue-light);
    text-decoration: none;
    transition: color 0.2s;
}
.grafcan-custom-footer-wrapper a:hover { color: #fff; }
.grafcan-custom-footer-wrapper a[href^="mailto"] { color: #8dc8e0; text-decoration: underline; }

.sellos-certificados ul {
    list-style: none;
    margin: 0 0 20px 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.sellos-certificados li { margin: 0; }
/*
.sellos-certificados img {
    max-height: 80px;
    width: auto;
    background: #fff;
    padding: 2px;
    border-radius: 2px;
}
*/
.calidad-icono img {
    max-height: 113px; /* 80px */
    width: auto;
    background: #fff;
    padding: 2px;
    border-radius: 2px;
}
.ens-icono img {
    max-height: 113px; /* 80px */
    width: auto;
    background: #fff;
    padding: 2px;
    border-radius: 2px;
}
.iqnet-icono img {
    max-height: 113px; /* 80px */
    width: auto;
	padding: 2px;
	/*
    background: #fff;
    border-radius: 2px;
	*/
}

.grafcan-social-icons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}
.grafcan-social-icons a {
    color: #fff;
    display: block;
    line-height: 0;
}
.grafcan-social-icons svg {
    fill: #fff;
    transition: fill 0.3s;
    width: 32px;
    height: 32px;
}
.grafcan-social-icons a:hover svg { fill: var(--grafcan-blue-light); }

.grafcan-copyright-wrapper {
    /*background-color: var(--grafcan-copyright-bg) !important;*/
	/*background-color: var(--grafcan-footer-bg) !important;*/
	background-color: #56595d;
    /*color: #fff;*/
	color: var(--grafcan-blue-light);
    padding: 5px 0; /* 15px 0 */
    text-align: center;
    clear: both;
    width: 100%;
}

.grafcan-copyright-content span {
	color: #fff;
	/*
	padding-right: 5px;
	border-right: 1px solid rgba(255, 255, 255, 0.3);
	*/
}

.grafcan-copyright-content ul {
	/*
	padding-left: 5px !important;
	*/
}

.grafcan-copyright-content {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    font-size: 13px;
    gap: 15px;
}

.legal-menu-items {
    list-style: none;
    margin: 0;
    padding: 0;
    display: inline-flex;
    flex-wrap: wrap;	
}

.legal-menu-items li {
    padding: 0 10px;
    border-left: 1px solid rgba(255,255,255,0.3);
}
.legal-menu-items li:first-child { 
	/*border-left: none; */
}

.legal-menu-items a { 
	/*color: #fff !important; */
	color: var(--grafcan-blue-light);
	}

.legal-menu-items a:hover { color: #fff; }



/* grid-table show css code (ver en /productos) */
.show-page{
	padding-bottom:20px;
	padding-top:10px;
}

/* MODIFICACIÓN GRID SERVICIOS 20230519 */
.show-row-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 45%));
    column-gap: 5%;
    row-gap: 0px;
    justify-items: stretch;
    align-items: start; /* <-- Asegura alineación superior */
    justify-content: center;
    align-content: center;
}


#seviciospresentacionpage .show-row-grid .show-column-grid {
		padding: 0em 1em 1em 1em !important;
		margin-right: auto;
		margin-left: 0px !important;
		/*float: left !important;*/
		text-align: justify;
		margin-top: 0px !important;
		/*min-height: 190px !important;*/		
}

#productospresentacionpage .show-row-grid .show-column-grid {
		padding: 0em 1em 1em 1em !important;
		margin-right: auto;
		margin-left: 0px !important;
		/*float: left !important;*/
		text-align: justify;
		margin-top: 0px !important;
		/* 20250205 min-height: 230px !important; */ /*min-height: 181px !important; */
}

#productospresentacionpage .show-row-grid .show-column-grid.finalerow {
		/* 20250205 min-height: 245px !important; */ min-height: 268px !important;
}

.show-column-grid {
}

/* END MODIFICACIÓN GRID SERVICIOS 20230519 */


/* GRID SERVICIOS UPDATE 16/05/2023*/
.show-cell-grid img, .show-cell-grid svg {
  margin-right: 20px !important;
  color: #1f3864 !important;
}

.show-cell-grid .show-svg {
  margin-right: 10px;
  vertical-align: top;
  color: #1f3864 !important;
}

.show-cell-grid a {
  display: flex;
  flex-direction: column;
}
.show-cell-grid .tittleservice {
    margin-bottom: -15px !important;
    text-align: left;
    margin-top: 10px;
}
.show-cell-grid .describeservice {
  justify-content: flex-start;
  text-align: left;
}
.show-cell-grid {
	display: flex;
	align-items: flex-start;
}

.show-cell-grid hr {
	margin: 15px 0 !important;
}


/* END GRID SERVICIOS UPDATE 16/05/2023*/

/* NEGRITA STRONG SERVICIOS 20230609 */
.show-cell-grid .tittleservice strong {
	color: #4acbff !important;
}

/*HISTORY TIMELINE CODE CSS*/
.wrappertime {
    margin: 0 auto;
    padding: 0 2.5rem 2.5rem !important;
    max-width: 1400px;
}
.paddedtime {
    /*padding: 2.5rem 0;*/
    margin-bottom: 0;
    margin-top: 0;
}
#timeline .wrappertime {
    position: relative;
}
#timeline .overlaytime.wrappertime {
    padding-left: 0;
}
#timeline .overlaytime {
    position: absolute;
    width: 100%;
    height: 100%;
}
#timeline .overlaytime .gridtime {
    grid-row-gap: 0 !important;
    grid-column-gap: 0 !important;
    height: 100%;
    position: relative;
    padding: 0 9rem 0 6.25rem;
    z-index: -1;
}
.gridtime.columntime.twotime, .gridtime {
    grid-template-columns: repeat(2,minmax(0,1 fr));
	/*grid-template-columns: repeat(12, 8.33%);*/
}
ul.no-bullettime {
    list-style: none!important;
    padding: 0;
}
.gridtime {
    display: grid;
    grid-template-columns: repeat(12,minmax(0,1 fr));
	/*grid-template-columns: repeat(12, 8.33%);*/
    grid-column-gap: 0.01em !important;
    grid-row-gap: 0.5em !important;
	/*grid-auto-rows: 1fr; /* Ajusta el tamaño de las filas automáticamente */
}
#timeline .timeline {
    align-items: center;
    justify-content: center;
    justify-items: center;
    /*padding: 0 6.25rem;*/
	  padding: 0 0.25rem;
    position: relative;
    z-index: 0;
}
#timeline .timeline .year.important {
    font-weight: 500; /* 700 */
	color: #1f3864;
	font-variation-settings: 'wght' 700;
	/*border-bottom: 2px solid rgba(179,179,179,.5);*/
	border-bottom: 2px solid rgba(203,230,241,1) !important;
}
#timeline .timeline li:first-of-type {
    /*border-bottom: 2px solid rgba(179,179,179,.5);*/
	border-bottom: 2px solid rgba(203,230,241,1) !important;
}
#timeline .timeline .year {
    background: #fff;
	color: #1f3864;
    font-size: 35.5555555556px;
    grid-column: span 2;
    text-align: center;
    /*padding: 1.25rem 0;*/
    padding-bottom: 0.01rem !important;
    padding-top: 1.25rem !important;
}
#timeline .timeline .milestone.with.image {
    padding: 0;
	/*background: #c9c9c92b;*/
}
#timeline .timeline .milestone {
    /*background: #ededed;
	/*background: #c9c9c92b;*/
	background: #cbe6f1 !important;
    border: 0;
	border-radius: 10px;
    height: 100%;
    padding: 1.25rem;
}
#timeline .timeline .milestone .grafcanlogo{
    /*background: #ededed;
	/*background: #c9c9c92b;*/
	background: #cbe6f1 !important;
    border: 0;
    height: 100%;
    padding: 1.25rem 0.25rem 1.25rem 0.75rem;
}


.tiletime {
  /*	background: #c9c9c92b;  */
	background: #fff;
    /*border: 2px solid rgba(179,179,179,.5);*/
    border-radius: 10px;
    display: flex;
    flex-flow: column;
    justify-content: center;
    padding: 1.25rem;
}
#timeline .timeline .milestone .contenttime {
    align-items: center;
	padding: 1.25rem;
}
.tiletime .contenttime {
    align-items: flex-end;
    display: flex;
    height: 100%;
}
#timeline .timeline li {
    margin: unset;
    height: 100%;
    /*margin: 2.5rem 0;*/
	  /*border-bottom: 2px solid rgba(179,179,179,.5);*/
	/*line-height: 1.7;  */
}
.year.oneevent {
	 /*border-bottom: 2px solid rgba(179,179,179,.5);*/
	border-bottom: 2px solid rgba(203,230,241,1) !important;
	
}
#timeline .timeline .doubletime {
    width: 50%;
    grid-column: span 2;
}
#timeline .timeline .milestone .contenttime .mediatime {
    max-width: 150px;
    width: 100%;
    line-height: 0;
	  margin: 1.25rem !important;
}
.wrappertime ul li {
    /*line-height: 1.7;*/
}
#timeline .timeline .milestone .contenttime p {
    align-self: normal;
    margin: 1.25rem;
    width: 100%;
}
#timeline .timeline .milestone p {
    margin: 0;
}
.tiletime .contenttime p, .tiletime .contenttime ul {
    /*font-size: 1.125rem;*/
    /*color: #000;*/
}
#timeline .overlaytime .gridtime .linestime.lefttime {
    /*border-left: 2px solid rgba(179,179,179,.5);*/
	border-bottom: 2px solid rgba(203,230,241,1) !important;
}
.timerowgrid {
		width: 100% !important;
    display: grid;
    /*grid-template-columns: 45% 45%;*/
	grid-template-columns: repeat(auto-fit, minmax(250px, 45%));
		/*grid-column: span 2;*/
    column-gap: 5%;
    row-gap: 10px !important;
    justify-items: center;
    align-items: center;
    justify-content: center;
    align-content: center;
}
.timeitemgrid .timeitemcell{
	/*background: black;*/
	/*color: white;*/
	padding: 1em;
	margin-right: auto;
	margin-left: auto;
	text-align: justify;
	min-width: 40% !important;
}

.year.oneevent {
    /*max-width: 150px;
    width: 100%;*/
}	

.doubletime.oneevent{
    max-width: 70%;
    width: 100%;	
}
.timeitemgrid.timeitemcell.milestone {    
	/*max-width: 50%;*/
	width: 100%;	
	/*background: #c9c9c92b;*/
}

.timerowgrid .timeitemgrid .grafcan-logo {
    font-family: League Spartan,sans-serif;
    font-weight: 800;
    color: #1f3864;
    font-size: 3.5rem;
    letter-spacing: 1px;
    margin-top: -0.8rem; /* 1.2rem */
    margin-left: -2rem;
    padding: 1rem;
    margin-bottom: -2rem;
}
.timerowgrid .timeitemgrid .mediatime img{
	/* width: 100px; */
    height: 112px;
    /* margin: 0rem; */
    margin-left: 0rem;
    margin-top: 1rem;
}
/* CSS para la línea de trayectoria */
.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 100%;
  /*background-color: #1f3864; /* Color de la línea */
  background-color: #cbe6f1; /* Color de la línea */
  z-index: -10;
}

/* AJUSTE TIMELINE A DISPOSITIVOS MÓVILES 20230920 */
@media (max-width: 768px), (max-width: 962px) {
/*@media (max-width: 768px) {*/
	/* logotipo */
	.timerowgrid .timeitemgrid .grafcan-logo {
		font-family: League Spartan,sans-serif;
		font-weight: 800;
		color: #1f3864;
		font-size: 2.5rem;
		letter-spacing: 1px;
		margin-top: -0.8rem;
		padding: 1rem;
		margin-left: auto;
		margin-right: auto;
		margin-bottom: -3rem;
	}	

  /* Restablece el ancho de las columnas y elimina el grid */
	.gridtime.columntime.twotime, 
	.gridtime {
		grid-template-columns: 1fr;
	}

  /* Ajusta el padding de los elementos */
	.paddedtime, 
	.tiletime, 
	.timeline .milestone, 
	.tiletime .contenttime {
		padding: 1.25rem;
	}

  /* Ajusta el tamaño de fuente para las fechas */
	.timeline .timeline .year {
		font-size: 20px;
		padding-top: 1rem !important;
		padding-bottom: 1rem !important;
	}

  /* Alinea el contenido de los elementos de manera centrada */
	.tiletime .contenttime p,
	.tiletime .contenttime ul,
	.tiletime .contenttime .mediatime {
		text-align: center;
	  }

	#timeline .timeline .doubletime {
		width: 100% !important;
		grid-column: span 1 !important;
	}  
	.doubletime.oneevent {
		max-width: 100% !important;
	}

}

/* END AJUSTE TIMELINE A DISPOSITIVOS MÓVILES 20230920 */

/* END HISTORY TIMELINE CODE CSS*/

/* GRID AREA PROYECTOS PRESENTACIÓN CSS CODE */
/* =========================================
   1. ESTILOS DE ESCRITORIO (TU CÓDIGO ORIGINAL)
   ========================================= */

/* gridarea css code */
.gridarea {
    display: grid;
    /* Mantenemos tu configuración exacta de escritorio */
    grid-template-columns: repeat(auto-fit, minmax(250px, 45%));
    column-gap: 5%;
    row-gap: 10px;
    justify-items: center;
    align-items: center;
    justify-content: center;
    align-content: center;
}

.gridarea .gridareacell {
    padding: 1em;
    margin-right: auto;
    text-align: justify;
}
/* end gridarea css code */

/* GRID AREA PROYECTOS PRESENTACIÓN CSS CODE */
.gridareaproyectos {
    display: grid;
    /* Mantenemos tu configuración exacta de escritorio */
    grid-template-columns: repeat(auto-fit, minmax(250px, 45%));
    column-gap: 5%;
    row-gap: 10px;
}

.gridareaproyectos .gridareaproycol {
    padding: 1em;
    margin-right: auto;
}

.gridareaproycol h4 {
    margin: 5px 0 5px 0;    
    color: #1f3864!important;
}

.gridareaproycol hr {
    margin: -9px 0 -29px 0; 
}

img.gridareaproyimg {
    display: inline;
    float: left;
    margin: 29px 15px 0 0;
    max-width: 180px !important;
}

span.gridareaproytext {
    display: inline;
    margin-left: 10%;
    vertical-align: top !important; 
}

/* CORRECCIÓN: Faltaban los 'px' en tu código original */
.gridareaproyimg.show-svg {
    width: 70px !important;  
    height: 70px !important;
}

.areaproyectospage .gridareaproyectos .gridareaproycol svg {
    width: auto;
    height: 142px !important;   
}

/* =========================================
   2. ADAPTACIÓN PARA MÓVIL Y TABLET
   (Solo se activa en pantallas menores de 900px)
   ========================================= */

@media only screen and (max-width: 900px) {
    
    /* Forzamos 1 sola columna para que no se vean estrechas */
    .gridarea, 
    .gridareaproyectos {
        grid-template-columns: 1fr !important; /* 1 columna ocupa todo el ancho */
        column-gap: 0;
        width: 100%;
        box-sizing: border-box;
    }

    /* Quitamos el 'float' de la imagen para que no comprima el texto */
    img.gridareaproyimg {
        float: none !important;
        display: block;
        margin: 0 auto 15px auto !important; /* Centrada y con margen abajo */
        max-width: 100% !important; /* Que no se salga de la pantalla */
        height: auto !important;
    }

    /* Ajustamos el texto para que fluya natural debajo de la imagen */
    span.gridareaproytext {
        display: block;
        margin-left: 0 !important; /* Quitamos el margen izquierdo que empujaba el texto */
        text-align: left;
    }
    
    /* Ajuste de padding para ganar espacio en pantallas pequeñas */
    .gridarea .gridareacell,
    .gridareaproyectos .gridareaproycol {
        padding: 0.5em; /* Menos relleno en móvil */
        width: 100%;
        box-sizing: border-box;
    }
}
	
/* END GRID AREA PROYECTOS PRESENTACIÓN CSS CODE */
/* grid-table area-show css code (ver en /areas) */
.area-show-page{
	padding-bottom:20px;
	padding-top:5px !important;
}
.area-show-row-grid {
	/*margin-top: 10px !important;*/
    display: grid;
    /*grid-template-columns: 45% 45%;*/
	grid-template-columns: repeat(auto-fit, minmax(250px, 45%));
    column-gap: 5%;
    /* 20250205 row-gap: 10px;*/ row-gap: 0px;
    justify-items: center;
    /* 2050205 align-items: center; */ align-items: baseline;
    justify-content: center;
    align-content: center;
		/*min-height: 300px !important;*/
}
.area-show-row-grid .area-show-column-grid {
		padding: 0em 1em 1em 1em !important;		
		margin-right: auto;
		margin-left: 0px !important;
		text-align: justify;
	    /* 20250205 min-height: 250px !important;*/ min-height: 207px !important;
}
.area-show-column-grid {		
}
.area-show-cell-grid {    
}
/* TAMAÑO CARDS ESTADISTICAS TRANSPARENCIA 
#estadisticas-transparencia .area-show-cell-grid {
    /*border: 3px solid #1f3864;*/
		/* T R B L 
    padding: 0px 10px 25px 10px;
		/*text-align: left;*/
    /*border-radius: 20px;
		min-height: 150px !important;
}
*/
.area-show-cell-grid h4{
	text-align: left;		
}
.area-show-svg{
	width:70 !important;  
	height:70 !important;
	/*		       T R B L	   */ 
    /*padding: 0px 5px 0px 0px;*/
}
.show-svg{
	width:70 !important;  
	height:70 !important;
}
.area-show-column-grid.sanidad{
	/*margin-top:-50px !important;*/
}
/* end grid-table area-show css code */

/* GRID PROYECTOS UPDATE 17/05/2023 */
.area-show-cell-grid img, .area-show-cell-grid svg {
  margin-right: 25px !important;
  width:70 !important;  
  height:70 !important;
}

.area-show-cell-grid .areaprincipalsvg {
  margin-right: 25px !important;
  vertical-align: top;
}

.area-show-cell-grid a {
  display: flex;
  flex-direction: column;
}
.area-show-cell-grid .tittleproject {
    margin-bottom: -15px !important;
    text-align: left;
    margin-top: 10px;
}
.area-show-cell-grid .describeproject {
  justify-content: flex-start;
  text-align: left;
}
.area-show-cell-grid {
	display: flex;
	align-items: flex-start;
}
.area-show-cell-grid hr {
	margin: 15px 0 !important;
}
/* END GRID SERVICIOS UPDATE 17/05/2023 */

/* ==========================================================================
   10. GRIDS DE NAVEGACIÓN (SVG) - PROYECTOS, SERVICIOS, PRODUCTOS
   ========================================================================== */

/* --- CONTENEDOR GRID COMÚN --- */
/* Este contenedor se usará para las 3 secciones, adaptándose automáticamente */
.grafcan-icon-grid {
    display: grid;
    /* Columnas responsive: Mínimo 150px, máximo fraccional */
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px; /* Espacio entre tarjetas */
    text-align: center;
    padding: 40px 0;
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
}

/* Ajuste específico para Servicios (si se requiere un poco más de ancho por los textos largos) */
.grafcan-icon-grid.servicios-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}

/* --- TARJETA DE ICONO (WRAPPER) --- */
.grafcan-grid-item {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    height: 100%;
}

/* --- ENLACE (LA CAJA) --- */
.grafcan-grid-item a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start; /* Alinea contenido arriba */
    padding: 20px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 5px;
    transition: all 0.3s ease;
    height: 100%; /* Para igualar alturas en la fila */
    width: 100%;
    color: var(--grafcan-blue-dark);
    font-family: var(--font-headings);
    box-sizing: border-box;
    text-decoration: none;
}

/* Efecto Hover en la Caja */
.grafcan-grid-item a:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transform: translateY(-5px);
    border-color: var(--grafcan-blue-light);
    background-color: #fff;
}

/* --- ESTILO DE LOS SVGs --- */
.grafcan-grid-item svg {
    width: 60px; /* Tamaño estándar para todos los iconos */
    height: 60px;
    margin-bottom: 15px;
    fill: var(--grafcan-blue-dark); /* Color base */
    transition: fill 0.3s ease;
}

/* Hover: Cambia el color del SVG al pasar el ratón por la caja */
.grafcan-grid-item a:hover svg,
.grafcan-grid-item a:hover .b {
    fill: var(--grafcan-blue-light) !important; 
}

/* Clases internas de los SVGs (compatibilidad con tus SVGs actuales) */
.grafcan-grid-item .b {
    fill: var(--grafcan-blue-dark);
    transition: fill 0.3s ease;
}

/* --- TÍTULO DEL ICONO --- */
.grafcan-grid-item p {
    font-weight: bold;
    margin: 0;
    line-height: 1.2;
    font-size: 16px;
    color: var(--grafcan-blue-dark);
    word-break: break-word; /* Evita desbordamiento en textos largos */
}

/* --- SEPARADOR VISUAL ENTRE CONTENIDO Y GRID --- */
.separador-seccion hr {
    border-top: 2px solid var(--grafcan-blue-light);
    opacity: 0.5;
    margin: 30px 0;
    border-bottom: 0;
    border-left: 0;
    border-right: 0;
}

/* ==========================================================================
   11. ESTILOS LISTADO NOTICIAS Y HEMEROTECA (Diseño Lista Migrado)
   ========================================================================== */

/* --- CONTENEDOR PRINCIPAL (GRID 2 COLUMNAS) --- */
/* Crea la estructura: [ Columna Imagen ] [ Columna Texto ] */
.listado-noticias,
.listado-hemeroteca {
    display: grid;
    grid-template-columns: 300px 1fr; /* Imagen fija de 300px, el resto para texto */
    gap: 30px; /* Espacio entre imagen y texto */
    border-bottom: 2px solid var(--grafcan-blue-dark); /* Línea separadora inferior */
    padding-bottom: 30px;
    margin-bottom: 30px;
    align-items: start; /* Alinear todo arriba */
}

/* --- COLUMNA IZQUIERDA: IMAGEN --- */
.listado-noticias-imagen-destacada,
.listado-hemeroteca-imagen-destacada {
    width: 100%;
}

.listado-noticias-imagen-destacada img,
.listado-hemeroteca-imagen-destacada img {
    width: 100%;
    height: auto;
    border-radius: 5px; /* Bordes redondeados suaves */
    object-fit: cover; 
    border: 1px solid #eee;
    display: block;
}

/* --- COLUMNA DERECHA: CONTENIDO --- */
.listado-noticias-contenido,
.listado-hemeroteca-contenido {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    text-align: left;
}

/* 1. Título */
.listado-noticias-titulo,
.listado-hemeroteca-titulo {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 24px;
    line-height: 1.2;
    font-family: var(--font-headings);
}

.listado-noticias-titulo a,
.listado-hemeroteca-titulo a {
    color: var(--grafcan-blue-dark);
    text-decoration: none;
    font-weight: 500; /* 700 */
}

.listado-noticias-titulo a:hover {
    color: var(--grafcan-blue-light);
}

/* 2. Resumen */
.listado-noticias-resumen p,
.listado-hemeroteca-resumen p {
    margin-bottom: 15px;
    font-size: 16px;
    color: var(--grafcan-text);
    line-height: 1.6;
}

/* 3. Metadatos (Fecha y Etiquetas) */
.listado-noticias-etiquetas {
    font-size: 14px;
    color: #998A82; /* Color marrón/gris original de Grafcan */
    margin-bottom: 20px;
    font-family: var(--font-body);
    font-weight: 500;
}

/* 4. Botón "Leer más" */
.btn-info.btn {
    background-color: var(--grafcan-blue-light);
    color: #ffffff !important;
    padding: 8px 20px;
    border-radius: 10px;
    text-decoration: none;
    display: inline-block;
    font-weight: bold;
    font-size: 14px;
    transition: background 0.3s ease;
    width: auto; 
    align-self: flex-start; /* Alinear botón a la izquierda */
    margin-top: auto;
}

.btn-info.btn:hover {
    background-color: var(--grafcan-blue-dark);
}

/* --- RESPONSIVE (Móvil) --- */
/* En pantallas pequeñas, la imagen pasa arriba y el texto debajo */
@media (max-width: 768px) {
	.listado-noticias-contenido,
	.listado-hemeroteca-contenido {
		padding-right:10px;
	}	
    .listado-noticias,
    .listado-hemeroteca {
        grid-template-columns: 1fr; /* Una sola columna */
        gap: 20px;
        text-align: left; 
    }

    .listado-noticias-imagen-destacada img,
    .listado-hemeroteca-imagen-destacada img {
        max-width: 100%;
        height: auto;
    }
    
    /* Si en móvil prefieres ocultar la imagen como en tu CSS antiguo, descomenta esto: */
    /* .listado-noticias-imagen-destacada { display: none; } */
}
/* SEPARADOR LISTADO ETIQUETAS NOTICIAS / HEMEROTECA DEL TÍTULO */
.content-area .site-main .etiquetas-container {
	margin-top: -50px !important;
}

/* ==========================================================================
   12. ESTILOS PORTADA ACTUALIDAD (Page Template)
   ========================================================================== */

/* --- LAYOUT GRID (2 COLUMNAS) --- */
.actualidad-layout-grid {
    display: grid;
    grid-template-columns: 60% 30%; /* Columna ancha para noticias, estrecha para sidebar */
    gap: 40px; /* Espacio entre columnas */
    align-items: start;
	padding-top: 5%;
}

/* Título de sección "Últimas Noticias" */
.actualidad-main-column .section-title {
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
    margin-top: 0;
}

/* --- SIDEBAR: BANNER HEMEROTECA --- */
.banner-hemeroteca-wrapper {
	background-color: var(--grafcan-blue-light, #8dc8e0);
    /*background-color: var(--grafcan-blue-dark); /* Azul Corporativo */
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    position: sticky; /* Opcional: Para que se quede fijo al hacer scroll si es la única pieza */
    top: 20px;
	margin-top: 15%;
}

.banner-hemeroteca-wrapper:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(31, 56, 100, 0.25);
    /*background-color: #2a4b85; /* Un tono ligeramente más claro al pasar el ratón */
	background-color: var(--grafcan-blue-dark); /* Azul Corporativo */
}

.banner-hemeroteca-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-decoration: none;
    /*color: #ffffff !important; /* Forzar texto blanco */
	color: var(--grafcan-blue-dark);
    text-align: center;
}

.banner-icon svg {
    width: 70px;
    height: 70px;
    /*fill: #ffffff;*/
	fill: var(--grafcan-blue-dark);
    margin-bottom: 20px;
    transition: transform 0.3s ease;
}

.banner-hemeroteca-wrapper:hover .banner-icon svg {
    transform: scale(1.1); /* Efecto zoom en el icono al hover */
	fill: #ffffff;
}

.banner-hemeroteca-wrapper:hover .banner-text h3,
.banner-hemeroteca-wrapper:hover .banner-text p {
    color: #ffffff;
}


.banner-text h3 {
    /*color: #ffffff !important;*/
	color: var(--grafcan-blue-dark);
    font-family: var(--font-headings);
    font-size: 26px;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.banner-text p {
    /*color: rgba(255, 255, 255, 0.8);*/
	/*color: #ffffff;*/
	color: var(--grafcan-blue-dark);
    font-size: 16px;
    margin: 0;
    line-height: 1.4;
    font-family: var(--font-body);
}

/* --- RESPONSIVE (Móvil y Tablet) --- */
@media (max-width: 900px) {
    .actualidad-layout-grid {
        grid-template-columns: 1fr; /* Una sola columna */
        gap: 30px;
    }

    /* En móvil, ponemos el banner de Hemeroteca arriba o abajo según prefieras. 
       Por defecto se queda abajo, que es el orden natural del HTML. */
    
    .banner-hemeroteca-link {
        padding: 30px;
        flex-direction: row; /* En móvil, icono a la izq y texto a la derecha */
        text-align: left;
        justify-content: flex-start;
        gap: 20px;
    }
    
    .banner-icon svg {
        margin-bottom: 0;
        width: 50px;
        height: 50px;
    }
}

/* ==========================================================================
   13. ESTILOS SHORTCODES HOME (NOTICIAS Y HEMEROTECA)
   ========================================================================== */

/* --- NOTICIAS HOME --- */
.grafcan-home-news-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.home-news-item {
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}
.home-news-item:last-child {
    border-bottom: none;
}

.home-news-title {
    font-size: 18px;
    margin-bottom: 10px;
    line-height: 1.3;
}

.home-news-title a {
    color: var(--grafcan-blue-dark);
    text-decoration: none;
    font-weight: 500; /* 700 */
}

.home-news-title a:hover {
    color: var(--grafcan-blue-light);
}

.home-news-excerpt p {
    font-size: 15px;
    color: var(--grafcan-text);
    margin: 0;
}

/* --- HEMEROTECA HOME --- */
.grafcan-home-hemeroteca-list ul.hemeroteca-simple-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.hemeroteca-simple-list li {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
    position: relative;
    padding-left: 20px; /* Espacio para viñeta personalizada */
}

.hemeroteca-simple-list li:last-child {
    border-bottom: none;
}

/* Viñeta personalizada (flechita o punto azul) 
.hemeroteca-simple-list li::before {
    content: '›'; 
    position: absolute;
    left: 0;
    top: 2px;
    font-size: 20px;
    line-height: 1;
    color: var(--grafcan-blue-light);
    font-weight: bold;
}
*/

.hemeroteca-simple-list li a {
    font-size: 16px;
    color: var(--grafcan-blue-dark);
    font-weight: 600;
    text-decoration: none;
    line-height: 1.4;
    display: block; /* Para que el área de clic sea el texto completo */
}

.hemeroteca-simple-list li a:hover {
    color: var(--grafcan-blue-light);
    text-decoration: underline;
}

/* ==========================================================================
   14. AJUSTES ESPECÍFICOS HOME (ID 10231) - ELIMINAR ESPACIOS
   ========================================================================== */

/* 1. Quitar el margen de abajo del Slider solo en la Home */
.page-id-10231 .hero-slider-wrapper {
    margin-bottom: 0 !important;
}

/* 2. Quitar el relleno (padding) superior del contenedor principal */
.page-id-10231 .site-content,
.page-id-10231 .content-area,
.page-id-10231 .inside-article {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* 3. Asegurar que el título oculto no ocupe ni un píxel */
.page-id-10231 .entry-header {
    display: none !important;
}

/* 4. Quitar márgenes del contenido de la entrada */
.page-id-10231 .entry-content {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* 5. Eliminar cualquier párrafo vacío fantasma antes de la sección azul */
.page-id-10231 .entry-content > p:empty {
    display: none !important;
}
/* ==========================================================================
   15. FORZAR ELIMINACIÓN DE MÁRGENES DE CONTENEDOR (SOLO HOME)
   ========================================================================== */

/* Atacamos la regla específica de .separate-containers .site-main solo en la página 10231 */
.page-id-10231.separate-containers .site-main {
    margin-top: 0 !important;
    /* Si quieres que se pegue también por los lados en móvil, descomenta la siguiente línea: */
    /* margin-left: 0 !important; margin-right: 0 !important; */
}

/* Opcional: Asegurar que el contenedor #content tampoco tenga padding extra */
.page-id-10231 #content {
    padding-top: 0 !important;
}

/* ==========================================================================
   16. UTILIDAD: GRID 2 COLUMNAS (GENÉRICO)
   ========================================================================== */

.grafcan-grid-2cols {
    display: grid;
    grid-template-columns: 1fr 1fr; /* 50% y 50% */
    gap: 40px; /* Espacio entre columnas */
    margin-bottom: 40px;
    align-items: start; /* Alineación superior */
}

/* Clases opcionales por si quieres anchos distintos */
.grafcan-grid-2cols.asimetrico {
    grid-template-columns: 2fr 1fr; /* Izquierda ancha (66%), Derecha estrecha (33%) */
}

/* --- RESPONSIVE (Móvil) --- */
@media (max-width: 768px) {
    .grafcan-grid-2cols,
    .grafcan-grid-2cols.asimetrico {
        grid-template-columns: 1fr; /* Una sola columna al 100% */
        gap: 30px;
    }
}


/* ==========================================================================
   17. SECCIONES DE ANCHO COMPLETO (Full Width Backgrounds) - VERSIÓN FINAL
   ========================================================================== */

/* Contenedor que "rompe" el ancho del sitio para ir de borde a borde */
.grafcan-full-width-section {
    width: 102vw;
    position: relative;
    left: 49%; /* 50 */
    right: 49%; /* 50 */
    margin-left: -50vw !important;
    margin-right: -50vw !important;
    /*background-color: var(--grafcan-white);*/
    /*background-color: var(--grafcan-blue-dark); /* Fondo azul oscuro */
    background-color: #56595d;
    /* Padding simétrico: 40px arriba y abajo. 
       Si quieres más o menos altura, cambia este número. */
	   /* arriba | derecha | abajo | izquierda */ 
    padding: 5px 1px 5px 1px !important;    /* padding: 20px 0 !important; */
    margin-bottom: 10px; /* 40px Separación con lo siguiente */
}

/* Contenedor interno para volver a centrar el contenido */
.grafcan-section-inner {
    max-width: 1400px; 
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
    box-sizing: border-box;
}

/* CORRECCIÓN DE PÁRRAFOS VACÍOS (El culpable del espacio extra abajo) */
/* Esto oculta los <p></p> que WordPress crea automáticamente */
.grafcan-full-width-section p:empty,
.grafcan-grid-6cols-home p:empty {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
    height: 0 !important;
}


/* ==========================================================================
   18. CORRECCIONES GLOBALES RESPONSIVE (Revisado)
   ========================================================================== */

html, body {
    overflow-x: hidden !important;
    width: 100%;
    position: relative;
}
/*
.site-header, .site-content, .site-footer {
	padding-left: 20px !important; /* Restauramos el padding interno *
    padding-right: 20px !important;	
}
*/
.grid-container {
	padding-left: 20px !important; /* 20 Restauramos el padding interno */
    padding-right: 0px !important;	/* 20 */
}
/*
.content-area.site-main {
	padding-left: 20px !important; /* Restauramos el padding interno *
    padding-right: 20px !important;	
}
*/	


/* Ajuste Sección Azul en Móvil */
@media (max-width: 768px) {
	.grid-container {
		padding-left: 20px !important; /* Restauramos el padding interno */
		padding-right: 20px !important;	
	}
	/*
	.container.grid-container {
		padding-left: 10px !important; /* Restauramos el padding interno *
		padding-right: 10px !important;	
	}    
	*/
	/*
	.grafcan-full-width-section {
        width: auto !important; /* Dejamos que fluya natural */
        
        /* Anulamos el posicionamiento absoluto de escritorio *
        left: auto !important;
        right: auto !important;
        position: static !important;
        
        /* Truco para romper el contenedor padre SOLO lo justo */
        /* Asumiendo que el contenedor padre tiene 20px de padding *
        margin-left: -20px !important; 
        margin-right: -20px !important;
        

    }*/

    /* El contenido interno (Grid) */
    .grafcan-section-inner {
        width: 100% !important;
        /*padding: 0 !important; /* Ya tiene padding el padre (.grafcan-full-width-section) */
        margin: 0 auto;
    }
}

/* ==========================================================================
   19. AJUSTE FOOTER MÓVIL (Vertical y Centrado)
   ========================================================================== */

@media (max-width: 768px) {
    
    /* 1. Contenedor Principal: Apilar en columna */
    .grafcan-footer-grid {
        display: flex !important;
        flex-direction: column !important; /* Uno debajo de otro */
        margin-right: 0 !important;        /* Quitamos el margen negativo de escritorio */
        margin-left: 0 !important;
        padding: 0 20px;                   /* Un poco de aire a los lados */
        gap: 40px;                         /* Separación entre los bloques */
    }

    /* 2. Columnas Individuales: Ancho completo */
    .grafcan-col-1,
    .grafcan-col-2,
    .grafcan-col-3 {
        width: 100% !important;           /* Ocupan todo el ancho */
        padding-right: 0 !important;      /* Quitamos padding lateral de escritorio */
        text-align: center !important;    /* Texto centrado */
        margin-bottom: 0 !important;      /* El espacio lo gestiona el 'gap' del padre */
    }

    /* 3. Centrar elementos internos específicos */
    
    /* Logos de certificados */
    .sellos-certificados ul {
        justify-content: center !important;
    }

	.calidad-icono img {
		max-height: 80px; /* 80px */
		width: auto;
		background: #fff;
		padding: 2px;
		border-radius: 2px;
	}
	.ens-icono img {
		max-height: 80px; /* 80px */
		width: auto;
		background: #fff;
		padding: 2px;
		border-radius: 2px;
	}
	.iqnet-icono img {
		max-height: 80px; /* 80px */
		width: auto;
		padding: 2px;
		/*
		background: #fff;
		border-radius: 2px;
		*/
	}

	


    /* Iconos de Redes Sociales */
    .grafcan-social-icons {
        justify-content: center !important;
        margin-top: 15px !important;
    }

    /* Títulos del footer */
    .grafcan-footer-title {
        display: inline-block !important; /* Para que el borde inferior se ajuste al texto */
        margin-bottom: 20px !important;
    }
    
    /* Enlaces de dirección */
    .footer-text {
        margin-bottom: 20px !important;
    }
	.feature-image1 img {
		margin-top: 50px !important;
		margin-bottom: 0px !important;
	}	
	.feature-image2 img {
		margin-top: 50px !important;
		margin-bottom: 0px !important;
	}	
    .legal-menu-items {        
        border-top: 0px solid rgba(255, 255, 255, 0.1);        
    }	
	.legal-menu-items li {		
		border-left: 0px solid rgba(255,255,255,0.3);
	}	
	.hero-slider-dot {
		width: 8px;
		height: 8px;
	}	
}


/* ==========================================================================
   20. ESTILOS NOTICIAS HOME (GRID NUEVO)
   ========================================================================== */

.grafcan-news-grid-wrapper {
    display: grid;
    gap: 30px;
    width: 100%;
    margin-bottom: 40px;
}

/* Configuración de Columnas */
.grafcan-news-grid-wrapper.cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grafcan-news-grid-wrapper.cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

/* Tarjeta Individual */
.news-grid-item {
    background: #fff;
    border: 1px solid #eee; /* Borde sutil */
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%; /* Para igualar alturas */
}

.news-grid-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    border-color: var(--grafcan-blue-light);
}

/* Imagen */
.news-grid-image {
    width: 100%;
    height: auto !important; /* IMPORTANTE: Permite que la caja crezca según la imagen */
    overflow: visible;       /* Deja ver todo el contenido */
    margin-bottom: 5px;     /* 15 Un poco de espacio antes del texto */
}

.news-grid-image img {
    height: 100% !important;
    object-fit: contain;
    display: block;
    border-radius: 5px;
    
    /* 1. Para centrar el bloque horizontalmente */
    margin: 0 auto; 
    
    /* 2. AJUSTE DE PADDING: 
       Antes tenías '20px 0px 0px 20px', lo que empujaba la imagen a la derecha.
       Opción A (Quitar padding lateral): Padding solo arriba */
    padding: 5px 0 0 0; 

    /* Opción B (Si quieres mantener el espacio lateral, hazlo simétrico):
       padding: 20px 20px 0 20px; 
    */
}

.news-grid-item:hover .news-grid-image img {
    transform: scale(1.05); /* Zoom suave al hover */
}

/* Contenido */
.news-grid-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* Fecha */
.news-grid-date {
    font-size: 13px;
    color: #998A82;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Título */
.news-grid-title {
    font-family: var(--font-headings);
    font-size: 18px;
    line-height: 1.3;
    margin: 0 0 10px 0;
    font-weight: 500; /* 700 */
}

.news-grid-title a {
    color: var(--grafcan-blue-dark);
    text-decoration: none;
    transition: color 0.2s;
}

.news-grid-title a:hover {
    color: var(--grafcan-blue-light);
}

/* Resumen */
.news-grid-excerpt p {
    font-size: 15px;
    color: var(--grafcan-text);
    line-height: 1.5;
    margin: 0;
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .grafcan-news-grid-wrapper.cols-3,
    .grafcan-news-grid-wrapper.cols-2 {
        grid-template-columns: 1fr; /* 1 columna en móvil */
        gap: 20px;
    }
    
    .news-grid-image {
        height: 180px;
    }
}

/* Ajuste para tu contenedor "grafcan-grid-1col" */
.grafcan-grid-1col { width: 100%; margin-bottom: 40px; }


/* ==========================================================================
   21. SECCIÓN PROYECTOS (HOME) - ESTILO LIMPIO Y CURVO
   ========================================================================== */

/* --- 1. TÍTULO CON FONDO CURVO --- */
/* Contenedor del título con la imagen de fondo y mezcla de color */
/* --- 1. TÍTULO CON FONDO CURVO (Alineado a la izquierda) --- */
.grafcan-title-curved {
    background-position: left top;
    background-blend-mode: soft-light;
    /*background-image: url('/files/grafcan-separador-secciones-curvas-completo-mitad-300x69-1.png');*/
    background-color: rgba(31, 56, 100, 0.02);
    min-height: 50px; /* 60px min-height: 70px; */
    
    display: flex;
    align-items: center;
    
    /* CAMBIO CLAVE: Alineamos al inicio (izquierda) en lugar de al centro */
    justify-content: flex-start !important; 
    
    /* CAMBIO: Añadimos el relleno lateral para separar del borde */
    padding-left: 15px !important; 
    padding-right: 15px; /* Por simetría si el texto es largo */
    
    margin-bottom: 0.5px; /*10px 30px margin-bottom: 40px; */
    margin-top: 0.5px; /* 10px */ 
    border-bottom: none !important; 
}

.grafcan-title-curved h2 {
    margin: 0;
    padding: 0 35px;
    color: #1f3864;
    border: none !important;
    
    /* CAMBIO: Forzamos alineación a la izquierda */
    text-align: left !important;
    
    font-family: 'League Spartan', sans-serif;
    font-weight: 600; /* 700*/
    font-size: 28px; /* 32px */
    
    /* Aseguramos que ocupe el espacio necesario */
    width: 100%; 
}

/* --- 2. CONTENEDOR DE FILA (Flexbox Centrado) --- */
.grafcan-proyectos-row {
    display: flex;
    flex-wrap: wrap;       /* Permite que bajen de línea si no caben */
    justify-content: center; /* Centra los elementos en la fila */
    gap: 30px;             /* Separación entre iconos */
    margin-bottom: 30px;
    width: 100%;
}

/* --- 3. ITEM DE PROYECTO (Icono + Texto) --- */
.grafcan-proyecto-item {
    /* Ancho fijo en escritorio para asegurar que caben 6 */
    /* 140px * 6 = 840px + gaps, cabe bien en 1400px */
    width: 140px; 
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* Estilo "Limpio" del enlace (OVERRIDE para quitar el cuadro blanco) */
.grafcan-proyecto-item a {
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    transition: transform 0.3s ease;
    
    width: 100%;
    height: auto !important;
    min-height: 0 !important; /* Reseteamos alturas mínimas anteriores */
}

/* Efecto Hover simple (subir un poco) */
.grafcan-proyecto-item a:hover {
    transform: translateY(-5px);
    background: transparent !important;
    box-shadow: none !important;
}

/* Ajuste del SVG */
.grafcan-proyecto-item svg {
	color: #1f3864 !important;
    width: 70px;
    height: 70px;
    margin-bottom: 0px; /* 10px */
    /* Los colores del SVG se heredan del código inline (clase .b) */
}

/* Texto del Proyecto */
.grafcan-proyecto-item p.b {
    color: #1f3864 !important;
    font-family: 'Overpass', sans-serif;
    font-size: 16px;
    line-height: 1.2;
    font-weight: 500; /* 700 */
    margin: 0;
}

/* --- RESPONSIVE: MÓVIL (2 por fila) --- */
@media (max-width: 768px) {
    .grafcan-proyectos-row {
        gap: 15px; /* Menos espacio en móvil */
        justify-content: space-between; /* Distribuir espacio */
		margin-bottom: -5px;
    }
    
    .grafcan-proyecto-item {
        /* Cálculo matemático para 2 columnas exactas: */
        /* (100% ancho - 1 hueco de 15px) / 2 = 2 por fila */
        width: calc(50% - 10px); 
        margin-bottom: 20px;
    }
    
    .grafcan-title-curved h2 {
        font-size: 24px; /* Título más pequeño en móvil */
    }
}

/* ==========================================================================
   22. ESTILOS NOTICIAS GRID (HOME) - NUEVO
   ========================================================================== */

/* Contenedor Principal del Grid */
.grafcan-news-grid {
    display: grid;
    gap: 30px; /* Espacio entre tarjetas */
    width: 100%;
    margin-bottom: 40px;
}

/* Variantes de Columnas (Escritorio) */
.grafcan-news-grid.cols-3 {
    grid-template-columns: repeat(3, 1fr); /* 3 columnas iguales */
}

.grafcan-news-grid.cols-2 {
    grid-template-columns: repeat(2, 1fr); /* 2 columnas iguales */
}

/* --- TARJETA INDIVIDUAL --- */
.news-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden; /* Para que la imagen no se salga de las esquinas redondeadas */
    display: flex;
    flex-direction: column; /* Apila imagen y texto verticalmente */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%; /* Iguala la altura de todas las tarjetas en la fila */
}

/* Efecto Hover (al pasar el ratón) */
.news-card:hover {
    transform: translateY(-5px); /* Sube un poco */
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    border-color: var(--grafcan-blue-light);
}

/* --- 1. IMAGEN (Arriba) --- */
.news-card-img {
    width: 100%;
    /* height: 220px;  <-- ELIMINADO: Ya no forzamos altura fija */ 
    height: auto;   /* NUEVO: La altura se adapta a la imagen */
    overflow: hidden;
    position: relative;
}

.news-card-img img {
    width: 100%;
    height: auto;   /* NUEVO: Mantiene la proporción original */
    /* object-fit: cover; <-- ELIMINADO: Ya no recorta */
    display: block; /* Elimina espacios extra debajo de la imagen */
    margin: 0 !important; 
    transition: transform 0.5s ease;
}

.news-card:hover .news-card-img img {
    transform: scale(1.05); /* Zoom suave en la imagen al hover */
}

/* --- 2. CONTENIDO (Abajo) --- */
.news-card-body {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Ocupa el espacio restante */
    text-align: left;
}

/* Fecha */
.news-date {
    font-size: 12px;
    color: #998A82;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    display: block;
}

/* Título */
.news-title {
    font-family: var(--font-headings);
    font-size: 20px;
    line-height: 1.3;
    margin: 0 0 15px 0;
    font-weight: 500; /* 700 */
}

.news-title a {
    color: var(--grafcan-blue-dark);
    text-decoration: none;
    transition: color 0.2s;
}

.news-title a:hover {
    color: var(--grafcan-blue-light);
}

/* Resumen */
.news-excerpt p {
    font-size: 15px;
    color: var(--grafcan-text);
    line-height: 1.6;
    margin: 0;
}

/* --- RESPONSIVE (Móvil y Tablet < 768px) --- */
@media (max-width: 768px) {
    .grafcan-news-grid.cols-3, 
    .grafcan-news-grid.cols-2 {
        grid-template-columns: 1fr; /* Fuerza 1 sola columna */
        gap: 25px;
    }
    
    .news-card-img {
        height: 200px; /* Un poco más bajita en móvil */
    }
    
    .news-card-body {
        padding: 20px;
    }
}

/* Ajuste para el contenedor padre si lo usas */
.grafcan-grid-1col {
    width: 100%;
    margin-bottom: 40px;
}

/* ==========================================================================
   23. ESTILOS PESTAÑAS (TABS)
   ========================================================================== */

/* Contenedor de los botones */
.grafcan-tabs-nav {
    display: flex;
    justify-content: center; /* Centrar los botones */
    gap: 10px; /* Espacio entre botones */
    margin-bottom: 70px; /* 30 */  
    flex-wrap: wrap; /* Para que se adapten en móviles */
}

/* Estilo base del botón */
.grafcan-tab-btn {
    background-color: #f7f8f9; /* Gris claro de fondo */
    color: #1f3864; /* Azul oscuro texto */
    /*border: 1px solid #eee;*/
    padding: 20px 30px; /* 5 30 */
    cursor: pointer;
    font-family: 'League Spartan', sans-serif;
    font-weight: 500; /* 700 */

    text-transform: uppercase;
    transition: all 0.3s ease;
    border-radius: 5px;
    outline: none;
	/* AÑADIR ESTO PARA FORZAR CENTRADO */
    display: flex;           /* Usar flexbox para centrar contenido interno */
    align-items: center;     /* Centrado vertical */
    justify-content: center; /* Centrado horizontal */
    text-align: center;      /* Respaldo para texto */
    line-height: 1.2;        /* Evitar alturas raras en líneas múltiples */
}

/* Estado Hover (al pasar el ratón) */
.grafcan-tab-btn:hover {
    background-color: #eef1f5;
    color: #8dc8e0; /* Azul claro texto */
}

/* Estado Activo (Pestaña seleccionada) */
.grafcan-tab-btn.active {
    background-color: #8dc8e0; /*#1f3864; /* Azul oscuro fondo */
	color: #ffffff; /* Blanco texto */
	font-weight: 800 !important;
	/*color: #000000; /* Negro texto */
	font-size: 22px;
    /*border-color: #1f3864;*/ 
}

/*
.grafcan-tab-btn.active:after {
    content: "";          /* 1. OBLIGATORIO para que exista *
    display: block;       /* 2. Para que se comporte como una caja debajo *
    margin-top: 2px;      /* Tu margen *
    border-bottom: 1px solid #1f3864; /* Mejor usar border-bottom si es una línea *
    /* O si quieres un recuadro completo, mantén border: 1px solid... *
    width: 100%;          /* Para que ocupe todo el ancho del botón *
}
*/

/* Estado Activo (Pestaña seleccionada) - OCULTO *
.grafcan-tab-btn.active {
    display: none !important; /* Se oculta cuando está activo *
}*/

/* Ocultar contenido por defecto (el JS lo muestra) */
.grafcan-tab-content {
    display: none;
    animation: fadeEffect 0.5s; /* Animación suave */
}

/* Animación de aparición */
@keyframes fadeEffect {
    from {opacity: 0;}
    to {opacity: 1;}
}

/* ==========================================================================
   24. SEPARADOR DE SECCIONES
   ========================================================================== */

.grafcan-separator {
    width: 100%;
    max-width: 1400px; /* Se ajusta al ancho de tu contenido */
    margin: 0 auto;    /* Centrado horizontal */
    padding: 0 20px;   /* Margen lateral de seguridad */
    box-sizing: border-box;
}

.grafcan-separator hr {
    border: 0;
    height: 2px; /* Grosor de la línea */
    background-color: var(--grafcan-blue-light, #8dc8e0); /* Color corporativo */
    margin-top: 40px;    /* Espacio arriba */
    margin-bottom: 40px; /* Espacio abajo */
    opacity: 0.6;        /* Un poco de transparencia para que sea sutil */
}

/* Ajuste para móviles (menos espacio) */
@media (max-width: 768px) {
    .grafcan-separator hr {
        margin-top: 25px;
        margin-bottom: 25px;
    }
}

/* CONTROL VERSIÓN TRANSPARENCIA */
.controlversionpagina {
	padding-top: 20px !important;
	padding-bottom: 10px !important;
	font-weight: 400 !important;
	font-size: 13px !important;
}
.controlversionpagina hr {
	font-family: inherit; 
	font-size: inherit; 
	font-style: inherit; 
	font-variant-ligatures: inherit; 
	font-variant-caps: inherit; 
	font-weight: inherit; 
	color: #ff56b2;
}	

/* INDEX NÚMERICO */
/* 1. EL CONTENEDOR: Se encarga de centrar todo el bloque */
/* --- PAGINACIÓN TABLAS RESPONSIVE --- */

/* 1. El contenedor que acabamos de crear: Centra todo el bloque */
.grafcan-pagination {
    text-align: center !important; /* Fuerza el centrado */
    margin-top: 30px;
    margin-bottom: 30px;
    width: 100%;
    display: block;
}

/* 2. Los botones individuales */
.page-numbers {
    display: inline-block !important; /* Vital para que respeten los márgenes */
    padding: 8px 14px;      /* Tamaño del botón */
    margin: 5px;            /* Espacio alrededor para que NO se pisen en móvil */
    border: 1px solid #ddd;
    text-decoration: none;
    color: #55555e;         /* Tu color de texto gris corporativo */
    background-color: #fff;
    border-radius: 10px;     /* Opcional: bordes un poco redondeados */
    line-height: 1;
}

.nav-links>:first-child {
    padding-left: 14px;
}

/* 3. Estado Activo (Página actual) y Hover */
.page-numbers.current,
.page-numbers:hover {
    background-color: var(--grafcan-blue-light, #8dc8e0);
    color: #fff;
    border-color: var(--grafcan-blue-light, #8dc8e0);
}

/* ==========================================================================
   25. ESTILOS SINGLE (NOTICIAS Y HEMEROTECA) - CABECERA
   Replicando estilo: TÍTULO -> GRAFCAN | FECHA
   ========================================================================== */

/* Contenedor de los metadatos (debajo del título) */
.single-noticia .entry-meta,
.single-hemeroteca .entry-meta {
    margin-top: 10px;
    margin-bottom: 30px;
    font-family: var(--font-body);
    font-size: 16px; /* Ajustado al tamaño de lectura */
    color: #666;
    display: block;
}

/* Inyectar "GRAFCAN | " antes de la fecha */
/* Usamos .posted-on que es la clase estándar de GP para la fecha */
.single-noticia .entry-meta .posted-on::before,
.single-hemeroteca .entry-meta .posted-on::before {
    content: "GRAFCAN | ";
    font-weight: 800; /* Negrita fuerte como en el diseño original */
    color: var(--grafcan-text); /* O el gris oscuro #555 */
    margin-right: 4px;
}

/* Estilo de la fecha (enlace desactivado visualmente) */
.single-noticia .entry-meta .posted-on a,
.single-hemeroteca .entry-meta .posted-on a {
    color: var(--grafcan-text) !important;
    text-decoration: none;
    pointer-events: none; /* Desactiva el clic */
    cursor: text;
    font-weight: 400;
}

/* Ocultar el autor ("por admin") ya que ponemos GRAFCAN fijo */
.single-noticia .entry-meta .byline,
.single-hemeroteca .entry-meta .byline {
    display: none !important;
}

/* Ocultar iconos de fecha si el tema los pone */
.single-noticia .entry-meta .gp-icon,
.single-hemeroteca .entry-meta .gp-icon {
    display: none !important;
}

/* Asegurar que el título tenga el espacio correcto */
.single-noticia .entry-header,
.single-hemeroteca .entry-header {
    margin-bottom: 0; /* Quitamos margen para que la fecha quede pegada visualmente */
}
.single-noticia .entry-title,
.single-hemeroteca .entry-title {
    margin-bottom: 5px;
    color: var(--grafcan-blue-dark);
    font-weight: 500; /* 700 */
}


/* ==========================================================================
   26. BOTÓN MÁS NOTICIA
   ========================================================================== */
.boton-mas-noticias {
    display: flex;              /* Activa Flexbox */
    justify-content: center;    /* Alinea horizontalmente al centro */
    align-items: center;        /* (Opcional) Alinea verticalmente si hubiera altura */
    width: 100%;
}

.btn-mas-noticias {
    /* Mismos estilos de botón que tenías */
    background-color: var(--grafcan-blue-light);
    color: #ffffff !important;
    padding: 8px 20px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: bold;
    font-size: 14px;
    transition: background 0.3s ease;
}


/* ==========================================================================
  27. ESTILOS PÁGINA DE CONTACTO (V4 - FINAL)
   ========================================================================== */

/* 1. Layout Principal y Filas */
.grafcan-contacto-wrapper {
    margin-bottom: 40px;
}

.contacto-grid-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

/* Ajuste Fila Sedes (Arriba) */
.contacto-grid-layout.sedes-row {
    margin-bottom: 20px;
}

/* Ajuste Fila Formulario/Emails (Abajo) */
.contacto-grid-layout.align-top {
    margin-top: 0;
    align-items: start;
}

/* Responsive: Móvil 1 columna */
@media (max-width: 768px) {
    .contacto-grid-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

/* 2. Textos e Introducción */
.contacto-intro {
    margin-bottom: 20px;
    font-size: 1.1em;
    color: #333;
    max-width: 900px;
}

.emails-intro {
    margin-bottom: 15px;
}

/* 3. Títulos (Estilo Grafcan) */
.sede-title, 
.form-title,
.section-subtitle {
    font-family: 'Overpass', sans-serif;
    color: var(--grafcan-blue-dark, #1f3864);
    font-size: 1.5rem;
    font-weight: 400;
    border-bottom: 2px solid var(--grafcan-blue-light, #8dc8e0);
    padding-bottom: 10px;
    margin-bottom: 20px;
    margin-top: 0;
}

/* 4. Mapas y Botones Visor */
.sede-mapa {
    margin-bottom: 15px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #eee;
}

.sede-mapa iframe {
    width: 100%;
    height: 250px;
    border: 0;
    background: #eee;
    display: block;
}

.visor-btn-wrapper {
    margin-bottom: 25px;
}

/* Botón Visor Ancho Completo */
.visor-btn-wrapper .button.ghost {
    width: 100%;
    text-align: center;
    box-sizing: border-box;
    display: block;
}

/* Estilo general botones (por si acaso) */
.grafcan-contacto-wrapper a.button {
    color: #ffffff;
    background-color: #8dc8e0;  
}
.grafcan-contacto-wrapper a.button.ghost {
    /*
	background: transparent;
    color: var(--grafcan-blue-dark, #1f3864);
    border: 1px solid var(--grafcan-blue-dark, #1f3864);
	*/
	background: #8dc8e0;
    color: #ffffff;
    /*border: 1px solid var(--grafcan-blue-dark, #1f3864);*/
    border-radius: 10px;
}

.grafcan-contacto-wrapper a.button.ghost:hover {
    background: var(--grafcan-blue-dark, #1f3864);
    color: #fff;
}

/* 5. Datos y Avisos */
.sede-datos {
    margin-bottom: 40px;
}
.sede-datos p {
    font-size: 1rem;
    line-height: 1.6;
}
.sede-datos strong {
    color: var(--grafcan-blue-dark, #1f3864);
}

.sede-aviso.alert-box {
    background-color: #f9f9f9;
    border-left: 4px solid var(--grafcan-blue-light, #8dc8e0);
    padding: 15px 20px;
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 20px;
    border-radius: 0 4px 4px 0;
}
.sede-aviso p { margin: 0; }


/* 6. Listado Emails */
.emails-block { margin-top: 0; }

.listado-emails {
    list-style: none;
    margin: 20px 0 0 0;
    padding: 0;
}
.listado-emails li {
    padding: 8px 0;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
}
.listado-emails li strong {
    color: #444;
    margin-right: 10px;
}
.listado-emails a {
    color: var(--grafcan-blue-light, #8dc8e0);
    text-decoration: none;
    font-weight: 400;
    padding-left: 5px;
}
.listado-emails a:hover {
    color: var(--grafcan-blue-dark, #1f3864);
    text-decoration: underline;
}

/* 7. Tarjeta Formulario */
.contacto-col-form .form-card {
    background: #f9f9f9; /* Color fondo gris suave */
    padding: 20px;
    border: 1px solid #eee;
    border-radius: 5px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

/* Campos CF7 */
.grafcan-form-wrapper input[type="text"],
.grafcan-form-wrapper input[type="email"],
.grafcan-form-wrapper textarea {
    background-color: #ffffff; 
    border: 1px solid #ddd;
    border-radius: 10px;
    width: 100%;
    box-sizing: border-box;
}
.grafcan-form-wrapper input[type="submit"] {
    /*background-color: var(--grafcan-blue-dark, #1f3864);*/
	background-color: var(--grafcan-blue-light, #8dc8e0);
    color: #fff;
    border: none;
    padding: 10px 25px;
    cursor: pointer;
    transition: background 0.3s;
	border-radius: 10px;
}
.grafcan-form-wrapper input[type="submit"]:hover {
    /*background-color: var(--grafcan-blue-light, #8dc8e0);*/
	background-color: var(--grafcan-blue-dark, #1f3864);
}


/* ==========================================================================
   28. EXTRAS NECESARIOS (Desplegable Privacidad + Icono)
   ========================================================================== */

/* Desplegable Política Privacidad */
.politica-privacidad-resumen {
    position: relative;
    padding: 10px 15px;
    margin-top: 20px;
    border: 1px solid transparent;
    border-radius: 10px;
    transition: all 0.3s ease;
}
.politica-privacidad-resumen:hover {
    background-color: #ffffff;
    border-color: #e0e0e0;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    z-index: 10;
}
.politica-privacidad-resumen h5 {
    font-family: 'Overpass', sans-serif;
    font-size: 0.95rem;
    color: var(--grafcan-text, #555);
    margin: 0;
    cursor: help;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.politica-privacidad-resumen h5::after {
    content: '▼'; 
    font-size: 0.8em;
    color: var(--grafcan-blue-light, #8dc8e0);
    transition: transform 0.3s;
}
.politica-privacidad-resumen:hover h5::after {
    transform: rotate(180deg);
}
.politica-privacidad-resumen p,
.politica-privacidad-resumen ul {
    display: none;
    font-size: 0.85rem;
    line-height: 1.5;
    color: #666;
    margin-top: 10px;
    margin-bottom: 10px;
}
.politica-privacidad-resumen:hover p,
.politica-privacidad-resumen:hover ul {
    display: block;
}

/* Icono Privacidad y Alineación CF7 */
.grafcancontactoform .privacy-wrapper {
    margin-bottom: 20px;
    width: 100%;
}
.grafcancontactoform .privacy-wrapper p {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    margin: 0 !important;
    gap: 8px;
}
.grafcancontactoform .privacy-wrapper br { display: none !important; }
.grafcancontactoform .privacy-wrapper .wpcf7-form-control-wrap {
    margin: 0 !important;
    width: auto !important;
    display: flex;
    align-items: center;
}
.grafcancontactoform .link-privacidad-icon {
    display: block; 
    flex-shrink: 0;
    width: 24px; height: 24px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231f3864' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'%3E%3C/path%3E%3Cpolyline points='14 2 14 8 20 8'%3E%3C/polyline%3E%3Cline x1='16' y1='13' x2='8' y2='13'%3E%3C/line%3E%3Cline x1='16' y1='17' x2='8' y2='17'%3E%3C/line%3E%3Cline x1='10' y1='9' x2='8' y2='9'%3E%3C/line%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 18px;
    cursor: pointer;
}
.grafcancontactoform .link-privacidad-icon:hover {
    transform: scale(1.1);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238dc8e0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'%3E%3C/path%3E%3Cpolyline points='14 2 14 8 20 8'%3E%3C/polyline%3E%3Cline x1='16' y1='13' x2='8' y2='13'%3E%3C/line%3E%3Cline x1='16' y1='17' x2='8' y2='17'%3E%3C/line%3E%3Cline x1='10' y1='9' x2='8' y2='9'%3E%3C/line%3E%3C/svg%3E");
}



/* ==========================================================================
   29. GRID BOTONES /perfil-del-contratante/
   ========================================================================== */
.grid-grafcan {
    display: grid;
    grid-template-columns: auto auto auto;
    /* background-color: #2196F3; */
    padding: 10px;
    column-gap: 10%;
    margin-bottom: 2.5rem;
}
.grid-grafcan-item {
    border: 3px solid #1f3864;
    padding: 20px;
    text-align: center;
    border-radius: 20px;
    /* background-color: rgba(255, 255, 255, 0.8); */
    /* font-size: 30px; */
}

@media (max-width: 768px) {
    .grid-grafcan {
        display: grid;
        grid-template-columns: 1fr;
        /* background-color: #2196F3; */
        padding: 10px;
        column-gap: 10%;
        margin-bottom: 2.5rem;
    }
}
@media (max-width: 768px) {
    .grid-grafcan-item {
        border: 3px solid #1f3864;
        padding: 20px;
        text-align: center;
        border-radius: 20px;
        margin-bottom: 5px !important;
        /* background-color: rgba(255, 255, 255, 0.8); */
        /* font-size: 30px; */
    }
}


/* ==========================================================================
   30. CABECERA: LOGO SECUNDARIO (SITCAN) Y BUSCADOR
   ========================================================================== */

/* 1. Contenedor del Logo Secundario */
.site-logo-secondary {
    display: flex;
    align-items: center;
    margin-left: 20px; /* Separación con el buscador */
    z-index: 100;
}

/* 2. Ajuste de altura para igualar al logo principal */
/* GeneratePress suele poner el logo principal en img.header-image */
.site-logo-secondary img {
    height: 43px; /* 80px Ajusta este valor a la altura real de tu logo principal */
    width: auto;  /* Mantiene la proporción */
    max-height: 100%;
	vertical-align: middle !important;
}

/* 3. Estructura Flexbox de la Cabecera (Escritorio) */
/* Aseguramos que los elementos se alineen en fila: Logo | Buscador | Logo2 */
.inside-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap; /* Permite que bajen en móvil */
}

/* El buscador (header-widget) debe ocupar el espacio necesario pero no todo */
.header-widget {
    margin-left: auto; /* Empuja todo lo anterior a la izquierda */
    margin-right: 0;
    order: 2; /* Posición intermedia */
    float: none !important; /* Reseteo de estilos legacy de GP */
    max-width: 100%;
}

/* El Logo secundario va al final */
.site-logo-secondary {
    order: 3;
}

/* El Logo principal (site-branding) va al principio */
.site-branding {
    order: 1;
}


/* ==========================================================================
   31. RESPONSIVE CABECERA (Móviles < 768px)
   ========================================================================== */
@media (max-width: 768px) {
    
    .inside-header {
        flex-direction: column; /* Apilar elementos verticalmente */
        text-align: center;
        padding-bottom: 20px;
    }

    /* 1. Logo Principal (Arriba del todo) */
    .site-branding {
        order: 1;
        width: 100%;
        margin-bottom: 15px;
        text-align: center; /* Centrar logo en móvil */
    }

    /* 2. Logo Secundario SITCAN (ENCIMA del buscador) */
    .site-logo-secondary {
        order: 2; /* Segundo lugar */
        margin-left: 0;
        margin-bottom: 15px; /* Separación con el buscador de abajo */
        width: 100%;
        justify-content: center; /* Centrar imagen */
    }
    
    /* Reducimos un poco el logo secundario en móvil si es muy grande */
    .site-logo-secondary img {
        height: 60px; 
    }

    /* 3. Buscador (Abajo del todo) */
    .header-widget {
        order: 3; /* Tercer lugar */
        margin: 0 auto;
        width: 100%;
        text-align: center;
    }
    
    /* Ajuste del formulario de búsqueda para que no se salga */
    .header-widget .search-form {
        display: flex;
        justify-content: center;
    }
    
    .header-widget input.search-field {
        width: 80%; /* Que no ocupe el 100% para dejar sitio al botón */
    }
}

/* ==========================================================================
   32. ESTILOS TARJETAS DESTACADAS HOME (SITCAN / IDE) - CORTE FINAL
   ========================================================================== */

.grafcan-feature-card {
    /*height: 100%;
    min-height: 170px;*/
    /*width: auto;*/
    
    /* --- FUERZA BRUTA: RECORTE FÍSICO --- */
    /* Esto recorta el div como si fuera una galleta. Infalible. *
    -webkit-clip-path: inset(0 round 10px);
    clip-path: inset(0 round 10px);
    /* ------------------------------------ */
    
    /*border-radius: 10px; /* Fallback */
    overflow: hidden;
    
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative; 
}

.grafcan-feature-card.idecanarias-style img {
	height: auto;
    max-width: 46%;
    margin-top: 8px;
	margin-bottom: 8px;
}

/* CORRECCIÓN IMAGEN MINI CARD IDECANARIAS */
.grafcan-mini-card.idecanarias-style img {
	height: 74px; /* 53PX Igualamos la altura a la de los SVGs (53px) */
    width: auto;  /* Dejamos que el ancho se adapte */
    max-width: 100%; /* Permitimos que crezca hasta el tope del contenedor si hace falta */
    margin-top: 8px;
	margin-bottom: 8px;
    object-fit: contain; /* Asegura que la imagen se vea entera */
}

.grafcan-feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.3);
}

/* --- TUS TAMAÑOS DE IMAGEN ORIGINALES --- */

/* Imagen 1 (SITCAN) */
.feature-image1 img {
    margin-top: 25px !important;   /* 0 */        
    margin-bottom: 0px !important; /* 0 */
    max-width: 90%;
    height: auto;
    display: block;
    margin-left: auto;
    margin-right: auto;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

/* Imagen 2 (IDECanarias) */
.feature-image2 img {
    margin-top: 25px !important;          /* 0 */
    margin-bottom: 25px !important;    /* 40 */
    max-width: 90%;
    height: 65px; /*70px; /* Tu altura fija original */
    display: block;
    margin-left: auto;
    margin-right: auto;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

/* Texto */
.feature-content {
    width: 100%;          
    text-align: center;   
    padding: 0 10px;      
    margin-top: 10px; 
	margin-bottom: 5px;	
}

.feature-content p{     
	margin-bottom: 5px !important;	
}

/* El Título H3 */
.feature-content h3 {
    font-family: var(--font-headings);
    font-size: 20px; /* 22 24 */
    font-weight: 500; /* 700 */
    margin: 0 auto;       
    line-height: 1.3;
    color: #fff !important;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    text-align: center !important; 
    display: block;       
}

/* ==========================================================================
   33. ESTILOS MINI CARDS (ICONOS PEQUEÑOS HOME)
   ========================================================================== */

.grafcan-mini-card {
    height: auto;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: flex-start; /* Alineación superior */
    transition: transform 0.3s ease;
    padding: 5px; /* Espacio de seguridad 25*/
}

/* Efecto de elevación al pasar el ratón */
.grafcan-mini-card:hover {
    transform: translateY(-5px);
}

/* Enlace contenedor */
.grafcan-mini-card a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-decoration: none;
    text-align: center;
    color: #ffffff !important; /* Texto blanco forzado */
}

/* Hover en el enlace: Texto azul claro */
.grafcan-mini-card:hover a {
    color: var(--grafcan-blue-light) !important;
}

/* --- FUERZA BRUTA PARA LOS SVGs --- */
/* Sobrescribimos los colores inline que traen tus iconos */

.grafcan-mini-card svg {
    width: 53px; /* 60px */
    height: 53px; /* 60px */
	margin-top: 8px;
    margin-bottom: 8px; /* 15px Separación con el texto */
    /*fill: #ffffff !important; */
	/*fill: var(--grafcan-blue-dark) !important;*/
	fill: var(--grafcan-white) !important;
}
.grafcan-mini-card p {
	/*color: var(--grafcan-blue-dark) !important;*/
	color: var(--grafcan-white) !important;
}

/* Atacamos todas las partes internas del SVG para pintarlas de blanco */
.grafcan-mini-card svg path,
.grafcan-mini-card svg circle,
.grafcan-mini-card svg rect,
.grafcan-mini-card svg line,
.grafcan-mini-card svg polyline,
.grafcan-mini-card svg polygon,
.grafcan-mini-card svg g {
    /*
	fill: #ffffff !important;
    stroke: #ffffff !important; */
	fill: var(--grafcan-white) !important;
	stroke: var(--grafcan-white) !important;	
	/*
	fill: var(--grafcan-blue-dark) !important;
	stroke: var(--grafcan-blue-dark) !important;
	*/
    transition: all 0.3s ease;
}

/* Hover en el SVG: Pintamos todo de azul claro */
.grafcan-mini-card:hover svg path,
.grafcan-mini-card:hover svg circle,
.grafcan-mini-card:hover svg rect,
.grafcan-mini-card:hover svg line,
.grafcan-mini-card:hover svg polyline,
.grafcan-mini-card:hover svg polygon,
.grafcan-mini-card:hover svg g {
    /*fill: var(--grafcan-blue-light) !important;*/
    /*stroke: var(--grafcan-blue-light) !important;*/
}

/* Texto del icono (Nombre del servicio) */
.grafcan-mini-card p,
.grafcan-mini-card h4 {
    font-family: var(--font-headings); 
    font-size: 16px;
    margin: 0;
    line-height: 1.3;
    font-weight: 500; /* 600 Un poco de peso para que se lea bien */
    color: inherit; /* Hereda el color del enlace (blanco o azul) */
}

/* ==========================================================================
   34. CORRECCIÓN GRID HOME MÓVIL (3 COLUMNAS CENTRADAS)
   ========================================================================== */
@media (max-width: 768px) {
    /* USAMOS LA CLASE EXACTA DE TU HTML: .grafcan-grid-6cols-home */
    .grafcan-grid-6cols-home {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important; /* 3 columnas exactas: 3 arriba, 3 abajo */
        gap: 5px; /* 10px */
        justify-content: center; /* Centrar el grid en la pantalla */
        padding: 0 1px; /* 0 10px */
    }
.grafcan-mini-card.idecanarias-style img {
	height: 64px; /* 53PX Igualamos la altura a la de los SVGs (53px) */
    width: auto;  /* Dejamos que el ancho se adapte */
    max-width: 100%; /* Permitimos que crezca hasta el tope del contenedor si hace falta */
    margin-top: 8px;
	margin-bottom: 8px;
    object-fit: contain; /* Asegura que la imagen se vea entera */
}	

    /* Ajuste para que las columnas no tengan anchos raros heredados */
    .grafcan-col {
        width: 100% !important;
        margin: 0 !important;
        display: flex;
        justify-content: center; 
        align-items: flex-start;
    }

    /* Ajuste de tamaño para que quepan 3 en móvil sin romperse */
    .grafcan-mini-card {
        padding: 2px; /* Reducimos padding */
    }
    
    /* Reducimos ligeramente los iconos en móvil para que quepan 3 en fila */
    .grafcan-mini-card svg,
    .grafcan-mini-card img {
        width: 45px; 
        height: 45px;
    }
    
    /* Texto un poco más pequeño para evitar saltos de línea excesivos */
    .grafcan-mini-card p, 
    .grafcan-mini-card h4 {
        font-size: 12px;
    }
}

/* ==========================================================================
   35. CORRECCIÓN GRID HOME ESCRITORIO (6 ICONOS EN 1 FILA)
   ========================================================================== */
@media (min-width: 769px) {
    /* USAMOS LA CLASE EXACTA DE TU HTML: .grafcan-grid-6cols-home */
    .grafcan-grid-6cols-home {
        display: grid !important;
        /* Forzamos 6 columnas para que los 6 elementos quepan en una sola línea */
        grid-template-columns: repeat(6, 1fr) !important; 
        gap: 20px;
        align-items: start;
        justify-content: center;
    }
    
    /* Nos aseguramos de que las columnas no tengan márgenes extraños */
    .grafcan-col {
        width: auto !important;
        margin: 0 !important;
    }
}

/* LINK TODOS LOS CONCURSOS/EMPLEOS */ 
.right-link-todos a {
    float: right !important;
    margin-top: -50px !important;
    display: inline-block !important;
    z-index: 1000;
    position: relative;
}
/* LINK TODOS LAS ENCOMIENDAS */ 
.right-link-todos-encomiendas a {
    float: right !important;
    margin-top: -25px !important;
    display: inline-block !important;
    z-index: 1000;
    position: relative;
}

@media only screen and (max-width: 900px) {
	.right-link-todos a {
		float: right !important;
		margin-top: -22px !important;
		display: inline-block !important;
		z-index: 1000;
		position: relative;
	}
}

