/* ============================================================
Archivo style.css
PostDragóra — Theme Variables & Base Styles
============================================================ */
/* Font Rubik (https://fonts.google.com/specimen/Rubik)
Fuente Rubik Light en latín */
@font-face {
  font-family: 'Rubik';
  src: url('../fonts/Rubik-VariableFont_wght.ttf') format('truetype');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* Fuente Rubik Italic (variable) */
@font-face {
  font-family: 'Rubik';
  src: url('../fonts/Rubik-Italic-VariableFont_wght.ttf') format('truetype');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

/* Light Theme (default) */
:root {
	--bg-primary: #f5f5f5;
	--bg-secondary: #ffffff;
	--bg-card: #ffffff;
	--bg-input: #fafafa;
	--titulo-text-primary: #000;
	--titulo-text-popup: #9e090d;
	--descripcion-text-primary: #202020;
	--text-primary: #202020;
	--text-secondary: #666666;
	--text-muted: #000;
	--border-color: #66666673;
	--border-focus: #c41e3a;
	--accent: #c41e3a;
	--accent-2: #000;
	--accent-hover: #9e1a31;
	--accent-light: rgba(201, 81, 102, 0.2);
	--accent-transparent: #fff0;
	--shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
	--shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
	--shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
	--radius-sm: 6px;
	--radius-md: 12px;
	--radius-lg: 20px;
	--font-sans: 'Rubik', sans-serif;
	--header-bg: rgba(255, 255, 255, 0.92);
	--btn-secondary-bg: #f5f5f5;
	--btn-secondary-text: #333333;
	--btn-secondary-hover: #e0e0e0;
	--btn-confirm: #0b8828;
	--btn-cancel: #f5f5f5;
	--btn-cancel-hover: brightness(1);
	--btn-warning: #d26e05;
	--btn-ok: #bc0e2b;
}



/* Dark Theme */
[data-theme="dark"] {
	--bg-primary: #0d0d0d;
	--bg-secondary: #1a1a1a;
	--bg-card: #1a1a1a;
	--bg-input: #242424;
	--titulo-text-primary: #fff;
	--titulo-text-popup: #e93e5b;
	--descripcion-text-primary: #dcdcdc;
	--text-primary: #dcdcdc;
	--text-secondary: #aaaaaa;
	--text-muted: #fff;
	--border-color: #aaaaaa70;
	--border-focus: #c41e3a;
	--accent: #c41e3a;
	--accent-2: #fff;
	--accent-hover: #e0405c;
	--accent-light: rgba(201, 81, 102, 0.2);
	--accent-transparent: #fff0;
	--shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
	--shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
	--shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
	--header-bg: rgba(26, 26, 26, 0.92);
	--btn-secondary-bg: #161616;
	--btn-secondary-text: #e0e0e0;
	--btn-secondary-hover: #333333;
	--btn-confirm: #0b8828;
	--btn-cancel: #181818;
	--btn-cancel-hover: brightness(1.2);
	--btn-warning: #d26e05;
	--btn-ok: #bc0e2b;
}



/* ============================================================
Reset & Base
============================================================ */
*, *::before, *::after {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}
	
html {
	scroll-behavior: smooth;
	font-size: 16px;
}

body {
	font-family: var(--font-sans);
	background-color: var(--bg-primary);
	color: var(--text-primary);
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	transition: background-color 0.4s ease, color 0.4s ease;
	overflow-x: hidden;
}

a {
	color: inherit;
	text-decoration: none;
}

button {
	font-family: inherit;
	cursor: pointer;
	border: none;
	outline: none;
}

input, select {
	font-family: inherit;
	outline: none;
}

.n-vb {
	display: none !important;
}


/* ============================================================
Loading Screen
============================================================ */
#loading-screen {
	position: fixed;
	inset: 0;
	z-index: 9999;
	background-color: var(--bg-primary);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	transition: opacity 0.6s ease, visibility 0.6s ease;
}

#loading-screen.hidden {
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
}

.loading-content {
	text-align: center;
}

.loading-logo {
	font-size: 2.8rem;
	font-weight: 800;
	letter-spacing: -0.02em;
	color: var(--text-primary);
	margin-bottom: 1.5rem;
}

.loading-logo span {
	color: var(--accent);
}

.loading-track {
	width: 200px;
	height: 3px;
	background-color: var(--border-color);
	border-radius: 3px;
	overflow: hidden;
	margin: 0 auto 1rem;
}

.loading-bar {
	width: 0%;
	height: 100%;
	background-color: var(--accent);
	border-radius: 3px;
	animation: loadProgress 2s ease-in-out forwards;
}

@keyframes loadProgress {
	0% { width: 0%; }
	50% { width: 70%; }
	100% { width: 100%; }
}

.loading-text {
	font-size: 0.85rem;
	color: var(--text-muted);
	letter-spacing: 0.08em;
	text-transform: uppercase;
}



