/* Metroflog-UICH - Estilos básicos + responsive */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.5;
    color: #333;
    background: #f5f0e8;
    min-height: 100vh;
}

/* ========== Header ========== */
header {
    width: 100%;
    background: #891c2e;
    color: #fff;
    padding: 1rem 1.5rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.header-top {
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.header-top h1 {
    font-size: 1.35rem;
    margin: 0;
    font-weight: 700;
    text-align: left;
}

.header-logos {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.header-logos .header-logo {
    display: block;
    height: 48px;
    width: auto;
    max-width: 120px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

header nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
}

header nav a {
    color: #fff;
    text-decoration: none;
    padding: 0.5rem 0.9rem;
    border-radius: 6px;
    transition: background 0.2s;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

header nav a:hover {
    background: rgba(255,255,255,0.2);
}

header nav a:active {
    background: rgba(255,255,255,0.3);
}

/* ========== Main ========== */
main {
    max-width: 720px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    width: 100%;
}

section {
    background: #fff;
    border-radius: 10px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

section h2 {
    margin-bottom: 0.75rem;
    color: #891c2e;
    font-size: 1.25rem;
}

section h3, section h4 {
    margin: 1rem 0 0.5rem;
    font-size: 1.1rem;
}

form label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 500;
}

form label.label-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-weight: normal;
}

form label.label-checkbox input[type="checkbox"] {
    margin-top: 0.2rem;
    width: auto;
    max-width: none;
}

form input[type="text"],
form input[type="password"],
form input[type="file"],
form textarea {
    display: block;
    width: 100%;
    max-width: 400px;
    margin-top: 0.25rem;
    padding: 0.6rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1rem;
    min-height: 44px;
}

form textarea {
    min-height: 80px;
    resize: vertical;
}

form input[type="color"] {
    width: 60px;
    height: 44px;
    padding: 2px;
    cursor: pointer;
}

form button,
button[type="submit"] {
    padding: 0.6rem 1.2rem;
    min-height: 44px;
    background: #891c2e;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
    -webkit-tap-highlight-color: transparent;
}

form button:hover,
button[type="submit"]:hover {
    background: #6d1624;
}

form button:active,
button[type="submit"]:active {
    background: #5a1220;
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
}

.form-actions .btn-register {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.2rem;
    min-height: 44px;
    background: #555;
    color: #fff;
    border-radius: 6px;
    font-size: 1rem;
    text-decoration: none;
    transition: background 0.2s;
}

.form-actions .btn-register:hover {
    background: #333;
}

a.btn-back {
    display: inline-block;
    padding: 0.5rem 1rem;
    margin-top: 1rem;
    background: #891c2e;
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.95rem;
}

a.btn-back:hover {
    background: #6d1624;
}

hr {
    border: none;
    border-top: 1px solid #e0e0e0;
    margin: 1rem 0;
}

ul {
    list-style: none;
}

ul li {
    padding: 0.6rem 0;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

ul li form {
    margin: 0;
}

ul li form button {
    min-height: 40px;
    padding: 0.4rem 0.8rem;
}

article {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    background: #fafafa;
}

article header {
    background: transparent;
    color: inherit;
    padding: 0;
    box-shadow: none;
    margin-bottom: 0.5rem;
}

article header strong {
    margin-right: 0.35rem;
}

article header small {
    color: #666;
    font-size: 0.9em;
}

article p {
    margin: 0.5rem 0;
}

article img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin-top: 0.5rem;
}

p {
    margin-bottom: 0.5rem;
}

a {
    color: #891c2e;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ========== Responsive: móvil ========== */
@media (max-width: 600px) {
    html {
        font-size: 15px;
    }

    header {
        padding: 0.75rem 1rem;
    }

    .header-top h1 {
        font-size: 1.15rem;
    }

    .header-logos .header-logo {
        height: 36px;
        max-width: 90px;
    }

    header nav {
        gap: 0.4rem 0.6rem;
    }

    header nav a {
        padding: 0.5rem 0.7rem;
        font-size: 0.95rem;
    }

    main {
        padding: 1rem;
    }

    section {
        padding: 1rem;
    }

    form input[type="text"],
    form input[type="password"],
    form input[type="file"],
    form textarea {
        max-width: 100%;
    }

    ul li {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    ul li a {
        flex: 1 1 100%;
    }
}

/* ========== Pantallas grandes ========== */
@media (min-width: 900px) {
    .header-top h1 {
        font-size: 1.5rem;
    }
}
