/* Evde Doktorum — Mobile & Responsive Refinements (v1.2) */

/* ===== GLOBAL SAFETY: prevent horizontal scroll ===== */
html, body { overflow-x: hidden; max-width: 100vw; }
img, video, iframe, svg { max-width: 100%; }

/* ===== MARQUEE / CAMPAIGNS — keep overflow hidden on small screens ===== */
.ed-campaigns { overflow: hidden; }
.ed-campaigns__track { will-change: transform; }

/* ===== HEADER MOBILE ===== */
@media (max-width: 899px) {
	.ed-topbar { display: none; }
	.ed-nav { padding: 10px 0; }
	.ed-nav__row { gap: 10px; flex-wrap: nowrap; }
	.ed-brand img, .ed-brand .ed-brand__logo { max-height: 38px; }
	.ed-brand__text { display: none; }
	.ed-menu { display: none; }
	/* Simplify nav CTAs on small screens */
	.ed-nav__cta .ed-btn--primary { padding: 8px 14px; font-size: 13px; }
	.ed-nav__cta .ed-btn--primary span { display: none; }
	.ed-nav__cta .ed-btn--primary svg { width: 18px; height: 18px; }
	.ed-nav__cta .ed-btn--accent { padding: 8px 14px; font-size: 13px; }
	.ed-nav__cta .ed-btn--accent span { display: none; }
	.ed-nav__cta .ed-btn--accent svg { width: 18px; height: 18px; }
	.ed-nav__toggle { width: 40px; height: 40px; }
}

@media (max-width: 479px) {
	.ed-brand img, .ed-brand .ed-brand__logo { max-height: 34px; }
	.ed-nav__cta .ed-btn--primary,
	.ed-nav__cta .ed-btn--accent {
		width: 40px; height: 40px;
		padding: 0;
		border-radius: var(--ed-r-sm);
	}
}

/* ===== HERO MOBILE ===== */
@media (max-width: 899px) {
	.ed-hero { padding: 40px 0 56px; }
	.ed-hero__layout { grid-template-columns: 1fr !important; gap: var(--ed-s5); }
	.ed-hero__title { font-size: clamp(1.75rem, 1.1rem + 3vw, 2.5rem); }
	.ed-hero__lede { font-size: 15px; }
	.ed-hero__cta .ed-btn { flex: 1; min-width: 140px; }
	.ed-hero__badges {
		grid-template-columns: 1fr 1fr;
		gap: 10px;
	}
	.ed-hero__media { aspect-ratio: 4 / 3; margin-inline: auto; max-width: 420px; }
	.ed-hero__float--tl, .ed-hero__float--br { display: none; }
	.ed-hero__review { flex-wrap: wrap; font-size: 11px; }
}

@media (max-width: 479px) {
	.ed-hero__badges { grid-template-columns: 1fr; }
	.ed-hero__cta { flex-direction: column; }
	.ed-hero__cta .ed-btn { width: 100%; }
}

/* ===== SERVICE FINDER MOBILE ===== */
@media (max-width: 819px) {
	.ed-finder { margin-top: -32px; }
	.ed-finder__wrap {
		grid-template-columns: 1fr !important;
		padding: 16px;
	}
}

/* ===== SECTIONS GRID MOBILE ===== */
@media (max-width: 899px) {
	.ed-services__grid[data-cols],
	.ed-areas__grid[data-cols] {
		grid-template-columns: repeat(2, 1fr) !important;
	}
	.ed-process__grid,
	.ed-why__grid,
	.ed-pricing__grid,
	.ed-testimonials__grid,
	.ed-blogfeed__grid {
		grid-template-columns: 1fr !important;
	}
	.ed-trust__grid { grid-template-columns: repeat(2, 1fr); }
	.ed-stats__grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
	.ed-stat__value { font-size: clamp(2rem, 1.5rem + 2vw, 2.5rem); }
	.ed-coverage__layout { grid-template-columns: 1fr !important; }
	.ed-coverage__counts { grid-template-columns: repeat(3, 1fr); gap: 10px; }
	.ed-coverage__count strong { font-size: 1.4rem; }
	.ed-contact-cta__wrap { grid-template-columns: 1fr !important; padding: 24px !important; }
}