/* ============================================================
Header
============================================================ */
.site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background-color: var(--header-bg);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	border-bottom: 1px solid var(--border-color);
	transition: background-color 0.4s ease, border-color 0.4s ease;
}

.header-inner {
	max-width: 1100px;
	margin: 0 auto;
	padding: 0 1.5rem;
	height: 64px;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.brand {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	font-size: 1.4rem;
	font-weight: 800;
	letter-spacing: -0.02em;
	color: var(--text-primary);
}

.brand-icon {
	width: 32px;
	height: 32px;
	background-color: var(--accent);
	border-radius: var(--radius-sm);
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	font-weight: 700;
	font-size: 1rem;
}

.brand span {
	color: var(--accent);
}

/* Theme Toggle */
.theme-toggle {
	width: 48px;
	height: 26px;
	border-radius: 13px;
	background-color: var(--btn-secondary-bg);
	border: 1px solid var(--border-color);
	position: relative;
	transition: background-color 0.3s ease, border-color 0.3s ease;
}

.theme-toggle::after {
	content: '';
	position: absolute;
	top: 2px;
	left: 2px;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background-color: var(--accent);
	transition: transform 0.3s ease;
}

[data-theme="dark"] .theme-toggle::after {
	transform: translateX(22px);
}

.theme-toggle .toggle-icon {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	color: var(--text-muted);
	pointer-events: none;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 16px;
	height: 16px;
}

.theme-toggle .toggle-icon svg {
	width: 100%;
	height: 100%;
}

.theme-toggle .icon-sun {
	left: 5px;
}

.theme-toggle .icon-moon {
	right: 5px;
}




/* ============================================================
Sidebar - YouTube Style
============================================================ */
.sidebar {
	position: fixed;
	top: 64px;
	left: 0;
	width: 240px;
	height: calc(100vh - 64px);
	background-color: var(--bg-secondary);
	border-right: 1px solid var(--border-color);
	overflow-y: auto;
	overflow-x: hidden;
	z-index: 90;
	transition: width 0.3s ease, transform 0.3s ease;
	scrollbar-width: thin;
	scrollbar-color: var(--text-muted) transparent;
}

.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: var(--text-muted); border-radius: 3px; }

.sidebar-nav {
	padding: 0.75rem 0;
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
}

.sidebar-link {
	display: flex;
	align-items: center;
	gap: 1rem;
	padding: 0.75rem 1.5rem;
	color: var(--text-primary);
	border-radius: 0 24px 24px 0;
	margin-right: 0.75rem;
	transition: background-color 0.2s ease, color 0.2s ease;
	white-space: nowrap;
}

.sidebar-link:hover,
.sidebar-link.active {
	background-color: var(--accent-light);
	color: var(--accent-2);
}

.sidebar-link svg {
	width: 24px;
	height: 24px;
	flex-shrink: 0;
}

.sidebar-link span {
	font-size: 0.9rem;
	font-weight: 500;
	transition: opacity 0.2s ease, width 0.2s ease;
}

/* Toggle Button */
.sidebar-toggle {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background-color: transparent;
	color: var(--text-primary);
	transition: background-color 0.2s ease;
}

.sidebar-toggle:hover {
	background-color: var(--accent-light);
}

.sidebar-toggle svg {
	width: 24px;
	height: 24px;
}

/* Overlay (Mobile) */
.sidebar-overlay {
	position: fixed;
	inset: 0;
	background-color: rgba(0, 0, 0, 0.5);
	z-index: 80;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
}

.sidebar-overlay.active {
	opacity: 1;
	visibility: visible;
}

/* Desktop: =>992px */
@media (min-width: 992px) {
	.sidebar.collapsed {
		width: 72px;
	}

	.sidebar.collapsed .sidebar-link span {
		display: none;
	}

	.sidebar.collapsed .sidebar-link {
		padding: 0.75rem 0;
		margin-right: 0;
		border-radius: 0;
		justify-content: center;
	}

	/* SOLUCIÓN: Forzar margen izquierdo y ajustar ancho */
	.main-content {
		margin-left: 240px !important;
		margin-right: 0 !important;
		width: calc(100% - 240px) !important;
		max-width: none !important;
		transition: margin-left 0.3s ease, width 0.3s ease, max-width 0.3s ease;
	}

	/* Cuando el sidebar está colapsado */
	.sidebar.collapsed ~ .main-content,
	body.sidebar-collapsed .main-content {
		margin-left: 72px !important;
		width: calc(100% - 72px) !important;
		max-width: none !important;
	}

	/* === SOLUCIÓN AL PROBLEMA DEL HEADER === */
	/* Eliminar padding dinámico */
	.header-inner {
		padding-left: 1.5rem !important;
		padding-right: 1.5rem !important;
		position: relative;
	}

	/* Posicionar el logo absolutamente centrado */
	.brand {
		position: absolute;
		left: 50%;
		transform: translateX(-50%);
	}

	/* Posicionar botón del menú fijo en el header */
	.sidebar-toggle {
		position: fixed;
		left: 1.0rem;
		top: 32px;
		transform: translateY(-50%);
		z-index: 101;
	}

	/* Posicionar botón de tema a la derecha */
	.theme-toggle {
		position: absolute;
		right: 1.5rem;
		top: 50%;
		transform: translateY(-50%);
	}
}

