/* ============================================================
   VARIABLES GLOBALES
============================================================ */
:root {
    --primary-color: #1A365D;
    --secondary-color: #2A9D90;
    --text-color: #2E2E2E;
    --bg-light: #F5F7FA;
    --bg-white: #FFFFFF;
    --border-light: rgba(26, 54, 93, 0.08);
    --shadow: rgba(26, 54, 93, 0.12);
    --shadow-hover: rgba(26, 54, 93, 0.18);
    --font-primary: 'Poppins', sans-serif;
    --font-size-base: 16px;
    --line-height-base: 1.6;
    --btn-radius: 14px;
}

/* ============================================================
   RESET Y BODY
============================================================ */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-primary);
    font-size: var(--font-size-base);
    color: var(--text-color);
    background-color: var(--bg-light);
    line-height: var(--line-height-base);
}

/* ============================================================
   CONTENEDOR GENERAL FORMULARIO
============================================================ */
.noticias-form-container {
    max-width: 920px;
    margin: 2rem auto;
    padding: 2.8rem;
    background: var(--bg-white);
    border-radius: 22px;
    box-shadow: 0 10px 35px rgba(0,0,0,0.10);
    border: 1px solid #e7e7e7;
    animation: fadeIn 0.5s ease-out;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.noticias-form-container:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 38px var(--shadow-hover);
}

/* ============================================================
   TITULOS
============================================================ */
.noticias-title {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 2rem;
    position: relative;
}

.noticias-title::after {
    content: "";
    display: block;
    width: 80px;
    height: 4px;
    background: var(--secondary-color);
    margin: 0.7rem auto 0;
    border-radius: 10px;
}

/* ============================================================
   SECCIONES
============================================================ */
.noticias-form-section {
    margin-bottom: 2.5rem;
    padding: 1.6rem 1.8rem;
    background: #fafafa;
    border-radius: 18px;
    border: 1px solid #e3e3e3;
}

.noticias-form-section h4 {
    font-size: 1.28rem;
    font-weight: 600;
    margin-bottom: 1.2rem;
    color: var(--primary-color);
    border-left: 5px solid var(--secondary-color);
    padding-left: 12px;
}

/* ============================================================
   INPUTS, TEXTAREAS Y SELECTS
============================================================ */
.noticias-form-control {
    width: 100%;
    padding: 1rem 1.2rem;
    border-radius: 14px;
    border: 1px solid var(--border-light);
    background: var(--bg-white);
    font-size: 1rem;
    transition: 0.25s ease;
}

.noticias-form-control:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 10px rgba(42,157,144,0.25);
    background: var(--bg-white);
    outline: none;
}

/* ============================================================
   PREVIEW DE IMAGEN
============================================================ */
.noticias-preview-img {
    width: 160px;
    border-radius: 14px;
    margin-top: 0.8rem;
    box-shadow: 0 4px 18px rgba(0,0,0,0.15);
    transition: transform 0.3s, box-shadow 0.3s;
}

.noticias-preview-img:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 22px rgba(0,0,0,0.18);
}

/* ============================================================
   BOTONES Y ACCIONES
============================================================ */
.noticias-form-actions {
    margin-top: 2.5rem;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    flex-wrap: wrap;
}

.noticias-form-actions .btn {
    padding: 0.85rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--btn-radius);
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.noticias-form-actions .btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #fff;
    border: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.noticias-form-actions .btn-primary:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 25px rgba(0,0,0,0.18);
}

.noticias-form-actions .btn-secondary {
    background: #e5e5e5;
    color: #333;
    border: none;
}

.noticias-form-actions .btn-secondary:hover {
    background: #d6d6d6;
    color: #222;
    text-decoration: none !important;
}

/* ============================================================
   MENSAJES FLASH
============================================================ */
.noticias-alert {
    font-size: 0.95rem;
    border-radius: 14px !important;
    padding: 1rem 1.4rem;
    margin-bottom: 1.5rem;
    animation: fadeIn 0.5s ease-out;
}

/* ============================================================
   ANIMACIONES
============================================================ */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   RESPONSIVE
============================================================ */
@media (max-width: 600px) {
    .noticias-form-container {
        padding: 1.6rem;
    }

    .noticias-form-actions {
        flex-direction: column;
        gap: 0.8rem;
    }

    .noticias-form-actions .btn {
        width: 100%;
        text-align: center;
    }

    .noticias-preview-img {
        width: 100%;
        max-width: 140px;
        margin: 0.6rem 0;
    }
}
