/* CSS Variables */
:root {
    --primary: #8B0000;
    --primary-dark: #660000;
    --primary-grad: linear-gradient(135deg, #a52a2a 0%, #8B0000 40%, #660000 100%);
    --secondary: #D4AF37;
    --accent: #FFD700;
    --gold: #b58e3b;
    --gold-grad: linear-gradient(135deg, #d8b25a 0%, #b58e3b 40%, #9b7a2f 100%);
    --gold-ink: #9b7a2f;
    --black: #1A1A1A;
    --gray-dark: #4A4A4A;
    --gray: #6B7280;
    --gray-light: #E5E7EB;
    --white: #FFFFFF;
    --card: #FFFFFF;
    --stroke: #E5E7EB;
    --body-bg: #F5F5F7;
    --body-bg-dark: #E5E5E7;
    --overlay-gray: linear-gradient(180deg, rgba(0, 0, 0, .45) 0%, rgba(0, 0, 0, .25) 40%, rgba(0, 0, 0, .35) 100%);
    --overlay-dark: rgba(51, 51, 51, 0.7);
    --hero-bg-image: url('../img/background.jpg');
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    
    /* Переменные для Live Customizer */
    --h1-size: 3.5rem;
    --h2-size: 2.5rem;
    --line-height: 1.6;
    --section-padding: 4rem;
    --border-radius: 8px;
    
    /* Дополнительные переменные */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --text: #333;
}

/* Background with gray gradient overlay */
.background-with-gray-overlay {
    background: var(--hero-bg-image) !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    position: relative;
}

.background-with-gray-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, .65) 0%, rgba(0, 0, 0, .45) 40%, rgba(0, 0, 0, .55) 100%);
    z-index: 1;
}

/* Background with darker overlay for better text readability */
.background-with-dark-overlay {
    background: linear-gradient(var(--overlay-dark), var(--overlay-dark)), var(--hero-bg-image);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* 
 * Usage instructions:
 * - .background-with-gray-overlay: 60% серый наложение для умеренного затемнения
 * - .background-with-dark-overlay: 70% темно-серый наложение для лучшей читаемости текста
 * 
 * To change the background image, update the --hero-bg-image variable
 * To adjust overlay opacity, modify --overlay-gray or --overlay-dark variables
 */

/* Reset and base styles */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-family);
    line-height: var(--line-height);
    color: var(--text);
    background: var(--body-bg) !important;
}
img { max-width: 100%; height: auto; }
a { text-decoration: none; color: inherit; }
button { border: none; background: none; cursor: pointer; font-family: inherit; }
ul { list-style: none; }
input, textarea { font-family: inherit; }

/* Typography */
h1, h2, h3, h4, h5, h6 { font-weight: 600; line-height: 1.2; margin: 0 0 1rem 0; }
h1 { font-size: var(--h1-size); font-family: "Playfair Display", serif; }
h2 { font-size: var(--h2-size); font-family: "Playfair Display", serif; }
h3 { font-size: 2rem; }
p { margin-bottom: 1rem; }
.section-title {
    font-family: "Playfair Display", serif;
    font-size: 32px;
    margin: 0 0 24px;
    letter-spacing: -0.01em;
    position: relative;
    display: inline-block;
    text-align: center;
}

.section-title::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -6px;
    height: 3px;
    border-radius: 3px;
    background: var(--gold-grad);
}
.section-subtitle { font-size: 1.125rem; color: var(--gray); text-align: center; margin-bottom: 3rem; }

/* Layout */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1rem; }
.section { padding: var(--section-padding) 0; }
.section > .container { text-align: center; }
.section:nth-child(even) { background: var(--body-bg-dark) !important; }

/* Grid */
.grid { display: grid; gap: 2rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* Row and Columns (old design) */
.row { 
    display: flex; 
    flex-wrap: wrap; 
    margin: 0 -1rem; 
    align-items: stretch;
}
.row > * { padding: 0 1rem; }
.col-4 {
    flex: 0 0 33.333%;
    max-width: 33.333%;
    padding: 1rem 1rem;
}
.col-6 { flex: 0 0 50%; max-width: 50%; padding: 0 1rem; }
.col-12 { flex: 0 0 100%; max-width: 100%; padding: 0 1rem; }

/* Cards */
.card {
    background: var(--white) !important;
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--stroke);
    transition: all 0.3s ease;
}
.card.with-icon { 
    position: relative; 
    padding-left: 3rem; 
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    font-size: 18px;
    padding-left: calc(3rem + 5px);
}
.card.with-icon::before { 
    content: attr(data-icon); 
    position: absolute; 
    left: 0.5rem; 
    top: 50%; 
    transform: translateY(-50%); 
    font-size: 2rem; 
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
    font-size: 1rem;
    min-height: 44px;
}

.btn-primary {
    background: var(--primary-grad);
    color: var(--white) !important;
    border-color: var(--primary-dark) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15);
}

.btn-primary:hover {
    background: var(--primary-dark) !important;
    border-color: var(--primary-dark) !important;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}