/* Mobile: <=992px */
@media (max-width: 991px) {
	.sidebar {
		transform: translateX(-100%);
		width: 260px;
		top: 56px;
		height: calc(100vh - 56px);
		box-shadow: var(--shadow-lg);
	}

	.sidebar.open {
		transform: translateX(0);
	}

	.main-content {
		margin-left: 0 !important;
	}

	.header-inner {
		padding-left: 1rem;
	}
}

/* Ajuste para loading screen y header en móvil */
@media (max-width: 768px) {
	.sidebar {
		top: 56px;
		height: calc(100vh - 56px);
	}
}




/* ============================================================
Main Layout
============================================================ */
.main-content {
	flex: 1;
	max-width: 1100px;
	width: 100%;
	margin: 0 auto;
	padding: 2.5rem 1.5rem 4rem;
}



/* ============================================================
Generator Section
============================================================ */
.generator-section {
	animation: fadeSlideUp 0.5s ease both;
}

.generator-section.hidden {
	display: none;
}

.section-title {
	font-size: 2rem;
	font-weight: 700;
	color: var(--titulo-text-primary);
	margin-bottom: 0.5rem;
	letter-spacing: -0.02em;
}

.section-subtitle {
	font-size: 1rem;
	color: var(--descripcion-text-primary);
	margin-bottom: 2.5rem;
	line-height: 1.6;
}

/* Generator Card */
.generator-card {
	background-color: var(--bg-card);
	border: 1px solid var(--border-color);
	border-radius: var(--radius-lg);
	padding: 2rem 2.5rem;
	box-shadow: var(--shadow-md);
	transition: background-color 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

.form-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 1.25rem;
	margin-bottom: 1.5rem;
}

.form-group {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.form-label {
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--text-primary);
}

.form-input,
.form-select {
	padding: 0.85rem 1rem;
	font-size: 0.95rem;
	color: var(--text-primary);
	background-color: var(--bg-input);
	border: 1px solid var(--border-color);
	border-radius: var(--radius-md);
	transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.4s ease;
	width: 100%;
}

.form-input::placeholder {
	color: var(--text-muted);
}

.form-input:focus,
.form-select:focus {
	border-color: var(--border-focus);
	box-shadow: 0 0 0 3px var(--accent-light);
}

.form-select {
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 1rem center;
	padding-right: 2.5rem;
}

[data-theme="dark"] .form-select {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23aaa' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
}

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	padding: 0.9rem 1.75rem;
	font-size: 0.95rem;
	font-weight: 600;
	border-radius: var(--radius-md);
	transition: all 0.2s ease;
	cursor: pointer;
}

.btn-primary {
	background-color: var(--accent);
	color: #fff;
	border: none;
}

.btn-primary:hover {
	background-color: var(--accent-hover);
	transform: translateY(-1px);
	box-shadow: var(--shadow-md);
}

.btn-primary:active {
	transform: translateY(0);
}

.btn-secondary {
	background-color: var(--btn-secondary-bg);
	color: var(--btn-secondary-text);
	border: 1px solid var(--border-color);
}

.btn-secondary:hover {
	background-color: var(--btn-secondary-hover);
	transform: translateY(-1px);
}

.btn-secondary:active {
	transform: translateY(0);
}

.btn svg {
	width: 18px;
	height: 18px;
	flex-shrink: 0;
}



/* ============================================================
Results Section
============================================================ */
.results-section {
	display: none;
	animation: fadeSlideUp 0.5s ease both;
}

.results-section.visible {
	display: block;
}

.results-header {
	margin-bottom: 2rem;
}

.results-header h2 {
	font-size: 1.75rem;
	font-weight: 700;
	color: var(--text-primary);
	margin-bottom: 0.3rem;
}

.results-header p {
	color: var(--text-secondary);
	font-size: 0.95rem;
}

/* Link Card */
.link-card {
	background-color: var(--bg-card);
	border: 1px solid var(--border-color);
	border-radius: var(--radius-lg);
	padding: 2rem;
	box-shadow: var(--shadow-md);
	margin-bottom: 1.5rem;
	transition: background-color 0.4s ease, border-color 0.4s ease;
}

.link-label {
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--text-primary);
	margin-bottom: 0.75rem;
}

.link-input-wrapper {
	display: flex;
	gap: 0.5rem;
	margin-bottom: 1.25rem;
}

