/* perfil.css */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap');



body {
  margin: 0;
  background-color: rgba(250, 242, 235);
  font-family: 'Roboto', sans-serif;
  padding-top: 50px;
  /* ajusta según la altura real del header */
  padding-left: 30px;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
}


.contenedor {
  width: 1100px;
  max-width: 95%;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.arriba {
  width: 100%;
  height: 100px;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.box1,
.box2,
.caja {
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.box1,
.box2 {
  height: 100px;
}

.abajo {
  display: flex;
  gap: 20px;
}

.caja {
  flex: 1;
  height: 424px;
}

img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* --- Versión Desktop --- */
.box1 {
  display: none;
}

/* oculto fondo1 */
.box2 {
  display: block;
}

/* muestro fondo2 */



/* HEADER */
.header {
  position: fixed;
  /* Lo deja fijo en la parte superior */
  top: 0;
  /* pegado al borde superior */
  left: 0;
  width: 100%;
  /* que ocupe todo el ancho */
  z-index: 1000;
  /* para que quede por encima del contenido */

  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: #382e27;
  padding: 15px 0px;
  /* espacio a los lados */
  height: 220px;
  /* altura exacta */
  box-sizing: border-box;
  /* para que el padding no rompa el ancho */
}



label {
  font-weight: 600;
  display: block;
  margin-top: 15px;
  color: #444;
}

input[type="email"],
input[type="password"],
input[type="text"] {
  width: 95%;
  padding: 12px;
  margin-top: 8px;
  border: 1px solid #ccc;
  border-radius: 10px;
  font-size: 15px;
  background-color: #fdfdfd;
}


.link {
  display: block;
  text-align: center;
  margin-top: 15px;
  color: #f27c41;
  text-decoration: none;
  font-weight: 600;
}

.link:hover {
  text-decoration: underline;
}

.error {
  color: red;
  font-size: 14px;
  margin-top: 5px;
  text-align: center;
}

/* ✅ Estilo para mensaje de registro */
.message {
  padding: 14px 16px;
  margin: 20px 0;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 500;
  text-align: center;
  display: none;
  /* se muestra desde JS */
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.message.success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.message.error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}







/* ✅ inicio y cerrar session */

.btn-logout {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  cursor: pointer;
}


.menu-link {
  font-family: 'Lato', sans-serif;
  margin-right: 15px;
  color: rgb(242, 138, 70);
  text-decoration: none;
  text-underline-offset: 5px;
  /* distancia del subrayado */
  font-size: 16px;
  text-align: center;
}

.menu-link:hover {
  text-decoration: underline;
  color: #ffffff86;
}

.logo-container {
  text-align: center;

}

/* ✅ La Comunidad */
.logo-text {
  font-family: 'Raleway', sans-serif;
  text-align: center;
  font-size: 26px;
  color: rgb(242, 138, 70);
  display: block;
  margin-top: 30px;
}


/* ✅ LOGO DCO */
.logo-dco {
  height: 60px;
  margin-top: 15px;
  margin-bottom: 15px;
}


/* ✅ Alineacion de La comunidad , inicio , cerrar sesion , DCO y redes */
.nav-container {
  display: flex;
  align-items: center;
  /* Centra verticalmente los items */
  justify-content: center;
  gap: 20px;
  height: 40px;
  /* Ajusta altura fija para alinear */
}


.nav-right {
  display: flex;
  align-items: center;
}

.nav-right .menu-link {
  line-height: 40px;
}

.social-icon {
  width: 28px;
  /* aquí ajustas el tamaño del logo */
  height: auto;
  margin-left: 20px;
  transition: filter 0.3s ease;
  cursor: pointer;
}

.social-icon:hover {
  filter: brightness(0) invert(1);
}

/* CONTENEDOR PERFIL */
.container {
  padding: 20px;
}

.card {
  background-color: rgb(255, 255, 255);
  border-radius: 12px;
  position: absolute;
  /* o fixed si querés que siga en la pantalla al hacer scroll */
  top: 150px;
  /* distancia desde arriba */
  left: 50px;
  /* distancia desde la izquierda */
  padding: 15px;
  width: 300px;
  border: 1px solid #f27c418f;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25);
  min-height: 450px;

  overflow-y: auto;
  z-index: 1010;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;

  /* 🔹 Estado inicial oculto */
  opacity: 0;
  transform: translateY(50px);
  pointer-events: none;
  transition: all 0.4s ease;

}

.card {
  opacity: 0;
  transform: translateY(50px);
  pointer-events: none;
  transition: all 0.4s ease;
}

.card.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  /* 🔹 Animación al aparecer */
  animation: slideIn 0.8s ease-out;
}

/* 🔹 Definición de la animación */
@keyframes slideIn {
  0% {
    transform: translateY(50px);
    /* empieza más abajo */
    opacity: 0;
    /* invisible */
  }

  100% {
    transform: translateY(0);
    /* posición final */
    opacity: 1;
    /* visible */
  }
}

.profile-header {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

.avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  margin-right: 10px;
}

.username {
  font-weight: bold;
  font-size: 16px;
  color: #6E6E6E;
}


.profile-info p {
  font-size: 14px;
  margin: 12px 0 0 0;
  color: #6E6E6E;
}

.profile-actions {
  display: flex;
  justify-content: space-between;
  /* reparte los botones */
  align-items: center;
  gap: 8px;
  /* espacio entre ellos */
  margin-top: 15px;
  padding: 4px;
  background: #fafafa;
  border-radius: 10px;
  width: 100%;
  /* ocupa ancho del card */
  box-sizing: border-box;
}

.profile-actions button {
  flex: 1;
  /* 🔹 cada botón ocupa el mismo espacio dentro de los 300px */
  min-width: 0;
  /* 🔹 permite que se achiquen */
  height: 44px;
  border-radius: 8px;
  background: rgb(255, 255, 255);
  border: 1px solid #ddd;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}


.profile-actions button:hover {

  transform: scale(1.1);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.profile-actions img {
  width: 40px;
  /* se adapta al botón, no al revés */
  height: auto;
  object-fit: contain;
}

/* CONTENEDOR de username, avatar,emal */
.user-box {
  position: absolute;
  /* Para poder ubicarlo en cualquier lugar de la pantalla */
  top: 70%;
  /* Lo baja hasta la mitad vertical */
  right: 40px;
  /* Margen izquierdo fijo */
  transform: translateY(-50%);
  /* Lo centra verticalmente */
  display: flex;
  align-items: center;
  gap: 10px;
  background-color: rgba(255, 255, 255, 0.404);
  /* O el color que uses */
  padding: 10px 15px;
  border-radius: 10px;

}

.user-box:hover {
  background-color: rgba(255, 255, 255, 0.3);
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.user-info {
  display: flex;
  flex-direction: column;
  font-size: 14px;
  color: white;
}

.user-info small {
  font-size: 12px;
  color: #ffe5d0;
}

/* menu card */
.menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
  /* separación entre enlaces */
}

.menu a {
  font-family: 'Lato', sans-serif;
  display: block;
  padding: 12px 16px;
  background-color: #f5f5f5;
  border-radius: 6px;
  text-decoration: none;
  font-size: 13px;
  color: #333;
  font-weight: lighter;
  transition: background-color 0.2s, transform 0.1s;
}

.menu a:hover {
  background-color: #e0e0e0;
  transform: translateY(-1px);
}

.menu a i {
  font-size: 16px;
  color: rgb(66, 64, 63);
  /* color del icono */
  margin: 5px;
}




/************************************************Responsive******************************/
/* HEADER RESPONSIVO */



/* Ocultar avatar de user-box info en móvil */
@media screen and (max-width: 768px) {

  /* header fijo arriba */
  header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 150px;
    /* altura real del header */
    background: #fff;
    /* o el color que uses */
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
  }


  body {
    margin: 0;
    padding-top: 150px;
    /* igual al height del header */
    -webkit-text-size-adjust: 100%;
  }

  /* logo */
  header img {
    max-width: 150px;
    /* ajusta al tamaño que quieras */
    height: auto;
    display: block;
  }

  .user-box {
    right: 15px;
    top: 40px;
    transform: none;

    margin-right: 5px;
    background-color: rgba(255, 255, 255, 0.404);
    padding: 10px 10px;
    border-radius: 20px;
  }

  .user-box:hover {
    background-color: rgba(255, 255, 255, 0.2);
  }

  .user-info {
    display: none;
    /* ocultar username y email */
  }

  .logo-container {
    align-items: flex-start;
    justify-content: flex-start;
    margin: 0;

  }

  .logo-text {
    font-size: 22px;
    margin-top: 10px;
  }

  .logo-dco {
    height: 50px;
    margin-bottom: 5px;

  }

  /* Menú principal en móvil */
  /* 🔹 Menú (Inicio, Cerrar Sesión) abajo izquierda */
  .nav-container {
    flex-direction: row;
    justify-content: flex-start;
    gap: 20px;
    margin-top: auto;
    /* se pega al fondo del header */
    width: 100%;
  }

  .nav-left {
    display: flex;
    flex-direction: row;
    margin-left: 15px;
    gap: 0px;
  }

  /* 🔹 Redes alineadas con menú */
  .nav-right {
    margin-left: auto;
    /* se empujan a la derecha */
    gap: 10px;
    margin-right: 15px;
  }

  .social-icon {
    width: 26px;
    margin: 0 5px;
  }

  /* Mostrar menú desplegable al abrir */
  .header.menu-open .nav-left {
    display: flex;
    flex-direction: column;
    margin-top: 10px;
  }



  .card {
    background-color: rgb(255, 255, 255);
    border-radius: 12px;
    position: absolute;
    /* o fixed si querés que siga en la pantalla al hacer scroll */
    top: 230px;
    /* distancia desde arriba */

    /* distancia desde la izquierda */
    padding: 15px;
    width: 300px;
    border: 1px solid #f27c418f;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25);
    overflow-y: auto;
    z-index: 1010;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;

    /* 🔹 Estado inicial oculto */
    opacity: 0;
    transform: translateY(50px);
    pointer-events: none;
    transition: all 0.4s ease;
    left: 25px;
    /* 🔹 la acercás al borde izquierdo */
    right: auto;
    /* asegurás que no quede centrada */

  }

 .contenedor {
    width: 100%;        /* 🔹 ocupa todo el ancho */
    margin: 0;          /* 🔹 eliminamos margin-left:30px */
    padding: 0 10px;    /* 🔹 si querés algo de separación interna */
    box-sizing: border-box;
  }

  .arriba {
    width: 100%;
    height: auto;
    box-shadow: none;
    margin-top: 50px; /* espacio debajo del header */
  }

  .box1 {
    display: block;
    width: 100%;        /* 🔹 100% del contenedor */
    height: auto;       /* mejor que fijar 100px si querés mantener proporción */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  }

  .abajo {
    flex-direction: column;
    width: 100%;
  }

  .caja {
    width: 100%;        /* 🔹 igual que box1 */
    height: auto;       /* 🔹 dejá que se ajuste */
  }

  .caja img,
  .box1 img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
  }

  .box2 {
    display: none;
  }



}




/* Botón para abrir/cerrar menu en móvil */
.menu-toggle {
  display: none;
  position: absolute;
  top: 15px;
  left: 15px;
  font-size: 28px;
  color: white;
  cursor: pointer;
}

@media screen and (max-width: 768px) {
  .menu-toggle {
    display: block;
  }
}


/* --- Animación al aparecer --- */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Aplica animación a todas las cajas --- */


/* --- Efecto al pasar el mouse --- */
.caja img,
.box1 img,
.box2 img {
  transition: transform 0.4s ease;
}

.caja:hover img,
.box1:hover img,
.box2:hover img {
  transform: scale(1.05) translateY(5px);
}