.admin-panel {
    max-width: 800px;
    margin: 20px auto;
    padding: 20px;
    background-color: #f5f5f5;
    border-radius: 8px;
}

#newsForm {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

input, textarea {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

textarea {
    min-height: 150px;
}

button {
    padding: 10px 20px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

button:hover {
    background-color: #0056b3;
}

.news-section {
    max-width: 800px;
    margin: 100px auto 20px; /* Añadido margen superior de 100px */
    padding: 0 20px;
    flex: 1; /* Hace que esta sección ocupe el espacio disponible */
}

.news-section h2 {
    font-size: 2.5rem;
    color: #2563eb;
    text-align: center;
    margin-bottom: 2rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.news-item {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    padding: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e5e7eb;
}

.news-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.news-item h3 {
    color: #1e40af;
    font-size: 1.5rem;
    margin: 1rem 0;
    font-weight: 600;
    line-height: 1.4;
}

.news-item p {
    color: #4b5563;
    line-height: 1.8;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.news-item .timestamp {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
    color: #6b7280;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.news-item .timestamp span:first-child {
    color: #4b5563;
    font-weight: 600;
}

.news-item.destacado {
    border: 2px solid #2563eb;
    background-color: #f0f7ff;
    position: relative;
}

.news-item.destacado::before {
    content: "⭐ Destacado";
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #2563eb;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
}

.form-actions {
    display: flex;
    gap: 10px;
}

.admin-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.delete-btn {
    background-color: #dc3545;
}

.delete-btn:hover {
    background-color: #c82333;
}

.news-item img {
    display: block;
    margin-bottom: 15px;
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.news-item iframe {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.news-item a {
    display: inline-block;
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    background-color: #f0f7ff;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.news-item a:hover {
    background-color: #dbeafe;
    transform: translateY(-2px);
}

.media-inputs {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 15px;
}

.media-input {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.media-input label {
    font-weight: bold;
    color: #333;
}

#youtubePreview {
    margin-top: 10px;
    max-width: 100%;
}

.link-inputs {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.link-inputs input {
    flex: 1;
}

.destacado-input {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0;
}

.destacado-input input[type="checkbox"] {
    width: 20px;
    height: 20px;
}

/* Añadir estos estilos para el layout principal */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Asegurar que el footer se mantenga al final */
.footer {
    margin-top: auto; /* Empuja el footer al final */
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .news-section {
        margin-top: 80px;
        padding: 0 15px;
    }

    .news-section h2 {
        font-size: 2rem;
        margin-bottom: 1.5rem;
    }

    .news-item {
        padding: 1.25rem;
        margin-bottom: 1.5rem;
    }

    .news-item h3 {
        font-size: 1.25rem;
    }

    .news-item p {
        font-size: 1rem;
        line-height: 1.6;
    }

    .news-item iframe {
        height: 250px;
    }
}

@media (max-width: 480px) {
    .news-section h2 {
        font-size: 1.75rem;
    }

    .news-item {
        padding: 1rem;
        margin-bottom: 1rem;
    }

    .news-item iframe {
        height: 200px;
    }

    .news-item .timestamp {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
}
