/* CSS variables are set by ColorSettings component from admin panel */
/* Default fallback values only if not set by component */

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

body {
    font-family: var(--font-family, 'Lora', serif) !important;
    color: var(--text-color, #3A3429);
    background-color: var(--background-color, #F5F3EF);
    line-height: 1.6;
}

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

/* Header */
header {
    background: var(--primary-color);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    padding: 1rem 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand a {
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none;
    font-family: var(--font-family, 'Caveat', cursive) !important;
    display: flex;
    align-items: center;
}

.logo-image {
    max-height: 50px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s;
}

.nav-menu a:hover {
    opacity: 0.8;
}

/* Hero Section */
.hero-section {
    background: var(--secondary-color);
    color: var(--text-color);
    padding: 100px 0;
    text-align: center;
    position: relative;
    min-height: 400px;
    display: flex;
    align-items: center;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Removed dark overlay to show actual header color from admin settings */

.hero-section .container {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: bold;
    font-family: var(--font-family, 'Caveat', cursive) !important;
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* Buttons */
.btn-primary, .btn-secondary {
    padding: 12px 30px;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    font-family: var(--font-family) !important;
}

/* Reviews page buttons container */
.reviews-section .text-center {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-primary {
    background-color: var(--accent-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--button-hover-color, #9a8d7a);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background-color: var(--button-hover-color, #9a8d7a);
    transform: translateY(-2px);
}

/* Page Header */
.page-header {
    background: var(--secondary-color);
    color: var(--text-color);
    padding: 60px 0;
    text-align: center;
    position: relative;
    min-height: 300px;
    display: flex;
    align-items: center;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Removed dark overlay to show actual header color from admin settings */

.page-header .container {
    position: relative;
    z-index: 2;
}

.page-header h1 {
    font-size: 2.5rem;
    font-family: var(--font-family, 'Caveat', cursive) !important;
}

/* Sections */
section {
    padding: 60px 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    font-family: var(--font-family, 'Caveat', cursive) !important;
    color: var(--text-color);
}

/* Services */
.services-preview, .services-section {
    background-color: var(--background-color, #f8f9fa);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.services-list-vertical {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.service-card {
    background: var(--background-color, white);
    border-radius: 16px;
    padding: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08), 0 4px 16px rgba(0,0,0,0.04);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.05);
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12), 0 4px 12px rgba(0,0,0,0.08);
    border-color: rgba(0,0,0,0.1);
}

.service-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: none;
    border-radius: 16px 16px 0 0;
    transition: transform 0.3s ease;
}

.service-card:hover .service-image {
    transform: scale(1.05);
}

.service-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    padding: 1.25rem;
    gap: 0.75rem;
}

.service-card h3 {
    color: var(--primary-color);
    margin-bottom: 0;
    font-size: 1.3rem;
    font-weight: 600;
    line-height: 1.3;
}

.service-card p {
    margin-bottom: 0;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    line-height: 1.6;
    max-height: 4.8em;
    color: var(--text-color);
    opacity: 0.85;
}

.service-price {
    margin-top: auto;
    text-align: right;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 0;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(0,0,0,0.08);
}

.service-details-btn {
    margin-top: 0.75rem;
    padding: 0.6rem 1.25rem;
    background-color: var(--accent-color);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    text-align: center;
    display: inline-block;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    font-family: var(--font-family) !important;
    align-self: flex-end;
    width: auto;
    min-width: 110px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.service-details-btn:hover {
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* About */
.about-section {
    padding: 60px 0;
}

.about-content {
    max-width: 900px;
    margin: 0 auto;
}

.about-image img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.about-text {
    font-size: 1.1rem;
    line-height: 1.8;
    width: 100%;
}

.about-text p {
    margin-bottom: 1.5rem;
}

/* Reviews */
.review-form-section {
    padding: 40px 0;
    background-color: var(--background-color, #ffffff);
}

.review-form-section h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    text-align: center;
    font-family: var(--font-heading);
}

.review-form-section .form-group {
    margin-bottom: 1rem;
}

.compact-review-form {
    max-width: 600px;
    margin: 0 auto;
}

.review-form-section label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-color);
}

.review-form-section input[type="text"],
.review-form-section input[type="email"],
.review-form-section input[type="number"],
.review-form-section textarea,
.review-form-section input[type="file"] {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    font-family: var(--font-family) !important;
}

.review-form-section textarea {
    resize: vertical;
    min-height: 120px;
}

.reviews-section {
    background-color: var(--background-color, #f8f9fa);
    padding: 60px 0;
}

.reviews-grid {
    max-width: 900px;
    margin: 0 auto;
}

.review-card {
    background: transparent;
    padding: 2rem 0;
    border-bottom: 1px solid #e0e0e0;
}

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

.review-text {
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.review-author {
    font-weight: bold;
    margin-top: 0.5rem;
    display: block;
}

.review-card::after {
    content: '';
    display: table;
    clear: both;
}

/* Contacts */
.contacts-section {
    padding: 60px 0;
}

.contact-main-content {
    display: flex;
    gap: 3rem;
    align-items: flex-start;
    max-width: 1000px;
    margin: 0 auto;
}

.contact-photo-container {
    flex-shrink: 0;
}

.contact-photo {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.contact-info {
    flex: 1;
}

.contact-description {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 2rem;
    color: var(--text-color);
}

.contact-description p {
    margin-bottom: 1rem;
}

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

.contact-link-item {
    font-size: 1.1rem;
}

.contact-link-item strong {
    color: var(--primary-color);
    margin-right: 0.5rem;
}

.contact-link-item a {
    color: var(--link-color, var(--accent-color));
    text-decoration: none;
    transition: color 0.3s;
}

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

.contact-social-media {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-link-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: var(--accent-color);
    text-decoration: none;
    border-radius: 50%;
    transition: all 0.3s;
    border: 2px solid var(--accent-color);
    background-color: transparent;
}

.social-link-icon:hover {
    background-color: var(--accent-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    text-decoration: none;
}

.social-link-icon svg {
    width: 20px;
    height: 20px;
}

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

.contact-card {
    background: var(--background-color, white);
    border-radius: 10px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.contact-card:hover {
    transform: translateY(-5px);
}

.contact-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

h1, h2, h3, .section-title, .hero-title, .page-header h1 {
    font-family: var(--font-family, 'Caveat', cursive) !important;
}

.contact-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: var(--background-color, white);
    margin: 5% auto;
    padding: 2rem;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    position: relative;
}

.close {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 2rem;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
}

.close:hover {
    color: var(--text-color);
}

/* Links */
a {
    color: var(--link-color, var(--accent-color));
    transition: color 0.3s;
}

a:hover {
    color: var(--primary-color);
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-color);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    font-family: var(--font-family) !important;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Footer */
footer {
    background-color: var(--footer-color, #2c3e50);
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 60px;
}

/* Utilities */
.text-center {
    text-align: center;
}

.mt-4 {
    margin-top: 2rem;
}

/* Responsive */
@media (max-width: 768px) {
    /* Navbar mobile styles */
    header {
        position: static; /* Убираем sticky для мобильной версии */
    }

    .navbar .container {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1.5rem;
    }

    .nav-brand {
        width: 100%;
        display: flex;
        justify-content: center;
    }

    .nav-menu {
        flex-direction: column;
        gap: 0;
        width: 100%;
        padding: 0;
    }

    .nav-menu li {
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    }

    .nav-menu li:first-child {
        border-top: 1px solid rgba(255, 255, 255, 0.3);
    }

    .nav-menu li:last-child {
        border-bottom: none;
    }

    .nav-menu a {
        display: block;
        padding: 0.75rem 0;
        width: 100%;
    }

    .navbar {
        padding-bottom: 1.5rem; /* Отступ между navbar и контентом */
    }

    main {
        margin-top: 0; /* Убираем дополнительный отступ, так как он уже в navbar */
    }

    /* Отступ для hero-section на главной странице в мобильной версии */
    .hero-section .hero-content-layout {
        padding-top: 2rem; /* Отступ от верхнего края header для виджетов */
    }

    /* Buttons on Reviews page */
    .reviews-section .text-center {
        flex-direction: column;
        align-items: center;
    }

    .reviews-section .text-center .btn-primary {
        margin-left: 0 !important;
        width: 100%;
        max-width: 300px;
    }

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

    .hero-section {
        min-height: 300px;
        padding: 60px 0;
    }

    .page-header {
        min-height: 250px;
        padding: 40px 0;
    }

    .page-header h1 {
        font-size: 2rem;
    }

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

    .services-grid,
    .reviews-grid,
    .contacts-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-main-content {
        flex-direction: column;
        align-items: center;
    }
    
    .contact-photo {
        width: 250px;
        height: 250px;
    }
    
    .service-card {
        flex-direction: column;
    }
    
    .service-image {
        width: 100%;
        height: 200px;
        min-width: unset;
        border-radius: 16px 16px 0 0;
    }
}


