/* AllMedia.ge — extended responsive layer (loaded after main.css) */

/* ============= GLOBAL ENHANCEMENTS ============= */
html { -webkit-text-size-adjust: 100%; }
body {
	font-family: 'FiraGO', 'Noto Sans Georgian', 'BPG Arial', 'Helvetica Neue', Arial, sans-serif;
}
img { max-width: 100%; height: auto; }
a:focus-visible, button:focus-visible {
	outline: 2px solid var(--primary-blue);
	outline-offset: 2px;
	border-radius: 4px;
}

/* Smooth header transition on scroll */
.am-header { transition: box-shadow .25s ease, background .25s ease; }
.am-header.is-scrolled { box-shadow: 0 4px 20px rgba(0, 66, 150, .08); }

/* Better hover for cards */
.am-card, .am-edit-card, .am-video-card {
	transition: transform .25s ease, box-shadow .25s ease;
}

/* Polish hero overlay */
.am-hero__card::before {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, transparent 30%, rgba(7,30,65,.5) 70%, rgba(7,30,65,.9) 100%);
	pointer-events: none;
}

/* Source chip dot color stripe */
.am-source-chip:hover .am-source-chip__dot {
	transform: scale(1.4);
	transition: transform .2s;
}

/* Newsletter form polish */
.am-newsletter__form button {
	white-space: nowrap;
}

/* ============= LARGE SCREENS (1200-1400) ============= */
@media (max-width: 1320px) {
	.am-container { padding: 0 20px; }
	.am-hero__title { font-size: 28px; }
}

/* ============= TABLET (1024-1100) ============= */
@media (max-width: 1100px) {
	.am-cat-grid__inner { gap: 18px; }
	.am-video-card { flex-basis: calc((100% - 32px) / 3); min-width: 220px; }
	.am-newsletter__inner { padding: 28px; gap: 18px; }
	.am-footer__inner { padding: 36px 20px; }
}

/* ============= TABLET PORTRAIT (768-900) ============= */
@media (max-width: 900px) {
	.am-hero { padding: 16px 0; }
	.am-hero__grid { min-height: auto; }
	.am-hero__card { min-height: 380px; }
	.am-hero__title { font-size: 24px; }
	.am-cat-grid__inner { grid-template-columns: repeat(2, 1fr); }
	.am-video-card { flex-basis: calc((100% - 16px) / 2); min-width: 0; }
	.am-archive__title { font-size: 24px; }
}

