/* Reset and base styles */

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

:root {
--primary-dark: #1a365d;
--primary-color: #2c5282;
--accent-color: #d69e2e;
--accent-dark: #b7791f;
--text-color: #2d3748;
--text-light: #718096;
--bg-light: #f7fafc;
--white: #ffffff;
--border-color: #e2e8f0;
--shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
--shadow-hover: 0 10px 15px rgba(0, 0, 0, 0.1);
--transition: all 0.3s ease;
}

body {
font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
line-height: 1.6;
color: var(--text-color);
background: var(--white);
}

.container {
max-width: 1200px;
margin: 0 auto;
padding: 0 20px;
}

/* Header */
.topbar {
background: var(--white);
box-shadow: var(--shadow);
position: fixed;
top: 0;
width: 100%;
z-index: 1000;
border-bottom: 2px solid var(--primary-dark);
}

.topbar-content {
display: flex;
align-items: center;
justify-content: space-between;
padding: 1rem 0;
}

.logo {
font-size: 1.5rem;
font-weight: 700;
color: var(--primary-dark);
letter-spacing: -0.5px;
}

.nav {
display: flex;
gap: 2rem;
}

.nav a {
text-decoration: none;
color: var(--text-color);
font-weight: 600;
transition: var(--transition);
padding: 0.5rem 0;
position: relative;
}

.nav a:hover {
color: var(--accent-color);
}

.nav a::after {
content: '';
position: absolute;
bottom: 0;
left: 0;
width: 0;
height: 2px;
background: var(--accent-color);
transition: var(--transition);
}

.nav a:hover::after {
width: 100%;
}

.cta {
background: var(--accent-color);
color: var(--white);
padding: 0.75rem 1.5rem;
border-radius: 6px;
text-decoration: none;
font-weight: 600;
transition: var(--transition);
border: 2px solid var(--accent-color);
}

.cta:hover {
background: var(--accent-dark);
border-color: var(--accent-dark);
transform: translateY(-2px);
}

/* Hero Section */
.hero {
background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
color: var(--white);
padding: 140px 0 80px;
margin-top: 80px;
position: relative;
overflow: hidden;
}

.hero::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
opacity: 0.3;
}

.hero-content {
text-align: center;
max-width: 800px;
margin: 0 auto;
position: relative;
z-index: 1;
}

.hero h1 {
font-size: 3.2rem;
margin-bottom: 1.5rem;
font-weight: 700;
line-height: 1.2;
text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero p {
font-size: 1.3rem;
margin-bottom: 2.5rem;
opacity: 0.95;
line-height: 1.6;
}

.hero-buttons {
display: flex;
gap: 1.5rem;
justify-content: center;
margin-bottom: 3rem;
flex-wrap: wrap;
}

.btn {
padding: 1.2rem 2.5rem;
border-radius: 8px;
text-decoration: none;
font-weight: 600;
transition: var(--transition);
border: none;
cursor: pointer;
display: inline-block;
text-align: center;
font-size: 1.1rem;
letter-spacing: 0.5px;
}

.btn.primary {
background: var(--accent-color);
color: var(--white);
box-shadow: 0 4px 15px rgba(214, 158, 46, 0.3);
}

.btn.primary:hover {
background: var(--accent-dark);
transform: translateY(-3px);
box-shadow: 0 8px 25px rgba(214, 158, 46, 0.4);
}

.btn.secondary {
background: transparent;
color: var(--white);
border: 2px solid var(--white);
backdrop-filter: blur(10px);
}

.btn.secondary:hover {
background: var(--white);
color: var(--primary-dark);
transform: translateY(-3px);
}

.btn.full-width {
width: 100%;
}

.features {
display: flex;
gap: 2rem;
justify-content: center;
flex-wrap: wrap;
padding-top: 2rem;
border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.features span {
background: rgba(255, 255, 255, 0.15);
padding: 0.8rem 1.5rem;
border-radius: 25px;
backdrop-filter: blur(10px);
font-weight: 500;
border: 1px solid rgba(255, 255, 255, 0.1);
}

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

.section h2 {
text-align: center;
font-size: 2.8rem;
margin-bottom: 1.5rem;
color: var(--primary-dark);
font-weight: 700;
letter-spacing: -0.5px;
}

.section-subtitle {
text-align: center;
color: var(--text-light);
margin-bottom: 3rem;
font-size: 1.2rem;
max-width: 600px;
margin-left: auto;
margin-right: auto;
line-height: 1.6;
}

/* Services */
.services-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
gap: 2.5rem;
margin-top: 3rem;
}

.service-card {
background: var(--white);
padding: 2.5rem;
border-radius: 12px;
box-shadow: var(--shadow);
text-align: center;
transition: var(--transition);
border: 1px solid var(--border-color);
position: relative;
overflow: hidden;
}

.service-card::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
height: 4px;
background: linear-gradient(90deg, var(--accent-color), var(--accent-dark));
}

