/* B3 Group CMS - Frontend Styles (WordPress Theme Design) */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Playfair+Display:wght@300;400;500;600;700&display=swap');
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css');

:root {
    --primary: #C9A876;
    --secondary: #8B7355;
    --dark: #1A1A1A;
    --light: #F8F8F8;
    --cream: #FAF9F7;
    --text-dark: #2C2C2C;
    --text-light: #666666;
    --gold: #D4AF37;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--cream);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Подвал внизу экрана: grid как на странице портфолио (обёртка .page-wrap + footer) */
body.page-with-footer {
    min-height: 100vh;
    display: grid;
    grid-template-rows: 1fr auto;
    grid-template-areas: "content" "footer";
}
body.page-with-footer .page-wrap {
    grid-area: content;
}
body.page-with-footer > footer.footer {
    grid-area: footer;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    font-weight: 300;
    line-height: 1.2;
    color: var(--text-dark);
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    z-index: 1000;
    padding: 22px 0;
    border-bottom: 1px solid rgba(212, 175, 55, 0.3);
    transition: all 0.3s ease;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.nav {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 60px;
    position: relative;
}

.nav::before {
    content: '';
    position: absolute;
    top: 0;
    left: 60px;
    right: 60px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.3), transparent);
}

.logo {
    font-family: 'Playfair Display', serif;
    font-size: 28px;
    font-weight: 600;
    color: var(--gold);
    text-decoration: none;
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
    transition: all 0.3s ease;
}

.logo:hover {
    color: #E6C547;
    text-shadow: 0 0 15px rgba(212, 175, 55, 0.5);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 40px;
    margin: 0;
    padding: 0;
}

.nav-menu li {
    margin: 0;
}

.nav-menu a {
    color: #E8E8E8;
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    transition: all 0.3s ease;
    position: relative;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 8px 0;
}

.nav-menu a:hover {
    color: var(--gold);
    text-shadow: 0 0 8px rgba(212, 175, 55, 0.4);
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, #D4AF37, #E6C547);
    transition: all 0.3s ease;
    transform: translateX(-50%);
    border-radius: 1px;
}

.nav-menu a:hover::after {
    width: 100%;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

.cta-btn {
    background: linear-gradient(135deg, #D4AF37, #B8941F);
    color: #000000;
    padding: 14px 32px;
    border: none;
    border-radius: 30px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 20px rgba(212, 175, 55, 0.3);
    text-decoration: none;
    display: inline-block;
}

.cta-btn:hover {
    background: linear-gradient(135deg, #E6C547, #D4AF37);
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(212, 175, 55, 0.5);
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    margin-top: 0;
}

.hero-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    z-index: 1;
    pointer-events: none;
}

.hero-slide.active {
    opacity: 1;
    z-index: 2;
    pointer-events: auto;
}

.hero-slide::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(26, 26, 26, 0.4), rgba(26, 26, 26, 0.6));
    z-index: 1;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 60px;
    pointer-events: auto;
}

.hero-slide .hero-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    text-align: center;
    pointer-events: auto !important;
}

.hero-title {
    font-family: 'Playfair Display', serif;
    font-size: 72px;
    font-weight: 300;
    color: white;
    margin-bottom: 20px;
    text-shadow: 2px 2px 20px rgba(0, 0, 0, 0.7);
    line-height: 1.1;
}

.hero-title-line {
    display: block;
}

.hero-subtitle {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 40px;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
    z-index: 100;
}

.btn-primary, .btn-secondary {
    padding: 16px 40px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    cursor: pointer !important;
    position: relative;
    z-index: 1000 !important;
    pointer-events: auto !important;
}

.btn-primary {
    background: linear-gradient(135deg, var(--gold), #B8941F);
    color: #000000;
    box-shadow: 0 4px 20px rgba(212, 175, 55, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #E6C547, var(--gold));
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(212, 175, 55, 0.5);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(5px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.8);
    transform: translateY(-3px);
}

/* Hero Slider Navigation */
.hero-slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.hero-slider-nav:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.8);
    transform: translateY(-50%) scale(1.1);
}

.hero-slider-prev {
    left: 30px;
}

.hero-slider-next {
    right: 30px;
}

.hero-slider-dots {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: center;
}

.hero-slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.5);
    background: transparent;
    cursor: pointer;
    padding: 0;
    transition: all 0.3s ease;
    outline: none;
}