/* ============= MOBILE (≤780) — full overhaul ============= */
@media (max-width: 780px) {
	:root { --gap: 16px; }
	body { font-size: 14.5px; }

	.am-container { padding: 0 16px; }

	/* Topbar — hide secondary nav */
	.am-topbar__menu { display: none !important; }
	.am-topbar__inner { height: 32px; }
	.am-topbar { font-size: 11px; }
	.am-topbar__date { font-size: 11px; }

	/* Header — sticky, mobile drawer */
	.am-header__inner { height: 60px; gap: 12px; }
	.am-logo { font-size: 20px; }
	.am-mobile-toggle { display: inline-flex !important; }
	.am-login { display: none; }

	/* Mobile drawer — slide from left */
	.am-nav {
		display: block !important;
		position: fixed !important;
		top: 0; left: 0; bottom: 0;
		width: 280px;
		max-width: 85vw;
		background: #fff;
		z-index: 200;
		padding: 20px 0;
		transform: translateX(-100%);
		transition: transform .3s ease;
		box-shadow: 0 0 50px rgba(0, 66, 150, .15);
		overflow-y: auto;
		border-top: 0;
	}
	.am-nav.is-open { transform: translateX(0); }
	.am-nav__menu { flex-direction: column; gap: 0; padding: 0 16px; }
	.am-nav__menu > li { width: 100%; }
	.am-nav__menu > li > a {
		display: block; width: 100%; padding: 14px 12px;
		border-radius: 10px; border: 0;
		font-size: 15px; font-weight: 600;
	}
	.am-nav__menu > li > a:hover {
		background: var(--sky-blue);
	}

	/* Drawer overlay */
	.am-drawer-overlay {
		position: fixed;
		inset: 0;
		background: rgba(7, 30, 65, .55);
		backdrop-filter: blur(2px);
		z-index: 199;
		opacity: 0;
		pointer-events: none;
		transition: opacity .3s;
	}
	.am-drawer-overlay.is-open {
		opacity: 1;
		pointer-events: auto;
	}

	/* Hero — single column */
	.am-hero__grid { grid-template-columns: 1fr; min-height: auto; }
	.am-hero__card { min-height: 320px; }
	.am-hero__inner { padding: 18px; }
	.am-hero__title { font-size: 20px; line-height: 1.3; }
	.am-hero__excerpt { font-size: 13.5px; max-width: 100%; }
	.am-hero__editorial { flex-direction: column; }
	.am-edit-card { min-height: 140px; }
	.am-edit-card__title { font-size: 15px; }
	.am-hero__latest { padding-bottom: 8px; }

	/* Source strip — horizontal scroll snap */
	.am-source-strip__inner {
		scroll-snap-type: x mandatory;
		padding: 10px;
		gap: 8px;
	}
	.am-source-chip {
		scroll-snap-align: start;
		padding: 7px 12px;
		font-size: 12.5px;
	}

	/* Category grid — 1 col */
	.am-cat-grid__inner { grid-template-columns: 1fr; }
	.am-cat-block { padding: 14px; }

	/* Videos — 1 col carousel */
	.am-video-section { padding: 20px 0; }
	.am-video-section__grid { grid-template-columns: 1fr; gap: 18px; }
	.am-video-card { flex-basis: 80%; min-width: 0; }
	.am-carousel-nav { display: none; }

	/* Newsletter */
	.am-newsletter { padding: 0 16px; margin: 20px 0; }
	.am-newsletter__inner {
		grid-template-columns: 1fr;
		text-align: center;
		padding: 24px 18px;
		gap: 14px;
	}
	.am-newsletter__icon { display: flex; justify-content: center; }
	.am-newsletter__icon svg { width: 60px; height: 60px; }
	.am-newsletter__text h2 { font-size: 18px; }
	.am-newsletter__form {
		flex-direction: column;
		padding: 8px;
	}
	.am-newsletter__form input {
		min-width: 0; width: 100%;
		text-align: center;
		padding: 12px 10px;
	}
	.am-newsletter__form button { width: 100%; }

	/* Partners */
	.am-partners__strip {
		grid-template-columns: repeat(2, 1fr);
		gap: 8px;
	}
	.am-partner { height: 54px; font-size: 12px; }

	/* Footer accordion */
	.am-footer__inner {
		grid-template-columns: 1fr;
		padding: 30px 16px 16px;
		gap: 0;
	}
	.am-footer__brand {
		grid-column: 1;
		text-align: center;
		padding-bottom: 24px;
		border-bottom: 1px solid rgba(255,255,255,.1);
		margin-bottom: 8px;
	}
	.am-footer__brand .am-social { justify-content: center; }
	.am-footer__col {
		border-bottom: 1px solid rgba(255,255,255,.1);
	}
	.am-footer__col h4 {
		display: flex;
		justify-content: space-between;
		align-items: center;
		padding: 16px 4px;
		margin: 0;
		cursor: pointer;
		user-select: none;
	}
	.am-footer__col h4::after {
		content: '+';
		font-size: 22px;
		font-weight: 400;
		color: rgba(255,255,255,.6);
		transition: transform .2s;
	}
	.am-footer__col.is-open h4::after { content: '−'; }
	.am-footer__col ul {
		max-height: 0;
		overflow: hidden;
		transition: max-height .3s ease;
		padding: 0 4px;
	}
	.am-footer__col.is-open ul {
		max-height: 500px;
		padding: 0 4px 14px;
	}
	.am-footer__col ul li {
		padding: 7px 0;
	}

	/* Single post */
	.am-single { padding: 16px 0 30px; }
	.am-single__main, .am-page__article { padding: 18px; border-radius: 14px; }
	.am-single__title { font-size: 22px; line-height: 1.25; }
	.am-single__body { font-size: 15px; line-height: 1.7; }
	.am-single__meta { font-size: 12px; gap: 4px; }
	.am-single__share { gap: 6px; }
	.am-single__share .am-btn { padding: 8px 12px; font-size: 12.5px; }

	/* Archive */
	.am-archive { padding: 14px 0 30px; }
	.am-archive__head { padding: 18px; }
	.am-archive__title { font-size: 22px; }
	.am-archive__layout { grid-template-columns: 1fr; gap: 20px; }
	.am-grid--3, .am-grid--4 { grid-template-columns: 1fr; }

	/* Pagination */
	.am-pagination .page-numbers { min-width: 34px; height: 34px; padding: 0 10px; font-size: 13px; }

	/* Section titles */
	.am-section-title { font-size: 16px; }
	.am-section-link { font-size: 11.5px; padding: 5px 10px; }

	/* Breaking ticker */
	.am-breaking__inner { padding: 8px 0; min-height: 44px; gap: 10px; }
	.am-breaking__badge { padding: 6px 10px; font-size: 11px; }
	.am-breaking__badge span { display: none; }
	.am-breaking__list { animation-duration: 30s; gap: 30px; }
	.am-breaking__list a { font-size: 13px; }

	/* Cards */
	.am-card__title { font-size: 14.5px; line-height: 1.35; }
	.am-card__body { padding: 12px; }
	.am-card__meta { font-size: 11.5px; }

	/* Search bar */
	.am-searchform { margin: 10px 16px 0; padding: 4px 4px 4px 12px; }
	.am-searchform input { font-size: 14px; padding: 9px 4px; }

	/* Comments */
	.am-comments { padding: 18px; }
}

