/* ===== СТИЛИ И ГЛОБАЛЬНЫЕ НАСТРОЙКИ ===== */
@font-face {
	font-family: 'Your Font';
	font-display: swap; /* Это главное! */
}
img {
	aspect-ratio: attr(width) / attr(height);
	/* или явно: */
}
:root {
	--primary-color: #6c5ce7;
	--primary-hover: #5b4cdb;
	--bg-gradient: linear-gradient(135deg, #f9f8f6 0%, #f1ebe1 100%);
	--text-dark: #2d3436;
	--text-muted: #636e72;
	--accent-purple: #9b18f9;
	--white: #ffffff;
	--transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

body {
	font-family: 'Manrope', 'Rubik', sans-serif;
	font-weight: 400;
	font-size: 15px;
	background: var(--bg-gradient);
	color: var(--text-dark);
	min-height: 100vh;
	line-height: 1.62;
	overflow-x: hidden;
}

.container {
	max-width: 1240px;
	padding: 0 24px;
	margin: 0 auto;
}

/* ===== FIXED HEADER ===== */
.header {
	padding: 16px 0;
	width: 100%;
	position: fixed;
	top: 0;
	left: 0;
	z-index: 100;
	background-color: rgba(251, 243, 231, 0.85);
	backdrop-filter: blur(12px);
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.header__container {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.logo-wrapper {
	display: flex;
	align-items: center;
	gap: 12px;
	text-decoration: none;
	z-index: 1001; /* Поверх меню */
}

.logo {
	width: 42px;
	height: auto;
	transition: transform 0.3s ease;
}

.logo-wrapper:hover .logo {
	transform: rotate(10deg) scale(1.08);
}

.logo-text {
	font-weight: 700;
	font-size: 18px;
	color: var(--text-dark);
	letter-spacing: -0.3px;
}

.header__nav .nav-menu {
	display: flex;
	list-style: none;
}

.header__nav li {
	margin-left: 32px;
}

.header__nav a {
	font-size: 15px;
	font-weight: 500;
	color: var(--text-dark);
	text-decoration: none;
	position: relative;
	padding: 4px 0;
	transition: color 0.3s ease;
}

.header__nav a::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 0;
	width: 0;
	height: 2px;
	background-color: var(--primary-color);
	transition: var(--transition-smooth);
}

.header__nav a:hover {
	color: var(--primary-color);
}

.header__nav a:hover::after {
	width: 100%;
}

.phone-link {
	color: var(--primary-color);
	font-weight: 700;
	font-size: 15px;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: rgba(108, 92, 231, 0.08);
	padding: 8px 16px;
	border-radius: 30px;
	transition: var(--transition-smooth);
}

.phone-link:hover {
	background: var(--primary-color);
	color: var(--white);
	transform: translateY(-2px);
}

.mobile-only {
	display: none;
}

/* ===== HERO SECTION ===== */
.hero-section {
	min-height: 95vh;
	display: flex;
	align-items: center;
	padding-top: 100px;
	position: relative;
}

.hero-container {
	display: grid;
	grid-template-columns: 1.1fr 0.9fr;
	gap: 40px;
	align-items: center;
}

.badge {
	display: inline-block;
	background: rgba(155, 24, 249, 0.1);
	color: var(--accent-purple);
	padding: 6px 14px;
	border-radius: 30px;
	font-size: 13px;
	font-weight: 600;
	margin-bottom: 20px;
}

.hero-title {
	font-size: 2.8rem;
	font-weight: 800;
	line-height: 1.25;
	color: var(--text-dark);
	margin-bottom: 20px;
	letter-spacing: -1px;
}

.hello {
	color: var(--accent-purple);
}

.accent-text {
	background: linear-gradient(90deg, #6c5ce7, #a83232);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
}

.message {
	font-size: 1.1rem;
	color: var(--text-muted);
	margin-bottom: 35px;
	max-width: 600px;
}

.hero-btns {
	display: flex;
	gap: 16px;
	flex-wrap: wrap;
}

.btn {
	display: inline-block;
	padding: 14px 28px;
	font-size: 14px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	border-radius: 50px;
	text-decoration: none;
	cursor: pointer;
	transition: var(--transition-smooth);
	text-align: center;
}

.btn-primary {
	background: var(--primary-color);
	color: var(--white);
	box-shadow: 0 10px 25px rgba(108, 92, 231, 0.25);
}

.btn-primary:hover {
	background: var(--primary-hover);
	transform: translateY(-3px);
	box-shadow: 0 15px 30px rgba(108, 92, 231, 0.35);
}

.btn-secondary {
	background: transparent;
	color: var(--text-dark);
	border: 2px solid var(--text-dark);
}

.btn-secondary:hover {
	background: var(--text-dark);
	color: var(--white);
	transform: translateY(-3px);
}

.image-wrapper {
	position: relative;
	display: flex;
	justify-content: center;
	align-items: center;
	width: 100%;
}

.hero-circle {
	position: absolute;
	width: 380px; /* Увеличен фон под фото */
	height: 380px;
	background: linear-gradient(
		135deg,
		rgba(108, 92, 231, 0.25),
		rgba(155, 24, 249, 0.15)
	);
	border-radius: 50%;
	z-index: 1;
	filter: blur(25px);
}

.hero-img {
	width: 100%;
	max-width: 440px; /* Картинка в главном секторе увеличена */
	height: auto;
	position: relative;
	z-index: 2;
	filter: drop-shadow(0 20px 30px rgba(0, 0, 0, 0.15));
	animation: float 6s ease-in-out infinite;
}

@keyframes float {
	0% {
		transform: translateY(0px);
	}
	50% {
		transform: translateY(-15px);
	}
	100% {
		transform: translateY(0px);
	}
}

/* ===== SKILLS SECTION ===== */
.skills-section {
	padding: 100px 0;
	background: rgba(255, 255, 255, 0.4);
}

.section-title {
	font-size: 2.4rem;
	font-weight: 800;
	text-align: center;
	color: var(--text-dark);
	margin-bottom: 60px;
}

.section-title::after {
	content: '';
	display: block;
	width: 50px;
	height: 4px;
	background: var(--primary-color);
	margin: 12px auto 0;
	border-radius: 2px;
}

.skills__hard,
.skills__soft {
	margin-bottom: 70px;
}

.hard__title,
.soft__title {
	font-size: 1.6rem;
	font-weight: 700;
	margin-bottom: 30px;
	text-align: center;
}

.skills__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 20px;
}

.skill-card {
	background: var(--white);
	border: 1px solid rgba(0, 0, 0, 0.04);
	border-radius: 16px;
	padding: 20px;
	display: flex;
	align-items: center;
	gap: 16px;
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
	transition: var(--transition-smooth);
}

.skill-card:hover {
	transform: translateY(-5px) scale(1.02);
	box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}

.skill-icon-box {
	font-size: 1.8rem;
	background: rgba(0, 0, 0, 0.03);
	width: 48px;
	height: 48px;
	border-radius: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.skill-content h4 {
	font-size: 1.1rem;
	font-weight: 700;
	margin-bottom: 2px;
}

.skill-level {
	font-size: 0.85rem;
	color: var(--text-muted);
}

.skill-card.html:hover {
	border-color: #ff6b6b;
}
.skill-card.css:hover {
	border-color: #54a0ff;
}
.skill-card.js:hover {
	border-color: #feca57;
}
.skill-card.php:hover {
	border-color: #1dd1a1;
}

.soft-grid {
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.skill-card-soft {
	background: var(--white);
	border-radius: 16px;
	padding: 28px 20px;
	text-align: center;
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
	transition: var(--transition-smooth);
}

.skill-card-soft:hover {
	transform: translateY(-5px);
	box-shadow: 0 15px 35px rgba(108, 92, 231, 0.1);
}

.skill-card-soft .skill-icon {
	font-size: 2.5rem;
	margin-bottom: 16px;
}

/* ===== PORTFOLIO SECTION ===== */
.portfolio-section {
	padding: 100px 0;
}

.portfolio-grid-cards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
	gap: 30px;
}

.portfolio-item {
	background: var(--white);
	border-radius: 20px;
	overflow: hidden;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
	transition: var(--transition-smooth);
	cursor: pointer;
}

.portfolio-item:hover {
	transform: translateY(-10px);
	box-shadow: 0 20px 45px rgba(0, 0, 0, 0.12);
}

.portfolio-img-container {
	position: relative;
	height: 220px;
	overflow: hidden;
	background: #eee;
}

.portfolio-thumb {
	width: 100%;
	height: 100%;
	 object-fit: contain;
	transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.portfolio-item:hover .portfolio-thumb {
	transform: scale(1.06);
}

.overlay-hint {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(45, 52, 54, 0.4);
	backdrop-filter: blur(3px);
	opacity: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--white);
	font-weight: 600;
	font-size: 14px;
	transition: opacity 0.3s ease;
}

.portfolio-item:hover .overlay-hint {
	opacity: 1;
}

.portfolio-info {
	padding: 24px;
}

.portfolio-info .skill-title {
	font-size: 1.25rem;
	font-weight: 700;
	color: var(--text-dark);
	margin-bottom: 10px;
}

.portfolio-desc {
	font-size: 0.92rem;
	color: var(--text-muted);
	margin-bottom: 16px;
}

.portfolio-tech-stack {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.tech-badge {
	background: #f1f2f6;
	color: var(--text-dark);
	font-size: 11px;
	font-weight: 600;
	padding: 4px 10px;
	border-radius: 4px;
}

/* ===== МОДАЛЬНОЕ ОКНО (УЛУЧШЕННОЕ) ===== */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.active {
    display: flex;
    opacity: 1;
}

.modal-content-wrapper {
    position: relative;
    width: 95%;
    height: 90vh;
    max-width: 1400px;
    margin: auto;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-body {
    flex: 1;
    overflow: auto; /* Включает скролл */
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 20px;
    scroll-behavior: smooth;
}

.modal-content {
    max-width: 100%;
    height: auto;
    object-fit: contain;
    transition: transform 0.25s ease;
    user-select: none;
    border-radius: 8px;
}

.modal-content:active {
    cursor: grabbing;
}

/* Кнопка закрытия */
.close {
    position: absolute;
    top: 16px;
    right: 24px;
    color: #fff;
    font-size: 2.4rem;
    font-weight: 300;
    cursor: pointer;
    z-index: 10;
    transition: color 0.2s;
    line-height: 1;
}

.close:hover {
    color: #ff6b6b;
}

/* Панель управления зумом */
.modal-controls {
    display: flex;
    gap: 12px;
    justify-content: center;
    padding: 16px 20px;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(4px);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.zoom-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 1.3rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.zoom-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
}

.zoom-btn:active {
    transform: scale(0.95);
}

/* Адаптив для мобилок */
@media (max-width: 768px) {
    .modal-content-wrapper {
        width: 98%;
        height: 92vh;
        border-radius: 12px;
    }
    .modal-body {
        padding: 12px;
    }
    .close {
        top: 12px;
        right: 18px;
        font-size: 2rem;
    }
    .zoom-btn {
        width: 38px;
        height: 38px;
        font-size: 1.1rem;
    }
    .modal-controls {
        padding: 12px;
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .modal-body {
        padding: 8px;
    }
    .modal-controls {
        gap: 6px;
        padding: 10px;
    }
    .zoom-btn {
        width: 34px;
        height: 34px;
        font-size: 1rem;
    }
}
/* ===== PRICES & PRODUCTS (УЛУЧШЕННЫЕ КАРТОЧКИ И КАРТИНКИ) ===== */
.prices-section {
	padding: 100px 0;
	background: rgba(232, 226, 217, 0.4);
}

.prices-main-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
	gap: 30px;
}

.price-card {
	background: var(--white);
	border-radius: 24px;
	padding: 32px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	transition: var(--transition-smooth);
	min-height: 480px; /* Карточка увеличена ввысь */
}

.price-card:hover {
	transform: translateY(-8px);
	box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

/* Блок картинки стал выше, чтобы вмещать полное изображение без сжатия */
.price-img-box {
	width: 100%;
	height: 200px; /* Увеличено с 160px */
	border-radius: 16px;
	overflow: hidden;
	margin-bottom: 24px;
	background: rgba(0, 0, 0, 0.02);
	display: flex;
	align-items: center;
	justify-content: center;
}

.price-img-box img {
	width: 100%;
	height: 100%;
	object-fit: contain; /* Картинка теперь НЕ сжимается уродливо, а аккуратно вписывается в блок */
	transition: transform 0.4s ease;
}

.price-card:hover .price-img-box img {
	transform: scale(1.04);
}

.price {
	font-size: 1.9rem;
	font-weight: 800;
	color: var(--primary-color);
	margin: 10px 0 14px;
}

.portfolio-title-text {
	font-size: 0.95rem;
	color: var(--text-muted);
	margin-bottom: 24px;
	flex-grow: 1; /* Толкает кнопку вниз, выравнивая все карточки в ряд */
}

.buy-btn {
	width: 100%;
	padding: 14px 24px;
	background: #f1f2f6;
	color: var(--text-dark);
	border-radius: 12px;
	font-weight: 700;
	text-decoration: none;
	text-transform: uppercase;
	font-size: 13px;
	letter-spacing: 0.5px;
	transition: var(--transition-smooth);
}

.price-card:hover .buy-btn {
	background: var(--primary-color);
	color: var(--white);
	box-shadow: 0 8px 20px rgba(108, 92, 231, 0.2);
}

/* ===== FOOTER ===== */
.footer {
	padding: 80px 0 40px;
	background: #1e272e;
	color: var(--white);
}

.footer-content {
	display: grid;
	grid-template-columns: 1fr 1fr 1fr;
	gap: 40px;
	margin-bottom: 60px;
}

.footer-brand .logo {
	width: 48px;
	margin-bottom: 16px;
}

.footer-brand h3 {
	font-size: 1.4rem;
	font-weight: 700;
	margin-bottom: 6px;
}

.footer-subtitle {
	color: #95a5a6;
	font-size: 14px;
}

.footer-links {
	display: grid;
	grid-template-columns: 1fr 1fr;
}

.link-group h4,
.footer-contact h4 {
	font-size: 15px;
	text-transform: uppercase;
	letter-spacing: 0.8px;
	margin-bottom: 20px;
	color: #f1f2f6;
}

.link-group a {
	display: block;
	color: #bdc3c7;
	text-decoration: none;
	margin-bottom: 12px;
	font-size: 14px;
	transition: color 0.2s;
}

.link-group a:hover {
	color: var(--primary-color);
}

.footer-contact .phone {
	display: block;
	font-size: 17px;
	font-weight: 700;
	color: var(--white);
	text-decoration: none;
	margin-bottom: 10px;
}

.footer-contact .email {
	color: #bdc3c7;
	text-decoration: none;
	font-size: 14px;
}

.footer-bottom {
	border-top: 1px solid rgba(255, 255, 255, 0.06);
	padding-top: 30px;
	text-align: center;
	color: #7f8c8d;
	font-size: 13px;
}

/* ===== ИСПРАВЛЕННЫЙ БУРГЕР (КНОПКА) ===== */
.burger {
	display: none;
	flex-direction: column;
	justify-content: space-between;
	width: 30px;
	height: 21px;
	cursor: pointer;
	z-index: 2000; /* Самый высокий приоритет клика */
	position: relative;
}

.burger span {
	width: 100%;
	height: 3px;
	background-color: var(--text-dark);
	border-radius: 4px;
	transition: var(--transition-smooth);
}

/* Переворот полосок бургера в крестик при активации */
.burger.active span:nth-child(1) {
	transform: translateY(9px) rotate(45deg);
	background-color: var(--text-dark);
}

.burger.active span:nth-child(2) {
	opacity: 0;
}

.burger.active span:nth-child(3) {
	transform: translateY(-9px) rotate(-45deg);
	background-color: var(--text-dark);
}

/* ===== МЕДИА-ЗАПРОСЫ (ПОЛНАЯ АДАПТИВНОСТЬ СТРАНИЦЫ И МЕНЮ) ===== */
@media (max-width: 1024px) {
	.hero-container {
		grid-template-columns: 1fr;
		text-align: center;
		gap: 50px;
	}
	.about-content {
		order: 1;
	}
	.image-wrapper {
		order: 2;
	}
	.hero-img {
		max-width: 380px;
	}
	.hero-btns {
		justify-content: center;
	}
	.message {
		margin-left: auto;
		margin-right: auto;
	}
	.footer-content {
		grid-template-columns: 1fr;
		gap: 40px;
	}
}

@media (max-width: 768px) {
	.header {
		padding: 12px 0;
	}
	.phone-link {
		display: none; /* Прячем десктопный телефон */
	}
	.burger {
		display: flex; /* Показываем кнопку бургер меню */
	}

	/* ИСПРАВЛЕННОЕ ПОЛНОЭКРАННОЕ МЕНЮ */
	.header__nav .nav-menu {
		position: fixed;
		top: 0;
		right: -100%;
		width: 100%;
		height: 100vh; /* На весь экран */
		background-color: #fbf3e7; /* Родной цвет фона */
		flex-direction: column;
		align-items: center;
		justify-content: center;
		gap: 32px;
		z-index: 1500;
		transition: right 0.5s cubic-bezier(0.16, 1, 0.3, 1);
		padding: 40px;
	}

	/* Активация меню на полный экран */
	.header__nav .nav-menu.active {
		right: 0;
	}

	.header__nav li {
		margin-left: 0;
	}

	.header__nav a {
		font-size: 24px; /* Крупные, легко нажимаемые ссылки */
		font-weight: 700;
	}

	.mobile-only {
		display: block;
		margin-top: 10px;
	}

	.phone-link-mobile {
		font-size: 20px !important;
		color: var(--primary-color) !important;
		text-decoration: underline !important;
	}

	.hero-title {
		font-size: 2.1rem;
	}

	.section-title {
		font-size: 2rem;
	}

	.portfolio-grid-cards,
	.prices-main-grid {
		grid-template-columns: 1fr; /* На мобилках выстраиваем карточки строго в одну колонку */
	}

	.price-card {
		min-height: auto;
		padding: 24px;
	}
}

@media (max-width: 480px) {
	.hero-title {
		font-size: 1.8rem;
	}
	.hero-img {
		max-width: 290px;
	}
	.hero-circle {
		width: 260px;
		height: 260px;
	}
	.btn {
		width: 100%; /* Кнопки на маленьких экранах на всю ширину для удобства клика */
	}
}
/* ===== КНОПКА "ЗАГРУЗИТЬ ЕЩЁ" ===== */
.portfolio-more-wrapper {
    text-align: center;
    margin-top: 50px;
}

.portfolio-more-btn {
    display: inline-block;
    padding: 14px 40px;
    background: var(--primary-color);
    color: var(--white);
    font-weight: 600;
    font-size: 16px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition-smooth);
    box-shadow: 0 8px 20px rgba(108, 92, 231, 0.25);
}

.portfolio-more-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(108, 92, 231, 0.35);
}

.portfolio-more-btn.hidden {
    display: none;
}

/* ===== АНИМАЦИЯ КАРТОЧЕК ===== */
.portfolio-item.hidden {
    display: none; /* Скрываем карточки */
}

.portfolio-item.show {
    display: block; /* Показываем */
    animation: cardAppear 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes cardAppear {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(40px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}