.link-input {
	flex: 1;
	padding: 0.9rem 1rem;
	font-size: 0.9rem;
	font-family: 'SF Mono', 'Fira Code', monospace;
	color: var(--text-primary);
	background-color: var(--bg-input);
	border: 1px solid var(--border-color);
	border-radius: var(--radius-md);
	transition: all 0.4s ease;
}

/* Social Share */
.share-label {
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--text-primary);
	margin-bottom: 0.75rem;
}


/* ============================================================
Footer
============================================================ */
.site-footer {
	text-align: center;
	padding: 1.5rem;
	font-size: 0.8rem;
	color: var(--text-muted);
	background-color: var(--bg-secondary); /* mismo color que header y sidebar */
	border-top: 1px solid var(--border-color);
	transition: border-color 0.4s ease, background-color 0.4s ease;
}



/* ============================================================
Animations
============================================================ */
@keyframes fadeSlideUp {
	from {
		opacity: 0;
		transform: translateY(20px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}



/* ============================================================
Responsive Design
============================================================ */
@media (max-width: 768px) {
	.header-inner {
		height: 56px;
		padding: 0 1rem;
	}
	.brand {
		font-size: 1.2rem;
	}
	.brand-icon {
		width: 28px;
		height: 28px;
		font-size: 0.85rem;
	}
	.main-content {
		padding: 1.5rem 1rem 3rem;
	}
	.section-title {
		font-size: 1.6rem;
	}
	.generator-card {
		padding: 1.5rem;
	}
	.form-grid {
		grid-template-columns: 1fr;
		gap: 1rem;
	}
	.form-actions {
		flex-direction: column;
	}
	.btn {
		width: auto;
	}
	.link-card {
		padding: 1.5rem;
	}
	.link-input-wrapper {
		flex-direction: column;
	}
	.loading-logo {
		font-size: 2rem;
	}
}

@media (max-width: 480px) {
	.section-title {
		font-size: 1.4rem;
	}
}



/* ============================================================
Portafolio — Grid estilo YouTube
============================================================ */
.portfolio-section {
    animation: fadeSlideUp 0.5s ease both;
}

.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    margin-bottom: 1rem;
}

/* Grupo de cards — grid anidado animable */
.services-group {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    width: 100%;
    grid-column: 1 / -1;
}

/* Card individual */
.service-card {
    display: flex;
    flex-direction: column;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-md);
    transition: background-color 0.25s ease, box-shadow 0.25s ease;
}

/* Hover visible en AMBOS temas */
.service-card:hover {
    background-color: var(--accent-light);
}

.card-thumbnail-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.card-thumbnail-wrapper {
    position: relative;
    width: 95%;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius-md);
    overflow: hidden;
    background-color: var(--bg-input);
    margin: 0.65rem auto 0.65rem auto;
}

.card-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.service-card:hover .card-thumbnail {
    transform: scale(1.05);
}

/* Body: avatar + info */
.card-body {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    padding: 0px 0px 0.5rem 0.3rem;
}

.card-avatar-link {
    flex-shrink: 0;
    text-decoration: none;
    color: inherit;
}

.card-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--accent-transparent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: transform 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0);
	margin: 0px -5px 0px -2px;
}

.card-avatar-link:hover .card-avatar {
    transform: scale(1.1);
}

.card-info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.card-title-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.card-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-title-link:hover .card-title {
    color: var(--accent-2);
}

.card-author-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.card-author-link:hover {
    color: var(--accent-2);
}

.card-meta {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.3;
}

/* Botón Mostrar más / Menos con líneas decorativas */
.load-more-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
    padding: 0 0.5rem;
}

.load-more-line {
    flex: 1;
    height: 1px;
    background-color: var(--text-secondary);
    opacity: 0.4;
}

.load-more-btn {
    padding: 0.55rem 1.75rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    background-color: transparent;
    border: 1px solid var(--border-color);
    border-radius: 24px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    font-family: inherit;
}

.load-more-btn:hover {
    background-color: var(--accent-light);
    border-color: var(--accent);
    color: var(--accent-2);
}

/* Responsive */
@media (max-width: 991px) {
    .services-group { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
    .card-thumbnail-wrapper { margin-bottom: 0.6rem; }
    .card-title {
        -webkit-line-clamp: 5;
    }
}

@media (max-width: 480px) {
    .services-group { grid-template-columns: 1fr; }
    .card-title {
        -webkit-line-clamp: unset;
        display: block;
        overflow: visible;
    }
    .load-more-wrapper { gap: 0.75rem; }
    .load-more-btn { padding: 0.5rem 1.25rem; font-size: 0.85rem; }
}




/* ============================================================
PostDragóra — Post Individual & Comentarios
============================================================ */

/* Layout principal: contenido + sidebar derecha */
.post-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 2.5rem;
    align-items: start;
}

