/* ============================================
   БАЗОВЫЕ СТИЛИ И СБРОС
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: #ffffff;
    color: #111827;
    line-height: 1.6;
}

/* ============================================
   ЦВЕТА
   ============================================ */
:root {
    --primary-dark: #c69c6b;
    --primary-terra: #a5523a;
    --primary-navy: #0f2b5b;
    --primary-beige: #f5e8d3;
    --background-light: #ffffff;
    --background-cream: #faf8f5;
    --background-gray: #f5f5f5;
    --text-gray-600: #4b5563;
    --text-gray-700: #374151;
    --text-gray-900: #111827;
    --text-white: #ffffff;
    --text-white-90: rgba(255, 255, 255, 0.9);
    --border-gray-200: #e5e7eb;
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* ============================================
   УТИЛИТЫ
   ============================================ */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

@media (min-width: 640px) {
    .container {
        padding: 0 1.5rem;
    }
}

@media (min-width: 1024px) {
    .container {
        padding: 0 2rem;
    }
}

/* ============================================
   HEADER
   ============================================ */
#header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    transition: all 0.3s ease;
    background: transparent;
    padding: 1.25rem 0;
}

#header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    padding: 0.75rem 0;
}

#header.scrolled .header-logo-text,
#header.scrolled .header-nav a,
#header.scrolled #mobileMenuBtn {
    color: var(--text-gray-700);
}

#header.scrolled .header-logo-text {
    color: var(--primary-dark);
}

nav {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

@media (min-width: 640px) {
    nav {
        padding: 0 1.5rem;
    }
}

@media (min-width: 1024px) {
    nav {
        padding: 0 2rem;
    }
}

.header-content {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.header-logo-img {
    width: 2.5rem;
    height: 2.5rem;
    object-fit: contain;
    display: block;
}

.header-logo-text-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.2;
}

.header-logo-subtitle {
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--text-white);
    transition: color 0.3s ease;
    opacity: 0.9;
}

.header-logo-text {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text-white);
    transition: color 0.3s ease;
}

#header.scrolled .header-logo-subtitle {
    color: var(--text-gray-700);
    opacity: 0.8;
}

.header-nav {
    display: none;
    align-items: center;
    gap: 2rem;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

@media (min-width: 768px) {
    .header-nav {
        display: flex;
    }
}

.header-nav a {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-white);
    text-decoration: none;
    transition: color 0.3s ease;
}

.header-nav a:hover {
    color: var(--primary-beige);
}

#mobileMenuBtn {
    display: block;
    padding: 0.5rem;
    color: var(--text-white);
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.3s ease;
}

@media (min-width: 768px) {
    #mobileMenuBtn {
        display: none;
    }
}

#mobileMenuBtn svg {
    width: 1.5rem;
    height: 1.5rem;
}

#mobileMenu {
    display: none;
    margin-top: 1rem;
    padding-bottom: 1rem;
    flex-direction: column;
    gap: 0.75rem;
}

@media (min-width: 768px) {
    #mobileMenu {
        display: none !important;
    }
}

#mobileMenu.show {
    display: flex;
}

#mobileMenu a {
    display: block;
    color: var(--text-white);
    font-weight: 500;
    text-decoration: none;
    transition: color 0.3s ease;
}

#mobileMenu a:hover {
    color: var(--primary-beige);
}

#header.scrolled #mobileMenu a {
    color: var(--text-gray-700);
}

/* ============================================
   HERO SECTION
   ============================================ */
#hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#hero img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

#hero .hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.2);
    z-index: 10;
}

.hero-content {
    position: relative;
    z-index: 20;
    text-align: center;
    padding: 0 1rem;
}

@media (min-width: 640px) {
    .hero-content {
        padding: 0 1.5rem;
    }
}

@media (min-width: 1024px) {
    .hero-content {
        padding: 0 2rem;
    }
}

.hero-content h1 {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

@media (min-width: 640px) {
    .hero-content h1 {
        font-size: 3rem;
    }
}

@media (min-width: 768px) {
    .hero-content h1 {
        font-size: 3.75rem;
    }
}

@media (min-width: 1024px) {
    .hero-content h1 {
        font-size: 4.5rem;
    }
}

.hero-content h1 span {
    display: block;
    color: var(--primary-beige);
}

.hero-content p {
    font-size: 1.125rem;
    color: var(--text-white-90);
    margin-bottom: 2rem;
    max-width: 42rem;
    margin-left: auto;
    margin-right: auto;
}

@media (min-width: 640px) {
    .hero-content p {
        font-size: 1.25rem;
    }
}

@media (min-width: 768px) {
    .hero-content p {
        font-size: 1.5rem;
    }
}

.hero-btn {
    display: inline-block;
    padding: 1rem 2rem;
    background-color: var(--primary-terra);
    color: var(--text-white);
    font-size: 1.125rem;
    font-weight: 600;
    border-radius: 0.5rem;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.hero-btn:hover {
    background-color: rgba(165, 82, 58, 0.9);
    transform: scale(1.05);
}

.hero-arrow {
    position: absolute;
    bottom: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
}

.hero-arrow svg {
    width: 1.5rem;
    height: 1.5rem;
    color: var(--text-white);
}

/* ============================================
   SECTIONS
   ============================================ */
section {
    scroll-margin-top: 80px;
    transition: background-color 0.8s ease, background-image 0.8s ease;
}

.section-padding {
    padding: 5rem 0;
}

@media (min-width: 768px) {
    .section-padding {
        padding: 7rem 0;
    }
}

.section-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 1rem;
    text-align: center;
}

@media (min-width: 640px) {
    .section-title {
        font-size: 2.25rem;
    }
}

@media (min-width: 768px) {
    .section-title {
        font-size: 3rem;
    }
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-gray-600);
    text-align: center;
    max-width: 48rem;
    margin: 0 auto;
}