.btn-secondary { 
    background: var(--gold-grad);
    color: #fff;
    border-color: var(--gold-ink);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15);
}
.btn-secondary:hover { 
    background: #B8941F !important; 
    transform: translateY(-2px); 
}
.btn-ghost { 
    background: transparent !important; 
    color: var(--primary) !important; 
    border-color: var(--primary) !important; 
}
.btn-ghost:hover { 
    background: var(--primary) !important; 
    color: var(--white) !important; 
}
.btn-messenger { 
    background: var(--white) !important; 
    color: var(--black) !important; 
    border: 1px solid var(--stroke) !important;
    padding: 0.75rem 1.5rem;
    border-radius: 999px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.btn-messenger:hover { 
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-call {
    background: linear-gradient(135deg, #D4AF37 0%, #B8941F 100%) !important;
    color: var(--text) !important;
    border: none !important;
    padding: 0.75rem 1.5rem;
    border-radius: 999px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);
}

.btn-call:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.4);
}

/* Header */
.site-header {
    background: var(--white) !important;
    border-bottom: 1px solid var(--stroke);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
    padding: 0 1rem;
}
.header-inner { 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    padding: 1rem 0; 
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}
.brand { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; color: var(--black); }
.brand-title { 
    font-family: 'Playfair Display', serif; 
    font-size: 1.3rem; 
    font-weight: 700; 
    background: linear-gradient(135deg, #8B0000 0%, #660000 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.main-nav { 
    display: flex;
    gap: 1rem;
}
.main-nav a { text-decoration: none; color: var(--gray); font-weight: 500; transition: color 0.3s ease; }
.main-nav a:hover { color: var(--primary); }
.header-cta { display: flex; gap: 1rem; }
.nav-toggle { 
    display: none; 
    background: none; 
    border: none; 
    cursor: pointer; 
    padding: 0.5rem; 
    position: relative;
    height: 20px;
    width: 40px;
}

/* Центральная линия */
.menu_toggle_line {
    position: relative;
    height: 3px;
    width: 25px;
    background: var(--primary);
    margin: 0 auto;
}

/* Псевдоэлементы для верхней и нижней линии */
.nav-toggle::before, 
.nav-toggle::after {
    position: absolute;
    content: '';
    left: 0px;
    right: 0;
    height: 3px;
    background: var(--primary);
    transition: 0.4s;
}

.nav-toggle::before {
    top: 0px;
}

.nav-toggle::after {
    bottom: 0; 
}

/* Анимация превращения в крестик */
.nav-toggle.active .menu_toggle_line {
    display: none;
}

.nav-toggle.active::before {
    transform: translateY(8.5px) rotate(45deg);
}

.nav-toggle.active::after {
    transform: translateY(-8.5px) rotate(-45deg);
}

/* Hero Section */
.hero {
    color: var(--white);
    padding: 6rem 0;
}
.hero-inner { display: flex; align-items: center; gap: 4rem; }

.hero-content {
    position: relative;
    z-index: 10;
}
.hero-content { flex: 1; }
.hero h1 { font-size: 3rem; margin-bottom: 1.5rem; line-height: 1.2; }
.subtitle { font-size: 1.25rem; margin-bottom: 2rem; opacity: 0.9; }
.cta-group { 
    display: flex; 
    gap: 1rem; 
    margin-bottom: 2rem; 
    flex-wrap: wrap;
}
.hero-bullets { 
    list-style: none; 
    margin: 0; 
    padding: 0; 
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: start;
}
.hero-bullets li { 
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    font-size: 1.125rem;
    position: relative;
    white-space: nowrap;
}
.hero-bullets li::before { 
    content: "✓"; 
    margin-right: 0.75rem;
    color: var(--secondary); 
    font-weight: bold; 
    font-size: 1.25rem;
}


/* Advantages Section */
.advantages { margin-top: 2rem; }

/* Services Section */
.services { margin-top: 2rem; }

/* Portfolio Section */
.filters { display: flex; gap: 1rem; justify-content: center; margin-bottom: 3rem; flex-wrap: wrap; }
.filter { padding: 0.5rem 1rem; border: 2px solid var(--primary); background: transparent; color: var(--primary); border-radius: 0.5rem; cursor: pointer; transition: all 0.3s ease; }
.filter:hover, .filter.active { background: var(--primary); color: var(--white); }

/* Steps Section */
.steps {
    list-style: none;
    counter-reset: step-counter;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.steps li {
    background: var(--card);
    border: 1px solid var(--stroke);
    padding: 16px;
    border-radius: 14px;
    position: relative;
    padding-left: 56px;
    counter-increment: step-counter;
    transition: all 0.3s ease;
    font-size: 20px;
}

.steps li:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.steps li::before {
    content: counter(step-counter);
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary-grad);
    color: var(--white);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.875rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15);
}

