/**
 * Angle North Atlantic Divi Child Theme — Responsive Refinements
 * File: assets/css/responsive.css
 * Version: 2.0.0
 *
 * Mobile-first breakpoints (Divi standard):
 *   ≤ 480px  — phones
 *   ≤ 767px  — landscape phones / small tablets
 *   ≤ 980px  — tablets
 *   ≥ 981px  — desktops
 *   ≥ 1280px — wide desktops
 */

/* ==========================================================================
   REDUCED MOTION — must come first
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}

	.ana-animate-float,
	.ana-animate-fade-up,
	.ana-skeleton {
		animation: none !important;
	}

	.ana-book-feature__cover {
		transform: none !important;
	}
}


/* ==========================================================================
   TABLET — max-width: 980px
   ========================================================================== */

@media (max-width: 980px) {

	/* Hero split → stacked */
	.ana-hero--split .ana-hero__inner {
		grid-template-columns: 1fr;
		gap: var(--space-10);
	}

	.ana-hero--split .ana-hero__photo {
		max-height: 400px;
		aspect-ratio: 4 / 3;
		max-width: 480px;
		margin: 0 auto;
	}

	.ana-hero__title {
		font-size: var(--fs-3xl);
		max-width: none;
	}

	/* Services → 2 columns */
	.ana-services__grid {
		grid-template-columns: repeat(2, 1fr);
	}

	/* Book feature → stacked */
	.ana-book-feature__inner {
		grid-template-columns: 1fr;
		gap: var(--space-10);
		text-align: center;
	}

	.ana-book-feature__cover {
		max-width: 260px;
		margin: 0 auto;
	}

	.ana-book-feature__ctas {
		justify-content: center;
	}

	.ana-book-feature__description {
		margin-left: auto;
		margin-right: auto;
	}

	/* Bio → stacked */
	.ana-bio-section__inner {
		grid-template-columns: 1fr;
		gap: var(--space-10);
	}

	.ana-bio-section__photo-col {
		position: static;
		max-width: 320px;
		margin: 0 auto;
	}

	/* CORE acrostic → 2×2 */
	.ana-letter-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: var(--space-6);
	}

	/* Media grid → 2 col */
	.ana-media-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	/* Blog grid → 2 col */
	.ana-blog-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	/* Testimonials → 2 col */
	.ana-testimonial-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	/* Contact → stacked */
	.ana-contact-page-wrap {
		grid-template-columns: 1fr;
		gap: var(--space-10);
	}

	/* Speaking topics → 1 col */
	.ana-speaking-topics {
		grid-template-columns: 1fr;
	}

	.ana-speaking-cta {
		padding: var(--space-10) var(--space-8);
	}

	/* Publications — hide link column on small tablets */
	.ana-publication-item {
		grid-template-columns: auto 1fr;
	}

	.ana-publication-item__link {
		grid-column: 2;
	}
}


/* ==========================================================================
   SMALL TABLET / LANDSCAPE PHONE — max-width: 767px
   ========================================================================== */

@media (max-width: 767px) {

	:root {
		--ana-section-pad-v: clamp(2.5rem, 5vw, 4rem);
	}

	.ana-hero {
		padding-top: var(--space-16);
		padding-bottom: var(--space-20);
	}

	.ana-hero__title {
		font-size: var(--fs-2xl);
	}

	.ana-hero__ctas {
		flex-direction: column;
		align-items: flex-start;
	}

	.ana-trust-strip__inner {
		flex-direction: column;
		gap: var(--space-4);
		text-align: center;
	}

	.ana-services__grid {
		grid-template-columns: 1fr;
	}

	.ana-media-grid {
		grid-template-columns: 1fr;
	}

	.ana-blog-grid {
		grid-template-columns: 1fr;
		padding-left: var(--ana-section-pad-h);
		padding-right: var(--ana-section-pad-h);
	}

	.ana-testimonial-grid {
		grid-template-columns: 1fr;
	}

	/* Form half-rows → full */
	.ana-form-row--half {
		flex-direction: column;
	}

	/* Clinical banner → stacked */
	.ana-clinical-banner {
		flex-direction: column;
		text-align: center;
		padding: var(--space-6);
	}

	.ana-clinical-banner__link {
		width: 100%;
		text-align: center;
		justify-content: center;
	}

	/* Publication items → simplified */
	.ana-publication-item {
		grid-template-columns: 1fr;
	}

	.ana-publication-item__year {
		font-size: var(--fs-md);
		text-align: left;
		min-width: auto;
	}

	.ana-speaking-cta {
		padding: var(--space-8) var(--space-6);
	}

	.ana-speaking-cta__ctas {
		flex-direction: column;
		align-items: center;
	}

	.ana-cta-band__ctas {
		flex-direction: column;
		align-items: center;
	}

	.ana-bio-section__name {
		font-size: var(--fs-2xl);
	}
}


