/* Дизайн адаптирован из примера верстки с цветами пользователя */

:root {
    --primary-color: #64AB77;
    --hover-color: #E5B686;
    --accent-color: #95612C;
    --bg-color: #ffffff;
    --text-color: #1d1d1f;
    --text-secondary: #86868b;
    --border-color: #d2d2d7;
    --card-bg: rgba(255, 255, 255, 0.95);
    --card-border: rgba(210, 210, 215, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 17px;
    line-height: 1.47059;
    font-weight: 400;
    letter-spacing: -0.022em;
    color: var(--text-color);
    background-color: var(--bg-color);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header - адаптирован из примера */
.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    margin: 0 auto;
    max-width: 1200px;
    padding: 8px 20px 0;
}

.header-top-bar {
    padding: 8px 0;
    border-bottom: 1px solid rgba(210, 210, 215, 0.2);
    margin-bottom: 8px;
}

.header-top-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-wrapper {
    position: relative;
    display: flex;
    min-height: 56px;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.9);
    padding: 8px 16px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.header-wrapper::before {
    content: '';
    pointer-events: none;
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border: 1px solid transparent;
    background: linear-gradient(to right, rgba(100, 171, 119, 0.2), rgba(229, 182, 134, 0.2), rgba(100, 171, 119, 0.2)) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: exclude;
    mask-composite: exclude;
}

.header-wrapper::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.header-content {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
}

.logo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.logo:hover {
    opacity: 0.8;
    transform: scale(1.05);
}

.logo-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--hover-color));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.logo-placeholder::after {
    content: '🖼️';
    font-size: 24px;
}

.header-text {
    flex: 1;
    min-width: 0;
}

.main-title {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 2px 0;
    background: linear-gradient(135deg, var(--text-color), var(--primary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.main-nav {
    display: flex;
    gap: 4px;
    flex-wrap: nowrap;
    align-items: center;
    flex-shrink: 0;
}

.nav-link {
    color: var(--text-color);
    text-decoration: none;
    font-size: 13px;
    transition: all 0.3s ease;
    padding: 6px 10px;
    border-radius: 8px;
    font-weight: 500;
    position: relative;
    white-space: nowrap;
}

.nav-link:hover {
    color: var(--primary-color);
    background: rgba(100, 171, 119, 0.1);
}

.social-links {
    display: flex;
    gap: 8px;
    align-items: center;
}

.social-link {
    color: var(--text-secondary);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(100, 171, 119, 0.05);
}

.social-link:hover {
    color: var(--primary-color);
    background: rgba(100, 171, 119, 0.15);
    transform: translateY(-2px);
}

.btn-contact {
    background: linear-gradient(to top, var(--primary-color), #5a9a6b);
    border: none;
    color: white;
    padding: 8px 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    box-shadow: inset 0px 1px 0px 0px rgba(255, 255, 255, 0.16);
    background-size: 100% 100%;
    background-position: bottom;
    white-space: nowrap;
}

.btn-contact:hover {
    background-size: 100% 150%;
    transform: translateY(-1px);
}

/* Breadcrumbs */
.breadcrumbs {
    padding: 16px 0;
    background: linear-gradient(to right, transparent, rgba(100, 171, 119, 0.05), transparent);
    font-size: 14px;
    border-top: 1px solid rgba(210, 210, 215, 0.3);
    border-bottom: 1px solid rgba(210, 210, 215, 0.3);
}

.breadcrumbs a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 4px 8px;
    border-radius: 6px;
}

.breadcrumbs a:hover {
    color: var(--primary-color);
    background: rgba(100, 171, 119, 0.1);
}

/* Main Content */
.main-content {
    min-height: calc(100vh - 300px);
    padding: 60px 0;
    position: relative;
}

/* Buttons - адаптированы из примера */
.btn-primary {
    background: linear-gradient(to top, var(--accent-color), #7a4f23);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 17px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    box-shadow: inset 0px 1px 0px 0px rgba(255, 255, 255, 0.16);
    background-size: 100% 100%;
    background-position: bottom;
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary:hover {
    background-size: 100% 150%;
    transform: translateY(-2px);
}

.btn-primary::after {
    content: '→';
    transition: transform 0.3s ease;
    opacity: 0.5;
}

.btn-primary:hover::after {
    transform: translateX(4px);
}

.btn-secondary {
    background: transparent;
    color: var(--text-color);
    border: 1px solid rgba(210, 210, 215, 0.5);
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 17px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    display: inline-block;
}

.btn-secondary::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border: 1px solid transparent;
    background: linear-gradient(to right, rgba(100, 171, 119, 0.2), rgba(229, 182, 134, 0.2), rgba(100, 171, 119, 0.2)) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: exclude;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-secondary:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-secondary:hover::before {
    opacity: 1;
}

/* Gallery Grid - карточки с эффектами свечения */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin: 40px 0;
}

.painting-card {
    position: relative;
    height: 100%;
    overflow: hidden;
    border-radius: 16px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    padding: 1px;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
    transition: all 0.4s ease;
}

.painting-card::before {
    content: '';
    pointer-events: none;
    position: absolute;
    left: -160px;
    top: -160px;
    z-index: 10;
    height: 320px;
    width: 320px;
    border-radius: 50%;
    background: rgba(100, 171, 119, 0.8);
    opacity: 0;
    filter: blur(60px);
    transition: opacity 0.5s ease;
    transform: translate(var(--mouse-x, 0), var(--mouse-y, 0));
}

.painting-card::after {
    content: '';
    pointer-events: none;
    position: absolute;
    left: -192px;
    top: -192px;
    z-index: 30;
    height: 256px;
    width: 256px;
    border-radius: 50%;
    background: var(--primary-color);
    opacity: 0;
    filter: blur(60px);
    transition: opacity 0.5s ease;
    transform: translate(var(--mouse-x, 0), var(--mouse-y, 0));
}

.painting-card:hover::before {
    opacity: 1;
}

.painting-card:hover::after {
    opacity: 0.2;
}

.painting-card-inner {
    position: relative;
    z-index: 20;
    height: 100%;
    overflow: hidden;
    border-radius: inherit;
    background: white;
}

.painting-card-inner::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom right, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.02));
    pointer-events: none;
}

.painting-card-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    background: linear-gradient(135deg, var(--border-color), rgba(210, 210, 215, 0.5));
    transition: transform 0.4s ease;
    display: block;
}