/* Contact Section */
.contact-info { display: flex; flex-direction: column; gap: 1.5rem; }
.contact-item { display: flex; align-items: center; gap: 1rem; }
.contact-icon { width: 40px; height: 40px; background: var(--primary); color: var(--white); border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.social-links { display: flex; gap: 1rem; }
.social-links a { width: 50px; height: 50px; background: var(--primary); color: var(--white); border-radius: 50%; display: flex; align-items: center; justify-content: center; text-decoration: none; transition: all 0.3s ease; }
.social-links a:hover { background: var(--primary-dark); transform: translateY(-2px); }

.contacts {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    align-items: start;
    gap: 2rem;
}

.contacts-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contacts-info p {
    margin: 0;
    line-height: 1.6;
}

.contacts-info strong {
    color: var(--primary);
}

.messengers {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    justify-content: center;
}

.contacts-map {
    background: var(--white);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow);
    width: 100%;
    height: 400px;
}

.contacts-map iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.request-wrap {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 2rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.request-aside {
    background: var(--gold);
    color: #fff;
    padding: 20px;
    border-radius: 16px;
    display: grid;
    gap: 12px;
    align-content: center;
    justify-items: center;
    text-align: center;
    font-size: 1.125rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.request-aside h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.75rem;
    font-weight: 600;
    margin: 0;
    color: #fff;
}

.request-aside p {
    margin: 0;
    line-height: 1.6;
    opacity: 0.9;
}

.request-aside .pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: rgba(0, 0, 0, .18);
    border-radius: 999px;
    transition: all 0.3s ease;
    color: #fff;
    font-size: 0.875rem;
    font-weight: 500;
}

.request-aside .pill:hover {
    background: rgba(0, 0, 0, .25);
    transform: translateY(-1px);
}

.request-aside .request-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    margin-top: 16px;
}

.request-aside .request-actions .btn {
    min-width: 200px;
    background: rgba(0, 0, 0, .2);
    border: 2px solid rgba(255, 255, 255, .3);
    color: #fff;
    font-weight: 500;
    transition: all 0.3s ease;
}

.request-aside .request-actions .btn:hover {
    background: rgba(0, 0, 0, .3);
    border-color: rgba(255, 255, 255, .5);
    transform: translateY(-2px);
}

.request-aside .request-actions small {
    font-size: 0.75rem;
    opacity: 0.8;
    color: #fff;
    text-align: center;
    line-height: 1.4;
}

/* Form */
.form { 
    background: var(--white); 
    padding: 2rem; 
    border-radius: 1rem; 
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-group { margin-bottom: 1rem; }
.form-input, .form-textarea { width: 100%; padding: 0.75rem; border: 2px solid var(--gray-light); border-radius: 0.5rem; font-size: 1rem; transition: border-color 0.3s ease; }
.form-input:focus, .form-textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 2px rgba(139, 0, 0, 0.1); }
.form-textarea { resize: vertical; min-height: 120px; }
.form-note { font-size: 0.875rem; color: var(--gray); margin-top: 1rem; text-align: center; }
.form-note a { color: var(--primary); text-decoration: none; }

/* Form elements */
.form label {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-weight: 500;
    color: var(--black);
}

.form label span {
    font-size: 0.875rem;
    color: var(--gray-dark);
}

.form label.full {
    grid-column: 1 / -1;
}

.form .grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form .grid .full {
    grid-column: 1 / -1;
}

.form input[type="text"],
.form input[type="tel"],
.form input[type="email"],
.form input[type="file"],
.form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--gray-light);
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    background: var(--white);
}

.form input[type="text"]:focus,
.form input[type="tel"]:focus,
.form input[type="email"]:focus,
.form textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(139, 0, 0, 0.1);
}

.form textarea {
    resize: vertical;
    min-height: 120px;
    font-family: inherit;
}

.form input[type="file"] {
    padding: 0.5rem;
    border: 2px dashed var(--gray-light);
    background: var(--body-bg);
    cursor: pointer;
}

.form input[type="file"]:hover {
    border-color: var(--primary);
    background: var(--body-bg-dark);
}

/* Стили для reCAPTCHA */
.form .g-recaptcha {
    margin: 1.5rem 0;
    display: flex;
    justify-content: center;
}

.form .g-recaptcha > div {
    margin: 0 auto;
}

/* File info display */
.file-info-display {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-top: 10px;
    border: 1px solid #e9ecef;
}

.file-info-display h4 {
    margin: 0 0 10px 0;
    color: #495057;
    font-size: 0.9em;
}

.file-info-display ul {
    margin: 0 0 10px 0;
    padding-left: 20px;
}

.file-info-display li {
    margin-bottom: 5px;
    color: #6c757d;
    font-size: 0.85em;
}

.file-info-display p {
    margin: 0;
    color: #6c757d;
    font-size: 0.8em;
}

.file-info {
    color: #6c757d;
    font-size: 0.8em;
    margin-top: 5px;
    display: block;
}

/* WebP Integration Styles */
.webp-file-info {
    background: #e8f5e8;
    padding: 15px;
    border-radius: 8px;
    margin-top: 10px;
    border: 1px solid #c3e6cb;
}

.webp-file-list h5 {
    margin: 0 0 10px 0;
    color: #155724;
    font-size: 0.9em;
}

.webp-file-list ul {
    margin: 0 0 10px 0;
    padding-left: 20px;
}

.webp-file-list li {
    margin-bottom: 5px;
    color: #155724;
    font-size: 0.85em;
}

.webp-note {
    margin: 0;
    color: #155724;
    font-size: 0.8em;
}

