/* ========== CSS RESET ========== */
*,
*::before,
*::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

html {
	font-size: 16px;
	scroll-behavior: smooth;
}

body {
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
	line-height: 1.6;
	color: #333;
	background-color: #f5f5f5;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

img,
picture,
video,
canvas,
svg {
	display: block;
	max-width: 100%;
	height: auto;
}

input,
button,
textarea,
select {
	font: inherit;
}

/* ========== WRAPPER ========== */
.geofotora-standalone-wrapper {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	background-color: #0f1e2f;
}

/* Sección MAPA: ocupa exactamente el viewport sin scroll */
.geofotora-standalone-wrapper.section-mapa {
	height: 100vh;
	max-height: 100vh;
	overflow: hidden;
}

/* Compensar la admin bar de WordPress (32px escritorio, 46px móvil) */
html.wp-toolbar .geofotora-standalone-wrapper.section-mapa {
	height: calc(100vh - 32px);
	max-height: calc(100vh - 32px);
}

@media screen and (max-width: 782px) {
	html.wp-toolbar .geofotora-standalone-wrapper.section-mapa {
		height: calc(100vh - 46px);
		max-height: calc(100vh - 46px);
	}
}

.geofotora-standalone-wrapper.section-mapa .geofotora-main {
	overflow: hidden;
	min-height: 0;
	/* necesario para que flex respete el height del padre */
}

.geofotora-standalone-wrapper .nf-form-cont {
	background: none;
	padding: 0;
	border-radius: 0;
	margin: 0;
}

/* ========== HEADER ========== */
.geofotora-header {
	/*position: sticky;*/
	background: rgb(0 87 151 / 80%);
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
	/*position: sticky;*/
	backdrop-filter: blur(6px);
	top: 0;
	z-index: 9998;
}

.geofotora-standalone-wrapper header {
	margin: 0 !important;
}

.geofotora-header-container {
	/*max-width: 1400px;*/
	margin: 0 auto;
	padding: 0 20px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 46px;
	position: relative;
}

.geofotora-header-container.menu-open {
	flex-direction: column;
	height: auto;
}

/* Burger */
.geofotora-burger-menu {
	display: none !important;
	background: transparent;
	border: none;
	cursor: pointer;
	padding: 10px;
	z-index: 1002;
	color: #fff;
	font-size: 1.5rem;
	transition: color 0.3s ease;
}

.geofotora-burger-menu:hover {
	color: rgba(255, 255, 255, 0.8);
}

.burger-icon-open {
	display: block;
}

.burger-icon-close {
	display: none !important;
}

.geofotora-burger-menu.active .burger-icon-open {
	display: none !important;
}

.geofotora-burger-menu.active .burger-icon-close {
	display: block !important;
}

/* Login */
.geofotora-login-section {
	flex: 0 0 auto;
}

/* Nav */
.geofotora-nav {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	height: 100%;
}

.nav-btn {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 6px 14px;
	background-color: transparent;
	color: rgba(255, 255, 255, 0.85);
	text-decoration: none;
	border-radius: 6px;
	font-weight: 600;
	transition: all 0.3s ease;
	font-size: 0.95rem;
	border: 2px solid transparent;
}

.nav-btn:hover:not(:has(img.avatar)),
.nav-btn.active:not(:has(img.avatar)) {
	background-color: rgba(255, 255, 255, 0.2);
	color: #fff;
	transform: translateY(-1px);
}

.nav-btn i {
	font-size: 1.6rem;
}

.nav-btn .nav-text {
	display: none;
}

/* Fixed width buttons - show ONLY icon by default, swap to text on hover */
@media (min-width: 769px) {
	.geofotora-nav {
		gap: 8px;
	}

	.geofotora-nav .nav-btn {
		width: 80px;
		min-width: 80px;
		height: 44px;
		padding: 0;
		display: flex;
		align-items: center;
		justify-content: center;
		position: relative;
		overflow: hidden;
	}

	/* Hide text by default */
	.geofotora-nav .nav-btn .nav-text {
		display: block;
		position: absolute;
		font-size: 0.75rem;
		white-space: nowrap;
		opacity: 0;
		pointer-events: none;
		transition: opacity 0.2s ease;
	}

	/* On hover: hide icon, show text */
	.geofotora-nav .nav-btn:hover i {
		display: none;
	}

	.geofotora-nav .nav-btn:hover .nav-text {
		opacity: 1;
		pointer-events: auto;
	}
}

/* Mobile: show ONLY icon, no titles */
@media (max-width: 768px) {
	.geofotora-nav .nav-btn {
		width: 44px;
		min-width: 44px;
		padding: 0;
		display: flex;
		align-items: center;
		justify-content: center;
	}

	.geofotora-nav .nav-btn i {
		display: block !important;
		opacity: 1 !important;
	}

	.geofotora-nav .nav-btn .nav-text {
		display: none !important;
		opacity: 0 !important;
	}
}

.nav-btn .avatar {
	height: 32px;
	width: 32px;
	border-radius: 50%;
}

/* Logo */
.geofotora-logo-section {
	flex: 0 0 auto;
}

.geofotora-logo-link {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 8px 12px;
	transition: all 0.3s ease;
}

.geofotora-logo-link:hover {
	transform: scale(1.05);
}

.geofotora-logo {
	height: 45px;
	width: auto;
}

/* Mobile login */
.geofotora-mobile-login-section {
	display: none;
	padding-top: 15px;
	margin-top: 15px;
	border-top: 1px solid;
	border-image: linear-gradient(to right, transparent, white 50%, transparent) 1;
}

.mobile-login-btn {
	width: 100%;
	justify-content: center;
}

/* ========== MAIN CONTENT ========== */
.geofotora-main {
	flex: 1;
	width: 100%;
	margin: 0 auto;
	padding: 0 !important;
}

.section-title {
	font-size: 1.75rem;
	font-weight: 700;
	color: #667eea;
	margin-bottom: 25px;
	display: flex;
	align-items: center;
	gap: 12px;
	padding-bottom: 15px;
	border-bottom: 3px solid #667eea;
}

.section-title i {
	color: #764ba2;
}

/* Messages */
.geofotora-message {
	padding: 25px;
	border-radius: 8px;
	margin-bottom: 20px;
}

.geofotora-message-warning {
	background-color: #fff3cd;
	border-left: 4px solid #ffc107;
	color: #856404;
}

.geofotora-message-error {
	background-color: #f8d7da;
	border-left: 4px solid #dc3545;
	color: #721c24;
}

/* Buttons */
.geofotora-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	border-radius: 6px;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
	transition: all 0.3s ease;
}