@media (max-width: 549px) {
	.ed-services__grid[data-cols],
	.ed-areas__grid[data-cols] {
		grid-template-columns: 1fr !important;
	}
	.ed-stats__grid { grid-template-columns: 1fr 1fr; }
	.ed-coverage__counts { grid-template-columns: 1fr; }
}

/* Section padding tighter on mobile */
@media (max-width: 767px) {
	.ed-section { padding-block: clamp(40px, 8vw, 64px); }
	.ed-section__title { font-size: clamp(1.375rem, 1rem + 2vw, 1.875rem); }
	.ed-section__lede { font-size: 14px; padding-inline: 12px; }
}

/* ===== SINGLE POST MOBILE ===== */
@media (max-width: 1019px) {
	.ed-single__layout { grid-template-columns: 1fr !important; gap: var(--ed-s5); }
	.ed-sidebar--rich { position: static; }
}

@media (max-width: 767px) {
	.ed-single-hero { padding-block: 32px 28px; }
	.ed-single-hero__title { font-size: clamp(1.5rem, 1.1rem + 2vw, 2rem); }
	.ed-single-hero__lede { font-size: 14px; }
	.ed-single-hero__actions { flex-direction: column; }
	.ed-single-hero__actions .ed-btn { width: 100%; }
	.ed-single-hero__mini { gap: 16px; font-size: 12px; }
	.ed-prose { font-size: 16px; }
	.ed-prose h2 { font-size: 1.3rem; margin-top: 32px; }
	.ed-single__block { margin-top: 40px; padding-top: 28px; }
	.ed-single__cta-banner { padding: 24px; border-radius: var(--ed-r-lg); }
	.ed-single__cta-banner h3 { font-size: 1.25rem; }
	.ed-single__cta-banner-actions { flex-direction: column; }
	.ed-single__cta-banner-actions .ed-btn { width: 100%; }
}

/* ===== FOOTER MOBILE (bento → stacked) ===== */
@media (max-width: 899px) {
	.ed-footer__main { padding-block: 40px 32px; }
	.ed-footer__hero-row { grid-template-columns: 1fr !important; }
	.ed-footer__cta-layer { padding-block: 40px 0; }
	.ed-footer__cta-wrap {
		grid-template-columns: 1fr !important;
		padding: 24px !important;
	}
	.ed-footer__cta-wrap h3 { font-size: 1.375rem; }
	.ed-footer__cta-actions { justify-content: flex-start !important; }
	.ed-footer__cta-actions .ed-btn { flex: 1; min-width: 140px; }
	.ed-footer__svc-grid { grid-template-columns: 1fr; }
	.ed-footer__areas-grid { grid-template-columns: repeat(2, 1fr); }
	.ed-footer__links-row { grid-template-columns: 1fr 1fr; gap: 20px; }
	.ed-footer__trust-row { grid-template-columns: 1fr 1fr; gap: 10px; }
	.ed-footer__trust-item { padding: 10px 12px; }
	.ed-footer__trust-item strong { font-size: 12px; }
	.ed-footer__trust-item span { font-size: 10px; }
	.ed-footer__brand-card { padding: 20px; }
	.ed-footer__big-cta { padding: 20px; }
	.ed-footer__big-cta h3 { font-size: 1.375rem; }
	.ed-footer__bottom { grid-template-columns: 1fr !important; text-align: center !important; }
	.ed-footer__bottom .ed-footer__credit { justify-content: center !important; }
}

@media (max-width: 479px) {
	.ed-footer__areas-grid { grid-template-columns: 1fr; }
	.ed-footer__links-row { grid-template-columns: 1fr; }
	.ed-footer__trust-row { grid-template-columns: 1fr; }
}

/* ===== MEGA MENU ON MOBILE — always hidden (handled by drawer) ===== */
@media (max-width: 1199px) {
	.ed-mega { display: none !important; }
}