.hero-slider-dot:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.8);
    transform: scale(1.2);
}

.hero-slider-dot.active {
    background: var(--primary);
    border-color: var(--primary);
    width: 14px;
    height: 14px;
    box-shadow: 0 0 10px rgba(201, 168, 118, 0.5);
}

/* Sections */
.section {
    padding: 120px 0;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 60px;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-family: 'Playfair Display', serif;
    font-size: 48px;
    font-weight: 300;
    color: var(--text-dark);
    margin-bottom: 20px;
    letter-spacing: 2px;
}

.section-subtitle {
    font-size: 18px;
    color: var(--text-light);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Services */
.services {
    background: white;
}

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

.service-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.15);
    text-decoration: none;
    color: inherit;
}

.service-image {
    height: 280px;
    min-height: 280px;
    width: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    flex-shrink: 0;
    display: block;
}

.service-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(201, 168, 118, 0.8), rgba(139, 115, 85, 0.8));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
}

.service-card:hover .service-overlay {
    opacity: 1;
}

.service-icon {
    font-size: 48px;
    color: white;
}

.service-content {
    padding: 40px 30px;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.service-top {
    flex: 1;
}

.service-bottom {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
    width: 100%;
}

.service-title {
    font-family: 'Playfair Display', serif;
    font-size: 28px;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 15px;
}

.service-text {
    font-size: 16px;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 15px;
}

.service-price {
    background: linear-gradient(135deg, var(--gold), #B8941F);
    color: white !important;
    padding: 12px 24px;
    border: none;
    border-radius: 30px;
    font-weight: 600;
    font-size: 14px;
    display: inline-block;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    visibility: visible;
    opacity: 1;
}

.service-link {
    display: inline-block;
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    margin: 0;
    visibility: visible;
    opacity: 1;
}

.service-link:hover {
    color: var(--secondary);
    transform: translateX(5px);
}

/* Portfolio */
.portfolio {
    background: var(--light);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.portfolio-item {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.portfolio-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.portfolio-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.12);
}

.portfolio-image {
    height: 300px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(26, 26, 26, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-info {
    padding: 25px;
}

.portfolio-title {
    font-family: 'Playfair Display', serif;
    font-size: 24px;
    font-weight: 400;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.portfolio-meta {
    font-size: 14px;
    color: var(--text-light);
}

/* Footer */
.footer {
    background: var(--dark);
    color: white;
    padding: 60px 0;
    text-align: center;
}

.footer p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

/* Mobile Menu */
.mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

.portfolio-btn {
    color: white;
    font-size: 18px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ============================================
   About Section
   ============================================ */
.about {
    background: var(--dark);
    color: white;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.about-image {
    height: 500px;
    background-size: cover;
    background-position: center;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.about-text h2 {
    font-family: 'Playfair Display', serif;
    font-size: 50px;
    font-weight: 300;
    color: var(--primary);
    margin-bottom: 30px;
    letter-spacing: 1px;
}

.about-text p {
    font-size: 18px;
    line-height: 1.8;
    margin-bottom: 25px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 300;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-top: 60px;
}

.stat {
    text-align: center;
    padding: 30px 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.stat-number {
    font-family: 'Playfair Display', serif;
    font-size: 42px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 10px;
}

.stat-label {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.8);
}

@media (max-width: 1024px) {
    .about-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .about-image {
        height: 400px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .about-text h2 {
        font-size: 36px;
    }
    
    .about-image {
        height: 300px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-number {
        font-size: 36px;
    }
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.team-member {
    text-align: center;
    transition: all 0.3s ease;
}

.team-member:hover {
    transform: translateY(-5px);
}

.team-photo {
    width: 200px;
    height: 200px;
    margin: 0 auto 20px;
    overflow: hidden;
    border-radius: 50%;
    border: 4px solid var(--primary);
    box-shadow: 0 10px 30px rgba(201, 168, 118, 0.3);
    transition: all 0.3s ease;
}

.team-member:hover .team-photo {
    box-shadow: 0 15px 40px rgba(201, 168, 118, 0.5);
}

.team-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%);
    transition: filter 0.4s ease, transform 0.4s ease;
}

.team-member:hover .team-photo img {
    filter: grayscale(0%);
    transform: scale(1.05);
}

.team-info {
    padding-top: 10px;
}

.team-name {
    font-family: 'Playfair Display', serif;
    font-size: 24px;
    font-weight: 400;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.team-role {
    color: var(--primary);
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.team-description {
    color: var(--text-light);
    font-size: 14px;
    line-height: 1.6;
}

.contact-wrapper {
    max-width: 1200px;
    margin: 0 auto;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.contact-info h3 {
    font-family: 'Playfair Display', serif;
    font-size: 28px;
    color: var(--primary);
    margin-bottom: 30px;
    font-weight: 400;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    font-size: 16px;
    color: var(--text-dark);
}

.contact-item i {
    color: var(--primary);
    font-size: 20px;
    width: 24px;
}

.contact-map {
    height: 100%;
}

.contact-form-wrapper {
    width: 100%;
}

.contact-form-wrapper form input:focus,
.contact-form-wrapper form textarea:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2);
}

.contact-form-wrapper form input[type="checkbox"] {
    accent-color: var(--primary);
}

.contact-form-wrapper form label a {
    color: var(--primary);
    text-decoration: underline;
}

.contact-form-wrapper form label a:hover {
    color: var(--secondary);
}

/* Map Styles */
#map {
    filter: grayscale(70%) brightness(0.95);
    transition: filter 0.3s ease;
    position: relative;
    z-index: 1;
    background: var(--cream);
    min-height: 500px;
}

#map .leaflet-container {
    background: var(--cream);
    font-family: 'Inter', sans-serif;
    height: 100%;
    width: 100%;
}

.leaflet-container {
    height: 500px;
    width: 100%;
}

#map:hover {
    filter: grayscale(50%) brightness(1);
}

/* Скрываем атрибуцию Leaflet */
.leaflet-control-attribution {
    display: none !important;
}

/* Кастомные маркеры в стиле сайта */
.custom-marker {
    background: transparent !important;
    border: none !important;
    position: relative;
}

.leaflet-container {
    font-family: 'Inter', sans-serif;
    background: var(--cream);
}

.marker-pin {
    position: relative;
    width: 40px;
    height: 50px;
    animation: markerPulse 2s infinite;
}

.marker-pin-inner {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--gold), #B8941F);
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(212, 175, 55, 0.5), 0 0 0 4px rgba(212, 175, 55, 0.2);
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
}

.marker-pin-inner:hover {
    transform: rotate(-45deg) scale(1.1);
    box-shadow: 0 6px 30px rgba(212, 175, 55, 0.7), 0 0 0 6px rgba(212, 175, 55, 0.3);
}

.marker-pin-inner i {
    transform: rotate(45deg);
    color: #000000;
    font-size: 18px;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.3);
}

.marker-pin-shadow {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 8px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    filter: blur(4px);
    z-index: 1;
}

@keyframes markerPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Кастомные всплывающие окна */
.custom-popup .leaflet-popup-content-wrapper {
    background: var(--cream);
    border-radius: 15px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(212, 175, 55, 0.2);
    padding: 0;
    border: 2px solid rgba(212, 175, 55, 0.3);
}

.custom-popup .leaflet-popup-content {
    margin: 0;
    padding: 20px;
    font-family: 'Inter', sans-serif;
    min-width: 200px;
}

.custom-popup .leaflet-popup-tip {
    background: var(--cream);
    border: 2px solid rgba(212, 175, 55, 0.3);
    border-top: none;
    border-left: none;
    border-right: none;
}

.map-popup-title {
    font-family: 'Playfair Display', serif;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(212, 175, 55, 0.3);
}

.map-popup-address {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.map-popup-address i {
    color: var(--gold);
    font-size: 14px;
}

.map-popup-description {
    font-size: 13px;
    color: var(--text-light);
    line-height: 1.6;
    margin-top: 8px;
    font-style: italic;
}

.leaflet-popup-close-button {
    color: var(--text-light) !important;
    font-size: 24px !important;
    font-weight: 300 !important;
    padding: 8px 12px !important;
    transition: all 0.3s ease !important;
}

.leaflet-popup-close-button:hover {
    color: var(--gold) !important;
    transform: rotate(90deg);
}

/* Partners Section */
.partners {
    position: relative;
    background: linear-gradient(135deg, #faf9f7 0%, #f5f3f0 50%, #faf9f7 100%);
    padding: 100px 0;
    overflow: hidden;
}

.partners-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.3;
}

.partners-pattern {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(201, 168, 118, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(212, 175, 55, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(201, 168, 118, 0.05) 0%, transparent 50%);
    background-size: 100% 100%;
    animation: patternMove 20s ease-in-out infinite;
}

@keyframes patternMove {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-20px, -20px) scale(1.05); }
}

.partners .container {
    position: relative;
    z-index: 1;
}

.partners-header {
    text-align: center;
    margin-bottom: 80px;
}

.partners-title-wrapper {
    display: inline-block;
}

.partners-label {
    display: inline-block;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--primary);
    margin-bottom: 15px;
    position: relative;
    padding: 8px 20px;
    background: rgba(201, 168, 118, 0.1);
    border-radius: 30px;
}

.partners-title {
    font-size: 48px;
    font-weight: 300;
    color: var(--text-dark);
    margin: 20px 0;
    line-height: 1.2;
}

.partners-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

.divider-line {
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.divider-icon {
    color: var(--gold);
    font-size: 24px;
    animation: handshakePulse 2s ease-in-out infinite;
}

@keyframes handshakePulse {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.1) rotate(5deg); }
}

.partners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
    align-items: stretch;
    margin-top: 60px;
}

.partner-item {
    position: relative;
    perspective: 1000px;
}

.partner-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.partner-card {
    position: relative;
    width: 100%;
    height: 180px;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(201, 168, 118, 0.1);
}

.partner-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s;
    z-index: 2;
}

.partner-item:hover .partner-card::before {
    left: 100%;
}

.partner-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
    padding-bottom: 50px;
    z-index: 1;
    flex-direction: column;
}