/* -------------------- CARRUSEL -------------------- */
.post-carousel {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--bg-input);
    margin-bottom: 1.5rem;
}

.carousel-track {
    display: flex;
    height: 100%;
    transition: transform 0.5s ease;
}

.carousel-slide {
    min-width: 100%;
    height: 100%;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(0,0,0,0.5);
    color: #fff;
    border: none;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
    z-index: 2;
}

.carousel-btn:hover { background: rgba(0,0,0,0.85); }
.carousel-prev { left: 12px; }
.carousel-next { right: 12px; }

.carousel-dots {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 2;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.45);
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}

.carousel-dot.active { background: #fff; }

/* -------------------- META CENTRADA -------------------- */
.post-meta-centered {
    text-align: center;
    margin-bottom: 1.25rem;
}

.post-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--titulo-text-primary);
    line-height: 1.3;
    margin-bottom: 0.75rem;
    text-wrap: balance;
}

.post-submeta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    flex-wrap: wrap;
    justify-content: center;
}

.post-meta-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.post-meta-author { font-weight: 600; color: var(--text-primary); }
.post-meta-separator { opacity: 0.5; }

/* -------------------- COMPARTIR -------------------- */
.post-share-bar {
    display: flex;
    justify-content: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border-color);
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    background: var(--btn-secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.share-btn:hover {
    background: var(--accent-light);
    border-color: var(--accent);
    color: var(--accent);
}

/* -------------------- CONTENIDO -------------------- */
.post-content {
    font-size: 1rem;
    line-height: 1.75;
    color: var(--text-primary);
    text-wrap: pretty;
    margin-bottom: 2.5rem;
}

/* -------------------- SIDEBAR RELACIONADOS -------------------- */
.post-sidebar {
    position: sticky;
    top: 84px;
}

.sidebar-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--titulo-text-primary);
    margin-bottom: 1rem;
}

.related-item {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
    text-decoration: none;
    color: inherit;
    transition: opacity 0.2s;
}

.related-item:hover { opacity: 0.85; }

.related-thumb {
    width: 120px;
    height: 68px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex-shrink: 0;
    background: var(--bg-input);
}

.related-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0.2rem;
}