.section-center {
    text-align: center;
    margin-bottom: 4rem;
}

/* ============================================
   ABOUT SECTION
   ============================================ */
#about {
    background-color: var(--background-cream);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 3rem;
}

@media (min-width: 768px) {
    .about-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.about-card {
    background-color: var(--background-light);
    padding: 2rem;
    border-radius: 0.75rem;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
}

.about-card:hover {
    box-shadow: var(--shadow-xl);
    transform: scale(1.05);
}

.about-card-icon {
    width: 4rem;
    height: 4rem;
    background-color: rgba(198, 156, 107, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.about-card-icon svg {
    width: 2rem;
    height: 2rem;
    color: var(--primary-dark);
}

.about-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 0.75rem;
    text-align: center;
}

.about-card p {
    color: var(--text-gray-600);
    text-align: center;
}

/* ============================================
   SERVICES SECTION
   ============================================ */
#services {
    background-color: var(--background-light);
}

.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.service-card {
    background-color: var(--background-cream);
    padding: 2rem;
    border-radius: 0.75rem;
    transition: all 0.3s ease;
}

.service-card:hover {
    box-shadow: var(--shadow-xl);
    transform: scale(1.05);
}

.service-card-icon {
    width: 5rem;
    height: 5rem;
    background-color: rgba(15, 43, 91, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.service-card-icon svg {
    width: 2.5rem;
    height: 2.5rem;
    color: var(--primary-navy);
}

.service-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 0.75rem;
    text-align: center;
}

.service-card p {
    color: var(--text-gray-600);
    text-align: center;
    font-size: 0.875rem;
}

/* ============================================
   PORTFOLIO SECTION
   ============================================ */
#portfolio {
    background-color: var(--background-gray);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .portfolio-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.portfolio-card {
    position: relative;
    overflow: hidden;
    border-radius: 0.75rem;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    transition: all 0.3s ease;
}

.portfolio-card:hover {
    transform: scale(1.05);
}

.portfolio-image {
    position: relative;
    height: 16rem;
    overflow: hidden;
}

.portfolio-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.portfolio-card:hover .portfolio-image img {
    transform: scale(1.1);
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(198, 156, 107, 0.8);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.portfolio-card:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-card:hover {
    transform: scale(1.05);
}

.portfolio-overlay-content {
    text-align: center;
    color: var(--text-white);
    padding: 0 1rem;
}

.portfolio-overlay-content h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.portfolio-overlay-content p {
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

/* ============================================
   CONTACT SECTION
   ============================================ */
#contact {
    background-color: var(--background-cream);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: stretch;
}

@media (min-width: 1024px) {
    .contact-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.contact-grid > div {
    display: flex;
    flex-direction: column;
}

.contact-grid > div:first-child {
    display: flex;
}

.contact-grid > div:last-child {
    display: flex;
}

.contact-form {
    background-color: var(--background-light);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-xl);
    height: 100%;
    display: flex;
    flex-direction: column;
}

@media (min-width: 768px) {
    .contact-form {
        padding: 2.5rem;
    }
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-gray-700);
    margin-bottom: 0.5rem;
}

.form-group label .required {
    color: #ef4444;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-gray-200);
    border-radius: 0.75rem;
    background-color: #f9fafb;
    transition: all 0.3s ease;
    font-family: inherit;
    font-size: 1rem;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-terra);
    background-color: var(--background-light);
    box-shadow: 0 0 0 2px rgba(165, 82, 58, 0.2);
}

.form-group textarea {
    resize: none;
    min-height: 6rem;
}

.form-message {
    margin-bottom: 1.5rem;
    padding: 1rem;
    border-radius: 0.5rem;
    display: none;
}

.form-message.show {
    display: block;
}

.form-message.success {
    background-color: #f0fdf4;
    color: #166534;
}

.form-message.error {
    background-color: #fef2f2;
    color: #991b1b;
}

.form-submit {
    width: 100%;
    padding: 1rem 2rem;
    background-color: var(--primary-terra);
    color: var(--text-white);
    font-size: 1.125rem;
    font-weight: 600;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: auto;
}

.form-submit:hover:not(:disabled) {
    background-color: rgba(165, 82, 58, 0.9);
    transform: scale(1.05);
}

.form-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.submit-loading {
    display: none;
    align-items: center;
    justify-content: center;
}

.submit-loading.show {
    display: flex;
}

.submit-loading {
    display: none;
    align-items: center;
    justify-content: center;
}

.submit-loading svg {
    margin-right: 0.75rem;
}

.contact-map {
    background-color: var(--background-light);
    border-radius: 1rem;
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.contact-map iframe {
    width: 100%;
    flex: 1;
    min-height: 400px;
    border: none;
}

@media (min-width: 768px) {
    .contact-map iframe {
        min-height: 500px;
    }
}

.contact-map-info {
    padding: 1.5rem;
    background-color: var(--background-light);
}

.contact-map-info h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
}

.contact-map-info p {
    color: var(--text-gray-600);
}

/* ============================================
   FOOTER
   ============================================ */
footer {
    background-color: var(--primary-dark);
    color: var(--text-white);
    padding: 3rem 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
    justify-items: center;
}

@media (min-width: 768px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        max-width: 800px;
        margin-left: auto;
        margin-right: auto;
    }
}

