/* ==========================================================================
   Template: Home — стилі головної сторінки
   Підключається через academy_scripts() лише для template-home.php
   ========================================================================== */

/* --------------------------------------------------------------------------
   ГЛОБАЛЬНІ ЗМІННІ (лише для головної)
   -------------------------------------------------------------------------- */
:root {
	--bg-hero: #f6fafa;
}

/* --------------------------------------------------------------------------
   HERO СЕКЦІЯ
   -------------------------------------------------------------------------- */
.hero-section {
	background-color: var(--bg-hero);
	padding: 40px 0;
}

.hero-container {
	display: flex;
	align-items: center;
	gap: 60px;
}

.hero-content {
	flex: 1;
	max-width: 600px;
}

.hero-image {
	flex: 1;
	display: flex;
	justify-content: flex-end;
}

.hero-image img {
	max-width: 100%;
	height: auto;
	display: block;
	border-radius: 30px;
}

.hero-title {
	font-size: 36px;
	font-weight: 700;
	margin: 0 0 20px 0;
	color: var(--text-color);
	line-height: 1.2;
}

.hero-description {
	font-size: 16px;
	line-height: 1.6;
	margin: 0 0 30px 0;
	color: #555555;
}

/* CF7 форма всередині hero */
.hero-form-wrapper .wpcf7-form {
	display: grid;
	grid-template-columns: 1fr;
	gap: 15px;
}

.hero-form-wrapper .wpcf7-form .form-group {
	margin-bottom: 10px;
}

.hero-form-wrapper .wpcf7-form .full-width,
.hero-form-wrapper .wpcf7-form .form-submit,
.hero-form-wrapper .wpcf7-form .form-disclaimer {
	grid-column: 1 / -1;
}

.hero-form-wrapper .form-group input,
.hero-form-wrapper .form-group textarea {
	width: 100%;
	padding: 15px;
	border: 1px solid #e0e0e0;
	border-radius: 25px;
	background-color: #ffffff;
	font-family: var(--font-main);
	font-size: 14px;
	box-sizing: border-box;
	outline: none;
}

.hero-form-wrapper .form-group textarea {
	border-radius: 15px;
	max-height: 100px;
	resize: none;
}

.hero-form-wrapper .form-submit input[type="submit"] {
	width: auto;
	padding: 15px 40px;
	background-color: var(--btn-accent-2);
	color: var(--text-color);
	border: none;
	border-radius: 25px;
	font-weight: 700;
	font-size: 16px;
	cursor: pointer;
	transition: background-color 0.3s ease;
	font-family: var(--font-main);
}

.hero-form-wrapper .form-submit input[type="submit"]:hover {
	background-color: #b0c78e;
}

.hero-form-wrapper .form-disclaimer {
	font-size: 12px;
	color: #999999;
	line-height: 1.4;
	margin-top: 5px;
}

.hero-form-wrapper .form-disclaimer a {
	color: #999999;
	text-decoration: underline;
}

.hero-form-wrapper .form-disclaimer a:hover {
	text-decoration: none;
}

.hero-form-wrapper .wpcf7-spinner {
	margin-left: 15px;
}

.hero-form-wrapper .wpcf7-not-valid-tip {
	font-size: 12px;
	margin-top: 5px;
	margin-left: 15px;
}

.hero-form-wrapper .wpcf7-response-output {
	grid-column: 1 / -1;
	border-radius: 10px;
	margin-top: 10px !important;
	font-size: 14px;
}

/* --------------------------------------------------------------------------
   СЕКЦІЯ — спільні стилі заголовків
   -------------------------------------------------------------------------- */
.text-center {
	text-align: center;
}

.section-title {
	font-size: 36px;
	font-weight: 700;
	color: var(--text-color);
	margin: 0 0 20px 0;
	text-transform: uppercase;
}

.section-subtitle {
	font-size: 16px;
	line-height: 1.6;
	color: #555555;
	margin: 0;
}

.section-header {
	text-align: center;
	max-width: 800px;
	margin: 0 auto 60px auto;
}

/* --------------------------------------------------------------------------
   WHY US СЕКЦІЯ
   -------------------------------------------------------------------------- */
.why-us-section {
	padding: 40px 0;
	background-color: var(--bg-accent);
}

.why-us-card {
	background-color: var(--bg-base);
	padding: 50px 60px;
	border-radius: 20px;
	box-shadow: 0 15px 40px rgba(0, 0, 0, 0.05);
	max-width: 900px;
	margin: 0 auto;
	position: relative;
	border-top: 5px solid var(--btn-accent-1);
}