/* ============= SMALL MOBILE (≤480) ============= */
@media (max-width: 480px) {
	.am-container { padding: 0 12px; }
	.am-topbar__date { font-size: 10.5px; }
	.am-header__inner { height: 56px; gap: 8px; }
	.am-logo { font-size: 18px; }
	.am-iconbtn { width: 34px; height: 34px; }
	.am-iconbtn svg { width: 16px; height: 16px; }

	.am-hero__card { min-height: 280px; }
	.am-hero__title { font-size: 18px; }
	.am-hero__inner { padding: 16px; }
	.am-edit-card { min-height: 120px; }

	.am-newsletter__inner { padding: 20px 14px; }
	.am-newsletter__text h2 { font-size: 17px; }

	.am-single__title { font-size: 19px; }
	.am-single__main, .am-page__article { padding: 14px; }

	.am-archive__title { font-size: 19px; }

	.am-section-title { font-size: 15px; padding-left: 12px; }
	.am-card__title { font-size: 13.5px; }

	.am-partners__strip { grid-template-columns: 1fr 1fr; }
	.am-partner { height: 48px; }

	/* Pulse animation simpler */
	.am-pulse { animation-duration: 2s; }
}

/* ============= ULTRA-SMALL ≤360 ============= */
@media (max-width: 360px) {
	body { font-size: 13.5px; }
	.am-hero__title { font-size: 17px; }
	.am-single__title { font-size: 18px; }
}

/* ============= REDUCED MOTION ============= */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		animation-duration: 0.01ms !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}

/* ============= PRINT ============= */
@media print {
	.am-topbar, .am-header, .am-breaking, .am-footer, .am-newsletter,
	.am-partners, .am-source-strip, .am-sidebar, .am-related,
	.am-single__share, .am-load-more, .am-pagination { display: none !important; }
	body { background: #fff; color: #000; font-size: 12pt; }
	.am-single__main { box-shadow: none; border: 0; padding: 0; }
}
