/* Core site styles (moved from index.html) */
body {
	font-family: Arial, sans-serif;
	margin: 0;
	padding: 0;
	line-height: 1.6;
	color: #333;
}

header {
	background-color: #0099ff;
	padding: 20px;
	text-align: center;
	line-height: 1.2;
}

header h1 {
	margin: 0;
	font-size: 2em;
}

section {
	padding: 20px;
	max-width: 900px;
	margin: auto;
}

.logo {
	max-width: 150px;
	display: block;
	margin: 10px auto;
}

.logo.gb {
	background: #0a66c2;
	padding: 10px;
	border-radius: 6px;
	display: block;
	max-width: 150px;
}

a.button {
	padding: 10px 15px;
	background: #0077b5;
	color: #fff;
	text-decoration: none;
	border-radius: 5px;
	margin-top: 15px;
	display: inline-block;
}

a.button:hover {
	background: #005f86;
}

.site-footer {
	background-color: #0099ff;
	padding: 20px;
	margin-top: 30px;
	text-align: center;
}

/* Form and upload styles (existing) */
.form-container { display: flex; flex-direction: column; width: 100%; max-width: 480px; margin: 20px auto; padding: 1rem; box-sizing: border-box; }
.form-container input, .form-container button { margin: 10px 0; padding: 12px; width: 100%; font-size: 1rem; }
.form-container button { background: #0077b5; color: #fff; border: none; border-radius: 6px; cursor: pointer; }
.form-container button:hover { background: #005f86; }

/* Upload preview styles */
.preview-container { text-align: center; margin: 10px 0; width: 100%; max-width: 360px; }
.preview-container img.preview-img { width: 100%; max-width: 100%; height: auto; border-radius: 6px; box-shadow: 0 2px 8px rgba(0,0,0,0.1); display: block; margin: 0 auto; }
.preview-info { font-size: 0.9rem; color: #333; margin-top: 6px; }

@media (max-width: 1000px) {
	.preview-container { max-width: 520px; }
}
@media (max-width: 600px) {
	.preview-container { max-width: 100%; }
}
.timeline { display: flex; flex-direction: column; align-items: center; }
.post { border: 1px solid #222; padding: 10px; margin: 10px; width: 90%; max-width: 400px; }
.post img { width: 100%; height: auto; }
@media (max-width: 600px) { .post { width: 100%; } }

/* Styles specific to photos.php when body has class 'photos' */
.photos {
	background-color: #fff;
	color: #000;
	min-height: 100vh;
}
.photos .timeline { display: block; background: transparent; }
.photos .post { border: 1px solid #e0e0e0; background: #fff; }
.photos a { color: #0077b5; }
.photos small { color: #666; }

/* Masonry layout using CSS columns for the timeline */
.photos .timeline {
	column-count: 3;
	column-gap: 1rem;
	width: 100%;
	max-width: 1100px;
	margin: 0 auto;
	padding: 1rem 0;
}
.photos .post {
	display: inline-block;
	width: 100%;
	margin: 0 0 1rem;
	break-inside: avoid;
	-webkit-column-break-inside: avoid;
	-moz-column-break-inside: avoid;
	box-shadow: 0 2px 8px rgba(0,0,0,0.6);
}
.photos .post img { display:block; width:100%; height:auto; border-radius:4px; }

@media (max-width: 1000px) {
	.photos .timeline { column-count: 2; }
}
@media (max-width: 600px) {
	.photos .timeline { column-count: 1; }
}

/* Lightbox / Carousel styles */
.lightbox-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0,0,0,0.9);
	display: none;
	align-items: center;
	justify-content: center;
	z-index: 9999;
}
.lightbox-overlay.open { display: flex; }
.lightbox-content { position: relative; max-width: 95%; max-height: 95%; text-align: center; }
.lightbox-content img { max-width: 100%; max-height: 80vh; border-radius: 6px; }
.lightbox-caption { color: #ddd; margin-top: 0.5rem; }
.lightbox-close, .lightbox-prev, .lightbox-next {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background: rgba(0,0,0,0.5);
	color: #fff;
	border: none;
	padding: 0.5rem 0.7rem;
	font-size: 1.2rem;
	cursor: pointer;
	border-radius: 4px;
}
.lightbox-close { top: 1rem; right: 1rem; transform: none; }
.lightbox-prev { left: -3rem; }
.lightbox-next { right: -3rem; }
.lightbox-inner { max-width: 100%; max-height: 80vh; overflow: auto; text-align: center; }
@media (max-width: 700px) {
	.lightbox-prev { left: 0.5rem; }
	.lightbox-next { right: 0.5rem; }
}

.photos-iframe {
    width: 100%;
    height: 600px;     /* fixed fallback */
    min-height: 60vh;  /* better responsive option: uses viewport height */
    border: none;
    display: block;
}

/* Utility classes to replace inline styles */
.hidden { display: none !important; }
.page-title { text-align: center; margin-top: 1rem; }
.muted-label { font-weight: 600; margin-bottom: 6px; display: block; }
.form-alert { max-width: 480px; margin: 10px auto; color: #b00020; font-weight: 600; }

/* Uploaded photos list */
.uploaded-list { display:flex; flex-wrap:wrap; gap:12px; margin-top:12px; }
.uploaded-item { width:120px; }
.uploaded-item img { display:block; width:100%; height:auto; border-radius:4px; }
.uploaded-meta { margin-top:6px; font-size:0.9rem; }
.delete-btn { display:inline-block; background:#b00020; color:#fff; border:none; padding:6px 8px; border-radius:4px; cursor:pointer; font-size:0.85rem; }
.delete-btn:hover { background:#880015; }
.page-wrap { max-width:920px; margin:16px auto; padding:0 12px; }
.section-title { margin-top:18px; }

/* Upload notices */
.upload-notice { font-weight:600; margin-top:8px; }
.upload-success { color: green; }
.upload-error { color: #b00020; }

/* Resize UI */
.resize-info { margin-left: 12px; color: #666; font-size: 0.9rem; }

/* Upload progress */
.upload-status { margin-top: 8px; }
.upload-progress { background:#e6e6e6; border-radius:6px; overflow:hidden; height:12px; width:100%; max-width:480px; }
.upload-progress-bar { height:100%; width:0%; background:#0077b5; transition:width 0.2s ease; }
.upload-message { margin-top:6px; font-size:0.95rem; }
