/* ---------- General ---------- */

body {
    font-family: 'Roboto', sans-serif;
    margin:0;
    padding:0;
    background: url('/img/mapa_mundi.png') no-repeat center center fixed;
    background-size: cover;
    color: #222;
    position: relative;
}

body::before {
    content:"";
    position:fixed;
    top:0;
    left:0;
    width:100%;
    height:100%;
    background:rgba(0,0,0,0.5);
    z-index:-1;
}

h1,h2,h3{
    font-family:'Montserrat',sans-serif;
    font-weight:700;
}

a{
    text-decoration:none;
}

.container{
    max-width:1200px;
    margin:auto;
    padding:0 15px;
}

/* ---------- HEADER ---------- */

header{
    background:#0b1a2a;
    color:#fff;
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding:15px 30px;
}

header .logo img{
    height:60px;
    border-radius:12px;
}

header .titles{
    text-align:right;
}

header .titles h1{
    font-size:2rem;
    margin:0;
    color:#6ce2ff;
}

header .titles h3{
    margin:2px 0;
    color:#a0bce9;
    font-weight:500;
}

/* ---------- NAVIGATION ---------- */

nav{
    background:#112240;
    display:flex;
    justify-content:center;
    flex-wrap:wrap;
}

nav a{
    color:white;
    padding:12px 15px;
}

nav a:hover{
    color:#36b5ff;
}

/* ---------- MENU HAMBURGUESA ---------- */

.menu-toggle{
    display:none;
    font-size:28px;
    cursor:pointer;
    color:white;
}

/* ---------- SECTIONS ---------- */

section{
    background: rgba(255,255,255,0.75);
    border-radius:8px;
    box-shadow:0 0 10px rgba(0,0,0,0.1);
    width:90%;
    max-width:1200px;
    margin:20px auto;
    padding:25px;
}

section h2{
    text-align:center;
    margin-bottom:40px;
    color:#0b1a2a;
}

/* ---------- TITULO GIS ---------- */

.titulo-gis{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:20px;
}

.titulo-gis i{
    font-size:1.8rem;
}

.titulo-gis h2{
    margin:0;
}

/* ---------- GRID SERVICIOS ---------- */

.servicios-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(250px,1fr));
    gap:20px;
}

/* ---------- AESA SERVICIOS ---------- */

.AESA-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(250px,1fr));
    gap:20px;
}

/* ---------- EJEMPLOS ---------- */

.ejemplos-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(250px,1fr));
    gap:20px;
}

/* ---------- CARDS ---------- */

.card-service{
    background:white;
    border-radius:8px;
    padding:20px;
    box-shadow:0 4px 12px rgba(0,0,0,0.1);
    transition:0.3s;
}

.card-service:hover{
    transform:translateY(-5px);
    box-shadow:0 6px 20px rgba(0,0,0,0.15);
}

.card-service i{
    font-size:1.6rem;
    color:#0b1a2a;
    margin-bottom:10px;
}

/* ---------- VISOR GIS ---------- */

.visor-container{
    width:100%;
    height:70vh;
}

.visor-container iframe{
    width:100%;
    height:100%;
    border:none;
}

/* ---------- BOTONES SOCIALES ---------- */

.contenedor-botones a{
    display:inline-block;
    margin:10px;
    width:50px;
    height:50px;
    line-height:50px;
    border-radius:50%;
    background:#0b1a2a;
    color:white;
    text-align:center;
    font-size:1.2rem;
}

.contenedor-botones a:hover{
    background:#2bb1ff;
}

/* ---------- IMAGES ---------- */

/* Contenedor de la imagen y el texto */
.portfolio-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px; /* Bordes redondeados opcionales */
    height: 250px;      /* Altura fija para que todas las tarjetas sean iguales */
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Recorta la imagen para que llene el espacio sin deformarse */
    transition: transform 0.5s ease;
}

/* Capa oscura con el texto */
.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6); /* Fondo negro semitransparente */
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0; /* Oculto por defecto */
    transition: opacity 0.3s ease;
    padding: 20px;
    text-align: center;
}

.overlay .text {
    color: white;
    font-weight: bold;
    font-size: 1.2rem;
    transform: translateY(20px); /* El texto sube un poco al aparecer */
    transition: transform 0.3s ease;
}

/* --- EFECTOS AL PASAR EL RATÓN --- */

.portfolio-item:hover .overlay {
    opacity: 1; /* Muestra el fondo oscuro */
}

.portfolio-item:hover .overlay .text {
    transform: translateY(0); /* El texto llega a su sitio */
}

.portfolio-item:hover img {
    transform: scale(1.1); /* Zoom suave a la imagen */
}




/* Contenedor para logos de empresas */
/* Contenedor individual de cada logo */
.logo-item {
    position: relative;
    height: 120px; /* Altura uniforme para todos */
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa; /* Fondo gris muy clarito opcional */
    border-radius: 8px;
    overflow: hidden; /* Corta el texto que sale por debajo */
    transition: all 0.3s ease;
}

/* Estilo de la imagen */
.logo-item img {
    max-height: 70%;
    max-width: 85%;
    object-fit: contain;
    filter: grayscale(100%); /* Todos en gris al inicio */
    transition: all 0.4s ease;
    opacity: 0.7;
}

/* Nombre de la empresa (oculto por defecto) */
.logo-name {
    position: absolute;
    bottom: -100%; /* Empieza fuera del recuadro (abajo) */
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.7); /* Fondo negro transparente */
    color: white;
    font-size: 0.8rem;
    padding: 5px 0;
    transition: all 0.3s ease;
}

/* --- EFECTOS HOVER --- */

.logo-item:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transform: translateY(-5px); /* Pequeño salto hacia arriba */
}

/* Al pasar el ratón: El logo recupera color */
.logo-item:hover img {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.05); /* Crece un poquito */
}

/* Al pasar el ratón: Sube el nombre */
.logo-item:hover .logo-name {
    bottom: 0;
}
/* ---------- FOOTER ---------- */

footer{
    background:#0b1a2a;
    color:white;
    text-align:center;
    padding:25px 15px;
    font-size:0.9rem;
}

footer a{
    color:#a0bce9;
}

footer a:hover{
    color:#ffc300;
}

/* ---------- COOKIE ---------- */

#cookie-banner{
    position:fixed;
    bottom:0;
    width:100%;
    background:#112240;
    color:white;
    padding:15px;
    text-align:center;
}

#cookie-banner button{
    margin-left:15px;
    padding:6px 12px;
    background:#ffc300;
    border:none;
    border-radius:4px;
}

/* ================================= */
/* ========= RESPONSIVE ============ */
/* ================================= */

@media (max-width:768px){

nav{
    display:none;
    flex-direction:column;
    width: 100%;
    text-align: center;
}

nav a{
    padding:15px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

nav.active{
    display:flex;
}

.menu-toggle{
    display:block;
}

header{
    flex-wrap:wrap;
}

header .titles{
    width:100%;
    text-align:center;
    margin-top:10px;
}

.titulo-gis{
    flex-direction:column;
}

.visor-container{
    height:60vh;
}

}

@media (max-width:480px){

header .titles h1{
    font-size:1.4rem;
}

section{
    padding:15px;
}

}