.webp-success-message {
    margin: 20px 0;
}

.webp-success-content {
    background: #d4edda;
    color: #155724;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #c3e6cb;
}

.webp-success-content h5 {
    margin: 0 0 15px 0;
    color: #155724;
}

.webp-success-content p {
    margin: 0 0 15px 0;
}

.webp-stats {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    border: 1px solid #e9ecef;
}

.webp-stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
}

.webp-stat-item:last-child {
    border-bottom: none;
}

.webp-stat-item .file-name {
    font-weight: 600;
    color: #155724;
}

.webp-stat-item .compression {
    color: #28a745;
    font-weight: 500;
}

.webp-stat-item .size {
    color: #6c757d;
    font-size: 0.9em;
}

.webp-error-message {
    margin: 20px 0;
}

.webp-error-content {
    background: #f8d7da;
    color: #721c24;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #f5c6cb;
}

.webp-error-content h5 {
    margin: 0 0 15px 0;
    color: #721c24;
}

.webp-error-content p {
    margin: 0 0 10px 0;
}

.form button[type="submit"] {
    width: 100%;
    margin-top: 1rem;
    padding: 1rem;
    font-size: 1.125rem;
    font-weight: 600;
}

/* Footer */
.footer {
    background: var(--black) !important;
    color: var(--white);
    padding: 3rem 0 1rem;
}
.footer-inner { display: flex; align-items: center; justify-content: space-between; padding: 2rem 0; }
.footer-brand { display: flex; align-items: center; gap: 1rem; }
.footer-bottom { border-top: 1px solid var(--gray); padding-top: 1rem; display: flex; justify-content: space-between; align-items: center; }
.footer-links { display: flex; gap: 2rem; }
.footer-links a { color: var(--gray); transition: color 0.3s ease; }
.footer-links a:hover { color: var(--white); }
.footer-socials { display: flex; gap: 1rem; }
.footer-socials a { color: var(--gray); transition: color 0.3s ease; }
.footer-socials a:hover { color: var(--white); }
.footer-brand .brand-title { 
    font-weight: 600; 
    font-size: 1.25rem; 
    background: linear-gradient(135deg, #8B0000 0%, #660000 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.footer-brand .brand-tagline { color: var(--gray); font-size: 0.875rem; }
.footer-nav { display: flex; gap: 2rem; }
.footer-nav a { color: var(--gray); transition: color 0.3s ease; }
.footer-nav a:hover { color: var(--white); }
.footer-bottom a { color: var(--gray); transition: color 0.3s ease; }
.footer-bottom a:hover { color: var(--white); }
.footer-bottom .copyright { color: var(--gray); }
.footer-bottom .privacy-link { color: var(--gray); transition: color 0.3s ease; }
.footer-bottom .privacy-link:hover { color: var(--white); }
.footer-bottom .social-links { display: flex; gap: 1rem; }
.footer-bottom .social-links a { color: var(--gray); transition: color 0.3s ease; }
.footer-bottom .social-links a:hover { color: var(--white); }
.footer-bottom .social-links img { width: 24px; height: 24px; opacity: 0.7; transition: opacity 0.3s ease; }
.footer-bottom .social-links a:hover img { opacity: 1; }
.footer-bottom .social-links a[href*="telegram"] img { filter: brightness(0.8) !important; }
.footer-bottom .social-links a[href*="vk"] img { filter: brightness(0.8) !important; }
.footer-bottom .social-links a[href*="telegram"]:hover img { filter: brightness(1) !important; }
.footer-bottom .social-links a[href*="vk"]:hover img { filter: brightness(1) !important; }
.footer-bottom .social-links a[href*="telegram"] img { filter: brightness(0.8) !important; }
.footer-bottom .social-links a[href*="vk"] img { filter: brightness(0.8) !important; }
.footer-bottom .social-links a[href*="telegram"]:hover img { filter: brightness(1) !important; }
.footer-bottom .social-links a[href*="vk"]:hover img { filter: brightness(1) !important; }
.footer-bottom .social-links a[href*="telegram"] img { filter: brightness(0.8) !important; }
.footer-bottom .social-links a[href*="vk"] img { filter: brightness(0.8) !important; }

/* Privacy page */
.privacy-content { max-width: 800px; margin: 0 auto; }
.privacy-content h2 { color: var(--black); margin: 2rem 0 1rem; }
.privacy-content h3 { color: var(--black); margin: 1.5rem 0 1rem; }
.privacy-content p { margin-bottom: 1rem; line-height: 1.6; }
.privacy-content ul { margin: 1rem 0; padding-left: 1.5rem; }
.privacy-content li { margin-bottom: 0.5rem; line-height: 1.5; }
.privacy-actions { display: flex; gap: 1rem; justify-content: center; margin: 3rem 0; }
.privacy-actions .btn { min-width: 120px; }

/* Animations and Effects */
.card, .portfolio-item {
    transition: all 0.3s ease;
}

.card:hover, .portfolio-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.site-header {
    transition: box-shadow 0.3s ease;
}

/* Portfolio items */
.portfolio-item {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
    background: transparent;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow);
    cursor: pointer;
    position: relative;
    height: 300px;
}

.portfolio-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.portfolio-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    position: absolute;
    top: 0;
    left: 0;
}

