/* =========================================================
   shell.css — SOLO para index.html (el marco/shell del sitio)
   ========================================================= */

:root {
	--bg: #364874;
	--dark: #252547;
	--header: #2D345B;
	--white: #fbf9da;
	--cream: #eef5e0;
	--hover: #4C638F;
	--content-bg: #78829e;
	--green: #b8ddb8;
	--tan: #C3C89B;
	--red: #cc9292;
	--orange: #e2a97e;
	--blue: #95b5cc;
	--pink: #ffd4fb;
	--light-pink: #fce6f9; 
	--yellow: #fffea9;
	--grey: #b9b9b9;

	--outer-margin-top: 6vh;
	/* Layout */
	--sidebar-width: 260px;
}

/* Escalón 2: monitores HD (laptops, 1366x768, 1600x900, etc.) */
@media (min-width: 768px) {
	:root {
		--outer-width: 1100px;
		--outer-height: 650px;
		--outer-margin-top: 5vh;
	}
}

/* Escalón 3: monitores Full HD y mayores */
@media (min-width: 1920px) {
	:root {
		--outer-width: 1200px;
		--outer-height: 650px;
		--outer-margin-top: 12vh;
	}
}

html,
body {
	margin: 0;
	padding: 0;
	width: 100%;
	height: 100%;
}

body {
	font-family: Calibri, sans-serif;
	font-size: 13px;
	color: var(--dark);
	background-color: var(--bg);
	background-image: url("assets/bg-pattern.png");
	background-repeat: repeat;
	display: flex;
	justify-content: center;
	align-items: flex-start;
	min-height: 100vh;
}

/* ============================
   Scrollbar
   ============================ */

::-webkit-scrollbar {
	width: 8px;
}

::-webkit-scrollbar-track {
	background: var(--green);
	border-radius: 10px;
}

::-webkit-scrollbar-thumb {
	background: var(--header);
	border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
	background: #555;
}

* {
	scrollbar-width: thin;
	scrollbar-color: var(--header) var(--green);
}

/* ============================
   Wrapper principal
   ============================ */

.outer {
	width: 100%;
	max-width: 95vw;
	margin-top: var(--outer-margin-top);
	display: flex;
	flex-direction: column;
	background-color: var(--bg);
	border: 1px solid var(--dark);
	border-radius: 4px;
	box-shadow: 2px 2px 5px var(--dark);
	overflow: hidden;
}

@media (min-width:768px) {
	.outer {
		width: var(--outer-width);
		height: var(--outer-height);
		max-height: 95vh;
	}
}

/* ============================
   Header
   ============================ */

.header {
	background: var(--header);
	color: var(--cream);
	padding: 5px 16px;
	border-bottom: 1px solid var(--dark);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
}

.header-titles {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 6px;
	font-size: 16px;
	font-weight: bold;
	min-width: 0;
}

.subtitle {
	font-size: 13px;
	font-weight: normal;
	opacity: .6;
}

/* Botón hamburguesa */

.header .navbar-toggler {
	display: block;
	flex-shrink: 0;
	padding: 2px 8px;
	border: 1px solid var(--cream);
	font-size: .9rem;
}