/* ==========================================================================
   PHONE — max-width: 480px
   ========================================================================== */

@media (max-width: 480px) {

	:root {
		--ana-section-pad-h: 1rem;
		--ana-section-pad-v: 2.5rem;
	}

	.ana-hero {
		padding-top: var(--space-12);
		padding-bottom: var(--space-16);
	}

	.ana-hero__title     { font-size: var(--fs-xl); }
	.ana-hero__sub       { font-size: var(--fs-base); }

	.ana-hero__ctas .ana-btn,
	.ana-book-feature__ctas .ana-btn,
	.ana-speaking-cta__ctas .ana-btn,
	.ana-cta-band__ctas .ana-btn {
		width: 100%;
		justify-content: center;
		text-align: center;
	}

	.ana-hero__ctas,
	.ana-book-feature__ctas,
	.ana-speaking-cta__ctas,
	.ana-cta-band__ctas {
		flex-direction: column;
		align-items: stretch;
	}

	.ana-hero--split .ana-hero__photo {
		aspect-ratio: 3 / 2;
		max-height: 280px;
	}

	.ana-child-theme h2 { font-size: var(--fs-xl); }

	.ana-book-feature__cover  { max-width: 200px; }
	.ana-book-feature__title  { font-size: var(--fs-xl); }

	.ana-bio-section__photo-col { max-width: 260px; }
	.ana-bio-section__name      { font-size: var(--fs-xl); }

	.ana-letter-item__char  { font-size: var(--fs-2xl); }

	.ana-service-card       { padding: var(--space-6); }
	.ana-media-card__body   { padding: var(--space-4); }

	.ana-inquiry-form-wrap {
		padding: var(--space-6);
		border-radius: var(--radius-lg);
	}

	.ana-testimonial        { padding: var(--space-6); }

	.ana-speaking-cta {
		padding: var(--space-8) var(--space-5);
	}

	.ana-speaking-cta h3 { font-size: var(--fs-xl); }
}


/* ==========================================================================
   WIDE DESKTOP — min-width: 1280px
   ========================================================================== */

@media (min-width: 1280px) {

	:root {
		--ana-section-pad-h: 3rem;
	}

	.ana-hero {
		padding-top: 8rem;
		padding-bottom: 8rem;
	}

	.ana-bio-section__inner {
		grid-template-columns: 420px 1fr;
	}

	.ana-book-feature__inner {
		grid-template-columns: 1fr 1.8fr;
	}

	.ana-book-feature__cover {
		max-width: 380px;
	}

	.ana-media-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}


/* ==========================================================================
   PRINT
   ========================================================================== */

@media print {
	#main-header,
	#main-footer,
	.ana-cta-band,
	.ana-speaking-cta,
	.ana-trust-strip,
	.ana-reading-progress,
	.ana-btn {
		display: none !important;
	}

	body.ana-child-theme {
		background: white;
		color: black;
		font-size: 12pt;
	}

	.ana-hero {
		background: white !important;
		color: black !important;
		padding: 1cm 0;
	}

	.ana-hero::before,
	.ana-hero::after {
		display: none;
	}

	.ana-hero__title { color: black !important; font-size: 24pt; }

	a[href]::after {
		content: ' (' attr(href) ')';
		font-size: 0.8em;
		color: #555;
	}

	.ana-book-feature {
		background: white !important;
		color: black !important;
		border: 1pt solid #ccc;
	}

	.ana-book-feature__title,
	.ana-book-feature__description {
		color: black !important;
	}

	.ana-blog-grid,
	.ana-media-grid,
	.ana-services__grid {
		display: block;
	}

	.ana-service-card,
	.ana-media-card,
	.ana-blog-card {
		border: 1pt solid #ccc;
		page-break-inside: avoid;
		margin-bottom: 0.5cm;
	}
}

/* ==========================================================================
   ANA-SPECIFIC RESPONSIVE (Angle North Atlantic)
   ========================================================================== */

@media (max-width: 980px) {
	.ana-stats-grid { grid-template-columns: repeat(2, 1fr); }
	.ana-contact-grid { grid-template-columns: 1fr; gap: var(--space-10); }
}

@media (max-width: 767px) {
	.ana-doc-list { grid-template-columns: 1fr; }
	.ana-meeting-card { padding: var(--space-6); }
	.ana-meeting-badge { width: 180px; height: 180px; }
	.ana-meeting-badge__year { font-size: 2.5rem; }
	.ana-table th,
	.ana-table td { padding: var(--space-3); font-size: var(--fs-xs); }
	.ana-table--officers th[scope="row"] { width: 40%; }
	.ana-page-header { padding: var(--space-12) var(--ana-section-pad-h) var(--space-8); }
}

