* {
  margin: 0;
  padding: 0;
  font-family: "Space Grotesk", sans-serif;
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  background-image: linear-gradient(#002a56, #002a56ab),
    url("../imagenes/fotomar.jpg");
  background-size: cover;
  background-position: center;
}

img {
  width: 100%;
}

/* ----------------SECTION---------------- */
.container {
  padding: 2rem 2rem 0 2rem;
  color: #f5f7f9;
}

h2 {
  padding-bottom: 0.5rem;
  font-size: 3rem;
  font-weight: 900;
  text-align: center;
}

.container article svg {
  transform: rotate(-45deg);
  fill: #00a6ff;
}

/* ----------------PORTADA---------------- */
.portada {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(#002a56, #002a5646),
    url("../imagenes/noticia2-buque.jpeg") center / cover no-repeat;
}

.portada article {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  color: #f5f7f9;
  text-align: center;
}

.portada article div h1 {
  font-size: 3.6rem;
  font-weight: 900;
}

.portada article div p {
  width: 80%;
  font-size: 1.1rem;
}

.portada article .contenedor-botones {
  display: flex;
  gap: 0.5rem;
}

/* --------Noticias-------- */
.noticias-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.noticias-container > div {
  background-color: #002a56;
  width: 100%;
  transition: all 0.5s;
}

.noticias-container > div:hover {
  transform: scale(1.02);
  box-shadow: 0px 0px 22px 0px #00a6ff;
}

.noticias-info {
  padding: 0.8rem;
}

/* ----------------INICIO SESION---------------- */
.fondo-inicio-registro {
  width: 100%;
  height: 18rem;
  overflow: hidden;
  position: relative;
}

.fondo-inicio-registro .gradiente {
  position: absolute;
  inset: 0;
  background: linear-gradient(#002a5600, #002a56);
  z-index: 1;
}

.contenedor-blanco {
  background-color: #f5f7f9;
  padding: 2rem;
  min-height: 100vh;
  border-radius: 1rem 1rem 0 0;
  margin-top: -50px; /* o -70px, ajustalo para que se monte justo */
  z-index: 2;
  position: relative;
}

.contenedor-blanco > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.contenedor-blanco .tabs {
  background-color: #818b961a;
  padding: 0.2rem;
  border-radius: 0.5rem;
  width: 100%;
  display: flex;
  justify-content: center;
}

.contenedor-blanco .tabs-inicio a {
  padding: 0.5rem 2rem;
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 500;
  border-radius: 0.4rem;
  width: 100%;
  text-align: center;
}

.contenedor-blanco .tabs-inicio a:first-child {
  color: #002a56;
  background-color: #f5f7f9;
}

.contenedor-blanco .tabs-inicio a:last-child {
  color: #818b96;
}

form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  width: 100%;
}

form .form-box {
  display: flex;
  gap: 1rem;
}

form .form-contenedores {
  display: flex;
  flex-direction: column;
  width: 100%;
}

label {
  color: #818b96;
}

input,
select {
  padding: 0.8rem 0.5rem;
  border: 1px solid #818b96;
  border-radius: 0.4rem;
  width: 100%;
  background-color: #f5f7f9;
}

input:hover,
select:hover {
  border: 1px solid #00a6ff;
}

input:focus select:focus {
  outline: none;
  border: 1px solid #00a6ff;
}

form a {
  background-color: #00a6ff;
  width: 100%;
}

/* ----------------REGISTRO---------------- */
.contenedor-blanco .tabs-registro a {
  padding: 0.5rem 2rem;
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 500;
  border-radius: 0.4rem;
  width: 100%;
  text-align: center;
}

.contenedor-blanco .tabs-registro a:first-child {
  color: #818b96;
}

.contenedor-blanco .tabs-registro a:last-child {
  color: #002a56;
  background-color: #f5f7f9;
}

/* ----------------INICIO---------------- */
/* ----NAV---- */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
}

nav {
  padding: 1.2rem 2rem 1.2rem 0;
  display: flex;
  justify-content: space-between;
  background-color: #002a56;
}

nav .logo-navegar {
  width: 10rem;
}

nav .foto-perfil {
  width: 3rem;
}

nav figure img {
  width: 100%;
  object-fit: cover;
}

.menu-container {
  position: relative;
  padding-left: 2rem;
}

#menu-toggle {
  display: none;
}