.service-card:hover {
transform: translateY(-8px);
box-shadow: var(--shadow-hover);
}

.service-card h3 {
color: var(--primary-dark);
margin-bottom: 1.5rem;
font-size: 1.5rem;
font-weight: 600;
}

.service-card p {
color: var(--text-light);
line-height: 1.7;
font-size: 1.05rem;
}

/* Gallery */
.portfolio-section {
background: var(--bg-light);
}

.gallery-grid {
display: grid;
grid-template-columns: repeat(5, 1fr); /* Изменили на 5 столбцов */
gap: 1rem;
margin-top: 3rem;
}

.gallery-item {
position: relative;
border-radius: 12px;
overflow: hidden;
cursor: pointer;
aspect-ratio: 4/3;
transition: var(--transition);
box-shadow: var(--shadow);
border: 1px solid var(--border-color);
}

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

.gallery-item img {
width: 100%;
height: 100%;
object-fit: cover;
transition: var(--transition);
}

.gallery-item:hover img {
transform: scale(1.1);
}

.gallery-item::after {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(26, 54, 93, 0.1);
opacity: 0;
transition: var(--transition);
}

.gallery-item:hover::after {
opacity: 1;
}


/* Responsive Design */
@media (max-width: 1200px) {
.gallery-grid {
grid-template-columns: repeat(4, 1fr); /* 4 колонки на больших планшетах */
}
}

@media (max-width: 968px) {
.gallery-grid {
grid-template-columns: repeat(3, 1fr); /* 3 колонки на планшетах */
}
}

@media (max-width: 768px) {
.gallery-grid {
grid-template-columns: repeat(2, 1fr); /* 2 колонки на мобильных */
gap: 0.8rem;
}
}

@media (max-width: 480px) {
.gallery-grid {
grid-template-columns: 1fr; /* 1 колонка на маленьких экранах */
gap: 0.6rem;
}
}

/* Lightbox */
.lightbox {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(26, 54, 93, 0.98);
display: flex;
align-items: center;
justify-content: center;
z-index: 2000;
opacity: 0;
visibility: hidden;
transition: var(--transition);
}

.lightbox.active {
opacity: 1;
visibility: visible;
}

.lightbox-content {
position: relative;
max-width: 90vw;
max-height: 90vh;
display: flex;
align-items: center;
justify-content: center;
}

.lightbox-image {
max-width: 100%;
max-height: 90vh;
border-radius: 12px;
box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
border: 2px solid var(--accent-color);
object-fit: contain;
}

/* Fixed position for controls - always in the same place */
.lightbox-close,
.lightbox-prev,
.lightbox-next {
position: fixed;
background: var(--accent-color);
color: var(--white);
border: none;
padding: 1rem;
border-radius: 50%;
cursor: pointer;
transition: var(--transition);
font-size: 1.5rem;
width: 60px;
height: 60px;
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
z-index: 2001;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
background: var(--accent-dark);
transform: scale(1.1);
}

/* Fixed positions - не зависят от размера изображения */
.lightbox-close {
top: 20px;
right: 20px;
}

.lightbox-prev {
left: 20px;
top: 50%;
transform: translateY(-50%);
}

.lightbox-next {
right: 20px;
top: 50%;
transform: translateY(-50%);
}

.lightbox-counter {
position: fixed;
bottom: 20px;
left: 50%;
transform: translateX(-50%);
color: var(--white);
font-size: 1.2rem;
font-weight: 600;
background: rgba(0, 0, 0, 0.5);
padding: 0.8rem 1.8rem;
border-radius: 25px;
backdrop-filter: blur(10px);
z-index: 2001;
}

/* Responsive adjustments */
@media (max-width: 768px) {
.lightbox-close,
.lightbox-prev,
.lightbox-next {
width: 50px;
height: 50px;
font-size: 1.2rem;
}

text
.lightbox-close {
    top: 15px;
    right: 15px;
}

.lightbox-prev {
    left: 10px;
}

.lightbox-next {
    right: 10px;
}

.lightbox-counter {
    font-size: 1rem;
    padding: 0.6rem 1.4rem;
}
}