.painting-card:hover .painting-card-image {
    transform: scale(1.05);
}

.painting-card-info {
    padding: 24px;
    position: relative;
    z-index: 2;
    background: white;
}

.painting-card-title {
    font-size: 21px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-color);
    transition: color 0.3s ease;
}

.painting-card:hover .painting-card-title {
    color: var(--primary-color);
}

.painting-card-details {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.painting-card-price {
    font-size: 19px;
    font-weight: 600;
    background: linear-gradient(135deg, var(--accent-color), var(--hover-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-top: 12px;
}

.painting-card-arrow {
    position: absolute;
    right: 24px;
    top: 24px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid rgba(210, 210, 215, 0.5);
    background: rgba(255, 255, 255, 0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 30;
}

.painting-card:hover .painting-card-arrow {
    opacity: 1;
}

/* Forms */
.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-color);
}

.form-control {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 17px;
    font-family: inherit;
    transition: all 0.3s ease;
    background: white;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(100, 171, 119, 0.1);
}

.form-control textarea {
    resize: vertical;
    min-height: 120px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 48px;
    border-radius: 24px;
    max-width: 520px;
    width: 90%;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close {
    position: absolute;
    right: 24px;
    top: 24px;
    font-size: 32px;
    font-weight: 300;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(210, 210, 215, 0.2);
}

.close:hover {
    color: var(--text-color);
    background: rgba(210, 210, 215, 0.4);
    transform: rotate(90deg);
}

.modal-content h2 {
    margin-bottom: 32px;
    font-size: 32px;
    font-weight: 600;
    background: linear-gradient(135deg, var(--text-color), var(--primary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Footer - адаптирован из примера */
.footer {
    position: relative;
    padding: 48px 0;
    margin-top: 80px;
    border-top: 1px solid rgba(210, 210, 215, 0.3);
}

.footer::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 1076px;
    height: 378px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1076 378"><path d="M0 0h1076v378H0z" fill="none"/></svg>') no-repeat;
    opacity: 0.05;
    pointer-events: none;
    z-index: -1;
}

.copyright {
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
}

/* Section Headers - градиентные заголовки с анимацией */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 48px;
    font-weight: 600;
    margin-bottom: 12px;
    background: linear-gradient(to right, var(--text-color), var(--primary-color), var(--hover-color), var(--primary-color), var(--text-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% auto;
    animation: gradient-shift 6s linear infinite;
}

@keyframes gradient-shift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.section-header p {
    font-size: 21px;
    color: var(--text-secondary);
}

.section-label {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 12px;
    margin-bottom: 16px;
}

.section-label::before {
    content: '';
    height: 1px;
    width: 32px;
    background: linear-gradient(to right, transparent, rgba(100, 171, 119, 0.5));
}

.section-label::after {
    content: '';
    height: 1px;
    width: 32px;
    background: linear-gradient(to left, transparent, rgba(100, 171, 119, 0.5));
}

.section-label span {
    background: linear-gradient(to right, var(--primary-color), var(--hover-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 14px;
    font-weight: 500;
}

/* Painting Detail */
.painting-detail {
    max-width: 1000px;
    margin: 0 auto;
}

.painting-detail-images {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    margin-bottom: 48px;
}

.painting-detail-image {
    width: 100%;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.4s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.painting-detail-image:hover {
    transform: scale(1.03);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.painting-detail-info {
    margin-bottom: 48px;
}

.painting-detail-title {
    font-size: 48px;
    font-weight: 600;
    margin-bottom: 24px;
    background: linear-gradient(135deg, var(--text-color), var(--primary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.painting-detail-meta {
    font-size: 17px;
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.8;
}

.painting-detail-description {
    font-size: 17px;
    line-height: 1.8;
    color: var(--text-color);
    margin-bottom: 32px;
}

.painting-detail-description p {
    margin-bottom: 1.5em;
}

.painting-detail-description p:last-child {
    margin-bottom: 0;
}

.painting-detail-price {
    font-size: 36px;
    font-weight: 600;
    background: linear-gradient(135deg, var(--accent-color), var(--hover-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 32px;
}

/* Blog - карточки с эффектами */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 24px;
    margin: 40px 0;
}

.blog-card {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    padding: 1px;
    transition: all 0.4s ease;
    text-decoration: none;
    color: inherit;
    display: block;
}

.blog-card::before {
    content: '';
    pointer-events: none;
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border: 1px solid transparent;
    background: linear-gradient(to right, rgba(100, 171, 119, 0.2), rgba(229, 182, 134, 0.2), rgba(100, 171, 119, 0.2)) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: exclude;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.blog-card:hover::before {
    opacity: 1;
}

.blog-card-inner {
    position: relative;
    z-index: 20;
    height: 100%;
    overflow: hidden;
    border-radius: inherit;
    background: white;
}

.blog-card-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    background: linear-gradient(135deg, var(--border-color), rgba(210, 210, 215, 0.5));
    transition: transform 0.4s ease;
}

.blog-card:hover .blog-card-image {
    transform: scale(1.05);
}

.blog-card-content {
    padding: 28px;
    position: relative;
    z-index: 2;
    background: white;
}

.blog-card-date {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.blog-card-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-color);
    transition: color 0.3s ease;
}

.blog-card:hover .blog-card-title {
    color: var(--primary-color);
}

.blog-card-excerpt {
    font-size: 17px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* About Section */
.about-section {
    padding: 80px 0;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 60px;
    align-items: center;
}

.about-photo {
    width: 100%;
    max-width: 400px;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--border-color), rgba(210, 210, 215, 0.5));
    object-fit: cover;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transition: transform 0.4s ease;
}

.about-photo:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.about-text {
    font-size: 17px;
    line-height: 1.8;
    color: var(--text-color);
}

.about-text p {
    margin-bottom: 1.5em;
}

.about-text p:last-child {
    margin-bottom: 0;
}

.about-text h3 {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 24px;
    background: linear-gradient(135deg, var(--text-color), var(--primary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Image Lightbox */
.lightbox {
    display: none;
    position: fixed;
    z-index: 3000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    cursor: pointer;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.lightbox img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: 24px;
    right: 40px;
    color: white;
    font-size: 40px;
    font-weight: 300;
    cursor: pointer;
    z-index: 3001;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

/* Messages */
.messages-container {
    padding: 24px 0;
}

.message {
    padding: 16px 24px;
    border-radius: 12px;
    margin-bottom: 12px;
    font-size: 17px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    animation: messageSlideIn 0.3s ease-out;
}

@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.message-success {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message-error {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.message-info {
    background: linear-gradient(135deg, #d1ecf1, #bee5eb);
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.message-warning {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    color: #856404;
    border: 1px solid #ffeaa7;
}

/* Responsive */
@media (max-width: 768px) {
    .header {
        top: 0;
        padding: 4px 10px 0;
    }

    .header-top-bar {
        padding: 6px 0;
        margin-bottom: 6px;
    }

    .header-top-content {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }

    .header-wrapper {
        flex-direction: column;
        min-height: auto;
        padding: 12px;
        gap: 12px;
    }

    .header-content {
        width: 100%;
        justify-content: space-between;
    }

    .main-title {
        font-size: 18px;
    }

    .subtitle {
        font-size: 12px;
    }

    .main-nav {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 4px;
    }

    .social-links {
        width: 100%;
        justify-content: center;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .painting-detail-images {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .section-header h2 {
        font-size: 32px;
    }

    .painting-detail-title {
        font-size: 32px;
    }

    .blog-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}