.why-us-card::before {
	content: "\f10e";
	font-family: "Font Awesome 6 Free";
	font-weight: 900;
	position: absolute;
	top: 30px;
	right: 40px;
	font-size: 60px;
	color: var(--bg-accent);
	opacity: 0.6;
	z-index: 0;
}

.why-us-card p {
	font-size: 16px;
	line-height: 1.8;
	color: #444444;
	margin: 0 0 20px 0;
	position: relative;
	z-index: 1;
}

.why-us-card .lead-text {
	font-size: 24px;
	font-weight: 700;
	line-height: 120%;
	color: var(--text-color);
	margin-bottom: 25px;
}

.highlight-box {
	background-color: #f8fbfd;
	padding: 25px 30px;
	border-radius: 12px;
	border-left: 4px solid var(--btn-accent-1);
	margin-top: 35px;
	position: relative;
	z-index: 1;
}

.highlight-box p {
	margin: 0;
	font-weight: 700;
	color: var(--text-color);
	font-size: 15px;
}

/* --------------------------------------------------------------------------
   SERVICES СЕКЦІЯ
   -------------------------------------------------------------------------- */
.services-section {
	padding: 40px 0;
	background-color: var(--bg-base);
}

.services-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 40px;
}

.service-card {
	background-color: #f8fbfd;
	border-radius: 20px;
	padding: 50px 40px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
	border-top: 5px solid var(--btn-accent-1);
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
	transform: translateY(-5px);
	box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
}

.service-header {
	display: flex;
	align-items: center;
	gap: 20px;
	margin-bottom: 35px;
	padding-bottom: 20px;
	border-bottom: 1px solid #e5eef5;
}

.service-header i {
	font-size: 36px;
	color: var(--btn-accent-1);
}

.service-header h3 {
	font-size: 26px;
	font-weight: 700;
	margin: 0;
	color: var(--text-color);
}

.service-list {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.service-list li {
	display: flex;
	align-items: flex-start;
	gap: 15px;
}

.service-list li i {
	color: var(--btn-accent-2);
	font-size: 18px;
	margin-top: 4px;
	flex-shrink: 0;
}

.service-list li span {
	font-size: 15px;
	line-height: 1.6;
	color: #555555;
}

/* Collapse beyond 4 items */
.service-list li:nth-child(n+5) {
	display: none;
}

.service-list.is-expanded li:nth-child(n+5) {
	display: flex;
	animation: fadeIn 0.4s ease forwards;
}

.btn-toggle-services {
	background: none;
	border: none;
	color: var(--btn-accent-1);
	font-family: var(--font-main);
	font-weight: 700;
	font-size: 16px;
	cursor: pointer;
	margin-top: 25px;
	padding: 0;
	display: flex;
	align-items: center;
	gap: 8px;
	transition: color 0.3s ease;
}

.btn-toggle-services:hover {
	color: #3b8cc4;
}

/* --------------------------------------------------------------------------
   MANAGEMENT СЕКЦІЯ
   -------------------------------------------------------------------------- */
.management-section {
	padding: 40px 0;
	background-color: var(--bg-base);
}

.management-list {
	display: flex;
	flex-direction: column;
	gap: 80px;
}

.management-row {
	display: flex;
	align-items: center;
	gap: 60px;
}

.management-row:nth-child(even) {
	flex-direction: row-reverse;
}

.management-photo {
	flex: 0 0 35%;
	max-width: 400px;
}

.management-photo img {
	width: 100%;
	height: auto;
	display: block;
	border-radius: 32px;
	border: 8px solid #ffffff;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
	box-sizing: border-box;
}

.management-content {
	flex: 1;
}

.management-name {
	font-size: 28px;
	font-weight: 700;
	color: var(--text-color);
	margin: 0 0 20px 0;
}

.management-bio p {
	font-size: 16px;
	line-height: 1.7;
	color: #555555;
	margin: 0 0 15px 0;
}

.management-bio ul {
	font-size: 16px;
	line-height: 1.7;
	color: #555555;
	margin: 0 0 15px 0;
	padding-left: 20px;
}

.management-bio li {
	margin-bottom: 10px;
}

/* --------------------------------------------------------------------------
   BLOG CATEGORIES СЕКЦІЯ
   -------------------------------------------------------------------------- */
.blog-categories-section {
	padding: 40px 0;
	background-color: var(--bg-hero);
}

.blog-cat-header-wrapper {
	margin-bottom: 50px;
	position: relative;
	overflow: visible;
}

.blog-cat-top {
	display: grid;
	grid-template-columns: 1.4fr 2fr;
	align-items: center;
	position: relative;
	min-height: 250px;
}

.blog-cat-top .section-title {
	font-size: 52px;
	font-weight: 800;
	max-width: 50%;
	margin: 0;
	line-height: 1.2;
	text-transform: uppercase;
	color: #1a2b3c;
	position: relative;
	z-index: 2;
}

.blog-cat-image {
	display: flex;
	justify-content: flex-end;
}

.blog-cat-image img {
	max-width: 100%;
	height: auto;
	display: block;
	border-radius: 30px;
}

.blog-cat-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 20px;
	position: relative;
	z-index: 3;
}

