/*
 * src/main/webapp/css/aboutUs.css
 * Author: Miguel Fernandez
 * Blue Team - Robert Breutzmann, Miguel Fernandez, Carolina Rodriguez, Sara White
 * Primary Author/Owner - Miguel Fernandez
 * CSD 460 - Capstone Project - Marina Website Project
 *
 * About Us page styles. Depends on site.css being linked first - every
 * color here comes from a semantic variable, no hex values. Shared form
 * classes (.hero-band, .form-group, .field-error, .required-mark,
 * .field-hint, .form-banner, .btn-primary) now live in site.css.
 */

.about-page {
	max-width: var(--content-wide);
	margin: 0 auto;
	padding: 3rem 1.5rem 4rem;
}

.about-page section + section {
	margin-top: 4rem;
}

.about-page h2 {
	margin: 0 0 1.25rem;
	color: var(--color-text-heading);
	font-family: var(--font-heading);
	font-size: 1.9rem;
}

/* ==========================================================================
   The marina's story - text beside a photo, stacking on narrow screens
   ========================================================================== */

.about-story {
	display: grid;
	grid-template-columns: 1.15fr 1fr;
	gap: 2.5rem;
	align-items: start;
}

.about-story__text p {
	margin: 0 0 1rem;
	font-size: 1.02rem;
	line-height: 1.65;
}

.about-story__text p:last-child {
	margin-bottom: 0;
}

.about-story__figure {
	margin: 0;
}

.about-story__figure img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: var(--radius-card);
	box-shadow: 0 8px 20px color-mix(in srgb, var(--color-charcoal-navy) 22%, transparent);
}

.about-story__figure figcaption,
.about-map figcaption {
	margin-top: 0.6rem;
	color: var(--color-text-muted);
	opacity: 0.75;
	font-size: 0.85rem;
	text-align: center;
}

/* ==========================================================================
   At a glance - three figures
   ========================================================================== */

.about-facts__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1.5rem;
}

.about-fact {
	background: var(--color-bg-card);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-card);
	padding: 1.5rem;
	text-align: center;
}

.about-fact__figure {
	display: block;
	color: var(--color-cta-secondary-bg);
	font-family: var(--font-heading);
	font-size: 2.6rem;
	line-height: 1;
}

.about-fact h3 {
	margin: 0.5rem 0 0.65rem;
	color: var(--color-text-heading);
	font-family: var(--font-heading);
	font-size: 1.1rem;
}

.about-fact p {
	margin: 0;
	color: var(--color-text-muted);
	font-size: 0.88rem;
	line-height: 1.55;
}

/* ==========================================================================
   Find us and reach us
   ========================================================================== */

/* minmax(0, 1fr), not 1fr: a plain 1fr column won't shrink below its
   widest unbreakable content (the email address), which pushed the cards
   past the edge of a 320px phone. */
.about-contact__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1.5rem;
}

.about-contact__card {
	background: var(--color-bg-card);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-card);
	padding: 1.5rem;
}

.about-contact__card h3 {
	margin: 0 0 1rem;
	padding-bottom: 0.6rem;
	border-bottom: 1px solid var(--color-border);
	color: var(--color-text-heading);
	font-size: 1.05rem;
}

.about-contact__card address {
	font-style: normal;
	line-height: 1.7;
}

.about-contact__line {
	display: flex;
	gap: 0.6rem;
	margin: 0 0 0.55rem;
	line-height: 1.5;
}

/* A longer address in future wraps instead of pushing the card wider. */
.about-contact__line a {
	overflow-wrap: anywhere;
}

.about-contact__label {
	flex: 0 0 3.6rem;
	color: var(--color-text-muted);
	opacity: 0.7;
	font-size: 0.85rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	padding-top: 0.12rem;
}

.about-hours {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.92rem;
}

.about-hours th,
.about-hours td {
	padding: 0.3rem 0;
	text-align: left;
	font-weight: 400;
}

.about-hours th {
	color: var(--color-text-muted);
	opacity: 0.75;
	padding-right: 1rem;
	white-space: nowrap;
}

.about-hours td {
	text-align: right;
}

.about-hours__note {
	margin: 0.9rem 0 0;
	padding-top: 0.8rem;
	border-top: 1px solid var(--color-border);
	color: var(--color-text-muted);
	opacity: 0.75;
	font-size: 0.82rem;
	line-height: 1.45;
}

/* ==========================================================================
   Marina map
   ========================================================================== */

.about-map figure {
	margin: 0;
	background: var(--color-surface-neutral);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-card);
	padding: 1.25rem;
}

.about-map img {
	display: block;
	width: 100%;
	height: auto;
}

/* ==========================================================================
   Contact form
   ========================================================================== */

.about-form-section__lead {
	max-width: 46rem;
	margin: -0.4rem 0 1.75rem;
	color: var(--color-text-muted);
	line-height: 1.6;
}

.contact-form {
	display: flex;
	flex-direction: column;
	gap: 0.85rem;
	max-width: 52rem;
	margin: 0 auto;
	background: var(--color-bg-card);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-card);
	padding: 1.75rem;
}

.contact-form__row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.85rem;
}

.contact-form textarea {
	padding: 0.7rem 0.8rem;
	border: 1px solid var(--color-input-border);
	border-radius: var(--radius-control);
	background: var(--color-input-bg);
	color: var(--color-input-text);
	font-family: inherit;
	font-size: 0.95rem;
	width: 100%;
	resize: vertical;
}

.contact-form textarea:focus {
	outline: none;
	border-color: var(--color-input-border-focus);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-ocean-blue) 15%, transparent);
}

.contact-form textarea.field-invalid {
	border-color: var(--color-error);
}

/* Sits under the textarea, right-aligned, quiet until it matters. */
.contact-form__counter {
	margin: 0.2rem 0 0;
	color: var(--color-text-muted);
	font-size: 0.78rem;
	text-align: right;
}

.contact-form__counter.is-near-limit {
	color: var(--color-error);
}

.contact-form__actions {
	margin-top: 0.25rem;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 56rem) {
	.about-story {
		grid-template-columns: 1fr;
		gap: 1.75rem;
	}

	.about-facts__grid,
	.about-contact__grid {
		grid-template-columns: minmax(0, 1fr);
		max-width: 520px;
		margin: 0 auto;
	}
}

@media (max-width: 40rem) {
	.about-page {
		padding: 2rem 1rem 3rem;
	}

	/* Label above its value on phones, so the email address gets the
	   card's full width and doesn't break mid-word. flex: none undoes the
	   label's 3.6rem width, which would otherwise become its height. */
	.about-contact__line {
		flex-direction: column;
		gap: 0.1rem;
	}

	.about-contact__label {
		flex: none;
		padding-top: 0;
	}

	.about-page section + section {
		margin-top: 2.75rem;
	}

	.about-page h2 {
		font-size: 1.6rem;
	}

	.contact-form {
		padding: 1.25rem;
		gap: 0.65rem;
	}

	.contact-form__row {
		grid-template-columns: 1fr;
		gap: 0.65rem;
	}
}