.related-author {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.related-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* -------------------- COMENTARIOS -------------------- */
.comments-section { margin-top: 1rem; }

.comments-count {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--titulo-text-primary);
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.comment-form-box {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.comment-input-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.comment-textarea {
    padding: 0.75rem;
    font-size: 0.95rem;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    resize: vertical;
    min-height: 80px;
    width: 100%;
    font-family: inherit;
}

.comment-textarea:focus,
.comment-field:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 2px var(--accent-light);
}

.comment-form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.comment-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.comment-submit-btn {
    padding: 0.55rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
    background: var(--accent);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background 0.2s;
    font-family: inherit;
}

.comment-submit-btn:hover { background: var(--accent-hover); }
.comment-submit-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Comment item */
.comment {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.comment-body { flex: 1; min-width: 0; }

.comment-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.comment-country {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.comment-date {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.comment-text {
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
    word-break: break-word;
}

.comment-actions {
    display: flex;
    gap: 0.75rem;
    font-size: 0.82rem;
    align-items: center;
}

.comment-action-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    font-size: inherit;
    font-family: inherit;
}

.comment-action-btn:hover { color: var(--accent); }

.comment-edited {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-left: 0.25rem;
}

/* Replies */
.comment-replies {
    margin-top: 0.5rem;
    margin-left: 44px;
    padding-left: 8px;
    border-left: 1px solid var(--border-color);
    transition: border-color 0.2s ease;
}

.comment-replies:hover {
    border-left-color: var(--text-secondary);
}

/* A partir del terciario: aplanar sin indentación extra (alineado con el terciario) */
.comment-replies.deep-replies {
    margin-left: -36px;
    padding-left: 0;
    border-left: none;
}

.reply-form {
    display: none;
    margin-top: 0.5rem;
    margin-bottom: 0.75rem;
}

.reply-form.visible { display: block; }

.replies-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.4rem;
    padding: 0.35rem 0.6rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--accent);
    background: none;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-family: inherit;
    transition: background-color 0.15s ease, color 0.15s ease;
}
.replies-toggle:hover {
    background-color: var(--accent-light);
    color: var(--accent-hover);
}

/* -------------------- RESPONSIVE -------------------- */
@media (max-width: 991px) {
    .post-layout { grid-template-columns: 1fr; }
    .post-sidebar { position: static; margin-top: 2rem; }
    .post-title { font-size: 1.15rem; }
    .comment-replies { margin-left: 28px; }
}

@media (max-width: 480px) {
    .carousel-btn { width: 36px; height: 36px; font-size: 1.3rem; }
    .share-btn { padding: 0.4rem 0.8rem; font-size: 0.8rem; }
    .related-thumb { width: 100px; height: 56px; }
    .comment-form-actions { flex-direction: column; align-items: flex-start; }
}




/* ============================================================
Comments 2.0 — Overrides & Additions
============================================================ */

/* Header del comentario con menú */
.comment-header {
	position: relative;
	display: flex;
	align-items: center;
	gap: 0.4rem;
    margin-bottom: 0.3rem;
	flex-wrap: wrap;
}

/* Menú ⋮ */
.comment-menu {
	margin-left: auto;
	position: relative;
}
.comment-menu-btn {
	background: none;
	border: none;
	color: var(--text-secondary);
	font-size: 1.1rem;
	cursor: pointer;
	padding: 0.15rem 0.4rem;
	border-radius: 4px;
	line-height: 1;
	transition: background 0.15s;
}
.comment-menu-btn:hover {
	background: var(--accent-light);
	color: var(--text-primary);
}
.comment-dropdown {
	position: absolute;
	right: 0;
	top: 100%;
	background: var(--bg-card);
	border: 1px solid var(--border-color);
	border-radius: var(--radius-sm);
	box-shadow: var(--shadow-md);
	display: none;
	min-width: 120px;
	z-index: 20;
	overflow: hidden;
}
.comment-dropdown.show {
	display: block;
}
.comment-dropdown button {
	display: block;
	width: 100%;
	padding: 0.55rem 1rem;
	text-align: left;
	background: none;
	border: none;
	color: var(--text-primary);
	cursor: pointer;
	font-size: 0.85rem;
	font-family: inherit;
}
.comment-dropdown button:hover {
	background: var(--accent-light);
	color: var(--accent);
}

/* Emoji picker nativo */
.emoji-picker {
	position: fixed;
	background: var(--bg-card);
	border: 1px solid var(--border-color);
	border-radius: var(--radius-md);
	box-shadow: var(--shadow-lg);
	padding: 0.75rem;
	display: none;
	grid-template-columns: repeat(8, 1fr);
	gap: 0.3rem;
	width: 280px;
	max-height: 240px;
	overflow-y: auto;
	z-index: 200;
}
.emoji-picker.show {
	display: grid;
}
.emoji-btn {
	background: none;
	border: none;
	font-size: 1.3rem;
	cursor: pointer;
	padding: 0.2rem;
	border-radius: 4px;
	line-height: 1;
}
.emoji-btn:hover {
	background: var(--accent-light);
}

/* Edición inline */
.comment-edit-box {
	margin-top: 0.5rem;
}
.comment-edit-actions {
	display: flex;
	justify-content: flex-end;
	gap: 0.5rem;
	margin-top: 0.5rem;
	align-items: center;
}

/* Badge pending */
.comment-pending-badge {
	font-size: 0.75rem;
	color: var(--accent);
	font-weight: 600;
}

/* Reply form compacto */
.reply-form .comment-textarea {
	min-height: 60px;
}

/* Trigger emoji al lado de textareas */
.emoji-trigger {
	opacity: 0.7;
	transition: opacity 0.2s;
}
.emoji-trigger:hover {
	opacity: 1;
}




/* ============================================================
Generator — Additions (device buttons, animal list, states)
============================================================ */
.animal-list {
	width: 100%;
	min-height: 220px;
	padding: .85rem 1rem;
	font-size: .95rem;
	color: var(--text-primary);
	background: var(--bg-input);
	border: 1px solid var(--border-color);
	border-radius: var(--radius-sm);
	resize: vertical;
	line-height: 1.5;
	white-space: pre-wrap;
	cursor: default;
}

.animal-list:focus {
	outline: none;
	border-color: var(--border-focus);
	box-shadow: 0 0 0 3px var(--accent-light);
}

.animal-list.flash-update {
	border-color: #28a745;
	box-shadow: 0 0 0 3px rgba(40, 167, 69, .25);
}

.link-card .form-actions {
	margin-top: 1rem;
}

.link-card .form-actions .btn:disabled {
	opacity: .55;
	cursor: not-allowed;
}



/* ============================================================
Results Actions (Editar enlace + Generar un nuevo enlace)
============================================================ */
.results-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	margin-bottom: 1.5rem;
	gap: 1rem; /* espacio horizontal en PC y vertical al apilarse en móvil */
}


/* ============================================================
Generator — Bottom (dispositivo + vista previa + acciones)
============================================================ */
.form-grid-bottom {
	display: flex;
	flex-direction: column; /* cada sección ocupa su propio espacio (sin columnas) */
	gap: 1.25rem;
	margin-top: 1.25rem;
}

/* Botones de dispositivo: misma relatividad que Generar/Limpiar */
.device-options {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
}