.blog-cat-card {
	display: flex;
	align-items: center;
	gap: 20px;
	background-color: #ffffff;
	padding: 25px 30px;
	border-radius: 8px;
	box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
	text-decoration: none;
	transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
	border: 1px solid transparent;
}

.blog-cat-card:hover {
	transform: translateY(-5px);
	box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
	border-color: var(--btn-accent-1);
}

.cat-icon-img {
	width: 32px;
	height: 32px;
	object-fit: contain;
	flex-shrink: 0;
}

.cat-name {
	font-size: 16px;
	font-weight: 700;
	color: var(--text-color);
	transition: color 0.3s ease;
	line-height: 1.4;
}

.blog-cat-card:hover .cat-name {
	color: var(--btn-accent-1);
}

/* --------------------------------------------------------------------------
   UNIVERSITIES / PARTNERS СЕКЦІЯ
   -------------------------------------------------------------------------- */
.universities-section {
	padding: 40px 0;
	background-color: var(--bg-base);
}

.universities-section .section-title {
	text-align: center;
	margin-bottom: 50px;
}

.universities-grid {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: 24px 32px;
	align-items: center;
}

.university-item {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px 16px;
	border-radius: 12px;
	background-color: #f8fbfd;
	border: 1px solid #eaf0f6;
	transition: box-shadow 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
	min-height: 100px;
}

.university-item:hover {
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
	border-color: var(--btn-accent-1);
	transform: translateY(-3px);
}

.university-item.is-link {
	text-decoration: none;
	cursor: pointer;
}

.university-logo {
	max-height: 70px;
	width: 100%;
	object-fit: contain;
	display: block;
}

/* Desktop: show first 10 logos (2 rows × 5 cols), hide the rest */
.universities-grid .university-item:nth-child(n+11) {
	display: none;
}

.universities-grid.is-expanded .university-item:nth-child(n+11) {
	display: flex;
	animation: unisFadeIn 0.4s ease forwards;
}

.btn-toggle-unis {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 40px auto 0;
	background: none;
	border: 2px solid var(--btn-accent-1);
	color: var(--btn-accent-1);
	font-family: var(--font-main);
	font-weight: 700;
	font-size: 15px;
	padding: 12px 28px;
	border-radius: 30px;
	cursor: pointer;
	transition: background-color 0.3s ease, color 0.3s ease;
}

.btn-toggle-unis:hover {
	background-color: var(--btn-accent-1);
	color: #ffffff;
}

/* --------------------------------------------------------------------------
   CONTACTS СЕКЦІЯ
   -------------------------------------------------------------------------- */
.contacts-section {
	padding: 40px 0;
	background-color: var(--bg-accent);
}

.contacts-wrapper {
	background-color: var(--bg-base);
	padding: 60px;
	border-radius: 20px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.06);
	max-width: 1100px;
	margin: 0 auto;
}

.contacts-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 60px;
}

.contact-col {
	display: flex;
	flex-direction: column;
}

.contact-title {
	font-size: 26px;
	font-weight: 700;
	margin: 0 0 30px 0;
	color: var(--text-color);
	text-transform: uppercase;
	position: relative;
	padding-bottom: 15px;
}

.contact-title::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 0;
	width: 60px;
	height: 3px;
	background-color: var(--btn-accent-1);
}

