:root {
    --color-1: rgba(104, 85, 224, 1);  /* Azul */
    --color-2: #4CAF50; /* verde */
    --color-3: orange;  /* naranja */
    
}


html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh; 
}


main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;  
    width: 100%;
    padding: 1rem; 
    box-sizing: border-box;
}


.leer {
    text-decoration: none; 
    font-size: 1.1rem; 
    font-weight: bold; 
    color: var(--color-1);
    transition: color 0.3s ease; 
}


.leer:hover {
    color: #005bb5; 
    text-decoration: underline; 
}



.header {
    display: flex;
    align-items: center; 
    width: 100%; 
    padding: 0; 
    margin: 0; 
    box-sizing: border-box; 
}

.header .logo {
 
    flex: 0 0 auto;
}


.search-bar {
    position: relative;
    max-width: 600px;
    width: 100%;
    margin-inline: 2rem;
    display: inline-block;

}

#search-li {
    width: 100%;
}



@media (max-width: 1450px) {

    .search-bar p{
        display:none;
    }
    .search-bar img{
        margin: 0;
    }
}

.search-bar input {
    width: 100%;
    padding: 0.6rem 1rem;
    border: 2px solid #ddd;
    border-radius: 50px;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.search-bar input:focus {
    border-color: var(--color-2);
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.3);
    outline: none;
}


.search-bar button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    padding: 0.5rem 1rem;
    background: var(--color-2);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
}

.search-bar p {
    color:white;
    font-weight: 600;
}

.search-bar button:hover {
    background: #45a049;
    transform: translateY(-50%) scale(1.05);
}

.search-bar button:focus {
    outline: none;
}


.nav {
    display: flex;
    width: 100%;
    justify-content: flex-end;
    align-items: center;
    margin-left: auto; 
    padding-inline: 2rem;

}



* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', system-ui, sans-serif;
}


.header {
    background: #1a1a1a;
    padding: 0.5rem 0;
    border-bottom: 2px solid var(--color-2);
    width: 100%;
}

.logo {
    height: 75px;
    margin-left: 2rem;
  
 
}

.search-logo {
    height: 17px;
    margin-right: 5px;
}

#buscarBtn {
  display: flex;
  justify-content: center;
  align-items: center;

}

.post-images {
    max-height: 300px;
    height: 30vw;
    width: 100%;
    object-fit: cover;
    border-radius: 5px;
}

.post-article  {
    margin-top: 50px;
}

.nav ul {
    display: flex;
    width: 100%;
    justify-content: flex-end;
    gap: 2rem;
    list-style: none;
    
}

.nav li {
    display: flex;
    align-items: center; 
    gap: 0.5rem; 
}

.nav a {
    display: flex;
    align-items: center; 
    font-size: 1.1rem;
    font-weight: bold;
    color: #ffffff; 
}


.img-nav {
    width: 24px; 
    height: 24px;
    margin-right: 2px;
    
}

#user-img {
    width: 50px; 
    height: 50px;
    border-radius: 50px;
}

#user-img:hover{
    cursor: pointer;
}


.main-content {
    width: 100%;
    max-width: 1000px; 
    margin: 0 auto; 
}

.featured-article {

    padding: 1.5rem;
}


#title-h1{
    width: 90%;
    color: var(--color-1);
    margin-bottom: 2rem;
    font-size: 3rem;
    margin-inline: 50px;
    letter-spacing: normal;

}
#title-id .verde { color: var(--color-2); }
#title-id .naranja { color: var(--color-3); }

.featured-article h2 {
    color: var(--color-1);
    margin-bottom: 1rem;
}


.featured-article a {
    text-decoration: none;
}

.noticias-containter {
	display: none;
}
pre {
    background: #f4f4f4;
    padding: 1rem;
    border-radius: 4px;
    overflow-x: auto;
}


.sidebar {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
}

.popular-topics ul {
    list-style: none;
    margin-top: 1rem;
}

.popular-topics a {
    color: var(--color-2);
    text-decoration: none;
}


.ad {
    margin: 2rem 0;
}

.ad-top {
    grid-column: 1 / -1;
    text-align: center;
}


.footer {
    background: #1a1a1a;
    color: white;
    padding: 2rem 0;
    text-align: center;
}

.footer a{
    text-decoration: underline;
    color: var(--color-3);
}

#menu-btn {
    display: none;
}