/* Vista previa: espacio propio, centrada y más grande en PC */
.preview-wrapper {
	background: var(--bg-input);
	border: 1px solid var(--border-color);
	border-radius: var(--radius-md);
	overflow: hidden;
	padding: 0.75rem;
	display: flex;
	justify-content: center;
	align-items: center;
	width: 100%;
	max-width: 560px; /* antes 420px — sube/baja este valor a gusto */
	margin: 0 auto;
}

.preview-img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: var(--radius-sm);
}

/* Acciones: Generar / Limpiar */
.form-actions {
	display: flex;
	gap: 1rem;
	flex-wrap: wrap;
	margin-top: 1.5rem;
}

.form-actions .btn {
	flex: 1;
	min-width: 220px;
}

@media (max-width: 991px) {
	.form-actions .btn {
		flex: none;
		width: 100%;
	}
	.preview-wrapper {
		max-width: 100%;
	}
}


/* ============================================================
Results — Cards unificadas, relatividad y textos más legibles
============================================================ */

/* 1) Acciones dentro de card, llena el ancho como .form-actions */
.results-actions-card {
	margin-bottom: 1.5rem;
}

/* 2) Card única: separador entre enlace y listado */
.results-divider {
	border: none;
	border-top: 1px solid var(--border-color);
	margin: 1.75rem 0;
}

.result-block + .result-block {
	margin-top: 0;
}

/* 3) Textos más grandes y legibles */
.form-label,
.link-label,
.share-label {
	font-size: 1rem;
}

.form-input,
.form-select,
.animal-list {
	font-size: 1rem;
}

.form-text-2 {
	font-size: 0.9rem;
	color: var(--text-secondary);
	margin-top: .35rem;
}

.link-input {
	font-size: 0.95rem;
}

.results-header h2 {
	font-size: 2rem;
}

.results-header p {
	font-size: 1.05rem;
}

@media (max-width: 991px) {
	.results-header h2 {
		font-size: 1.6rem;
	}
}


/* ============================================================
Unificación de botones del index.php (mismo diseño que .btn)
============================================================ */

/* "Editar enlace" y "Generar un nuevo enlace" */
#results-section .back-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	flex: 1;
	min-width: 220px;
	padding: 0.9rem 1.75rem;
	font-size: 0.95rem;
	font-weight: 600;
	border-radius: var(--radius-md);
	margin-bottom: 0;
	cursor: pointer;
	transition: all 0.2s ease;
}

/* Editar enlace → variante secundaria (como Limpiar Formulario) */
#results-section .back-btn:not(.btn-primary-style) {
	background-color: var(--btn-secondary-bg);
	color: var(--btn-secondary-text);
	border: 1px solid var(--border-color);
}

#results-section .back-btn:not(.btn-primary-style):hover {
	background-color: var(--btn-secondary-hover);
	color: var(--text-primary);
	transform: translateY(-1px);
}

/* Generar un nuevo enlace → variante primaria (como Generar Enlace) */
#results-section .back-btn.btn-primary-style {
	background-color: var(--accent);
	color: #fff;
	border: none;
}

#results-section .back-btn.btn-primary-style:hover {
	background-color: var(--accent-hover);
	color: #fff;
	transform: translateY(-1px);
	box-shadow: var(--shadow-md);
}

#results-section .back-btn svg {
	width: 18px;
	height: 18px;
	flex-shrink: 0;
}


/* Botón "Copiar" del enlace → variante primaria */
#results-section .copy-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	align-self: stretch; /* iguala su altura a la del input */
	padding: 0 1.75rem;
	font-size: 0.95rem;
	font-weight: 600;
	background-color: var(--accent);
	color: #fff;
	border: none;
	border-radius: var(--radius-md);
	cursor: pointer;
	transition: all 0.2s ease;
	white-space: nowrap;
}

#results-section .copy-btn:hover {
	background-color: var(--accent-hover);
	transform: translateY(-1px);
	box-shadow: var(--shadow-md);
}

#results-section .copy-btn.copied,
#results-section .copy-btn.copied:hover {
	background-color: #2e7d32;
}

#results-section .copy-btn svg {
	width: 18px;
	height: 18px;
}


/* Botones sociales → variante secundaria */
#results-section .social-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	padding: 0.9rem 1.25rem;
	font-size: 0.95rem;
	font-weight: 600;
	color: var(--btn-secondary-text);
	background-color: var(--btn-secondary-bg);
	border: 1px solid var(--border-color);
	border-radius: var(--radius-md);
	cursor: pointer;
	transition: all 0.2s ease;
}

#results-section .social-btn:hover {
	background-color: var(--btn-secondary-hover);
	color: var(--text-primary);
	transform: translateY(-1px);
}

#results-section .social-btn svg {
	width: 18px;
	height: 18px;
	flex-shrink: 0;
}