.portfolio-item:hover img {
    transform: scale(1.05);
}

.portfolio-item-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
    color: white;
    padding: 1.5rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    z-index: 2;
}

.portfolio-item:hover .portfolio-item-overlay {
    transform: translateY(0);
}

.portfolio-item-overlay h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.portfolio-category-tag {
    display: inline-block;
    background: var(--gold);
    color: var(--white);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Модальное окно портфолио */
.portfolio-modal-overlay {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999 !important;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 2rem;
    box-sizing: border-box;
    cursor: pointer;
}

.portfolio-modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.portfolio-modal {
    background: var(--white);
    border-radius: 1rem;
    max-width: 900px;
    width: 100%;
    max-height: 95vh;
    overflow: hidden;
    transform: scale(0.8);
    transition: transform 0.3s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    cursor: default;
    position: relative;
    z-index: 10000 !important;
    display: flex;
    flex-direction: column;
}

.portfolio-modal-overlay.show .portfolio-modal {
    transform: scale(1);
}

.portfolio-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #e9ecef;
    background: var(--white);
    position: relative;
    z-index: 10001;
}

.portfolio-modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--black);
    font-weight: 600;
}

.portfolio-modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: #6c757d;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.portfolio-modal-close:hover {
    background: #f8f9fa;
    color: var(--black);
}

.portfolio-modal-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}

.portfolio-modal-image {
    width: 100%;
    flex: 1;
    overflow: hidden;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.portfolio-modal-image img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* Специальные стили для вертикальных изображений */
.portfolio-modal-image.vertical-image {
    flex: 1;
}

.portfolio-modal-image.vertical-image img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
}

.portfolio-modal-info {
    padding: 1.5rem;
    flex: 0 0 auto;
    overflow-y: auto;
    max-height: 15vh;
}

.portfolio-modal-category {
    display: inline-block;
    background: var(--gold);
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
}

.portfolio-modal-description {
    color: var(--gray);
    line-height: 1.6;
    font-size: 1rem;
}

/* Адаптивность для модального окна */
@media (max-width: 767px) {
    .portfolio-modal-overlay {
        padding: 1rem;
    }
    
    .portfolio-modal {
        max-height: 95vh;
    }
    
    .portfolio-modal-header {
        padding: 1rem 1.5rem;
    }
    
    .portfolio-modal-header h2 {
        font-size: 1.25rem;
    }
    
    .portfolio-modal-info {
        padding: 1rem;
        max-height: 12vh;
    }
    
    .portfolio-modal-image {
        flex: 1;
    }
    
    .portfolio-modal-image.vertical-image {
        flex: 1;
    }
}

/* Специальные стили для высоких экранов */
@media (min-height: 800px) {
    .portfolio-modal-info {
        max-height: 15vh;
    }
}

@media (min-height: 1000px) {
    .portfolio-modal-info {
        max-height: 10vh;
    }
}

/* Gallery */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.gallery .portfolio-item {
    margin: 0;
}

/* Portfolio Modal - удалено, создается динамически */

/* Старые стили модального окна удалены */

/* Все старые стили модального окна удалены */

/* Анимация загрузки */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #d8b25a;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Make portfolio items clickable */
.portfolio-item img {
    cursor: pointer;
    transition: transform 0.2s ease;
}

.portfolio-item img:hover {
    transform: scale(1.02);
}