.contact-info-list {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.contact-info-list li {
	display: flex;
	align-items: center;
	gap: 15px;
	font-size: 16px;
}

.contact-info-list i {
	color: var(--btn-accent-1);
	font-size: 24px;
	width: 24px;
	text-align: center;
}

.contact-info-list a {
	color: var(--text-color);
	text-decoration: none;
	transition: color 0.3s ease;
	font-weight: 500;
}

.contact-info-list a:hover {
	color: var(--btn-accent-1);
}

.contact-messengers {
	display: flex;
	flex-wrap: wrap;
	gap: 15px;
}

.messenger-link {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 12px 25px;
	background-color: var(--bg-accent);
	color: var(--text-color);
	text-decoration: none;
	border-radius: 30px;
	font-weight: 700;
	font-size: 15px;
	transition: all 0.3s ease;
}

.messenger-link i {
	font-size: 20px;
}

.messenger-link.wa:hover {
	background-color: #25D366;
	color: #ffffff;
}

.messenger-link.tg:hover {
	background-color: #0088cc;
	color: #ffffff;
}

.messenger-link.reviews:hover {
	background-color: var(--btn-accent-2);
	color: var(--text-color);
}

/* --------------------------------------------------------------------------
   ANIMATIONS
   -------------------------------------------------------------------------- */
@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translateY(-10px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes unisFadeIn {
	from {
		opacity: 0;
		transform: translateY(-8px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* --------------------------------------------------------------------------
   RESPONSIVE
   -------------------------------------------------------------------------- */
@media (max-width: 1200px) {
	.blog-cat-image {
		right: 0;
	}
}

@media (max-width: 1100px) {
	.universities-grid {
		grid-template-columns: repeat(4, 1fr);
	}
}

@media (max-width: 991px) {

	/* Hero */
	.hero-container {
		flex-direction: column;
		text-align: center;
		gap: 10px;
	}

	.hero-section {
		padding: 40px 0;
	}

	.hero-content {
		max-width: 100%;
		order: 2;
	}

	.hero-form-wrapper .wpcf7-form {
		grid-template-columns: 1fr;
		text-align: left;
	}

	.hero-image {
		order: 1;
		justify-content: center;
		margin-top: 0;
	}

	.hero-title {
		font-size: 32px;
	}

	.form-submit {
		display: flex;
		flex-direction: column;
		align-items: center;
	}

	/* Why us */
	.why-us-card {
		padding: 40px 25px;
	}

	.why-us-card::before {
		font-size: 40px;
		top: 20px;
		right: 25px;
	}

	.highlight-box {
		padding: 20px;
	}

	/* Services */
	.services-grid {
		grid-template-columns: 1fr;
		gap: 30px;
	}

	.service-card {
		padding: 40px 25px;
	}

	.service-header h3 {
		font-size: 22px;
	}

	/* Management */
	.management-section {
		padding: 30px 0;
	}

	.section-title {
		font-size: 30px;
		line-height: 120%;
	}

	.management-list {
		gap: 60px;
	}

	.management-row,
	.management-row:nth-child(even) {
		flex-direction: column;
		text-align: center;
		gap: 30px;
	}

	.management-photo {
		flex: none;
		width: 100%;
		max-width: 300px;
		margin: 0 auto;
	}

	.management-bio ul {
		display: inline-block;
		text-align: left;
	}

	/* Blog categories */
	.blog-cat-top {
		grid-template-columns: 1fr;
		min-height: auto;
	}

	.blog-cat-top .section-title {
		max-width: 100%;
		font-size: 42px;
		margin-bottom: 30px;
		text-align: center;
	}

	.blog-cat-image {
		position: static;
		width: 80%;
		margin: 0 auto;
		justify-content: center;
	}

	.blog-cat-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	/* Contacts */
	.contacts-wrapper {
		padding: 50px 30px;
	}

	.contacts-grid {
		grid-template-columns: 1fr;
		gap: 50px;
	}

	.contact-title {
		font-size: 22px;
	}
}

@media (max-width: 768px) {

	/* Universities */
	.universities-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 16px;
	}

	.university-logo {
		max-height: 56px;
	}

	/* Mobile: override to show only first 6 (2 cols × 3 rows) */
	.universities-grid .university-item:nth-child(n+7) {
		display: none;
	}

	.universities-grid.is-expanded .university-item:nth-child(n+7) {
		display: flex;
	}
}

@media (max-width: 576px) {

	/* Blog categories */
	.blog-cat-top .section-title {
		font-size: 32px;
	}

	.blog-cat-image {
		width: 100%;
	}

	.blog-cat-grid {
		grid-template-columns: 1fr;
	}

	/* Contacts */
	.contact-info-list a {
		font-size: 14px;
		word-break: break-all;
	}

	.messenger-link {
		width: 100%;
		justify-content: center;
		box-sizing: border-box;
	}
}

@media (max-width: 480px) {

	/* Universities */
	.university-item {
		padding: 14px 10px;
		min-height: 80px;
	}
}