@media (max-width: 480px) {
	.ana-stats-grid { grid-template-columns: 1fr; gap: var(--space-6); }
	.ana-table td:last-child { white-space: normal; }
}

@media (max-width: 980px) {
	.ana-footer-band__inner { grid-template-columns: 1fr 1fr; }
	.wp-block-gallery, .gallery { grid-template-columns: repeat(3, 1fr); }
	.ana-meeting-card--split { grid-template-columns: 1fr; text-align: center; }
	.ana-meeting-card--split .ana-meeting-badge { margin: 0 auto; }
	.ana-meeting-card--split .ana-hero__ctas { justify-content: center; }
}

@media (max-width: 767px) {
	.ana-footer-band__inner { grid-template-columns: 1fr; gap: var(--space-8); }
	.wp-block-gallery, .gallery { grid-template-columns: repeat(2, 1fr); }
	.wp-block-gallery img, .gallery img { height: 130px; }
	.ana-table--dues .ana-pay-btn { padding: 0.4rem 0.8rem; }
}

/* --- v1.2 native Divi responsive --- */
@media (max-width: 980px) {
	.ana-home-feature .et_pb_row,
	.ana-biennial-row { flex-direction: column; text-align: center; }
	.ana-home-feature .et_pb_button_module_wrapper,
	.ana-biennial-row .et_pb_button_module_wrapper { margin-right: var(--space-2); }
	.et_pb_section.ana-hero { padding: var(--space-16) var(--ana-section-pad-h) !important; }
}
@media (max-width: 767px) {
	.ana-trust-strip .ana-trust-strip__inner { gap: var(--space-3) var(--space-5); font-size: var(--fs-xs); }
	.et_pb_section.ana-page-header { padding: var(--space-10) var(--ana-section-pad-h) var(--space-8) !important; }
	#logo { max-height: 54%; }
}

/* --- v1.3 responsive --- */
@media (max-width: 1180px) {
	#top-menu li a { font-size: 13px; padding: 10px 8px !important; }
}
@media (max-width: 980px) {
	#main-header .container { width: 92% !important; }
}

@media (max-width: 767px) {
	.ana-meeting-badge { width: 150px; height: 150px; }
	.ana-meeting-badge__year { font-size: 2.2rem; }
	.ana-meeting-badge--sm { width: 130px; height: 130px; }
}

@media (max-width: 980px) {
	.ana-date-panel { min-height: 0; padding: var(--space-8) var(--space-6); margin-bottom: var(--space-6); }
	.ana-date-panel__year { font-size: 2.6rem; }
}

@media (max-width: 767px) {
	.ana-services__grid-row .et_pb_column { margin-bottom: var(--space-4); }
}

/* --- v1.6 news grid responsive --- */
@media (max-width: 980px) {
	.ana-news__grid { grid-template-columns: repeat(2, 1fr); }
	.ana-news__toolbar { flex-direction: column; align-items: stretch; }
	.ana-news__search input[type="search"] { flex: 1; min-width: 0; }
}
@media (max-width: 600px) {
	.ana-news__grid { grid-template-columns: 1fr; }
}

@media (max-width: 767px) {
	.blocks-gallery-item img,
	.wp-block-gallery li img { height: 130px !important; }
}

@media (max-width: 1100px) {
	.single-post .entry-content .gallery,
	.single-post .entry-content .wp-block-gallery { grid-template-columns: repeat(3, 1fr); }
	.single-post .gallery img, .single-post .wp-block-gallery img { height: 180px !important; }
}
@media (max-width: 700px) {
	.single-post .entry-content .gallery,
	.single-post .entry-content .wp-block-gallery { grid-template-columns: repeat(2, 1fr); }
	.single-post .gallery img, .single-post .wp-block-gallery img { height: 140px !important; }
}

@media (max-width: 767px) {
	.ana-meeting-card__cols { flex-direction: column; align-items: stretch; gap: var(--space-5); }
	.ana-meeting-card__actions { min-width: 0; }
}

/* ==========================================================================
   ANA v1.8.3 — FULL MOBILE PASS
   ========================================================================== */

