/* CSS Global - RepoExterno PWA (Estilo Apple Glass) */

:root {
    --primary-blue: #007aff;
    --primary-blue-hover: #005ad3;
    --danger-red: #e74c3c;
    --danger-red-hover: #c0392b;
    --bg-light: #f3f4f6;
    --text-main: #2b2b2b;
    --text-dark: #111;
    --glass-bg: rgba(255, 255, 255, 0.65);
    --glass-border: rgba(255, 255, 255, 0.55);
    --glass-shadow: rgba(0, 0, 0, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(180deg, #ffffff 0%, var(--bg-light) 100%);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

/* ===========================
   NAVEGACIÓN GLASS
   =========================== */
header {
    padding: 1.8em 1em 1em;
    text-align: center;
}

header h1 {
    font-size: clamp(24px, 4vw, 36px);
    font-weight: 700;
    color: var(--text-dark);
}

header p {
    margin-top: 4px;
    font-size: 14px;
    opacity: 0.6;
}

nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1180px;
    margin: 1.2em auto;
    padding: 1em 2em;
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 4px 26px var(--glass-shadow);
    position: relative;
    z-index: 2000;
}

nav .logo img {
    height: 42px;
    filter: drop-shadow(0px 2px 3px rgba(0, 0, 0, 0.18));
}

nav ul {
    list-style: none;
    display: flex;
    gap: 2em;
}

nav ul li a {
    text-decoration: none;
    color: #222;
    font-weight: 500;
    padding: 0.3em 0;
    transition: all .25s ease;
    position: relative;
}

nav ul li a:hover,
nav ul li a.active {
    color: var(--primary-blue);
}

nav ul li a.active {
    font-weight: 600;
}

nav ul li a.active::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -6px;
    height: 3px;
    width: 100%;
    background: var(--primary-blue);
    border-radius: 10px;
}

.menu-icon {
    display: none;
    font-size: 2em;
    cursor: pointer;
    color: var(--primary-blue);
}

/* ===========================
   CONTENEDORES
   =========================== */
.container {
    flex: 1;
    max-width: 1100px;
    width: 100%;
    margin: 1em auto 3em;
    background: #ffffff;
    /* Fondo sólido por compatibilidad */
    background: rgba(255, 255, 255, 0.85);
    /* Fondo glass más opaco */
    border-radius: 26px;
    padding: 2.5em;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.07);
    position: relative;
    z-index: 10;
}

@supports (backdrop-filter: blur(10px)) {
    .container {
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
    }
}

/* ===========================
   FORMULARIOS
   =========================== */
form label {
    font-weight: 600;
    margin-bottom: 6px;
    display: block;
    color: #333;
}

form input[type="text"],
form input[type="email"],
form input[type="password"],
form input[type="file"],
form textarea,
form select {
    width: 100%;
    padding: 12px;
    margin-bottom: 18px;
    border-radius: 14px;
    border: 1px solid #d1d1d1;
    background: rgba(255, 255, 255, 0.8);
    font-size: 16px;
    transition: border .25s ease, box-shadow .25s ease;
}

form input:focus,
form textarea:focus,
form select:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, .2);
}

button {
    width: 100%;
    padding: 14px;
    background: var(--primary-blue);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 3px 12px rgba(0, 122, 255, .25);
    transition: background .25s, box-shadow .25s;
}

button:hover {
    background: var(--primary-blue-hover);
    box-shadow: 0 6px 16px rgba(0, 122, 255, .35);
}

/* ===========================
   FOOTER
   =========================== */
footer {
    text-align: center;
    padding: 1.5em;
    font-size: 14px;
    opacity: 0.6;
}

/* ===========================
   MOBILE
   =========================== */
@media (max-width: 768px) {
    nav {
        padding: 1em 1.4em;
    }

    nav ul {
        display: none;
        flex-direction: column;
        gap: 1.2em;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-radius: 18px;
        padding: 1.2em 1.5em;
        position: absolute;
        top: 80px;
        right: 20px;
        width: 240px;
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
        border: 1px solid rgba(255, 255, 255, 0.7);
        z-index: 3000;
        opacity: 0;
        transform: translateY(10px);
        transition: opacity .25s ease, transform .25s ease;
    }

    nav ul.active {
        display: flex;
        opacity: 1;
        transform: translateY(0);
    }

    .menu-icon {
        display: block;
    }

    .container {
        padding: 1.5em;
        margin: 1em;
        width: auto;
    }
}