.partner-logo-wrapper {
    position: relative;
    width: 100%;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.5s ease;
}

.partner-logo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center;
    filter: grayscale(100%) brightness(0.8);
    opacity: 0.8;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.partner-item:hover .partner-logo {
    filter: grayscale(0%) brightness(1);
    opacity: 1;
    transform: scale(1.05);
}

.partner-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
    text-align: center;
    transition: color 0.3s ease;
}

.partner-item:hover .partner-name {
    color: var(--primary);
}

/* Подпись под картинкой партнера в стиле "НАМ ПОМОГАЛИ" */
.partner-name-label {
    position: absolute;
    bottom: 15px;
    left: 0;
    right: 0;
    text-align: center;
    font-family: 'Playfair Display', serif;
    font-size: 14px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #D4AF37;
    padding: 0 15px;
    z-index: 2;
}

.partner-card-inner {
    flex-direction: column;
    padding-bottom: 50px;
}

.partner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(201, 168, 118, 0.95), rgba(212, 175, 55, 0.95));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
    border-radius: 20px;
}

.partner-item:hover .partner-overlay {
    opacity: 1;
}

.partner-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: white;
    transform: translateY(10px);
    transition: transform 0.4s ease;
}

.partner-item:hover .partner-info {
    transform: translateY(0);
}