/* ... (остальной CSS без изменений) ... */

/* Pricing */
.pricing-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
gap: 2.5rem;
margin-top: 3rem;
}

.pricing-card {
background: var(--white);
padding: 3rem;
border-radius: 16px;
box-shadow: var(--shadow);
text-align: center;
transition: var(--transition);
border: 2px solid var(--border-color);
position: relative;
}

.pricing-card.featured {
border-color: var(--accent-color);
transform: scale(1.05);
background: linear-gradient(135deg, #fff 0%, #f7fafc 100%);
box-shadow: 0 15px 35px rgba(214, 158, 46, 0.2);
}

.pricing-card.featured::before {
content: 'Most Popular';
position: absolute;
top: -15px;
left: 50%;
transform: translateX(-50%);
background: var(--accent-color);
color: var(--white);
padding: 0.8rem 2rem;
border-radius: 25px;
font-size: 0.9rem;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 1px;
}

.pricing-card h3 {
color: var(--primary-dark);
margin-bottom: 1.5rem;
font-size: 1.6rem;
font-weight: 600;
}

.price {
font-size: 3rem;
font-weight: 700;
color: var(--accent-color);
margin-bottom: 2rem;
display: block;
}

.pricing-card ul {
list-style: none;
margin-bottom: 2.5rem;
}

.pricing-card li {
padding: 1rem 0;
color: var(--text-color);
border-bottom: 1px solid var(--border-color);
font-weight: 500;
}

.pricing-card li:last-child {
border-bottom: none;
}

.pricing-card li::before {
content: '✓';
color: var(--accent-color);
font-weight: bold;
margin-right: 0.5rem;
}

/* Contact */
.contact-section {
background: var(--bg-light);
}

.contact-grid {
display: grid;
grid-template-columns: 1.2fr 0.8fr;
gap: 3rem;
margin-top: 3rem;
}

.contact-form {
background: var(--white);
padding: 3rem;
border-radius: 16px;
box-shadow: var(--shadow);
border: 1px solid var(--border-color);
}

.form-group {
margin-bottom: 2rem;
}

.form-group label {
display: block;
margin-bottom: 0.8rem;
font-weight: 600;
color: var(--primary-dark);
font-size: 1.1rem;
}

.form-group input,
.form-group textarea {
width: 100%;
padding: 1.2rem;
border: 2px solid var(--border-color);
border-radius: 8px;
font-size: 1.1rem;
transition: var(--transition);
font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
outline: none;
border-color: var(--accent-color);
box-shadow: 0 0 0 3px rgba(214, 158, 46, 0.1);
}

.form-group textarea {
resize: vertical;
min-height: 140px;
}

.form-message {
margin-top: 1.5rem;
padding: 1.2rem;
border-radius: 8px;
text-align: center;
font-weight: 600;
font-size: 1.1rem;
}

.form-message.success {
background: #f0fff4;
color: #2d7848;
border: 2px solid #9ae6b4;
}

.form-message.error {
background: #fff5f5;
color: #c53030;
border: 2px solid #fc8181;
}

.contact-info {
background: var(--white);
padding: 3rem;
border-radius: 16px;
box-shadow: var(--shadow);
border: 1px solid var(--border-color);
height: fit-content;
}

.contact-info h3 {
color: var(--primary-dark);
margin-bottom: 2rem;
font-size: 1.5rem;
font-weight: 600;
}

.contact-item {
margin-bottom: 2rem;
padding-bottom: 2rem;
border-bottom: 1px solid var(--border-color);
}

.contact-item:last-child {
border-bottom: none;
margin-bottom: 0;
padding-bottom: 0;
}

.contact-item strong {
display: block;
margin-bottom: 0.8rem;
color: var(--primary-dark);
font-size: 1.1rem;
}

.contact-item a {
color: var(--accent-color);
text-decoration: none;
transition: var(--transition);
font-weight: 500;
}

.contact-item a:hover {
color: var(--accent-dark);
text-decoration: underline;
}

.contact-item span {
display: block;
color: var(--text-color);
margin-bottom: 0.3rem;
}

/* Footer */
.footer {
background: var(--primary-dark);
color: var(--white);
padding: 4rem 0 2rem;
}

.footer-content {
display: grid;
grid-template-columns: 1fr 1fr 1fr;
gap: 3rem;
margin-bottom: 2rem;
}

.footer-info h3 {
margin-bottom: 1.5rem;
font-size: 1.5rem;
color: var(--accent-color);
}

.footer-info p {
opacity: 0.9;
line-height: 1.7;
font-size: 1.1rem;
}

.footer-links {
display: flex;
flex-direction: column;
gap: 1rem;
}

.footer-links a {
color: var(--white);
text-decoration: none;
opacity: 0.9;
transition: var(--transition);
font-weight: 500;
}

.footer-links a:hover {
opacity: 1;
color: var(--accent-color);
transform: translateX(5px);
}

.footer-contact p {
opacity: 0.9;
font-size: 1.1rem;
}

.footer-bottom {
text-align: center;
padding-top: 2rem;
border-top: 1px solid rgba(255, 255, 255, 0.1);
opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 968px) {
.gallery-grid {
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

text
.contact-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
}

.footer-content {
    grid-template-columns: 1fr 1fr;
}
}

@media (max-width: 768px) {
.topbar-content {
flex-direction: column;
gap: 1.5rem;
text-align: center;
}

.nav {
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.hero {
    padding: 120px 0 60px;
    margin-top: 120px;
}

.hero h1 {
    font-size: 2.5rem;
}

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

.features {
    flex-direction: column;
    gap: 1rem;
}

.services-grid,
.pricing-grid {
    grid-template-columns: 1fr;
}

.pricing-card.featured {
    transform: none;
    order: -1;
}

.gallery-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.lightbox-prev {
    left: 15px;
}

.lightbox-next {
    right: 15px;
}

.footer-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2rem;
}

.footer-links {
    align-items: center;
}
}

@media (max-width: 480px) {
.container {
padding: 0 15px;
}

.hero h1 {
    font-size: 2rem;
}

.hero p {
    font-size: 1.1rem;
}

.section {
    padding: 80px 0;
}

.section h2 {
    font-size: 2.2rem;
}

.btn {
    padding: 1rem 2rem;
    font-size: 1rem;
}

.service-card,
.pricing-card,
.contact-form,
.contact-info {
    padding: 2rem;
}

.gallery-grid {
    grid-template-columns: 1fr;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
}

.lightbox-close {
    top: -60px;
}

.lightbox-prev {
    left: 10px;
}

.lightbox-next {
    right: 10px;
}
}
/* ===== Mobile tweaks for your actual HTML structure =====
   - скрыть стрелки листания на телефоне
   - показать только крестик закрытия в лайтбоксе
   - на мобилях стекать .contact-info под .contact-form
   Paste this at the VERY END of styles.css
*/
@media (max-width: 600px) {

  /* 1) Hide all possible prev/next arrows on small screens (various class names covered) */
  .lb-prev, .lb-next,
  .lightbox-prev, .lightbox-next,
  .lightbox .prev, .lightbox .next,
  .slick-arrow, .swiper-button-prev, .swiper-button-next,
  .glide__arrow, .glide__arrows {
    display: none !important;
    pointer-events: none !important;
  }

  /* 2) Ensure close button is visible when lightbox is open
     Support both "active" class and aria-hidden attribute patterns.
     Also support different possible class names (.lightbox-close, .lb-close) */
  .lightbox.active .lightbox-close,
  .lightbox[aria-hidden="false"] .lightbox-close,
  .lightbox.active .lb-close,
  .lightbox[aria-hidden="false"] .lb-close,
  .lightbox-close, .lb-close {
    display: block !important;
    pointer-events: auto !important;
    z-index: 9999 !important;
    color: #fff !important;
    background: transparent !important;
  }

  /* adjust close position/size on mobile */
  .lightbox-close, .lb-close {
    right: 14px !important;
    top: 12px !important;
    font-size: 30px !important;
    padding: 6px !important;
  }

  /* 3) Stack contact grid: form above, contacts (contact-info) below */
  .contact-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
  /* ensure contact-info moves below form */
  .contact-grid .contact-info {
    order: 2;
    width: 100%;
  }
  .contact-grid .contact-form {
    order: 1;
    width: 100%;
  }

  /* 4) Make input fields full width and comfortable on small screens */
  .contact-grid input[type="text"],
  .contact-grid input[type="tel"],
  .contact-grid input[type="email"],
  .contact-grid textarea {
    width: 100% !important;
    font-size: 15px !important;
  }

  /* small visual tweak: make form-message (status) clearly visible */
  .form-message {
    margin-top: 8px;
    font-weight:600;
    color: var(--text);
  }
}
