@import url('/css/custom.properties.css');
/* @import url('/css/styles.css'); */

html, body {
    max-width: 100vw;
    overflow-x: hidden;
}

.home__contenedor-texto{
    display: grid;
    gap: 1rem; 
    grid-template-rows: repeat(2, auto);  
    align-items: center;
    width: 100%;
}

.home__contenedor-titulos{
    grid-row: 2/3;
}

.home__contenedor-enlaces{
    grid-row: 1/2;
    justify-self: flex-end; 
}

@media(min-width: 768px){
    .home__contenedor-texto{
        grid-template-rows: none;
        grid-template-columns: 1fr auto 1fr;
    }
    .home__contenedor-titulos{
        grid-row: unset;
        grid-column: 2/3;
    }
    .home__contenedor-enlaces{
        grid-row: unset;
        grid-column: 3/4;
    }
}

.home__contenedor-enlaces a{
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    line-height: 0.3;
}

.home__contenedor-enlaces a i{
    margin-bottom: .5rem;
    font-size: 2.2rem;
}

.hover-login{
    transition: all .8s ease-in-out;
    color:var(--gris-claro)
}

.hover-login:hover{
    transform: scale(1.04);
    filter: brightness(.96);
    color: var(--paleta-principal-botones);
}

.home__principal {
    display: flex;
    flex-direction: column-reverse;
    gap: 1rem;
}

.home__aside {
    flex: 0 0 25%;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.home__mapa,
.home__video {
    flex: 1 1 75%;
}

.home__video{
    flex: 1 1 560px;
    position: relative; 
    padding-bottom: 56.25%; 
    height: 0; 
    overflow: hidden;
}

.home__video iframe{
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    border: 0;
}

.carrusel-empresas {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    padding: 40px 0;
    background-color: #f8f9fa;
    overflow: hidden;
}

.marquee__container {
    width: 100%;
    overflow: hidden;
    position: relative;
    padding: 10px 0;
}

.marquee__track {
    display: flex;
    width: max-content;
    gap: 30px;
    animation: scrollInfinito 100s linear infinite;
}

.marquee__track:hover {
    animation-play-state: paused;
}

.card__empresa {
    width: 260px;
    height: 160px;
    perspective: 1000px;
    flex-shrink: 0;
}

.card__inner {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    animation: rotacionInfinita 10s infinite ease-in-out;
}

.card__face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 8px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border: 1px solid #e9ecef;
    white-space: normal;
}

