/*
Theme Name: Rimgaile Child
Theme URI: https://rimgaile.ru
Description: Дочерняя тема Rimgaile: портфолио по категориям, компактная сетка, футер с Instagram и подписью разработчика, новый favicon.
Author: Caposquadra Studio
Author URI: https://rimgaile.ru
Template: rimgaile
Version: 1.5.1
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: rimgaile-child
*/

/*
 * Стили дочерней темы загружаются после style.css родительской темы.
 */

/* Убираем увеличение фотографий при наведении */
.tile img {
	transition: none;
}

.tile:hover img {
	transform: none;
}

/* Скрываем подписи под фотографиями */
.tile figcaption {
	display: none;
}

/* H1, который видят только поисковики и скринридеры */
.rg-visually-hidden {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* Портфолио: меньше пустого пространства сверху */
.portfolio-section {
	padding-top: clamp(0.75rem, 2vw, 1.25rem);
	padding-bottom: clamp(2rem, 5vw, 3.5rem);
}

.portfolio-intro {
	margin-bottom: clamp(1rem, 2vw, 1.5rem);
}

/* Длинный заголовок с городом */
.hero h1 {
	max-width: 30ch;
}

/* Убираем дублирующий бренд над главным заголовком */
.hero .eyebrow {
	display: none;
}

/* Категории портфолио */
.portfolio-category {
	margin: 0 0 clamp(1.5rem, 3vw, 2.25rem);
}

.portfolio-category + .portfolio-category {
	padding-top: clamp(1.25rem, 3vw, 1.75rem);
	border-top: 1px solid var(--line, #e2d8c6);
}

.portfolio-category h2 {
	margin: 0 0 0.75rem;
	padding: 0;
	border: 0;
	font-family: "PT Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
	font-size: 0.8rem;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--muted, #7a7266);
}

/* Сетка: 3 фото в ряд на десктопе, 2 на планшете и телефоне */
.portfolio-category-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(0.75rem, 1.5vw, 1.25rem);
	align-items: stretch;
}

.portfolio-item {
	margin: 0;
	overflow: hidden;
}

.portfolio-category-grid .portfolio-item {
	background: #fff;
}

.portfolio-category-grid .tile img {
	width: 100%;
	height: auto;
	aspect-ratio: auto;
	object-fit: initial;
	transition: none;
}

.portfolio-category-grid .tile:hover img {
	transform: none;
}

.portfolio-empty {
	color: var(--muted, #7a7266);
}

/* Компактная главная: меньше пустого места до заголовка */
.home .hero {
	min-height: auto;
	align-items: flex-start;
	padding-block: clamp(1.5rem, 4vw, 3rem);
}

.home .hero--image {
	min-height: clamp(420px, 55vh, 620px);
	align-items: flex-end;
}

.home .featured-section {
	padding-top: clamp(1rem, 2.5vw, 1.5rem);
	padding-bottom: clamp(1rem, 2.5vw, 1.75rem);
}

.home .free-dates-section,
.home .gift-section,
.home .process-section,
.home .faq-section {
	padding-block: clamp(1rem, 2.5vw, 1.75rem);
}

.home .cta-band {
	padding-block: clamp(1.5rem, 3vw, 2.25rem);
}

.process-section .section-intro {
	margin-bottom: 1rem;
}

.gift-section .section-intro {
	margin-bottom: 1.25rem;
}

/* Ближайшие свободные даты */
.free-dates-box {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
	padding: clamp(1.5rem, 4vw, 2.5rem);
	background: var(--bg-alt, #f1e9dc);
	border: 1px solid var(--line, #e2d8c6);
}

.free-dates-box h2 {
	margin-bottom: 0.5rem;
	font-size: clamp(1.5rem, 3vw, 2rem);
}

.free-dates-box p {
	max-width: 52ch;
	margin-bottom: 1rem;
	color: var(--muted, #7a7266);
}

.free-dates {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.free-dates li {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 112px;
	padding: 0.5rem 0.9rem;
	background: #fff;
	border: 1px solid var(--line, #e2d8c6);
	color: var(--ink, #3b352d);
	font-size: 0.95rem;
	text-align: center;
}

.free-dates-box .btn {
	flex-shrink: 0;
}

.free-dates-note {
	margin: 0.75rem 0 0;
	font-size: 0.9rem;
	color: var(--muted, #7a7266);
}

.free-dates-note a {
	color: var(--accent, #8c7554);
}

.free-dates-box--compact {
	margin: 1.5rem 0;
	padding: 1.25rem 1.5rem;
}

.free-dates-box--compact h2 {
	font-size: 1.15rem;
	margin-bottom: 0.35rem;
}

.free-dates-box--compact p {
	margin-bottom: 0.75rem;
	font-size: 0.9rem;
}

.free-dates-box--compact .free-dates li {
	padding: 0.35rem 0.75rem;
	font-size: 0.85rem;
}

/* Как проходит съёмка */
.section-intro {
	max-width: 60ch;
	margin-bottom: 2rem;
	color: var(--muted, #7a7266);
}

.process-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 1.5rem;
}

.process-step {
	padding-top: 1rem;
	border-top: 1px solid var(--line, #e2d8c6);
}

.process-number {
	display: block;
	margin-bottom: 0.75rem;
	font-family: "Cormorant Garamond", Georgia, serif;
	font-size: 2rem;
	line-height: 1;
	color: var(--accent, #8c7554);
}

.process-step h3 {
	margin-bottom: 0.5rem;
	font-size: 1.15rem;
}

.process-step p {
	margin: 0;
	color: var(--muted, #7a7266);
	font-size: 0.95rem;
}

/* FAQ */
.faq-list {
	max-width: 820px;
}

.faq-item {
	padding: 1rem 0;
	border-bottom: 1px solid var(--line, #e2d8c6);
}

.faq-item summary {
	position: relative;
	padding-right: 2rem;
	cursor: pointer;
	font-weight: 700;
	list-style: none;
}

.faq-item summary::-webkit-details-marker {
	display: none;
}

.faq-item summary::after {
	content: "+";
	position: absolute;
	top: 0;
	right: 0;
	font-size: 1.25rem;
	line-height: 1.2;
	color: var(--accent, #8c7554);
}

.faq-item[open] summary::after {
	content: "–";
}

.faq-item p {
	margin: 0.75rem 0 0;
	color: var(--muted, #7a7266);
}

.faq-cta {
	margin-top: 1.5rem;
	color: var(--muted, #7a7266);
}

/* Подарочный сертификат */
.gift-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(1rem, 2vw, 1.5rem);
}

.gift-card {
	display: flex;
	flex-direction: column;
	padding: clamp(1.25rem, 2.5vw, 1.75rem);
	background: #fff;
	border: 1px solid var(--line, #e2d8c6);
}

.gift-card--featured {
	border-color: var(--accent, #8c7554);
	box-shadow: 0 12px 30px rgba(59, 53, 45, 0.08);
}

.gift-badge {
	margin-bottom: 0.5rem;
	font-size: 0.68rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--accent, #8c7554);
}

.gift-price {
	margin: 0 0 0.25rem;
	font-family: "Cormorant Garamond", Georgia, serif;
	font-size: clamp(1.75rem, 3vw, 2.25rem);
	line-height: 1.1;
	color: var(--accent, #8c7554);
	white-space: nowrap;
}

.gift-card h3 {
	margin-bottom: 0.5rem;
	font-size: 1.25rem;
}

.gift-card p {
	margin-bottom: 1rem;
	color: var(--muted, #7a7266);
	font-size: 0.95rem;
}

.gift-card ul {
	display: grid;
	gap: 0.35rem;
	margin: 0 0 1.25rem;
	padding: 0;
	list-style: none;
}

.gift-card li {
	position: relative;
	padding-left: 1rem;
	color: var(--muted, #7a7266);
	font-size: 0.92rem;
}

.gift-card li::before {
	content: "✓";
	position: absolute;
	left: 0;
	color: var(--accent, #8c7554);
	font-size: 0.8rem;
	line-height: 1.5;
}

.gift-card .btn {
	align-self: flex-start;
	margin-top: auto;
}

.gift-note {
	margin: 1rem 0 0;
	font-size: 0.85rem;
	color: var(--muted, #7a7266);
}

/* Кнопки соцсетей на странице «Контакты» */
.contacts-socials {
	margin-top: 1.5rem;
}

.contacts-socials .social-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	appearance: none;
	background: transparent;
	font-family: inherit;
}

.contacts-socials .social-btn svg {
	display: block;
	width: 18px;
	height: 18px;
}

.contacts-socials .social-btn:disabled {
	opacity: 0.65;
	cursor: default;
	color: var(--accent, #8c7554);
	border-color: var(--mid, #c9b08c);
	background: transparent;
}

.contacts-socials .social-btn:disabled:hover {
	background: transparent;
	color: var(--accent, #8c7554);
	border-color: var(--mid, #c9b08c);
}

/* Иконки соцсетей в футере */
.footer-socials {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.85rem;
}

.footer-social-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: var(--muted, #7a7266);
	line-height: 1;
	transition: color 0.2s ease;
}

a.footer-social-icon:hover {
	color: var(--accent, #8c7554);
	text-decoration: none;
}

.footer-social-icon svg {
	display: block;
	width: 22px;
	height: 22px;
}

/* Подпись разработчика */
.footer-bottom .footer-credit {
	color: var(--muted, #7a7266);
}

.footer-credit a {
	color: inherit;
	text-decoration: none;
	border-bottom: 1px solid rgba(122, 114, 102, 0.45);
}

.footer-credit a:hover {
	color: var(--accent, #8c7554);
	text-decoration: none;
	border-bottom-color: currentColor;
}

.mobile-cta {
	display: none;
}

@media (max-width: 900px) {
	.portfolio-category-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.process-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.free-dates-box {
		flex-direction: column;
		align-items: flex-start;
	}

	.free-dates-box .btn {
		width: 100%;
		text-align: center;
	}
}

@media (max-width: 820px) {
	.gift-grid {
		grid-template-columns: 1fr;
	}

	.gift-card .btn {
		align-self: stretch;
		text-align: center;
	}

	.mobile-cta {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		position: fixed;
		left: 50%;
		bottom: calc(0.75rem + env(safe-area-inset-bottom));
		z-index: 90;
		max-width: calc(100% - 2rem);
		padding: 0.65rem 1.25rem;
		border-radius: 999px;
		background: var(--accent, #8c7554);
		color: #fdfbf7;
		text-align: center;
		font-size: 0.9rem;
		font-weight: 600;
		letter-spacing: 0.02em;
		text-decoration: none;
		box-shadow: 0 6px 20px rgba(59, 53, 45, 0.22);
		transform: translate(-50%, 120%);
		opacity: 0;
		visibility: hidden;
		transition: transform 0.25s ease, opacity 0.25s ease, visibility 0.25s;
	}

	.mobile-cta.is-visible {
		transform: translate(-50%, 0);
		opacity: 1;
		visibility: visible;
	}

	.mobile-cta:hover {
		background: #75613f;
		color: #fdfbf7;
		text-decoration: none;
	}

	body.has-mobile-cta {
		padding-bottom: 64px;
	}

	body.page-template-page-templatescontacts-php {
		padding-bottom: 0;
	}

	body.page-template-page-templatescontacts-php .mobile-cta {
		display: none;
	}
}

@media (max-width: 640px) {
	.footer-bottom .footer-credit {
		margin-top: 0.25rem;
	}

	.process-grid {
		grid-template-columns: 1fr;
	}
}