/* ===== STICKY MOBILE CTA — reserve body padding ===== */
@media (max-width: 767px) {
	body { padding-bottom: 72px; }
	.ed-sticky-cta {
		display: flex !important;
		position: fixed;
		inset: auto 0 0 0;
		padding: 8px 10px env(safe-area-inset-bottom, 8px);
		gap: 8px;
		background: rgba(11, 17, 32, 0.96);
		backdrop-filter: blur(14px);
		-webkit-backdrop-filter: blur(14px);
		border-top: 1px solid rgba(255, 255, 255, 0.1);
		z-index: var(--ed-z-sticky);
	}
	.ed-sticky-cta .ed-btn { flex: 1; padding: 12px 10px; font-size: 14px; }
	.ed-sticky-cta .ed-btn--primary { background: var(--ed-accent); color: var(--ed-primary); border-color: var(--ed-accent); }
	.ed-wa-float { bottom: 84px !important; }
}

/* ===== MODAL MOBILE ===== */
@media (max-width: 479px) {
	.ed-modal__content { padding: 20px; max-height: 94vh; border-radius: var(--ed-r-md); }
	.ed-modal__content h2 { font-size: 1.25rem; }
	.ed-field--row { grid-template-columns: 1fr !important; }
}

/* ===== ACCORDION MOBILE ===== */
@media (max-width: 767px) {
	.ed-accordion__trigger { padding: 14px 16px; font-size: 15px; }
	.ed-accordion__body { padding: 0 16px 16px; }
}

/* ===== CARDS MOBILE ===== */
@media (max-width: 549px) {
	.ed-card { padding: var(--ed-s4); }
	.ed-card__title { font-size: 1rem; }
	.ed-card__text { font-size: 13px; }
	.ed-card__icon { width: 44px; height: 44px; }
	.ed-card__icon svg { width: 22px; height: 22px; }
}

/* ===== BLOG ARCHIVE MOBILE ===== */
@media (max-width: 767px) {
	.ed-archive-list .ed-grid { grid-template-columns: 1fr !important; }
	.ed-page-hero { padding: 40px 0 24px; }
	.ed-page-hero__title { font-size: clamp(1.5rem, 1.1rem + 2vw, 2rem); }
	.ed-sortbar { flex-direction: column; align-items: stretch; gap: 10px; }
	.ed-sortbar__controls { justify-content: space-between; }
}

/* ===== PAGINATION MOBILE ===== */
@media (max-width: 479px) {
	.ed-pagination a, .ed-pagination span {
		min-width: 36px; height: 36px;
		font-size: 13px;
	}
}

/* ===== FORMS MOBILE ===== */
@media (max-width: 549px) {
	.ed-field--row { grid-template-columns: 1fr !important; }
	.ed-input, .ed-textarea, .ed-select { padding: 12px 14px; font-size: 15px; } /* 15px prevents iOS zoom */
}

/* ===== PROSE tables → scrollable on mobile ===== */
@media (max-width: 767px) {
	.ed-prose table, .ed-single__content table {
		display: block;
		overflow-x: auto;
		white-space: nowrap;
		-webkit-overflow-scrolling: touch;
	}
}

/* ===== FOOTER TAG CLOUD mobile tight ===== */
@media (max-width: 767px) {
	.ed-footer__tagcloud a { font-size: 10px; padding: 3px 8px; }
}

/* ===== TYPOGRAPHY RHYTHM on mobile ===== */
@media (max-width: 549px) {
	h1, .ed-hero__title, .ed-single-hero__title { letter-spacing: -0.015em; }
	p { line-height: 1.6; }
}

/* ===== ICON BUTTONS touch target ===== */
@media (hover: none) and (pointer: coarse) {
	.ed-btn { min-height: 44px; }
	.ed-ibtn { min-width: 44px; min-height: 44px; }
	.ed-footer__social a { width: 42px; height: 42px; }
}

/* ===== HERO IMAGE FALLBACK on small viewports ===== */
@media (max-width: 767px) {
	.ed-hero__media { aspect-ratio: 5 / 4; }
}
