:root {
    --primary-color: #c9a227; /* Premium Gold */
    --primary-hover: #b08d22;
    --text-dark: #1f1f1f;
    --text-muted: #5e5e5e;
    --bg-light: #f7f7f5;
    --bg-white: #ffffff;
    --bg-dark: #1b1b1b;
    --transition: all 0.3s ease;

    --font-heading: 'Playfair Display', serif;
    --font-body: 'Montserrat', sans-serif;
}

/* Reset basics */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-body); color: var(--text-dark); line-height: 1.6; background-color: var(--bg-white); }
a { text-decoration: none; color: inherit; transition: var(--transition); }
ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; }

/* Utilities */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.section { padding: 90px 0; }
.bg-light { background-color: var(--bg-light); }
.bg-dark { background-color: var(--bg-dark); }
.text-center { text-align: center; }
.text-light { color: #fff !important; }
.text-light-muted { color: #b3b3b3 !important; }
.w-100 { width: 100%; }

/* Typography */
.section-title {
    font-family: var(--font-heading);
    font-size: 40px;
    font-weight: 600;
    margin-bottom: 40px;
    position: relative;
    color: var(--text-dark);
}
.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: var(--primary-color);
    margin-top: 15px;
}
.text-center.section-title::after {
    margin-left: auto;
    margin-right: auto;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 16px 32px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 1.5px;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    outline: none;
}
.btn-primary { background-color: var(--primary-color); color: #fff; }
.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(201, 162, 39, 0.4);
}

/* Header */
.header {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    padding: 25px 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(8px);
    z-index: 1000;
    box-shadow: 0 2px 15px rgba(0,0,0,0.03);
    transition: var(--transition);
}
.header.scrolled { padding: 12px 0; }
.header-inner { display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: 26px; font-weight: 700; font-family: var(--font-heading); letter-spacing: 1px; color: var(--text-dark); }
.logo span { color: var(--primary-color); font-weight: 700; font-family: var(--font-body); }
.nav-list { display: flex; gap: 35px; }
.nav-list a { font-weight: 500; font-size: 14px; text-transform: uppercase; letter-spacing: 1px; position: relative; }
.nav-list a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}
.nav-list a:hover::after, .nav-list a.active::after { width: 100%; }
.header-contacts { display: flex; align-items: center; gap: 20px; }
.phone { font-weight: 600; color: var(--text-dark); font-size: 16px; }
.phone:hover { color: var(--primary-color); }
.mobile-menu-btn { display: none; flex-direction: column; gap: 6px; cursor: pointer; }
.mobile-menu-btn span { width: 28px; height: 2px; background: var(--text-dark); transition: var(--transition); }

/* Hero */
.hero { position: relative; height: 100vh; min-height: 600px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.hero-bg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-size: cover; background-position: center; z-index: 1; filter: brightness(0.65); }
.hero::after { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(to right, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.2) 100%); z-index: 2; }
.hero-content { position: relative; z-index: 3; color: #fff; max-width: 850px; padding-top: 80px; }
.hero-title { font-family: var(--font-heading); font-size: 56px; font-weight: 700; line-height: 1.15; margin-bottom: 25px; }
.hero-text { font-size: 18px; margin-bottom: 45px; font-weight: 300; opacity: 0.9; line-height: 1.7; }

/* About */
.about-inner { display: flex; align-items: center; gap: 70px; }
.about-text { flex: 1; }
.about-text p { margin-bottom: 20px; color: var(--text-muted); font-size: 16px; text-align: justify;}
.highlight-text { font-family: var(--font-heading); font-size: 22px; font-style: italic; color: var(--text-dark); margin-top: 35px; border-left: 3px solid var(--primary-color); padding-left: 20px; }
.about-image { flex: 1; }
.img-wrapper { position: relative; padding: 20px; }
.img-wrapper img { width: 100%; z-index: 2; position: relative; box-shadow: 0 15px 40px rgba(0,0,0,0.15); }
.img-wrapper::after { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 2px solid var(--primary-color); z-index: 1; }

/* Grid / Cards */
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); gap: 40px; margin-top: 60px; }
.service-card { background: var(--bg-white); overflow: hidden; box-shadow: 0 5px 20px rgba(0,0,0,0.03); transition: var(--transition); border-bottom: 3px solid transparent; }
.service-card:hover { transform: translateY(-10px); box-shadow: 0 20px 40px rgba(0,0,0,0.08); border-bottom-color: var(--primary-color); }
.service-card-img { height: 320px; overflow: hidden; }
.service-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.service-card:hover .service-card-img img { transform: scale(1.05); }
.service-card-content { padding: 40px 30px; }
.service-card-content h3 { font-family: var(--font-heading); font-size: 24px; margin-bottom: 15px; }
.service-card-content p { color: var(--text-muted); font-size: 15px; }