.menu {
  position: relative;
  width: 40px;
  height: 30px;
  margin-top: 0.5rem;
  cursor: pointer;
  display: block;
}

.menu span {
  display: block;
  position: absolute;
  height: 4px;
  width: 100%;
  background-color: #f5f7f9;
  border-radius: 9px;
  opacity: 1;
  left: 0;
  transition: 0.25s ease-in-out;
}

.menu span:nth-of-type(1) {
  top: 0px;
  transform-origin: left center;
}

.menu span:nth-of-type(2) {
  top: 50%;
  transform: translateY(-50%);
  transform-origin: left center;
}

.menu span:nth-of-type(3) {
  top: 100%;
  transform-origin: left center;
  transform: translateY(-100%);
}

#menu-toggle:checked + .menu span:nth-of-type(1) {
  transform: rotate(45deg);
  top: 0;
  left: 5px;
}

#menu-toggle:checked + .menu span:nth-of-type(2) {
  width: 0%;
  opacity: 0;
}

#menu-toggle:checked + .menu span:nth-of-type(3) {
  transform: rotate(-45deg);
  top: 28px;
  left: 5px;
}

.menu-container ul {
  display: none;
  flex-direction: column;
  gap: 2rem;
  position: absolute;
  top: 105%;
  left: 0;
  width: 16rem;
  padding: 2rem;
  list-style: none;
  background-color: #002a56;
  border-radius: 0 0 1rem 0;
  z-index: 10;
}

.menu-container .links {
  display: block;
  font-size: 1.2rem;
  color: #f5f7f9;
  text-decoration: none;
}

.menu-container .links:hover {
  color: #00a6ff;
  font-weight: 500;
}

.menu-container #menu-toggle:checked ~ ul {
  display: flex;
}

.botones {
  padding: 0.8rem 2rem;
  display: block;
  font-size: 1.1rem;
  font-weight: 500;
  color: #f5f7f9;
  border-radius: 0.6rem;
  text-align: center;
  text-decoration: none;
  transition: all 0.5s;
}

.inicio {
  background-color: #00a6ff;
}

.inicio:hover {
  background-color: #002a56;
  border: 1px solid #00a6ff;
}

.registro {
  background-color: #002a56;
}

.registro:hover {
  background-color: #00a6ff;
}

/* ----PORTADA SIMULADOR---- */
.portada-simulador {
  margin-bottom: 3rem;
}

.portada-simulador > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.portada-simulador h4 {
  color: #00a6ff;
  font-weight: 500;
  font-size: 1.1rem;
}

h3 {
  font-size: 2.2rem;
}

.foto-simulador {
  border: 1px solid #00a6ff;
  border-radius: 0.8rem;
}

.foto-simulador img {
  display: block;
  object-fit: cover;
  border-radius: 0.8rem;
  height: 15rem;
}
/* ----PORTADA ULTIMAS NOTICIAS---- */
.u-noticias-cards {
  height: 22rem;
  width: 18rem;
  flex: 0 0 auto;
  padding: 0 1rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.8rem;
  border-radius: 0.8rem;
  border: 1px solid #00a6ff;
}