.footer-section {
    text-align: center;
}

@media (min-width: 768px) {
    .footer-section {
        text-align: left;
    }
}

.footer-section h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-links li {
    display: flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
}

.footer-links li svg {
    width: 1.25rem;
    height: 1.25rem;
    margin-right: 0.5rem;
}

.footer-links li a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links li a:hover {
    color: var(--primary-beige);
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.footer-social a {
    width: 2.5rem;
    height: 2.5rem;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.footer-social a:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.footer-social a svg {
    width: 1.25rem;
    height: 1.25rem;
    color: var(--text-white);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 2rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
}

/* ============================================
   АНИМАЦИИ
   ============================================ */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes scaleIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.animate-fade-in {
    animation: fadeIn 0.6s ease-in-out;
}

.animate-slide-up {
    animation: slideUp 0.6s ease-out;
}

.animate-scale-in {
    animation: scaleIn 0.5s ease-out;
}

.animate-bounce {
    animation: bounce 2s infinite;
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* ============================================
   УТИЛИТЫ
   ============================================ */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-6 {
    margin-bottom: 1.5rem;
}

.mb-8 {
    margin-bottom: 2rem;
}

.mb-12 {
    margin-bottom: 3rem;
}

.mb-16 {
    margin-bottom: 4rem;
}

.mt-4 {
    margin-top: 1rem;
}

.mt-12 {
    margin-top: 3rem;
}

.p-2 {
    padding: 0.5rem;
}

.p-4 {
    padding: 1rem;
}

.p-6 {
    padding: 1.5rem;
}

.p-8 {
    padding: 2rem;
}

.px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
}

.py-3 {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.py-5 {
    padding-top: 1.25rem;
    padding-bottom: 1.25rem;
}

.py-12 {
    padding-top: 3rem;
    padding-bottom: 3rem;
}

.py-20 {
    padding-top: 5rem;
    padding-bottom: 5rem;
}

@media (min-width: 768px) {
    .md\:py-28 {
        padding-top: 7rem;
        padding-bottom: 7rem;
    }
}

.w-full {
    width: 100%;
}

.h-full {
    height: 100%;
}

.flex {
    display: flex;
}

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.relative {
    position: relative;
}

.absolute {
    position: absolute;
}

.fixed {
    position: fixed;
}

.inset-0 {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}

.z-0 {
    z-index: 0;
}

.z-10 {
    z-index: 10;
}

.z-20 {
    z-index: 20;
}

.z-50 {
    z-index: 50;
}

.overflow-hidden {
    overflow: hidden;
}

.rounded-lg {
    border-radius: 0.5rem;
}

.rounded-xl {
    border-radius: 0.75rem;
}

.rounded-2xl {
    border-radius: 1rem;
}

.rounded-full {
    border-radius: 9999px;
}

.shadow-lg {
    box-shadow: var(--shadow-lg);
}

.shadow-xl {
    box-shadow: var(--shadow-xl);
}

.shadow-md {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.transition-all {
    transition: all 0.3s ease;
}

.transition-colors {
    transition: color 0.3s ease;
}

.transform {
    transform: translateZ(0);
}

.hover\:scale-105:hover {
    transform: scale(1.05);
}

.object-cover {
    object-fit: cover;
}

.cursor-pointer {
    cursor: pointer;
}

.resize-none {
    resize: none;
}

/* ============================================
   АДАПТИВНОСТЬ
   ============================================ */
@media (max-width: 767px) {
    section {
        scroll-margin-top: 60px;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
}