.header .navbar-toggler-icon {
	width: 1.1em;
	height: 1.1em;
	background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23dbe1b6' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

@media (min-width:768px) {
	.header .navbar-toggler {
		display: none;
	}
}

/* ============================
   Menú
   ============================ */

.menu {
	background: var(--bg);
	border-bottom: 1px solid var(--dark);
	padding: 0;
}

.menu .container-fluid {
	padding: 0;
}

.menu a.nav-link {
	display: block;
	padding: 6px 16px;
	color: var(--cream);
	text-decoration: none;
	line-height: 1.2;
	cursor: pointer;
}

.menu a.nav-link:hover,
.menu a.nav-link.active {
	background: var(--hover);
	color: var(--cream);
}

@media (min-width:768px) {
	.menu {
		padding-left: 16px;
	}
}

/* ============================
   Layout principal
   ============================ */

.main {
	display: flex;
	flex-direction: column;
}

/* Sidebar oculto en móviles */

.sidebar {
	display: none;
	background: var(--header);
	background-image: url("assets/sidebar.gif");
	/* la imagen quedo de 240x520 */
	background-size:contain;
	background-repeat: no-repeat;
	background-position: top center;
	color: var(--cream);
	border: 1px solid var(--dark);
	border-radius: 4px;
	box-sizing: border-box;
	flex-direction: column;
	justify-content: space-between;
	padding: 10px;
	margin: 12px;
	min-height: 120px;
}

.sidebar-top {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 12px;
	margin-top: 10px;
}
.sidebar-center {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
}
.social-icon {
	width: 48px;
	height: 48px;
	object-fit: contain;
	transition: transform .15s ease;
	filter: drop-shadow(0px 5px 8px rgba(0, 0, 0, 0.7));
}

.social-icon:hover {
	transform: scale(1.25);
}
.content-wrap {
	margin: 12px 12px 12px;
	background: var(--content-bg);
	border: 1px solid var(--header);
	border-radius: 4px;
	overflow: hidden;
}

.content-frame {
	display: block;
	width: 100%;
	height: 60vh;
	min-height: 280px;
	border: 0;
}

/* ============================
   Desktop
   ============================ */

@media (min-width:768px) {
	.main {
		flex: 1;
		min-height: 0;
		flex-direction: row;
	}

	.sidebar {
		display: flex;
		flex: 0 0 var(--sidebar-width);
		width: var(--sidebar-width);
		height: calc(100% - 24px);
		margin: 12px;
	}

	.content-wrap {
		flex: 1;
		min-width: 0;
		height: calc(100% - 24px);
		margin: 12px 12px 12px 0;
		box-sizing: border-box;
	}

	.content-frame {
		height: 100%;
	}
}

/* ============================
   Updates iframe (opcional)
   ============================ */

iframe.updates {
	border: 0;
	margin: 0;
	padding: 0;
	width: 100%;
	height: 20px;
}

@media (min-width:768px) {
	iframe.updates {
		position: absolute;
		bottom: 3px;
	}

}


/* ---- Lightbox IMG Visualizer ---- */

.lightbox-img {
	cursor: zoom-in;
	transition: filter 0.2s ease;
}

.lightbox-img:hover {
	filter: brightness(1.08);
}

.lightbox-overlay {
	position: fixed;
	inset: 0;
	background: rgba(37, 37, 71, 0.75); /* var(--dark) con transparencia */
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 9999;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.2s ease; 
	box-sizing: border-box;
}

.lightbox-overlay.active {
	opacity: 1;
	pointer-events: auto;
}

.lightbox-box {
	width: 100%;
	height: auto;
	max-width: 90vw;
	max-height: 90vh;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	align-items: center;
	transform: scale(0.95);
	transition: transform 0.2s ease;
	overflow: hidden;
}
.lightbox-box span {
	color: var(--cream);
	font-size: 16px;
}


.lightbox-overlay.active .lightbox-box {
	transform: scale(1);
}

.lightbox-box img {
	max-width: 100%;
	max-height: 75vh;
	object-fit: contain;
	border-radius: 4px;
	display: block;
	transition: transform 0.15s ease;
	user-select: none;

	filter: drop-shadow(0px 5px 15px rgba(0, 0, 0, 0.35));
}

.lightbox-box img.zoomed {
	cursor: grab;
}

.lightbox-box img.dragging {
	cursor: grabbing;
	transition: none;
}

.lightbox-close {
	align-self: flex-end;
	background: var(--hover);
	color: var(--cream);
	border: 1px solid var(--bg);
	border-radius: 2px;
	width: 28px;
	height: 28px;
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
	font-family: Calibri, sans-serif;
}

.lightbox-close:hover {
	background: var(--bg);
}

/* ----------------- */

#zoomWrapper {
	transform: scale(1);
	transform-origin: top center;
	transition: transform .1s ease;
}

#zoomWrapper.origin-center {
	transform-origin: center center;
}


.zoom-controls {
	position: fixed;
	bottom: 12px;
	right: 12px;
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 6px;
	z-index: 9998;
}

.zoom-controls button {
	width: 40px;
	height: 40px;
	background: var(--header);
	color: var(--cream);
	border: var(--cream) 1px solid;
	border-radius: 25%;
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
	font-family: Calibri, sans-serif;
	transition: transform .2s;
}

.zoom-controls button:hover {
	background: var(--hover);
	transform: scale(1.1);
}

#zoomToggleBtn i,
.zoom-panel button i {
	pointer-events: none;
}

.zoom-panel {
	display: flex;
	align-items: center;
	gap: 8px;
	background: var(--header);
	border: 1px solid var(--cream);
	border-radius: 4px;
	padding: 6px 10px;

	opacity: 0;
	visibility: hidden;
	transform: translateX(10%);
	transform-origin: center right;
	transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}

.zoom-panel.open {
	opacity: 1;
	visibility: visible;
	transform: translateX(0) scale(1);
}

.zoom-panel input[type="range"] {
	accent-color: var(--cream);
	cursor: pointer;
}

.zoom-panel span {
	color: var(--cream);
	font-size: 16px;
	min-width: 36px;
	text-align: center;
}

.zoom-panel button {
	width: 26px;
	height: 26px;
	background: var(--bg);
	color: var(--cream);
	border: 1px solid var(--dark);
	border-radius: 4px;
	font-size: 14px;
	cursor: pointer;
}

.zoom-panel button:hover {
	background: var(--dark);
}

.zoom-panel button.active {
	background: var(--cream);
	color: var(--dark);
	border: 1px solid var(--dark);
}

@media (max-width: 767px) {
	.zoom-controls {
		display: none;
	}
}