/* Botones de dispositivo → mismo diseño que .btn */
#generator-section .device-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	flex: 1;
	min-width: 220px;
	padding: 0.9rem 1.75rem;
	font-size: 0.95rem;
	font-weight: 600;
	border-radius: var(--radius-md);
	background-color: var(--btn-secondary-bg);
	color: var(--btn-secondary-text);
	border: 1px solid var(--border-color);
	cursor: pointer;
	transition: all 0.2s ease;
}

#generator-section .device-btn:hover {
	background-color: var(--btn-secondary-hover);
	transform: translateY(-1px);
}

#generator-section .device-btn.active {
	background-color: var(--accent);
	border-color: var(--accent);
	color: #fff;
}

#generator-section .device-btn.active:hover {
	background-color: var(--accent-hover);
	box-shadow: var(--shadow-md);
}

#generator-section .device-btn svg {
	width: 18px;
	height: 18px;
	flex-shrink: 0;
}


/* Móvil: se conserva el apilado full-width */
@media (max-width: 991px) {
	#results-section .back-btn,
	#generator-section .device-btn {
		flex: none;
		width: 100%;
	}
}

@media (max-width: 768px) {
	#results-section .copy-btn {
		width: 100%;
		padding: 0.9rem 1.75rem;
	}
}

/* ============================================================
Redes sociales: fila completa en PC y columna en móvil
============================================================ */

#results-section .social-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
}

#results-section .social-btn {
	flex: 1 1 0;
	min-width: 0;
	width: auto;
}

/* Móvil y tablet: una sola columna */
@media (max-width: 991px) {
	#results-section .social-grid {
		flex-direction: column;
	}

	#results-section .social-btn {
		flex: none;
		width: 100%;
	}
}

/* ============================================================
Back to Top — botón flotante (mismo lenguaje que .btn-primary)
============================================================ */
.back-to-top {
	position: fixed;
	right: 1.5rem;
	bottom: 1.5rem;
	z-index: 89; /* sobre el contenido; bajo sidebar (90), header (100) y loading (9999) */
	width: 48px;
	height: 48px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background-color: var(--accent);
	color: #fff;
	border: none;
	border-radius: var(--radius-md);
	box-shadow: var(--shadow-md);
	cursor: pointer;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transform: translateY(10px);
	transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease,
		background-color 0.2s ease, box-shadow 0.2s ease;
}

.back-to-top.visible {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transform: translateY(0);
}

.back-to-top:hover {
	background-color: var(--accent-hover);
	transform: translateY(-2px);
	box-shadow: var(--shadow-lg);
}

.back-to-top:active {
	transform: translateY(0);
}

.back-to-top svg {
	width: 24px;
	height: 24px;
	flex-shrink: 0;
}

@media (max-width: 768px) {
	.back-to-top {
		width: 42px;
		height: 42px;
		right: 1rem;
		bottom: 1rem;
	}
}

/* ============================================================
SweetAlert2 — heredar tema de PostDragóra (claro/oscuro)
============================================================ */
.swal2-popup {
	font-family: var(--font-sans);
	background: var(--bg-card);
	color: var(--text-primary);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-lg);
}
.swal2-title {
	color: var(--titulo-text-primary);
	font-size: 1.5rem;
	text-shadow: none;
}
.swal2-html-container {
	color: var(--text-primary);
	text-shadow: none;
}
.swal2-actions {
	gap: 0.5rem;
}
.swal2-styled {
	font-family: var(--font-sans);
	font-weight: 600;
}
.swal2-container .swal2-confirm {
	color: #fff !important;
	border-radius: var(--radius-md);
	border: 1px solid var(--border-color) !important;
}
.swal2-container .swal2-confirm:focus {
	box-shadow: 0 0 0 0px var(--accent-light);
}
.swal2-container .swal2-cancel {
	background-color: var(--btn-cancel) !important;
	border-color: var(--btn-cancel) !important;
	color: var(--btn-secondary-text) !important;
	border-radius: var(--radius-md);
	border: 1px solid var(--border-color) !important;
}
.swal2-container .swal2-deny {
	background-color: var(--btn-warning) !important;
	border-color: var(--btn-warning) !important;
	color: #fff !important;
	border-radius: var(--radius-md);
	border: 1px solid var(--border-color) !important;
}
.swal2-container .swal2-styled:hover {
	background-image: none;
	filter: brightness(1.2) !important;
}
.swal2-container .swal2-cancel:hover {
	filter: var(--btn-cancel-hover) !important;
}
.swal2-close {
	color: var(--text-secondary);
}
.swal2-close:hover {
	color: var(--accent);
	background: transparent;
}
.swal2-validation-message {
	background: var(--bg-input);
	color: var(--text-secondary);
}
.swal2-container.swal2-backdrop-show {
	background: rgba(0, 0, 0, 0.55);
}

/* Tema oscuro: backdrop más profundo (lo demás se hereda por variables) */
[data-theme="dark"] .swal2-container.swal2-backdrop-show {
	background: rgba(0, 0, 0, 0.7);
}