/* Extra top space below the header for gallery title */
.projects-page-title-spacer { height: 20px; }
/* Page-specific styles for blagosad.ru */

/* ===== TPRODUCT PAGES (unified styles based on Rubin Estate) ===== */
.t-product-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px;
}
.t-product-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eee;
}
.t-product-back {
    color: #333;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
}
.t-product-back:hover { color: #666; }
.t-product-close {
    color: #333;
    text-decoration: none;
    font-size: 24px;
    font-weight: bold;
}
.t-product-close:hover { color: #666; }
.t-product-title {
    text-align: center;
    font-size: 36px;
    font-weight: bold;
    color: #333;
    margin-bottom: 20px;
}
.t-product-content {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}
.t-product-image {
    flex: 1;
    position: relative;
    max-width: 600px;
}
.t-product-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 8px;
    display: none;
}
.t-product-image img.active { display: block; }
.t-product-image-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    transition: background 0.3s ease;
}
.t-product-image-nav:hover { background: rgba(0,0,0,0.7); }
.t-product-image-nav.prev { left: 10px; }
.t-product-image-nav.next { right: 10px; }
.t-product-image-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 12px;
}
.t-product-image-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ddd;
    cursor: pointer;
    transition: background 0.3s ease;
}
.t-product-image-dot.active { background: #333; }
.t-product-text { flex: 1; padding-left: 20px; }
.t-product-description {
    font-size: 16px;
    line-height: 1.6;
    color: #555;
    margin-bottom: 16px;
}

/* Paragraph spacing inside product description */
.t-product-description p {
    margin: 0 0 8px 0; /* в 2 раза меньше стандартного 16px */
    line-height: 1.5;
}
@media (max-width: 768px) {
    .t-product-content { flex-direction: column; gap: 16px; }
    .t-product-text { padding-left: 0; }
    .t-product-title { font-size: 28px; margin-bottom: 16px; }
    .t-product-image { max-width: 100%; }
}

/* Gallery specific styles */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    padding: 20px 0;
}
/* Force 3-per-row layout for projects section */
.projects-section .grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 40px;
    max-width: 1200px !important;
    margin: 0 auto;
}
.projects-section .row,
.projects-section .bottom-row { display: contents !important; }
.projects-section .row .item,
.projects-section .bottom-row .item {
    flex: initial !important;
    max-width: none !important;
    width: 100% !important;
    display: block !important;
}

@media (max-width: 1024px) {
    .projects-section .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px; }
}
@media (max-width: 640px) {
    .projects-section .grid { grid-template-columns: 1fr; gap: 20px; }
}

/* Gallery cards: unify thumbnail aspect and text block height */
.projects-section .item { display: flex !important; flex-direction: column !important; height: 100%; }
.projects-section .item .thumb { width: 100%; height: 260px; position: relative; overflow: hidden; border-top-left-radius: 12px; border-top-right-radius: 12px; display: block; }
.projects-section .item .thumb__img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.projects-section .item .t-title2 { min-height: 28px; }
.projects-section .item .t-title2 + p { min-height: 110px; display: flex; align-items: flex-start; }

@media (max-width: 1024px) {
  .projects-section .item .t-title2 + p { min-height: 90px; }
}
@media (max-width: 640px) {
  .projects-section .item .t-title2 + p { min-height: 70px; }
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* Blog specific styles */
.blog-post {
    background: white;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-post:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.blog-post h2 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.blog-post .meta {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

.blog-post .excerpt {
    line-height: 1.6;
    color: #555;
}

/* Contact page specific styles */
.contact-info {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 16px;
    padding: 40px;
    margin: 30px 0;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.contact-item i {
    font-size: 1.5rem;
    color: #e0b690;
    margin-right: 15px;
    width: 30px;
}

.contact-form {
    background: white;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #e0b690;
    box-shadow: 0 0 0 3px rgba(224, 182, 144, 0.1);
}

/* Price page specific styles */
.pricing-card {
    background: white;
    border-radius: 16px;
    padding: 40px 30px;
    text-align: center;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.pricing-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.15);
}

.pricing-card.featured {
    border: 3px solid #e0b690;
    transform: scale(1.05);
}

.pricing-card.featured::before {
    content: 'Популярно';
    position: absolute;
    top: 20px;
    right: -30px;
    background: #e0b690;
    color: white;
    padding: 5px 40px;
    font-size: 0.8rem;
    font-weight: 600;
    transform: rotate(45deg);
}

.pricing-header {
    margin-bottom: 30px;
}

.pricing-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 10px;
}

.pricing-price {
    font-size: 3rem;
    font-weight: 700;
    color: #e0b690;
    margin-bottom: 10px;
}

.pricing-period {
    color: #666;
    font-size: 1rem;
}

.pricing-features {
    list-style: none;
    padding: 0;
    margin: 30px 0;
}

.pricing-features li {
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    color: #555;
}

.pricing-features li:last-child {
    border-bottom: none;
}

.pricing-features li i {
    color: #28a745;
    margin-right: 10px;
}

/* About page specific styles */
.team-member {
    text-align: center;
    margin-bottom: 40px;
}

.team-member img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 20px;
    border: 4px solid #e0b690;
    transition: transform 0.3s ease;
}

.team-member:hover img {
    transform: scale(1.05);
}

.team-member h3 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.team-member .position {
    color: #e0b690;
    font-weight: 600;
    margin-bottom: 15px;
}

.team-member .bio {
    color: #666;
    line-height: 1.6;
    max-width: 300px;
    margin: 0 auto;
}

/* Responsive design for page-specific styles */
@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 15px;
        padding: 15px 0;
    }
    
    .gallery-item img {
        height: 200px;
    }
    
    .blog-post {
        padding: 20px;
        margin-bottom: 20px;
    }
    
    .contact-info {
        padding: 20px;
        margin: 20px 0;
    }
    
    .contact-form {
        padding: 20px;
    }
    
    .pricing-card {
        padding: 30px 20px;
        margin-bottom: 20px;
    }
    
    .pricing-card.featured {
        transform: none;
    }
    
    .team-member img {
        width: 150px;
        height: 150px;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .pricing-price {
        font-size: 2.5rem;
    }
    
    .contact-item {
        flex-direction: column;
        text-align: center;
    }
    
    .contact-item i {
        margin-right: 0;
        margin-bottom: 10px;
    }
}