/* Railings (List layout) */
.railings-list { display: flex; flex-direction: column; gap: 50px; margin-top: 60px; }
.railing-item { display: flex; align-items: center; gap: 50px; background: var(--bg-white); padding: 40px; box-shadow: 0 5px 20px rgba(0,0,0,0.03); border: 1px solid #eee; }
.railing-item.reverse { flex-direction: row-reverse; }
.railing-content { flex: 1; }
.railing-content h3 { font-family: var(--font-heading); font-size: 28px; margin-bottom: 20px; color: var(--primary-color); }
.railing-content p { color: var(--text-muted); font-size: 16px; }
.railing-img { flex: 1; }
.railing-img img { width: 100%; height: 350px; object-fit: cover; box-shadow: 0 15px 30px rgba(0,0,0,0.1); }

/* Gallery / Tables */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; margin-top: 50px; }
.gallery-item { overflow: hidden; position: relative; border-radius: 6px; box-shadow: 0 5px 15px rgba(0,0,0,0.08); cursor: pointer; transition: var(--transition); aspect-ratio: 1 / 1; }
.gallery-item:hover { transform: translateY(-5px); box-shadow: 0 15px 30px rgba(0,0,0,0.15); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.gallery-item:hover img { transform: scale(1.08); }

/* Modal Галерея */
.modal { display: none; position: fixed; z-index: 2000; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background-color: rgba(0,0,0,0.9); }
.modal-header { padding: 20px 40px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #333; position: sticky; top: 0; background: rgba(0,0,0,0.95); z-index: 2001;}
.close-modal { color: #fff; font-size: 35px; font-weight: bold; cursor: pointer; transition: color 0.3s; line-height: 1;}
.close-modal:hover { color: var(--primary-color); }
.modal-content { padding: 40px 20px; margin: 0 auto; width: 100%; max-width: 1200px; }
.modal-open { overflow: hidden; }

/* Contacts */
.contacts-inner { display: flex; gap: 80px; }
.contacts-info { flex: 1; }
.contacts-list { margin-top: 40px; }
.contacts-list li { margin-bottom: 25px; display: flex; flex-direction: column; }
.contacts-list li strong { color: var(--primary-color); margin-bottom: 8px; font-size: 14px; text-transform: uppercase; letter-spacing: 2px; }
.contacts-list li a, .contacts-list li span { color: #fff; font-size: 18px; font-weight: 300; }
.contacts-list li a:hover { color: var(--primary-color); }
.contacts-form { flex: 1; background: var(--bg-white); padding: 50px; }
.form-group { margin-bottom: 25px; }
.form-group input, .form-group textarea { width: 100%; padding: 16px 20px; border: 1px solid #e1e1e1; background: #fafafa; font-family: var(--font-body); font-size: 15px; transition: var(--transition); }
.form-group input:focus, .form-group textarea:focus { border-color: var(--primary-color); outline: none; background: #fff; box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.1); }
.form-group textarea { height: 140px; resize: none; }
.form-group.has-error input, .form-group.has-error textarea { border-color: #e74c3c; background: #fff5f5; }
.form-group.has-error input:focus, .form-group.has-error textarea:focus { box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1); }
.error-message {
    display: block;
    color: #e74c3c;
    font-size: 13px;
    margin-top: 6px;
    font-weight: 500;
}

/* Footer */
.footer { background: #0a0a0a; padding: 40px 0; color: #777; font-size: 14px; }
.footer-content { display: flex; justify-content: space-between; align-items: center; }
.footer-logo p { margin-top: 10px; font-weight: 300;}

/* Lightbox */
.lightbox-overlay {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.95);
    align-items: center;
    justify-content: center;
    flex-direction: column;
}
.lightbox-overlay.active {
    display: flex;
}
.lightbox-inner {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 60px 80px;
}
.lightbox-img-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    max-height: 100%;
}
.lightbox-img-wrap img {
    max-width: 100%;
    max-height: calc(100vh - 120px);
    object-fit: contain;
    box-shadow: 0 20px 60px rgba(0,0,0,0.8);
    border-radius: 4px;
    animation: lightboxFadeIn 0.25s ease;
}
@keyframes lightboxFadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to   { opacity: 1; transform: scale(1); }
}
.lightbox-close {
    position: fixed;
    top: 20px; right: 30px;
    color: #fff;
    font-size: 42px;
    line-height: 1;
    cursor: pointer;
    transition: color 0.2s, transform 0.2s;
    z-index: 10000;
    font-weight: 300;
    user-select: none;
}
.lightbox-close:hover { color: var(--primary-color); transform: rotate(90deg); }
.lightbox-btn {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    font-size: 28px;
    width: 56px; height: 56px;
    border-radius: 50%;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.2s, color 0.2s;
    z-index: 10000;
    user-select: none;
    backdrop-filter: blur(4px);
}
.lightbox-btn:hover { background: var(--primary-color); border-color: var(--primary-color); }
.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }
.lightbox-counter {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,0.6);
    font-size: 14px;
    font-family: var(--font-body);
    letter-spacing: 1px;
    z-index: 10000;
}
/* Cursor pointer for gallery items */
.gallery-item { cursor: zoom-in; }

/* Responsive */
@media(max-width: 991px) {
    .about-inner, .contacts-inner { flex-direction: column; gap: 40px;}
    .railing-item, .railing-item.reverse { flex-direction: column; padding: 25px;}
    .hero-title { font-size: 40px; }
    .hero-content { padding-top: 40px; }
    .section-title { font-size: 32px; }
    .services-grid { grid-template-columns: 1fr; }
    .nav { display: none; position: absolute; top: 100%; left: 0; width: 100%; background: #fff; padding: 30px 20px; box-shadow: 0 10px 20px rgba(0,0,0,0.1); }
    .nav.active { display: block; }
    .nav-list { flex-direction: column; gap: 20px; text-align: center; }
    .mobile-menu-btn { display: flex; }
    .contacts-form { padding: 30px 20px; }
}

@media(max-width: 576px) {
    .hero-title { font-size: 32px; }
    .hero-text { font-size: 16px; }
    .section { padding: 60px 0; }
    .btn { padding: 14px 24px; font-size: 13px; }
    .footer-content { flex-direction: column; gap: 20px; text-align: center; }
}