/* Responsive Design */
@media (max-width: 767px) {
    .container {
        width: 100%;
        max-width: 100%;
        padding: 0 1rem;
        box-sizing: border-box;
    }
    
    .request-wrap {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        padding: 0;
        margin: 0;
    }
    
    .form,
    .request-aside {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .nav-toggle { display: block; }
    .main-nav { display: none; }
    .main-nav.active { 
        display: flex; 
        flex-direction: column; 
        position: absolute; 
        top: 100%; 
        left: 0; 
        right: 0; 
        background: var(--white); 
        border-top: 1px solid var(--stroke); 
        padding: 1rem; 
        box-shadow: var(--shadow); 
        z-index: 1000;
    }
    .header-cta { display: none; }
    .hero-inner { 
        flex-direction: column; 
        text-align: center; 
        gap: 1.5rem;
    }
    .hero h1 { 
        font-size: 2rem; 
    }
    .cta-group { 
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.75rem;
        max-width: 300px;
        margin: 0 auto 2rem;
    }
    .contact-grid { grid-template-columns: 1fr; }
    .contacts { grid-template-columns: 1fr; }
    .request-wrap { grid-template-columns: 1fr; }
    .form-grid { grid-template-columns: 1fr; }
    .section-title { 
        font-size: 26px; 
        margin: 0 0 20px; 
    }
    .section { 
        padding: 2rem 0; 
    }
    .hero { 
        padding: 4rem 0; 
    }
    .request-aside { padding: 16px; }
    .request-aside .request-actions .btn { min-width: 160px; }
    .steps li { padding: 12px; padding-left: 48px; }
    .steps li::before { width: 20px; height: 20px; font-size: 0.75rem; left: 12px; }
    .footer-inner { flex-direction: column; gap: 1rem; text-align: center; }
    .footer-bottom { flex-direction: column; gap: 1rem; text-align: center; }
    .col-4, .col-6 { flex: 0 0 100%; max-width: 100%; }
    .privacy-content { 
        max-width: 500px; 
        padding: 0 1rem; 
    }
}

@media (max-width: 480px) {
    .container { 
        width: 100%;
        max-width: 100%;
        padding: 0 0.5rem; 
        box-sizing: border-box;
    }
    
    .request-wrap {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    .section { padding: 2rem 0; }
    .hero { padding: 4rem 0; }
    .hero h1 { font-size: 2rem; }
    .cta-group { flex-direction: column; align-items: center; }
    .filters { flex-direction: column; align-items: center; }
    .contacts { gap: 1rem; }
    .request-wrap { gap: 1rem; }
    .section-title { font-size: 24px; margin: 0 0 16px; }
    .request-aside { padding: 12px; }
    .request-aside .request-actions .btn { min-width: 140px; font-size: 0.875rem; }
    .request-aside .pill { padding: 8px 10px; }
    .steps li { padding: 10px; padding-left: 44px; }
    .steps li::before { width: 18px; height: 18px; font-size: 0.7rem; left: 10px; }
    .privacy-content { padding: 0 0.5rem; }
}

/* Comprehensive Responsive Design */
@media (max-width: 1400px) {
    .container {
        width: 100%;
        max-width: 1200px;
    }
    .hero h1 { font-size: 2.75rem; }
    .section { padding: 3.5rem 0; }
    .privacy-content { max-width: 1000px; }
}

@media (max-width: 1200px) {
    .container {
        width: 100%;
        max-width: 1024px;
    }
    .hero h1 { font-size: 2.5rem; }
    .section-title { font-size: 30px; }
    .section { padding: 3rem 0; }
    .privacy-content { max-width: 900px; }
}

@media (max-width: 1024px) {
    .container {
        width: 100%;
        max-width: 100%;
        padding: 0 1rem;
        box-sizing: border-box;
    }
    
    .request-wrap {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    /* Предотвращение переполнения */
    * {
        box-sizing: border-box;
    }
    
    body {
        overflow-x: hidden;
    }
    
    /* Header адаптация */
    .header-inner {
        flex-wrap: wrap;
        gap: 0.5rem;
        justify-content: space-between;
        align-items: center;
        margin: 5px auto;
        max-width: 1200px;
        width: 100%;
    }
    
    .brand {
        flex: 0 0 auto;
        min-width: 150px;
        max-width: 200px;
    }
    
    .brand-title {
        font-size: 0.9rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .main-nav {
        display: none; /* Скрываем на планшетах */
    }
    
    .nav-toggle {
        display: block; /* Показываем toggle на планшетах */
    }
    
    .main-nav.active { 
        display: flex; 
        flex-direction: column; 
        position: absolute; 
        top: 100%; 
        left: 0; 
        right: 0; 
        background: var(--white); 
        border-top: 1px solid var(--stroke); 
        padding: 1rem; 
        box-shadow: var(--shadow); 
        z-index: 1000;
    }
    
    .header-cta {
        display: flex;
        flex-wrap: wrap;
        gap: 0.25rem;
        justify-content: flex-end;
        align-items: center;
        flex: 1;
        min-width: 0;
    }
    
    .header-cta .btn {
        font-size: 0.7rem;
        padding: 0.4rem 0.5rem;
        min-width: auto;
        white-space: normal;
        word-wrap: break-word;
        line-height: 1.1;
        height: auto;
        min-height: 32px;
        flex-shrink: 1;
    }
    
    .btn-messenger {
        font-size: 0.65rem;
        padding: 0.4rem 0.5rem;
        white-space: normal;
        word-wrap: break-word;
        line-height: 1.1;
        height: auto;
        min-height: 32px;
    }
    
    .btn-call {
        font-size: 0.7rem;
        padding: 0.4rem 0.6rem;
        white-space: normal;
        word-wrap: break-word;
        line-height: 1.1;
        height: auto;
        min-height: 32px;
    }
    
    /* Hero секция */
    .hero {
        padding: 3rem 0;
        overflow-x: hidden;
    }
    
    .hero-inner {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
        width: 100%;
        max-width: 100%;
    }
    
    .hero h1 {
        font-size: 1.5rem;
        line-height: 1.3;
        margin-bottom: 1rem;
        word-wrap: break-word;
        hyphens: auto;
        max-width: 100%;
        text-align: center;
    }
    
    .subtitle {
        font-size: 1rem;
        margin-bottom: 1.25rem;
        line-height: 1.4;
        word-wrap: break-word;
        max-width: 100%;
    }
    
    .cta-group {
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.5rem;
        margin-bottom: 1.25rem;
        width: 100%;
        max-width: 100%;
    }
    
    .cta-group .btn {
        font-size: 0.75rem;
        padding: 0.5rem 0.6rem;
        min-width: 100px;
        max-width: 140px;
        flex: 1;
        text-align: center;
        white-space: normal;
        word-wrap: break-word;
        line-height: 1.2;
        height: auto;
        min-height: 36px;
    }
    
    .hero-bullets {
        justify-content: center;
        align-items: center;
        gap: 0.75rem;
        width: 100%;
        max-width: 100%;
    }
    
    .hero-bullets li {
        font-size: 0.9rem;
        padding: 0.5rem 0.75rem;
        text-align: left;
        word-wrap: break-word;
        line-height: 1.3;
    }
    
    /* Services секция */
    .services .row {
        margin: 0;
        width: 100%;
        max-width: 100%;
    }
    
    .services .col-4 {
        flex: 0 0 100%;
        max-width: 100%;
        padding: 0;
        margin-bottom: 1rem;
        width: 100%;
    }
    
    .services .card {
        padding: 1rem;
        height: auto;
        min-height: 80px;
        width: 100%;
        max-width: 100%;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .services .card.with-icon {
        font-size: 14px;
        padding-left: 2rem;
        line-height: 1.3;
    }
    
    .services .card.with-icon::before {
        font-size: 1.25rem;
        left: 0.5rem;
    }
    
    /* Portfolio секция */
    .filters {
        flex-wrap: wrap;
        gap: 0.5rem;
        justify-content: center;
    }
    
    .filter {
        font-size: 0.875rem;
        padding: 0.4rem 0.8rem;
        min-width: auto;
    }
    
    .gallery {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1.5rem;
    }
    
    .portfolio-item {
        margin: 0;
    }
    
    .portfolio-item {
        height: 250px;
    }
    
    .portfolio-item img {
        height: 100%;
    }
    
    .portfolio-item-content {
        padding: 1.25rem;
    }
    
    .portfolio-item h3 {
        font-size: 1.125rem;
        margin-bottom: 0.5rem;
    }
    
    .portfolio-item p {
        font-size: 0.9rem;
    }
    
    /* Steps секция */
    .steps {
        gap: 0.75rem;
    }
    
    .steps li {
        padding: 1rem;
        padding-left: 3rem;
        font-size: 1.125rem;
    }
    
    .steps li::before {
        width: 20px;
        height: 20px;
        font-size: 0.75rem;
        left: 0.75rem;
    }
    
    /* Contacts секция */
    .contacts {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .contacts-info {
        order: 2;
    }
    
    .contacts-map {
        order: 1;
        min-height: 300px;
        height: 300px;
        width: 100%;
    }
    
    .contacts-map iframe {
        width: 100%;
        height: 100%;
    }
    
    .messengers {
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.75rem;
    }
    
    .messengers .btn {
        font-size: 0.875rem;
        padding: 0.6rem 1rem;
    }
    
    /* Request секция */
    .request-wrap {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .request-aside {
        order: 2;
        padding: 1.5rem;
    }
    
    .request-aside h3 {
        font-size: 1.5rem;
    }
    
    .request-aside .request-actions .btn {
        min-width: 180px;
        font-size: 0.9rem;
    }
    
    .form {
        padding: 1.5rem;
        order: 1;
    }
    
    .form .grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .form input[type="text"],
    .form input[type="tel"],
    .form input[type="email"],
    .form textarea {
        font-size: 0.9rem;
        padding: 0.6rem;
    }
    
    .form button[type="submit"] {
        font-size: 1rem;
        padding: 0.75rem;
    }
    
    /* Footer */
    .footer-inner {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }
    
    .footer-brand {
        justify-content: center;
    }
    
    .footer-nav {
        justify-content: center;
        flex-wrap: wrap;
        gap: 1.5rem;
    }
    
    .footer-socials {
        justify-content: center;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    /* Общие улучшения */
    .section {
        padding: 2rem 0;
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }
    
    .section-title {
        font-size: 24px;
        margin-bottom: 1.25rem;
        word-wrap: break-word;
        line-height: 1.2;
    }
    
    .card {
        padding: 1rem;
        width: 100%;
        max-width: 100%;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    /* Дополнительные правила для предотвращения переполнения */
    .row {
        margin: 0;
        width: 100%;
        max-width: 100%;
    }
    
    .row > * {
        padding: 0 0.5rem;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    /* Улучшения для мобильных устройств */
    .btn-messenger {
        font-size: 0.65rem;
        padding: 0.4rem 0.5rem;
        white-space: normal;
        word-wrap: break-word;
        line-height: 1.1;
        height: auto;
        min-height: 32px;
    }
    
    .btn-call {
        font-size: 0.7rem;
        padding: 0.4rem 0.6rem;
        max-width: 120px;
        white-space: normal;
        word-wrap: break-word;
        line-height: 1.1;
        height: auto;
        min-height: 32px;
    }
    
    .privacy-content { 
        max-width: 100%;
        padding: 0 1rem;
    }
    
    /* Принудительное ограничение ширины для всех элементов */
    .container > * {
        max-width: 100%;
        overflow-x: hidden;
    }
    
    /* Исправление для текста */
    p, h1, h2, h3, h4, h5, h6, span, div {
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
    }
}


@media (max-width: 576px) {
    .container {
        width: 100%;
        max-width: 100%;
        padding: 0 1rem;
        box-sizing: border-box;
    }
    
    .request-wrap {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .filters {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 10px !important;
    }
    
    .filter {
        width: 100% !important;
        text-align: center !important;
    }
    
    .main-nav.active {
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
        text-align: center !important;
    }
    
    .main-nav.active a {
        width: 100% !important;
        padding: 10px !important;
    }
    
    .header-cta {
        display: none;
    }
    .cta-group {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
        justify-content: center;
        max-width: 300px;
        margin: 0 auto 2rem;
    }
    .hero-bullets li {
        font-size: 0.74rem;
        /* white-space: nowrap; */
    }
    .hero-bullets li::before {
        margin-right: 0.3rem;
        font-size: 1rem;
    }
    .hero h1 { font-size: 1.75rem; }
    .section-title { font-size: 24px; }
    .hero-inner { gap: 1rem; }
    .section { padding: 1.5rem 0; }
    .hero { padding: 3rem 0; }
    .privacy-content { max-width: 400px; }
}

@media (max-width: 414px) {
    .container {
        width: 100%;
        max-width: 100%;
        padding: 0 0.75rem;
        box-sizing: border-box;
    }
    .hero h1 { font-size: 1.5rem; }
    .section-title { font-size: 22px; }
    .section { padding: 1.25rem 0; }
    .hero { padding: 2.5rem 0; }
    .privacy-content { max-width: 350px; }
}

@media (max-width: 393px) {
    .container {
        width: 100%;
        max-width: 100%;
        padding: 0 0.5rem;
        box-sizing: border-box;
    }
    .hero h1 { font-size: 1.25rem; }
    .section-title { font-size: 20px; }
    .section { padding: 1rem 0; }
    .hero { padding: 2rem 0; }
    .privacy-content { max-width: 300px; }
}

@media (max-width: 320px) {
    .container {
        width: 100%;
        max-width: 100%;
        padding: 0 0.5rem;
        box-sizing: border-box;
    }
    .hero h1 { font-size: 1.125rem; }
    .section-title { font-size: 18px; }
    .section { padding: 0.75rem 0; }
    .hero { padding: 1.5rem 0; }
    .privacy-content { max-width: 250px; }
}

/* Дополнительные стили для preview.php */
.contact-info h3,
.social-links h3 {
    margin-bottom: 1rem;
    color: var(--primary);
    font-size: 1.25rem;
}

.contact-info p {
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

.contact-info a {
    color: var(--primary);
    text-decoration: none;
}

.contact-info a:hover {
    text-decoration: underline;
}

.social-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.social-buttons .btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
    padding: 0.75rem 1.5rem;
}

.site-footer {
    background: var(--white);
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
}

.site-footer p {
    margin: 0;
    opacity: 0.9;
}

/* Стили для смены ориентации */
/* Стили для смены ориентации - только для существующих классов */
@media screen and (orientation: landscape) and (max-height: 500px) and (max-width: 767px) {
    /* Ландшафтная ориентация на мобильных */
    .hero {
        min-height: 70vh;
        padding: 2rem 0;
    }
    
    .hero h1 {
        font-size: 2rem !important;
        margin-bottom: 1rem;
    }
    
    .section {
        padding: 3rem 0;
    }
    
    .gallery {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 1rem;
    }
    
    .services .row {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }
    
    .steps {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .contacts {
        grid-template-columns: 1fr 1fr !important;
        align-items: flex-start;
        gap: 2rem;
    }
    
    .contacts-info,
    .contacts-map {
        flex: 1;
    }
    
    /* Компактное меню для ландшафта */
    .site-header {
        padding: 0.5rem 0;
    }
    
    .brand-title {
        font-size: 1rem;
    }
    
    /* Уменьшаем отступы для экономии места */
    .container {
        padding: 0 1rem;
    }
}

@media screen and (orientation: portrait) and (max-width: 767px) {
    /* Портретная ориентация на мобильных */
    .hero {
        min-height: 60vh;
        padding: 3rem 0;
    }
    
    .gallery {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .services .row {
        flex-direction: column;
    }
    
    .steps {
        display: block !important;
    }
    
    .contacts {
        grid-template-columns: 1fr !important;
    }
    
    /* Увеличиваем размеры кнопок для удобного нажатия */
    .btn {
        min-height: 48px;
        padding: 12px 24px;
        font-size: 1rem;
        touch-action: manipulation;
    }
    
    /* Улучшаем читаемость текста */
    .hero h1 {
        font-size: 2.5rem !important;
        line-height: 1.2;
    }
    
    .section-title {
        font-size: 2rem !important;
    }
    
    /* Увеличиваем поля ввода для удобства */
    input[type="text"],
    input[type="tel"],
    input[type="email"],
    textarea,
    select {
        min-height: 48px;
        font-size: 16px; /* Предотвращает зум на iOS */
        padding: 12px 16px;
    }
}

/* Переходы при смене ориентации */
@media screen and (max-width: 767px) {
    .hero,
    .gallery,
    .contacts {
        transition: all 0.3s ease-in-out;
    }
    
    /* Скрываем элементы при переходе */
    body.orientation-changing {
        overflow: hidden;
    }
    
    body.orientation-changing * {
        transition-duration: 0.1s !important;
    }
}
