/*
Theme Name: Perla — Miguel Barragán
Theme URI: https://miguelbarragan.es
Author: Miguel Barragán
Description: Tema ligero para la web de vídeo y fotografía de bodas de Miguel Barragán. Tono Perla, sin constructores visuales.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: perla
*/

html { scroll-behavior: smooth; }
body { margin: 0; background: #F6F7F7; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; }
a { color: #007C88; }
a:hover { color: #005F68; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
	outline: 2px solid #007C88;
	outline-offset: 2px;
}
input:focus, select:focus, textarea:focus { border-color: #007C88 !important; outline: none; }

/* Cabecera y menú móvil */
.mb-menu-btn {
	display: none;
	width: 44px; height: 44px;
	border: 0; background: transparent; cursor: pointer;
	align-items: center; justify-content: center;
}
.mb-nav a:not([style*="background"]):hover { color: #007C88 !important; }
.admin-bar .mb-header { top: 32px !important; }
@media (max-width: 782px) { .admin-bar .mb-header { top: 46px !important; } }

@media (max-width: 900px) {
	.mb-menu-btn { display: flex; }
	.mb-nav { display: none !important; }
	.mb-nav.is-open {
		display: flex !important;
		flex-direction: column;
		align-items: stretch !important;
		gap: 0 !important;
		width: 100%;
		padding: 8px 0 12px;
		font-size: 17px !important;
	}
	.mb-nav.is-open a { padding: 14px 0; border-top: 1px solid #E0E5E6; }
	.mb-nav.is-open a[style*="background"] { margin-top: 12px; text-align: center; border-top: 0; }
	.mb-header > div { padding: 12px 20px !important; }
	.mb-header img { width: 40px !important; }
	#inicio { height: 620px !important; }
	section[style*="padding: 120px"], section[style*="padding: 110px"] { padding-top: 72px !important; padding-bottom: 72px !important; }
}

@media (max-width: 520px) {
	section, section > div { padding-left: 20px !important; padding-right: 20px !important; }
	[style*="minmax(420px"] { grid-template-columns: 1fr !important; }
	[style*="minmax(320px"] { grid-template-columns: 1fr !important; }
	form[style*="padding: 40px"] { padding: 24px !important; }
}

/* Vídeos: se cargan solo al pulsar */
.mb-video iframe, .mb-modal iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.mb-modal {
	position: fixed; inset: 0; z-index: 1000;
	background: rgba(10, 10, 10, 0.92);
	display: flex; align-items: center; justify-content: center; padding: 24px;
}
.mb-modal-frame { position: relative; width: min(1200px, 100%); aspect-ratio: 16 / 9; }

/* Visor de fotos */
.mb-lightbox[hidden] { display: none; }
.mb-lightbox {
	position: fixed; inset: 0; z-index: 1000;
	background: rgba(10, 10, 10, 0.94);
	display: flex; align-items: center; justify-content: center;
}
.mb-lightbox img { max-width: calc(100% - 140px); max-height: calc(100% - 80px); object-fit: contain; }
.mb-lightbox button, .mb-modal-close {
	position: absolute;
	width: 56px; height: 56px;
	border: 1px solid rgba(255,255,255,0.5); border-radius: 50%;
	background: rgba(0,0,0,0.3); color: #FFFFFF;
	font: 300 32px/1 Raleway, sans-serif; cursor: pointer;
}
.mb-lb-close, .mb-modal-close { top: 20px; right: 20px; }
.mb-lb-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.mb-lb-next { right: 20px; top: 50%; transform: translateY(-50%); }
@media (max-width: 600px) {
	.mb-lightbox img { max-width: 100%; }
	.mb-lb-prev, .mb-lb-next { top: auto; bottom: 20px; transform: none; }
}

/* Páginas y entradas genéricas */
.mb-content { max-width: 760px; margin: 0 auto; padding: 96px 32px 120px; box-sizing: border-box; font-size: 17px; line-height: 1.75; color: #3A4245; }
.mb-content h1, .mb-content h2, .mb-content h3 { font-family: 'Cormorant Garamond', serif; font-weight: 400; color: #1C1C1C; line-height: 1.1; }
.mb-content h1 { font-size: clamp(40px, 5vw, 64px); margin: 0 0 32px; }
.mb-content h2 { font-size: 36px; margin: 48px 0 16px; }
.mb-content img { height: auto; }
.mb-content iframe { max-width: 100%; }
.mb-post-list { display: flex; flex-direction: column; gap: 40px; }
.mb-post-list a { color: #1C1C1C; text-decoration: none; }