.partner-visit {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.partner-icon {
    font-size: 24px;
    animation: iconBounce 1.5s ease-in-out infinite;
}

@keyframes iconBounce {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(5px); }
}

.partner-shine {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
    z-index: 3;
}

.partner-item:hover .partner-shine {
    opacity: 1;
    animation: shineRotate 2s linear infinite;
}

@keyframes shineRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.partner-item:nth-child(even) .partner-card {
    animation-delay: 0.1s;
}

.partner-item:nth-child(3n) .partner-card {
    animation-delay: 0.2s;
}

@media (max-width: 768px) {
    .partners {
        padding: 60px 0;
    }
    
    .partners-title {
        font-size: 36px;
    }
    
    .partners-grid {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        gap: 20px;
    }
    
    .partner-card {
        height: 140px;
    }
    
    .partner-logo {
        width: 100px;
        height: 100px;
    }
    
    .partners-header {
        margin-bottom: 50px;
    }
}

@media (max-width: 480px) {
    .partners-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .partner-card {
        height: 120px;
    }
    
    .partner-logo {
        width: 80px;
        height: 80px;
    }
}

/* Адаптивность карты */
@media (max-width: 768px) {
    #map {
        height: 400px !important;
    }
    
    .contact-grid {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .hero-title {
        font-size: 42px;
    }
    
    .services-grid,
    .portfolio-grid,
    .team-grid {
        grid-template-columns: 1fr;
    }
    
    .container {
        padding: 0 20px;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .hero-content {
        padding: 0 20px;
    }
}
