/*
Theme Name: MC Media
Description: Mobile Center Media Portal tema (pakeičia Joomla Helix3 šabloną). Veikia su įskiepiu MC Media Portal.
Version: 0.1.0
Text Domain: mc-media
*/

:root {
	--mc-blue: #428bca;
	--mc-blue-dark: #2a6496;
	--mc-cyan: #00aeef;
	--mc-text: #494a49;
	--mc-dark: #363636;
	--mc-bg-soft: #f8f8f8;
	--mc-line: #eaeaea;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
	margin: 0;
	font-family: 'Montserrat', -apple-system, 'Segoe UI', Arial, sans-serif;
	font-size: 13px;
	line-height: 1.6;
	color: #212529;
	background: #fff;
}
a { color: var(--mc-blue); text-decoration: none; }
a:hover { color: var(--mc-blue-dark); }
img { max-width: 100%; height: auto; }

.mc-wrap { min-height: 100%; display: flex; flex-direction: column; }
.mc-container { max-width: 1140px; width: 100%; margin: 0 auto; padding: 0 15px; }

/* TOP */
.mc-top { background: #494a49; color: #fff; height: 25px; font-size: 13px; font-weight: 600; line-height: 25px; }
.mc-top .mc-container { display: flex; justify-content: flex-end; gap: 25px; }
.mc-top a { color: #fff; }
.mc-top .mc-login { background: url('images/logout.png') left center no-repeat; padding-left: 18px; }

/* HEADER */
.mc-header { height: 90px; background: #fff; box-shadow: 0 3px 3px rgba(0,0,0,.05); position: relative; }
.mc-header .mc-container { display: flex; align-items: center; justify-content: space-between; height: 100%; }
.mc-logo img { display: block; width: 100px; height: auto; }
.mc-nav ul { list-style: none; display: flex; gap: 6px; margin: 0; padding: 0; }
.mc-nav a { display: block; padding: 0 12px; line-height: 90px; color: #000; text-transform: uppercase; font-size: 12px; letter-spacing: 1px; }
.mc-nav a:hover, .mc-nav .current a { color: var(--mc-blue); }
.mc-nav li:last-child a { color: var(--mc-blue); }

/* LAYOUT */
.mc-main { padding: 100px 0 60px; flex: 1 0 auto; }
.mc-main .mc-container { display: grid; grid-template-columns: 230px 1fr; gap: 40px; }
.mc-sidebar h3 { margin: 0 0 14px; font-size: 14px; font-weight: 600; text-transform: uppercase; color: #212529; }
.mc-tree, .mc-tree ul { list-style: none; margin: 0; padding: 0; }
.mc-tree ul { padding-left: 15px; display: none; }
.mc-tree li.open > ul { display: block; }
.mc-tree li { margin: 0; border: 0; }
.mc-tree a { color: #636363; line-height: 26px; font-size: 14px; }
.mc-tree a:hover { text-decoration: underline; }
.mc-tree .current > a, .mc-tree .current-ancestor > a { color: #1f1f1f; font-weight: 600; }
.mc-tree .toggle { display: inline-block; width: 12px; height: 10px; margin-right: 4px; cursor: pointer; background: url('images/pliusas.png') center no-repeat; }
.mc-tree li.open > .toggle { background-image: url('images/minusas.png'); }
.mc-tree .toggle-spacer { display: inline-block; width: 16px; }

.mc-content h1 { font-size: 16.25px; text-transform: uppercase; font-weight: 400; color: #b3b3b3; margin: 0 0 30px; }
.mc-subcats { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 25px; padding: 0; list-style: none; }
.mc-subcats a { display: block; padding: 8px 14px; background: var(--mc-bg-soft); border: 1px solid var(--mc-line); border-radius: 3px; color: var(--mc-text); }
.mc-subcats a:hover { border-color: var(--mc-blue); color: var(--mc-blue); }

/* FILE TABLE */
.mc-files { width: 100%; border-collapse: collapse; }
.mc-files th { text-align: left; font-weight: 400; font-size: 13px; padding: 15px 10px; color: #666; background: #fff; }
.mc-files td { padding: 15px 0 15px 10px; vertical-align: middle; font-size: 13px; color: #212529; }
.mc-files tbody tr:nth-child(odd) td { background: rgba(0,0,0,.05); }
.mc-files td:first-child { width: 62%; }
.mc-files .t { display: flex; align-items: center; gap: 10px; color: #999; word-break: break-word; }
.mc-ext { flex: 0 0 auto; display: block; width: 30px; height: 45px; background: center / contain no-repeat; }
.mc-ext span { display: none; }
.mc-files .act { width: 160px; padding-right: 10px; }
.mc-btn, .mc-preview { display: flex; align-items: center; justify-content: center; gap: 8px; width: 140px; height: 32px; margin: 0 0 8px; padding: 5px 15px; border-radius: 8px; font-size: 13px; }
.mc-btn { background: #006dcc; color: #fff !important; border: 0; }
.mc-btn:hover { background: #005cad; }
.mc-preview { background: #fafafa; color: #8f8f8f !important; }
.mc-preview:hover { background: #f0f0f0; }
.mc-btn svg, .mc-preview svg { width: 16px; height: 16px; fill: currentColor; }
.mc-empty { color: #888; }

/* HOME / CARDS */
.mc-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 15px; list-style: none; padding: 0; margin: 0; }
.mc-cards a { display: block; padding: 22px 16px; border: 1px solid var(--mc-line); border-radius: 3px; background: var(--mc-bg-soft); color: var(--mc-text); font-weight: 600; text-align: center; }
.mc-cards a:hover { border-color: var(--mc-blue); color: var(--mc-blue); }

/* FORMS (įkėlimo puslapis) */
.mc-content form label { font-weight: 600; }
.mc-content form input[type=text], .mc-content form select { width: 100%; max-width: 420px; padding: 8px; border: 1px solid #ccc; border-radius: 3px; }
.mc-content form button { padding: 9px 22px; background: var(--mc-blue); color: #fff; border: 1px solid #347cb9; border-radius: 3px; cursor: pointer; }
.mc-ok { color: #2e7d32; font-weight: 600; }
.mc-err { color: #c62828; font-weight: 600; }

/* FOOTER */
.mc-footer { flex-shrink: 0; background: #428bca; color: #fff; padding: 20px 0; font-size: 12px; line-height: 20.8px; text-align: center; }
.mc-footer a { color: rgba(255,255,255,.9); }
.mc-footer .mc-container { display: flex; align-items: center; justify-content: space-between; gap: 15px; flex-wrap: wrap; }
.mc-footer-logo img { width: 96px; height: 42px; display: block; }
.mc-footer-contacts { display: flex; flex: 1; justify-content: space-between; gap: 10px 25px; flex-wrap: wrap; }
.mc-footer-green img { width: 79px; height: auto; display: block; }

@media (max-width: 800px) {
	.mc-main .mc-container { grid-template-columns: 1fr; gap: 20px; }
	.mc-header { height: auto; }
	.mc-header .mc-container { flex-direction: column; padding-top: 10px; }
	.mc-nav ul { flex-wrap: wrap; justify-content: center; }
	.mc-nav a { line-height: 36px; }
	.mc-top .mc-container { gap: 12px; justify-content: space-between; white-space: nowrap; }
	.mc-top .mc-container > span { display: none; }
	.mc-files thead { display: none; }
	.mc-files td { display: block; }
}

/* --- Suderinimas su Joomla (pataisymai) --- */
.mc-container.mc-fluid { max-width: none; padding: 0 20px; }
.mc-header .mc-container.mc-fluid { padding: 0 15px; }
.mc-main { padding-top: 95px; }
.mc-content { padding-top: 55px; }
.mc-main .mc-container { grid-template-columns: 25% 1fr; gap: 0; }
.mc-content { padding-left: 12px; padding-right: 12px; }
.mc-tree ul { padding-left: 0; }
.mc-tree .current > a { font-weight: 400; color: #636363; }
.mc-tree .current-ancestor > a { font-weight: 600; color: #1f1f1f; }
.mc-files td:first-child { width: auto; }
.mc-files th:nth-child(2), .mc-files td:nth-child(2) { width: 90px; white-space: nowrap; }
.mc-files .act { width: 160px; padding: 5px 10px 5px 10px; }
.mc-btn { margin: 0 0 11px; }
.mc-preview { margin: 0; }
@media (max-width: 800px) { .mc-main .mc-container { grid-template-columns: 1fr; } .mc-content { padding-top: 0; } }