.card__empresa-img{
    width: 50%;
    flex: 0 1 90px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.card__empresa-img img{
    width: 100%;
}

.card__face--front {
    background: #ffffff;
    color: #22577A;
    font-size: 1.1rem;
}

.card__face--back {
    background-color: #1898C6;
    color: #ffffff;
    transform: rotateY(180deg);
    font-size: 1.3rem;
    overflow-y: auto;
}

.mapa-institucional {
    width: 100%;
    margin-top: 4rem;
    margin-bottom: 4rem;
}

.mapa__pilares-grid {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: repeat(3, auto);
    gap: 1px;
    background-color: #e9ecef;
    border: 1px solid #e9ecef;
    border-top: none;
    border-radius: 0 0 12px 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.pilar-card {
    background: #ffffff;
    padding: 25px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}

.pilar-card:hover {
    background-color: #f8f9fa;
    transform: translateY(-2px);
}

.pilar-card__icono {
    font-size: 2rem;
    color: #1898C6;
    margin-bottom: 12px;
}

.pilar-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #22577A;
    margin-bottom: 10px;
    font-family: 'Exo', sans-serif;
}

.pilar-card p {
    font-size: 1.2rem;
    color: #5c6770;
    line-height: 1.5;
    margin-bottom: 15px;
    flex-grow: 1;
}

.pilar-card__accion {
    font-size: 1.1rem;
    font-weight: bold;
    color: #83c442;
    transition: margin-left 0.3s ease;
}

.pilar-card:hover .pilar-card__accion {
    margin-left: 5px;
}

.popup-custom h4,
.popup-custom p,
.vessel-search__box .form-control,
.vessel-search__feedback,
.valor-card h4 {
    font-family: 'Exo', sans-serif;
}

.popup-custom h4 {
    font-weight: 700;
    color: #22577A;
    margin: 0 0 5px 0;
}

.popup-custom p {
    color: #495057;
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.4;
}

.dashboar-operativo {
    margin: 2rem 0;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.dashboard__map-wrapper {
    width: 100%;
}

.mapa__elemento {
    width: 100%;
    height: 410px;
    border-radius: 12px 12px 0 0;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
    z-index: 1;
}

.dashboard__sidebar-valores {
    display: flex;
    flex-direction: column;
    gap: 15px;
    justify-content: space-between;
}

.valor-card {
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
}

.valor-card:hover {
    transform: translateX(-3px);
    border-color: #1898C6;
}

.valor-card__icono {
    font-size: 1.8rem;
    color: #83c442;
    margin-bottom: 8px;
}

.valor-card h4 {
    font-weight: 700;
    font-size: 1rem;
    color: #22577A;
    margin-bottom: 6px;
}

.valor-card p {
    font-size: 0.85rem;
    color: #6c757d;
    margin: 0;
    line-height: 1.4;
}

.vessel-tracking {
    background: #f8f9fa;
    padding: 40px 20px;
    border-radius: 16px;
    border: 1px solid #e9ecef;
    margin: 2rem 0;
}

.vessel-search__box {
    max-width: 650px;
    margin: 0 auto 25px auto;
}

.vessel-search__box .input-group-text {
    background-color: #22577A;
    color: #ffffff;
    border: none;
    font-size: 1.2rem;
}

.vessel-search__box .form-control {
    border: 2px solid #e9ecef;
}

.vessel-search__box .form-control:focus {
    border-color: #1898C6;
    box-shadow: none;
}

.vessel-search__feedback {
    font-size: 0.85rem;
    margin-top: 8px;
}

.vessel-map__wrapper {
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
    background: #ffffff;
}

.vessel-map__wrapper {
  position: relative;
  overflow: hidden;
}

/* El escudo para el buscador de MarineTraffic */
.vessel-map__blocker {
  position: absolute;
  top: 0;                /* Pegado al borde superior */
  left: 50%;             /* Centrado horizontalmente */
  transform: translateX(-50%);
  width: 400px;          /* El ancho que probamos y quedó bien */
  height: 45px;          /* La altura que probamos y quedó bien */
  z-index: 10;           /* Por encima del iframe */
  background: transparent; /* Invisible para el usuario */
  pointer-events: auto;  /* CAPTURA los clics para que no lleguen al buscador */
  cursor: default;       /* Muestra el cursor normal, no el de clic */
}

/* Opcional: Si quieres que el resto de la sección siga funcionando como link */
section.vessel-tracking {
  cursor: pointer;
}

.vessel-map__wrapper {
  position: relative;
}

div#debug-search-blocker {
  position: absolute;
  top: 0px;
  left: 50%;
  width: 400px;
  height: 45px;
  background-color: rgba(255, 0, 0, 0.4);
  z-index: 9999;
  pointer-events: auto;
  border: 2px solid red;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 12px;
  font-weight: bold;
  transform: translateX(-50%);
}

.vessel-search__box a{
    display: inline-flex;
    justify-content: center;
}

/* ==========================================
   MEDIA QUERIES (Cascada limpia y ordenada)
   ========================================== */
@media(min-width: 768px) {
    
    .mapa__pilares-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 992px) {
    .dashboard-grid {
        grid-template-columns: 3fr 1fr;
    }
    .home__principal {
        flex-direction: row;
        align-items: flex-start;
    }
}

/* ==========================================
   KEYFRAMES
   ========================================== */
@keyframes scrollInfinito {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@keyframes rotacionInfinita {
    0%, 40% { transform: rotateY(0deg); }
    50%, 90% { transform: rotateY(180deg); }
    100% { transform: rotateY(360deg); }
}

/* ==========================================
   SECCIÓN EMPRESAS Y GRILLA CON FILTROS
   ========================================== */

.companies {
    padding: 3rem 0;
    background-color: #f8f9fa;
    width: 100%;
}

/* .companies .wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
} */
/*
.section-head {
    text-align: center;
    margin-bottom: 2rem;
}

.section-head .eyebrow {
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #1898C6;
    letter-spacing: 1px;
    display: block;
    margin-bottom: 0.5rem;
}

.section-head h2 {
    color: #22577A;
    font-family: 'Exo', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.section-head p {
    color: #5c6770;
    font-size: 1.05rem;
    max-width: 650px;
    margin: 0 auto;
}
*/
/* Chips / Filtros */
.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    /* justify-content: center; */
    margin-bottom: 2.5rem;
}

.chip {
    padding: 0.9rem 1.8rem;
    border-radius: 100px;
    background-color: #ffffff;
    border: 1px solid #e9ecef;
    color: #5c6770;
    font-size: 1.35rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease-in-out;
    box-shadow: 0 2px 6px rgba(0,0,0,0.03);
    user-select: none;
}

.chip:hover {
    border-color: #1898C6;
    /* color: #1898C6; */
    color: var(--white);
    transform: translateY(-2px);
}

.chip.active {
    background-color: #22577A;
    color: #ffffff;
    border-color: #22577A;
    box-shadow: 0 4px 10px rgba(34, 87, 122, 0.25);
}

/* Grilla de Tarjetas */
.company-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 576px) {
    .company-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 992px) {
    .company-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Contenedor enlace para envolver la tarjeta */
/* Transición suave para las tarjetas al filtrar */
.company-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    opacity: 1;
    transform: scale(1);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.company-card-link.is-hidden {
    display: none !important;
}

/* Tarjeta individual */
.company-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid #e9ecef;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.company-card-link:hover .company-card {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
    border-color: #1898C6;
}

/* Badges / Cat-tags */
.cat-tag {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
}

.cat-tag.combustibles { background-color: #fff3cd; color: #856404; }
.cat-tag.aridos       { background-color: #e2e3e5; color: #383d41; }
.cat-tag.logistica    { background-color: #d1ecf1; color: #0c5460; }
.cat-tag.energia      { background-color: #d4edda; color: #155724; }

.company-card__logo {
    width: 100%;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 0.75rem;
}

.company-card__logo img {
    max-height: 100%;
    max-width: 140px;
    object-fit: contain;
}

.company-card h4 {
    color: #22577A;
    font-family: 'Exo', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.company-card p {
    color: #5c6770;
    font-size: 0.95rem;
    line-height: 1.4;
    margin: 0;
}