/* Mediasite — LIVVO Hotels
   Brand system derived from the LIVVO Corporate Identity Manual (2024):
   turquoise #2ED8C3 as the signature colour, charcoal/black grounds, the crown
   mark, and the type pairing used on livvohotels.com (Inter + Libre Baskerville).
   Fully self-contained — fonts are self-hosted, no CDNs (GoDaddy-friendly). */

/* ---------- Fonts (same files shipped on livvohotels.com) ---------- */
@font-face { font-family: "Inter"; src: url("fonts/inter-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/inter-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/inter-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/inter-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Libre Baskerville"; src: url("fonts/libre-baskerville-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Libre Baskerville"; src: url("fonts/libre-baskerville-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
    /* Brand palette (Identity Manual) */
    --brand: #2ed8c3;          /* Pantone 333C — signature turquoise */
    --brand-deep: #12a291;     /* darker teal for hover on solids */
    --brand-ink: #0c6f63;      /* teal for text/labels on light */
    --brand-soft: #d8f6f1;     /* pale turquoise wash */
    --gold: #dbc079;           /* Tinta dorada (submarca Urban) */
    --blue: #508bb6;           /* Pantone P110-13C (submarca Apartments) */
    --magenta: #8c0352;        /* Pantone 235C (submarca Hotels) */

    /* Neutrals — cool, slight teal bias (chosen, not defaulted) */
    --ink: #1b1e1e;            /* charcoal from the manual cover */
    --ink-strong: #101313;
    --bg: #f3f6f6;
    --surface: #ffffff;
    --surface-2: #eef3f3;
    --line: #e1e8e8;
    --line-strong: #ccd6d6;
    --muted: #5e6a6a;

    --shadow: 0 1px 2px rgba(16, 19, 19, .05), 0 8px 24px rgba(16, 19, 19, .07);
    --shadow-hover: 0 2px 4px rgba(16, 19, 19, .06), 0 16px 40px rgba(16, 19, 19, .14);
    --radius: 14px;
    --radius-sm: 10px;
    --sans: "Inter", -apple-system, system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --serif: "Libre Baskerville", Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    background: var(--bg);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 15px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
svg { width: 100%; height: 100%; display: block; }

/* ---------- Top bar (charcoal, brand cover feel) ---------- */
.topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    background: var(--ink);
    color: #fff;
    border-bottom: 3px solid var(--brand);
}
.topbar-inner {
    max-width: 1320px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 16px; min-width: 0; }
.brand-link {
    color: rgba(255, 255, 255, .7);
    font-size: 12px; letter-spacing: .02em;
    white-space: nowrap;
    padding: 6px 12px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 999px;
    transition: color .15s, border-color .15s, background .15s;
}
.brand-link:hover { color: #fff; border-color: var(--brand); }

/* Official LIVVO logo (used as-is) + Mediasite label */
.logo { display: flex; align-items: center; gap: 16px; }
.brand-logo { height: 58px; width: auto; display: block; flex: 0 0 auto; }
.brand-divider { width: 1px; height: 40px; background: rgba(255, 255, 255, .22); border-radius: 1px; flex: 0 0 auto; }
.brand-titles { min-width: 0; }
.brand-title {
    margin: 0;
    font-family: var(--serif);
    font-weight: 700;
    font-size: 22px;
    line-height: 1.05;
    color: #fff;
}
.brand-subtitle {
    margin: 5px 0 0;
    font-size: 11px;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .55);
}

.topbar-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.search { position: relative; }
.search-icon {
    position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
    width: 17px; height: 17px; color: rgba(255, 255, 255, .55);
}
#search {
    width: 300px; max-width: 60vw;
    padding: 10px 14px 10px 38px;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 999px;
    background: rgba(255, 255, 255, .08);
    font: inherit; color: #fff;
    transition: border-color .15s, box-shadow .15s, background .15s;
}
#search::placeholder { color: rgba(255, 255, 255, .5); }
#search:focus {
    outline: none;
    border-color: var(--brand);
    background: rgba(255, 255, 255, .14);
    box-shadow: 0 0 0 3px rgba(46, 216, 195, .25);
}

.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 16px; border-radius: 999px;
    font-weight: 600; font-size: 14px;
    border: 1px solid transparent; cursor: pointer;
    transition: transform .12s, box-shadow .15s, background .15s;
}
.btn svg { width: 17px; height: 17px; }
/* Brand signature combo: turquoise fill + charcoal ink */
.btn-primary { background: var(--brand); color: var(--ink-strong); box-shadow: var(--shadow); }
.btn-primary:hover { background: #4ee2cf; transform: translateY(-1px); }
.btn-meta { font-weight: 500; opacity: .7; font-size: 12px; }

/* ---------- Layout ---------- */
.layout {
    max-width: 1320px; margin: 0 auto; padding: 28px 24px;
    display: grid; grid-template-columns: 260px 1fr; gap: 28px; align-items: start;
}

/* ---------- Sidebar / tree ---------- */
.sidebar {
    position: sticky; top: 100px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 14px;
    box-shadow: var(--shadow);
    max-height: calc(100vh - 124px);
    overflow: auto;
}
.sidebar-head {
    display: flex; align-items: center; justify-content: space-between;
    font-size: 11px; text-transform: uppercase; letter-spacing: .16em;
    color: var(--muted); padding: 4px 8px 12px;
}
.sidebar-close { display: none; background: none; border: 0; font-size: 22px; line-height: 1; color: var(--muted); cursor: pointer; }

.tree-nav { font-size: 14px; }
.tree-root, .tree-link {
    display: flex; align-items: center; gap: 9px;
    padding: 8px 10px; border-radius: var(--radius-sm);
    color: var(--ink); border-left: 2px solid transparent;
    transition: background .12s, color .12s, border-color .12s;
}
.tree-root { font-weight: 600; margin-bottom: 4px; }
.tree-root:hover, .tree-link:hover { background: var(--surface-2); }
.tree-root.is-active, .tree-link.is-active {
    background: var(--brand-soft); color: var(--brand-ink);
    border-left-color: var(--brand);
}
.tree-icon { width: 17px; height: 17px; flex: 0 0 auto; color: var(--brand-ink); }
.tree-root.is-active .tree-icon, .tree-link.is-active .tree-icon { color: var(--brand-ink); }
.tree-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tree { list-style: none; margin: 0; padding-left: 14px; }
.tree .tree { display: none; }
.tree-item.is-open > .tree { display: block; }
.tree-empty { color: var(--muted); font-size: 13px; padding: 8px 10px; }

/* ---------- Content ---------- */
.content { min-width: 0; }
.content-head { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.menu-toggle {
    display: none; width: 40px; height: 40px; padding: 9px;
    border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
    background: var(--surface); color: var(--ink); cursor: pointer;
}
.breadcrumbs { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; }
.crumb { color: var(--muted); transition: color .12s; }
.crumb:hover { color: var(--brand-ink); }
.crumb-current { color: var(--ink); font-weight: 600; }
.crumb-sep { color: var(--line-strong); }

.section { margin-bottom: 36px; }
.section-title { display: flex; align-items: baseline; gap: 10px; margin: 0 0 16px; }
.section-title h2 { margin: 0; font-family: var(--serif); font-size: 19px; font-weight: 700; letter-spacing: .01em; }
.section-meta {
    font-size: 12px; color: var(--brand-ink);
    background: var(--brand-soft); border: 1px solid transparent;
    padding: 1px 10px; border-radius: 999px; font-weight: 600;
}

/* ---------- Grid & cards ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px; }
.card {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    overflow: hidden; box-shadow: var(--shadow);
    display: flex; flex-direction: column;
    transition: transform .14s, box-shadow .16s, border-color .16s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); border-color: var(--brand); }

.card-thumb {
    position: relative; aspect-ratio: 4 / 3;
    background: var(--surface-2);
    display: flex; align-items: center; justify-content: center;
    color: var(--brand-ink); overflow: hidden;
}
.card-thumb img, .card-thumb .photo { width: 100%; height: 100%; object-fit: cover; }
.thumb-icon { width: 44px; height: 44px; opacity: .9; }
.thumb-ext {
    position: absolute; bottom: 10px; right: 10px;
    font-size: 11px; font-weight: 700; letter-spacing: .04em;
    color: var(--ink); background: rgba(255, 255, 255, .92);
    padding: 2px 7px; border-radius: 6px; border: 1px solid var(--line);
}

/* Folder cards get the crown-teal treatment */
.card-folder .card-thumb { background: linear-gradient(160deg, #eafaf7, #d8f6f1); color: var(--brand-ink); }
.thumb-folder svg { width: 52px; height: 52px; }

/* Category tints on non-thumbnail files (mirror the submark palette) */
.cat-pdf .thumb-icon, .cat-doc .thumb-icon { color: var(--magenta); }
.cat-sheet .thumb-icon { color: var(--brand-ink); }
.cat-video .thumb-icon, .cat-audio .thumb-icon { color: var(--blue); }
.cat-archive .thumb-icon { color: var(--gold); }
.cat-slides .thumb-icon { color: var(--magenta); }

.card-body { padding: 12px 14px 4px; flex: 1 1 auto; }
.card-name { display: block; font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-meta { display: block; margin-top: 3px; font-size: 12px; color: var(--muted); }

.card-actions { display: flex; gap: 8px; padding: 10px 14px 14px; }
.action {
    flex: 1; text-align: center; padding: 7px 10px;
    font-size: 13px; font-weight: 600; border-radius: var(--radius-sm);
    border: 1px solid var(--line-strong); color: var(--ink);
    transition: background .12s, color .12s, border-color .12s;
}
.action:hover { background: var(--surface-2); border-color: var(--brand); }
.action-download { background: var(--brand); color: var(--ink-strong); border-color: var(--brand); }
.action-download:hover { background: #4ee2cf; }
.card-folder { cursor: pointer; }

/* ---------- Empty & search ---------- */
.empty-state {
    text-align: center; padding: 70px 20px; color: var(--muted);
    background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--radius);
}
.empty-icon { width: 56px; height: 56px; margin: 0 auto 14px; color: var(--brand); opacity: .85; }
.empty-state h2 { margin: 0 0 8px; font-family: var(--serif); color: var(--ink); }
.empty-state code { background: var(--brand-soft); color: var(--brand-ink); padding: 2px 6px; border-radius: 5px; }

.search-results { margin-bottom: 30px; }
.result-path { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.no-results { color: var(--muted); padding: 30px; text-align: center; }

/* ---------- Footer ---------- */
.footer {
    max-width: 1320px; margin: 8px auto 40px; padding: 20px 24px 0;
    border-top: 1px solid var(--line);
    display: flex; justify-content: space-between; gap: 12px;
    font-size: 12px; color: var(--muted); letter-spacing: .02em;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .layout { grid-template-columns: 1fr; }
    .menu-toggle { display: inline-flex; align-items: center; justify-content: center; }
    .sidebar {
        position: fixed; inset: 0 auto 0 0; z-index: 40;
        width: 82%; max-width: 320px; max-height: none;
        border-radius: 0; transform: translateX(-100%); transition: transform .22s ease;
    }
    .sidebar.is-visible { transform: translateX(0); }
    .sidebar-close { display: block; }
    body.sidebar-open::after { content: ""; position: fixed; inset: 0; background: rgba(16, 19, 19, .45); z-index: 39; }
}
@media (max-width: 560px) {
    .topbar-inner { padding: 12px 16px; }
    .brand-logo { height: 44px; }
    .brand-divider, .brand-titles { display: none; }
    #search { width: 180px; }
    .layout { padding: 16px; }
    .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
}