/* --- Header: restore Divi's mobile menu below 980px ------------------- */
@media (max-width: 980px) {
	/* The desktop flex-nav rules must not leak into mobile — hide the
	   desktop menu entirely and let Divi's hamburger take over. */
	#et-top-navigation nav,
	#top-menu-nav,
	#top-menu { display: none !important; }

	#et-top-navigation {
		display: flex !important;
		align-items: center;
		justify-content: flex-end;
		padding-top: 0 !important;
	}
	#et_mobile_nav_menu { display: block; }
	.mobile_menu_bar:before { color: var(--ana-navy); font-size: 30px; }

	/* Logo: cap width so the tagline never collides with the hamburger */
	#logo { max-width: min(62vw, 300px); max-height: 46px !important; }
	#main-header .logo_container { display: flex; align-items: center; }

	/* Mobile dropdown menu: brand styling + roomy tap targets */
	.et_mobile_menu {
		background: var(--ana-white) !important;
		border-top: 3px solid var(--ana-sky);
		box-shadow: var(--shadow-md);
		padding: 6px 0;
	}
	.et_mobile_menu li a {
		font-family: var(--font-body);
		font-size: 16px;
		font-weight: 500;
		color: var(--ana-ink-mid) !important;
		padding: 14px 5% !important;
		border-bottom: 1px solid var(--ana-navy-light);
	}
	.et_mobile_menu li:last-child a { border-bottom: none; }
	.et_mobile_menu li a:hover,
	.et_mobile_menu li.current-menu-item > a {
		color: var(--ana-sky-dark) !important;
		background: var(--ana-navy-light);
	}
}

/* --- Page headers & section rhythm ------------------------------------ */
@media (max-width: 980px) {
	.et_pb_section.ana-page-header { padding: var(--space-10) var(--ana-section-pad-h) var(--space-8) !important; }
	.ana-page-header__title { font-size: var(--fs-2xl); }
	.et_pb_section.ana-section-pad,
	.et_pb_section.ana-cta-band,
	.et_pb_section.ana-book-feature,
	.et_pb_section.ana-services { padding: var(--space-12) var(--ana-section-pad-h) !important; }
}

@media (max-width: 767px) {
	.ana-section-pad h2,
	.ana-services h2,
	.ana-cta-band .et_pb_module_header { font-size: var(--fs-xl); }
	.ana-dates--dark,
	.ana-meeting-card__dates { font-size: var(--fs-lg); }

	/* Tables scroll horizontally instead of crushing */
	.ana-table {
		display: block;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}
	.ana-table th, .ana-table td { min-width: 120px; }
	.ana-table--dues td:last-child,
	.ana-table--officers th[scope="row"] { min-width: 90px; }

	/* Meeting card + panels */
	.ana-meeting-card { padding: var(--space-5); }
	.ana-meeting-card__actions .ana-btn { width: 100%; }

	/* Footer band + bottom bar */
	.ana-footer-band { padding: var(--space-8) var(--ana-section-pad-h); }
	#footer-info { padding: 0 5%; line-height: 1.7; }

	/* News toolbar: search stretches, pills wrap cleanly */
	.ana-news__search { width: 100%; }
	.ana-archive-filter { gap: 6px; }
	.ana-filter-btn { padding: 0.45rem 0.9rem; }

	/* Buttons: comfortable tap targets, no cramped rows */
	body #page-container .et_pb_button { padding: 0.8rem 1.3rem !important; }
	.et_pb_button_module_wrapper { margin-right: var(--space-2) !important; }
}

@media (max-width: 480px) {
	.ana-page-header__title { font-size: var(--fs-xl); }
	.ana-hero__title { font-size: var(--fs-2xl); }
	.et_pb_section.ana-hero { padding: var(--space-12) var(--ana-section-pad-h) !important; }
	.ana-trust-strip .ana-trust-strip__inner { flex-direction: column; gap: var(--space-2); text-align: center; }
	.ana-stats-grid { gap: var(--space-5); }
	.ana-news__pagination { flex-wrap: wrap; }
	#logo { max-width: 58vw; }
}

/* ==========================================================================
   ANA v1.8.4 — MOBILE HEADER: LOGO RESTORED + BREATHING ROOM
   ========================================================================== */

@media (max-width: 980px) {
	/* Header bar: real padding, logo left / hamburger right, vertically centered */
	#main-header { padding: 12px 0 !important; }
	#main-header .container {
		width: 90% !important;
		display: flex !important;
		align-items: center;
		justify-content: space-between;
		min-height: 52px;
	}

	/* Logo: explicit height (SVG needs it — max-height alone collapses width) */
	#main-header .logo_container {
		position: static !important;
		width: auto !important;
		height: auto !important;
		display: flex;
		align-items: center;
		flex: 1;
		min-width: 0;
	}
	#logo {
		height: 40px !important;
		width: auto !important;
		max-height: none !important;
		max-width: min(64vw, 300px) !important;
		margin: 0 !important;
	}

	/* Hamburger: inset from the edge, comfortable hit area */
	#et-top-navigation {
		flex: 0 0 auto;
		padding: 0 !important;
		margin: 0 !important;
	}
	.mobile_menu_bar {
		padding: 8px 2px 8px 12px;
		line-height: 0;
	}
	#main-header .et_mobile_nav_menu { float: none; margin: 0; }
}

@media (max-width: 480px) {
	#logo { height: 34px !important; max-width: 60vw !important; }
	#main-header .container { min-height: 46px; }
}