.noticia1 {
  background: linear-gradient(#002a5600, #002a56),
    url("../imagenes/noticia1-buque.png") center / cover no-repeat;
}

.noticia2 {
  background: linear-gradient(#002a5600, #002a56),
    url("../imagenes/noticia2-buque.jpeg") center / cover no-repeat;
}

.noticia3 {
  background: linear-gradient(#002a5600, #002a56),
    url("../imagenes/noticia3-puerto.jpg") center / cover no-repeat;
}

.noticia4 {
  background: linear-gradient(#002a5600, #002a56),
    url("../imagenes/noticia4-buque.jpeg") center / cover no-repeat;
}

.u-noticias-cards h4 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 1.5rem;
}

.u-noticias-cards p {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.portada-ultimasnoticias > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
}

/*---------------------NOTICIAS---------------------------*/
.ultimas-noticias > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 2rem;
}

.noticias {
  width: 100%;
}

/*---------------------FORO---------------------------*/
.foro-lista {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.post-fake {
  text-decoration: none;
  color: #f5f7f9;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background-color: #00a6ff27;
  border: 1px solid #f5f7f9;
  border-radius: 0.8rem;
  padding: 1rem;
}

.post-fake div:first-child {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.avatar-cuadrado {
  width: 2.5rem;
  height: 2.5rem;
  object-fit: cover;
  border-radius: 6px;
}

.post-fake .autor {
  font-weight: 400;
  color: #00a6ff;
  margin-bottom: 0.3rem;
}

.post-fake h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.parrafo {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.responder {
  position: sticky;
  bottom: 0;
  z-index: 1000;
  background-color: #002a56;
}

.post-respuesta {
  border: 1px solid #00a6ff;
}

/*---------------------ASTILLEROS---------------------------*/
.astilleros-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.astilleros-container > div {
  display: grid;
  place-content: center;
  gap: 1rem;
  transition: all 0.5s;
  background-color: #002a56;
  padding: 2rem;
  border-radius: 0.8rem;
}

.astilleros-container > div:hover {
  transform: scale(1.02);
  box-shadow: 0px 0px 22px 0px #00a6ff;
}

.astilleros-container img {
  width: 12rem;
  height: 8rem;
  aspect-ratio: 1;
  object-fit: contain;
}

.astilleros-foto img {
  width: 100%;
  max-width: 100%;
  border-radius: 1rem;
  object-fit: cover;
}

.volver {
  color: white;
  font-size: 1.2rem;
  text-decoration: none;
  display: block;
}

.astillero1 {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.astillero1 h2 {
  font-size: 2.2rem;
}

/*---------------------SIMULADOR---------------------------*/
.simulador-contenedor {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.simulador-contenedor .titulos {
  text-align: center;
}

.simulador-contenedor h4 {
  color: #00a6ff;
  font-weight: 500;
  font-size: 1.1rem;
}

.simulador-dificultad {
  width: 100%;
}

.simulador-dificultad div {
  display: flex;
  justify-content: space-between;
}

.simulador-dificultad input {
  margin-right: 0.5rem;
  width: 2rem;
}

.simulador-dificultad input[type="radio"] {
  accent-color: #00a6ff;
}

/*---------------------GIF SIMULADOR---------------------------*/
.gif-container {
  width: 100%;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.gif {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.gif-volver {
  position: fixed;
  top: 15px;
  left: 20px;
  font-size: 32px;
  color: #f5f7f9;
  background-color: #00a6ff27;
  padding: 5px 10px;
  border-radius: 5px;
  text-decoration: none;
  z-index: 999;
}

/* Versión móvil: rotamos el GIF */
@media (max-width: 768px) {
  .gif {
    transform: rotate(270deg);
    width: 100vh;
    height: 100vw;
    object-fit: contain;
  }
}

/* ----------------MEDIA QUERIES---------------- */
@media screen and (min-width: 975px) {
  .menu {
    display: none;
  }

  #menu-toggle {
    display: none;
  }

  .menu-container ul {
    display: flex;
    flex-direction: row;
    align-items: center;
    position: static;
    padding: 0;
    background-color: none;
    width: auto;
    border-radius: 0;
  }
}