.geofotora-btn-primary {
	background: linear-gradient(179deg, #7d7d7d 0%, #454545 100%);
	color: #fff;
}

/* Footer */
.geofotora-footer {
	background: linear-gradient(180deg, #06070c 0%, #101c33 100%);
	color: #fff;
	margin-top: auto;
}

.geofotora-footer-container {
	max-width: 1400px;
	margin: 0 auto;
	padding: 40px 20px;
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 40px;
}

.geofotora-footer .footer-title {
	padding: 1.5rem 0;
}

.geofotora-footer .footer-links {
	list-style: none;
	padding-left: 0;
	margin: 0;
}

/* Lazy load */
.feed-photo-img {
	opacity: 0;
	filter: blur(12px);
	transform: scale(1.02);
	transition: opacity .5s ease, filter .6s ease, transform .6s ease;
}

.feed-photo-img.is-loaded {
	opacity: 1;
	filter: blur(0);
	transform: scale(1);
}

/* --- Contenedor de la botonera --- */
.geofotora-botonera {
	position: absolute;
	width: 100%;
	height: 48px;
	z-index: 9999;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 992px) {

	main {
		padding: 0;
	}

	.geofotora-standalone-wrapper {
		/* Añade espacio en la parte inferior para la nueva barra de navegación */
		padding-bottom: 60px;
	}

	/* En la sección MAPA el cuerpo llena el viewport; la nav inferior es un overlay fijo */
	.geofotora-standalone-wrapper.section-mapa {
		padding-bottom: 0 !important;
	}

	.geofotora-header-container {
		/* El header solo contiene el logo en móvil, lo centramos */
		justify-content: center;
	}

	/* --- Barra de navegación inferior --- */
	.geofotora-botonera {
		/* Estilos para Móvil (<= 992px) */
		position: fixed;
		width: 100%;
		margin-left: 0;
		bottom: 0;
		left: 0;
		right: 0;
		height: 60px;
		background: #0f1e2f;
		border-top: 1px solid #38485b;
		padding: 0 5px;
		z-index: 10000;
		box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
	}

	.geofotora-nav {
		justify-content: space-around;
		gap: 5px;
	}

	/* Oculta el texto de los botones */
	.nav-btn span {
		display: none;
	}

	/* Estilo para los botones-icono en la barra inferior */
	.nav-btn {
		flex: 1;
		/* Distribuye el espacio equitativamente */
		flex-direction: column;
		justify-content: center;
		gap: 4px;
		padding: 8px 5px;
		border-radius: 8px;
		height: 100%;
		min-width: 50px;
		/* Ancho mínimo para cada ícono */
	}

	.nav-btn:hover:not(:has(img.avatar)),
	.nav-btn.active:not(:has(img.avatar)) {
		transform: none;
		/* Quita el efecto de escritorio */
	}

	.nav-btn i {
		font-size: 1.5rem;
		margin-bottom: 2px;
	}

	.nav-btn .avatar {
		height: 28px;
		width: 28px;
		border: 2px solid transparent;
	}

	.nav-btn.active .avatar {
		border-color: #fff;
	}

	.nav-btn .nav-btn-text {
		display: none;
		/* Oculta el texto, muestra solo iconos */
	}

	/* Estilo especial para el botón central 'Subir' */
	.nav-btn[href*="/subir/"] {
		background-color: #fbbf24;
		color: white;
		border-radius: 50%;
		width: 56px;
		height: 56px;
		min-width: 56px;
		flex: 0 0 56px;
		position: relative;
		top: -14px;
		padding-top: 4px;
		border: 6px solid #0f1e2f;
		box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
		transition: all 0.2s ease-in-out;
	}

	.nav-btn[href*="/subir/"]:hover {
		background-color: #f59e0b;
		transform: translateY(-3px) scale(1.05);
	}

	.nav-btn[href*="/subir/"] i {
		font-size: 2.2rem;
		margin: 0;
		/* Resetea el margen para centrarlo bien */
	}
}

@media (max-width: 768px) {

	.geofotora-main {
		/*padding: 20px 15px;*/
	}

	.geofotora-footer-container {
		grid-template-columns: 1fr;
	}

	.geofotora-logo {
		height: 40px;
	}
}

@media (max-width: 480px) {

	.geofotora-header-container {
		padding: 10px 15px;
	}

	.geofotora-logo {
		height: 35px;
	}

	.geofotora-login-btn {
		font-size: 0.85rem;
		padding: 8px 12px;
	}
}