@media (max-width: 1300px) {
    .nav {
        display: none;
        position: absolute;
        top: 80px; /* Ajusta según la altura del header */
        left: 0;
        width: 100%;
        background: #1a1a1a;
        flex-direction: column;
        align-items: center;
        padding: 1rem 0;
    }
    
    .nav ul {
        display: flex;
        flex-direction: column;
        width: 100%;
        text-align: center;
        padding: 0;
    }
    
    .nav li {
        display: block;
        width: 100%;
        padding: 10px 0;
        border-bottom: 1px solid #333;
    }
    
    .nav a {
        color: white;
        text-decoration: none;
        display: block;
        width: 100%;
        padding: 10px;
    }
    
    .nav.show {
        display: flex;
    }
    
    .search-bar {
        width: 70vw;
        max-width: 400px;
    }

    .featured-article h2{
        font-size: 20px;
    }

    .featured-article p{
        font-size: 15px;
    }

    #menu-btn {
        display: block;
        background-color: transparent;
        border: none;
        color: white;
        font-size: large;
        margin-inline: 32px;
        cursor: pointer;
        
    }
	
    .main-content h1{
	font-size: 2rem;

    }

    #title-h1 {
	font-size: 2rem;

    }
    .header {
        justify-content: space-between;
    }

    .footer p{
        font-size: 12px;
    }

}
  




#noticias-destacadas {
    position: fixed; /* Fija la posición en el centro de la pantalla */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); /* Centrado exacto */
    background-color: rgba(255, 255, 255, 0.9); /* Fondo blanco con algo de opacidad */
    width: 80%; /* Puedes ajustar este valor según tus necesidades */
    max-width: 800px; /* Para limitar el tamaño máximo */
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    height: 80vh;
    display: none;
    overflow-y: auto;
}


.noticias-destacadas article {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ddd;
}

.noticias-destacadas img {
    width: 25%;
    height: auto;
    margin-right: 10px;
}

.noticias-destacadas h2 {
    font-size: 1rem;
    color: var(--color-1);
    margin-bottom: 10px;
}

.spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 4px solid #f3f3f3; /* Color de fondo */
    border-top: 4px solid #3498db; /* Color de la rueda */
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 2s linear infinite; /* Animación de giro */
}

/* Animación de giro para el spinner */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#spinner-home {
	display: none;
}

/* Estilo básico para el botón de cierre */

.cerrar-noticias {
    position: fixed;
    top: 10px;
    right: 10px;
    background: transparent;
    border: none;
    font-size: 30px;
    color: black;
    cursor: pointer;
}

.cerrar-noticias:hover {
    color: #f00; /* Rojo cuando el ratón pasa por encima */
}

/* Estilo para la sección de Licencia */
.licencia {
    font-family: 'Arial', sans-serif; /* Fuente neutral */
    font-size: 14px; /* Tamaño de fuente pequeño */
    font-style: italic; /* Cursiva */
    color: #777; /* Color gris suave para no llamar mucho la atención */
    background-color: #f8f8f8; /* Fondo muy suave para distinguirlo */
    padding: 20px; /* Espaciado interno */
    margin-top: 30px; /* Separación del contenido anterior */
    border-left: 3px solid #ddd; /* Línea sutil a la izquierda para un toque discreto */
    border-radius: 5px; /* Bordes redondeados */
    line-height: 1.5; /* Mejor legibilidad */
}

.licencia a {
    color: #333; /* Enlaces de color ligeramente más oscuro */
    text-decoration: none; /* Quitar subrayado */
}

.licencia a:hover {
    text-decoration: underline; /* Subrayado solo al pasar el cursor */
}



/* nav user data */

#user-data button {
  cursor: pointer;
  border: 0;
  border-radius: 4px;
  font-weight: 600;
  margin: 0 10px;
  width: 100px;
  padding: 10px 0;
  box-shadow: 0 0 20px rgba(104, 85, 224, 0.2);
  transition: 0.4s;
}

#login-btn {
  color: rgb(104, 85, 224);
  background-color: rgba(255, 255, 255, 1);
  border: 1px solid rgba(104, 85, 224, 1);
}

#reg-btn {
  color: white;
  background-color: rgba(104, 85, 224, 1);
}

@keyframes invert-login {
  0% {
    background-color: rgba(255, 255, 255, 1);
    color: rgb(104, 85, 224);
  }
  100% {
    background-color: var(--color-2);
    color: white;
  }
}

@keyframes invert-register {
  0% {
    background-color: rgba(104, 85, 224, 1);
    color: white;
  }
  100% {
    background-color: var(--color-3);
  }
}

#login-btn:hover {
  animation: invert-login 0.4s forwards;
}

#reg-btn:hover {
  animation: invert-register 0.4s forwards;
}


.enlace-perfil {
    color: var(--color-3)
}

.fecha-publicacion {
    color: black;
}