/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Новая цветовая палитра - натуральные оттенки */
    --bg-ivory: #FAF8F3;
    --bg-cream: #F5F1E8;
    --primary: #A67C52;
    --primary-dark: #8B5F3C;
    --secondary: #C4A77D;
    --accent: #6B8E5A;
    --accent-light: #8FA87A;
    --text-dark: #2C2C2C;
    --text-medium: #4A4A4A;
    --text-light: #6B6B6B;
    --white: #ffffff;
    --border: #E8E3D8;
}

body {
    font-family: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.7;
    color: var(--text-dark);
    background-color: var(--bg-ivory);
    font-weight: 400;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-dark);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

/* Header */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border);
}

.header-phones-mobile {
    display: none;
    justify-content: space-between;
    padding: 4px 16px 6px;
    font-size: 12px;
    border-top: 1px solid var(--border);
}
.header-phones-mobile .phone-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}
.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 40px 6px;
}
.header-phones-desktop {
    display: flex;
    gap: 14px;
    font-size: 14px;
}
.header-phones-desktop .phone-link {
    white-space: nowrap;
}
.header-messengers {
    display: none;
    gap: 8px;
    align-items: center;
}
.header-messengers .messenger-icon {
    opacity: 0.9;
}
.header-messengers .messenger-icon:hover {
    opacity: 1;
}
.header-messengers .messenger-icon.icon-whatsapp { color: #25D366; }
.header-messengers .messenger-icon.icon-telegram { color: #0088cc; }
.header-messengers .messenger-icon.icon-viber { color: #7360f2; }
.nav-mobile-phones {
    padding: 12px 0;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}
.nav-mobile-phones .phone-link {
    font-size: 14px;
}

.logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    text-align: center;
}

.logo-link {
    display: block;
    line-height: 0;
}

.logo {
    height: 60px;
    width: auto;
}

.logo-text {
    font-size: 11px;
    color: #ba8149;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    white-space: nowrap;
    margin-top: 2px;
    max-width: 320px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}
.header-right-top {
    line-height: 1;
}
.header-right .nav-desktop {
    align-self: center;
}
.header-right .header-mobile-right,
.header-right .header-actions {
    align-self: flex-end;
    margin-left: auto;
}

.nav-desktop {
    display: flex;
    gap: 25px;
}

.nav-desktop a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: color 0.3s;
}

.nav-desktop a:hover {
    color: var(--primary);
}

.phone-link {
    text-decoration: none;
    color: var(--primary);
    font-weight: 600;
}

.lang-switcher select {
    padding: 5px 10px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--white);
    cursor: pointer;
}

.mobile-menu-toggle-wrap {
    display: none;
}

.mobile-menu-toggle {
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-dark);
    transition: all 0.3s;
}

.nav-mobile {
    display: none;
    flex-direction: column;
    padding: 20px;
    background: var(--bg-light);
    border-top: 1px solid var(--border);
}

.nav-mobile.active {
    display: flex;
}

.nav-mobile a {
    padding: 10px 0;
    text-decoration: none;
    color: var(--text-dark);
    border-bottom: 1px solid var(--border);
}

/* Cookie Notice */
.cookie-notice {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--text-dark);
    color: var(--white);
    padding: 15px 20px;
    z-index: 10000;
    display: none;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.2);
}

.cookie-notice.show {
    display: block;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.cookie-content p {
    flex: 1;
}

.btn-accept {
    background: var(--accent);
    color: var(--white);
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
}

.btn-accept:hover {
    background: #1a6b1a;
}

.quiz-btn-hint {
    display: block;
    font-size: 0.6em;
    font-weight: 400;
    margin-top: 4px;
    opacity: 0.9;
    text-transform: none;
    letter-spacing: normal;
}

/* How it works Section */
.how-it-works-section {
    padding: 60px 0;
    background: var(--bg-cream);
}
.how-it-works-intro {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-medium);
    max-width: 560px;
    margin: 0 auto 16px;
    text-align: center;
}
.how-it-works-list {
    max-width: 560px;
    margin: 0 auto 24px;
    padding-left: 1.5em;
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-medium);
}
.how-it-works-list li {
    margin-bottom: 8px;
}
.contact-phones {
    margin-bottom: 4px;
}
.contact-phones span {
    color: var(--text-medium);
}

/* Hero Section */
.hero {
    position: relative;
    width: 100%;
    height: 90vh;
    min-height: 600px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    overflow: hidden;
}

.hero-slideshow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 2s ease-in-out;
}

.hero-slide.active {
    opacity: 1;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.hero .container {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1200px;
    padding: 0 20px;
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 30px;
    color: var(--white);
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.3;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-subtitle {
    font-size: 1.4rem;
    color: var(--white);
    max-width: 900px;
    margin: 0 auto 50px;
    line-height: 1.9;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

/* Quiz Button Container */
.quiz-button-container {
    margin-top: 60px;
    text-align: center;
}

.btn-quiz-start {
    background-color: rgba(255, 255, 255, 0.95);
    color: var(--primary);
    border: 3px solid var(--white);
    padding: 25px 60px;
    font-size: 1.8rem;
    font-weight: 700;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 2px;
    box-shadow: 0 6px 25px rgba(0,0,0,0.3);
    position: relative;
    backdrop-filter: blur(10px);
}

.btn-quiz-start:hover {
    background-color: var(--white);
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.4);
    color: var(--primary);
}

.filter-form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-form select,
.filter-form input {
    padding: 10px 15px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 14px;
}

.filter-form select {
    min-width: 150px;
}

.filter-form input[type="number"] {
    width: 120px;
}

.btn-filter,
.btn-reset {
    padding: 10px 25px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-filter {
    background: var(--primary);
    color: var(--white);
    font-family: 'Lato', sans-serif;
}

.btn-filter:hover {
    background: var(--primary-dark);
}

.btn-reset {
    background: var(--text-medium);
    color: var(--white);
    font-family: 'Lato', sans-serif;
}

.btn-reset:hover {
    background: var(--text-dark);
}

/* Directions Section */
.directions-section {
    padding: 100px 40px;
    background: var(--white);
}

.directions-subtitle {
    text-align: center;
    font-size: 1.2rem;
    color: var(--text-medium);
    margin-bottom: 60px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.directions-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 50px;
    max-width: 1100px;
    margin: 0 auto;
}

.direction-card {
    display: block;
    width: 100%;
    text-align: center;
    padding: 40px 30px;
    background: var(--bg-ivory);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-family: inherit;
    transition: transform 0.3s;
}

.direction-card:hover {
    transform: translateY(-5px);
}

.direction-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 30px;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.direction-icon svg {
    width: 100%;
    height: 100%;
}

.direction-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.direction-card p {
    color: var(--text-medium);
    line-height: 1.7;
    font-size: 1rem;
}

/* Properties Section */
.properties-section {
    padding: 100px 40px;
    background: var(--bg-ivory);
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 20px;
    text-align: center;
    color: var(--text-dark);
    font-weight: 600;
}

.full-filter {
    background: var(--white);
    padding: 40px;
    border-radius: 12px;
    margin-bottom: 60px;
    display: none;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

.full-filter.active {
    display: block;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.properties-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.property-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
}

.property-link {
    display: flex;
    flex-direction: column;
    flex: 1;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.property-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.property-image {
    width: 100%;
    height: 250px;
    overflow: hidden;
    background: var(--bg-light);
}

.property-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.property-card:hover .property-image img {
    transform: scale(1.05);
}

.property-info {
    padding: 30px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.property-title {
    font-size: 1.3rem;
    margin-bottom: 12px;
    color: var(--text-dark);
    font-weight: 600;
}

.property-region,
.property-excerpt {
    color: var(--text-medium);
    margin-bottom: 20px;
    font-size: 1rem;
    flex: 1;
}

.btn-details {
    display: inline-block;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
    margin-top: 10px;
}

.property-link:hover .btn-details {
    color: var(--accent);
}

/* About Section */
.about-section {
    padding: 100px 40px;
    background: var(--white);
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about-content p {
    font-size: 1.2rem;
    line-height: 1.9;
    color: var(--text-medium);
}

/* Services Section */
.services-section {
    padding: 100px 40px;
    background: var(--bg-ivory);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 60px;
    max-width: 1000px;
    margin: 0 auto;
}

.service-item h3 {
    color: var(--text-dark);
    margin-bottom: 30px;
    font-size: 1.5rem;
    font-weight: 600;
}

.service-item ul {
    list-style: none;
}

.service-item li {
    padding: 12px 0;
    padding-left: 30px;
    position: relative;
    color: var(--text-medium);
    font-size: 1.05rem;
    line-height: 1.8;
}

.service-item li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: bold;
    font-size: 1.3rem;
}

/* Why Us Section */
.why-us-section {
    padding: 100px 40px;
    background: var(--white);
    text-align: center;
}

.why-us-text {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.2rem;
    line-height: 1.9;
    color: var(--text-medium);
}

/* Team Section */
.team-section {
    padding: 100px 40px;
    background: var(--bg-ivory);
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    max-width: 1000px;
    margin: 0 auto;
}

.team-member {
    text-align: center;
}

.team-photo {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 20px;
    display: block;
    border: 4px solid var(--secondary);
}

.team-member h3 {
    color: var(--primary);
    margin-bottom: 10px;
}

.team-role {
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 10px;
}

.team-bio {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Clients Section */
.clients-section {
    padding: 100px 40px;
    background: var(--white);
}

.clients-list {
    max-width: 800px;
    margin: 0 auto;
    list-style: none;
}

.clients-list li {
    padding: 18px 0;
    padding-left: 35px;
    position: relative;
    font-size: 1.15rem;
    color: var(--text-medium);
    line-height: 1.8;
}

.clients-list li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: bold;
    font-size: 1.2rem;
}

/* Contacts Section */
.contacts-section {
    padding: 100px 40px;
    background: var(--bg-ivory);
}

.contacts-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    max-width: 1000px;
    margin: 0 auto;
}

.contact-info p {
    margin-bottom: 20px;
    color: var(--text-medium);
    font-size: 1.05rem;
}

.contact-info a {
    color: var(--primary);
    text-decoration: none;
}

.contact-info a:hover {
    text-decoration: underline;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-form-labeled .form-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.contact-form-labeled .form-field label {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.95rem;
}

.form-hint {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: 2px;
}

.contact-form input,
.contact-form textarea {
    padding: 15px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: 'Lato', sans-serif;
    font-size: 15px;
    background: var(--white);
}

.contact-form textarea {
    resize: vertical;
}

.btn-submit {
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 15px 40px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 16px;
    font-family: 'Lato', sans-serif;
    transition: all 0.3s;
}

.btn-submit:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

/* Footer */
.footer {
    background: var(--text-dark);
    color: var(--white);
    padding: 18px 20px;
    text-align: center;
}

.footer .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

.footer-copy {
    margin-bottom: 2px;
    line-height: 1.35;
}

.footer-tax {
    margin-bottom: 4px;
    font-size: 0.95rem;
    line-height: 1.35;
}

.footer-tax a {
    color: var(--secondary);
    text-decoration: none;
}

.footer-tax a:hover {
    text-decoration: underline;
}

.footer-links {
    margin-bottom: 4px;
    line-height: 1.35;
}

.footer-links a {
    color: var(--white);
    text-decoration: none;
}

.footer-links a:hover {
    text-decoration: underline;
}

.footer a:visited,
.footer-links a:visited,
.footer-policy-link:visited {
    color: rgba(255, 255, 255, 0.9);
}

.footer-sep {
    margin: 0 6px;
    opacity: 0.7;
}

.footer-social {
    margin-bottom: 4px;
    line-height: 1.35;
}

.footer-social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    margin: 0 6px;
    text-decoration: none;
}

.footer-social-icon .material-icons {
    font-size: 24px;
}

.footer-social-icon:hover {
    color: var(--secondary);
}

.footer-policies {
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid rgba(255,255,255,0.2);
    font-size: 0.9rem;
    line-height: 1.35;
}

.footer-policy-link {
    color: rgba(255,255,255,0.85);
    text-decoration: none;
}

.footer-policy-link:hover {
    color: var(--white);
    text-decoration: underline;
}

/* Page content (legal, services, privacy, cookie) */
.page-main {
    padding: 40px 20px 60px;
}

.page-content h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.page-content h2 {
    font-size: 1.4rem;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.page-content h3 {
    font-size: 1.15rem;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.page-content p, .page-content ul {
    margin-bottom: 1rem;
}

.page-content ul {
    padding-left: 1.5rem;
}

.page-lead {
    font-size: 0.95rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

/* Property Detail Page */
.property-main {
    padding: 40px 20px;
}

.back-link {
    display: inline-block;
    margin-bottom: 30px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.back-link:hover {
    text-decoration: underline;
}

.property-detail-header {
    margin-bottom: 30px;
}

.property-detail-header h1 {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 15px;
}

.property-meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 15px;
}

.property-region-badge,
.property-type-badge,
.property-status-badge {
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.property-region-badge {
    background: var(--secondary);
    color: var(--text-dark);
}

.property-type-badge {
    background: var(--accent);
    color: var(--white);
}

.property-status-badge {
    background: var(--text-light);
    color: var(--white);
}

.property-status-badge.status-available {
    background: var(--accent);
}

.property-status-badge.status-reserved {
    background: #ff9800;
}

.property-status-badge.status-unavailable {
    background: #f44336;
}

.property-status-badge.status-in-development {
    background: #2196f3;
}

/* Gallery */
.property-gallery {
    margin-bottom: 40px;
}

.gallery-main {
    width: 100%;
    height: 500px;
    margin-bottom: 20px;
    overflow: hidden;
    border-radius: 8px;
    background: var(--bg-light);
}

.gallery-main-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-thumbnails {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
}

.gallery-thumb {
    width: 100%;
    height: 100px;
    overflow: hidden;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border 0.3s;
}

.gallery-thumb.active {
    border-color: var(--primary);
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.property-single-image {
    width: 100%;
    height: 500px;
    margin-bottom: 40px;
    overflow: hidden;
    border-radius: 8px;
    background: var(--bg-light);
}

.property-single-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.property-detail-content {
    max-width: 1000px;
    margin: 0 auto;
}

.property-specs {
    margin-bottom: 40px;
}

.property-specs h2 {
    color: var(--primary);
    margin-bottom: 20px;
}

.specs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.spec-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: var(--bg-light);
    border-radius: 8px;
}

.spec-item i {
    color: var(--primary);
    font-size: 2rem;
}

.spec-item strong {
    display: block;
    color: var(--text-dark);
    margin-bottom: 5px;
}

.spec-item span {
    color: var(--text-light);
    font-size: 1.1rem;
}

.property-description {
    margin-bottom: 40px;
}

.property-description h2 {
    color: var(--primary);
    margin-bottom: 20px;
}

.property-description p {
    line-height: 1.8;
    color: var(--text-light);
    font-size: 1.1rem;
}

.property-features {
    margin-bottom: 40px;
}

.property-features h2 {
    color: var(--primary);
    margin-bottom: 20px;
}

.features-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 10px;
}

.features-list li {
    padding: 10px;
    padding-left: 30px;
    position: relative;
    background: var(--bg-light);
    border-radius: 4px;
}

.features-list li:before {
    content: "✓";
    position: absolute;
    left: 10px;
    color: var(--accent);
    font-weight: bold;
}

.property-tags {
    margin-bottom: 40px;
}

.property-tags h2 {
    color: var(--primary);
    margin-bottom: 20px;
}

.tags-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tags-list .tag-badge {
    display: inline-block;
    padding: 6px 14px;
    background: var(--secondary);
    color: var(--text-dark);
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.property-contact-form {
    background: var(--bg-light);
    padding: 30px;
    border-radius: 8px;
}

.property-contact-form h2 {
    color: var(--primary);
    margin-bottom: 20px;
}

/* Lazy Loading */
.lazy-load {
    opacity: 0;
    transition: opacity 0.3s;
}

.lazy-load.loaded {
    opacity: 1;
}

/* Responsive Design */
/* Quiz Styles - Mobile */
@media (max-width: 768px) {
    .quiz-button-container {
        margin-top: 40px;
    }

    .btn-quiz-start {
        padding: 20px 40px;
        font-size: 1.4rem;
        background-color: rgba(255, 255, 255, 0.95);
        color: var(--primary);
        border: 3px solid var(--white);
    }

    .btn-quiz-start:hover {
        transform: translateY(-2px);
        background-color: var(--white);
    }
}

.quiz-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    overflow-y: auto;
}

.quiz-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s;
}

.quiz-modal-content {
    background: var(--white);
    margin: 20px auto;
    padding: 40px;
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.quiz-close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--text-light);
    background: none;
    border: none;
    cursor: pointer;
    line-height: 1;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s;
    z-index: 10;
}

.quiz-close:hover {
    color: var(--primary);
}

.quiz-progress {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-bottom: 40px;
    padding: 20px 0;
    flex-wrap: wrap;
}

.quiz-progress-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--secondary);
    position: relative;
    transition: background 0.3s;
}

.quiz-progress-dot.active {
    background: var(--primary);
}

.quiz-progress-dot.completed {
    background: var(--primary);
}

.quiz-progress-dot::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 100%;
    width: 15px;
    height: 2px;
    background: var(--secondary);
    transform: translateY(-50%);
}

.quiz-progress-dot:last-child::after {
    display: none;
}

.quiz-progress-dot.completed::after {
    background: var(--primary);
}

.quiz-container {
    min-height: 400px;
}

.quiz-question {
    display: none;
}

.quiz-question.active {
    display: block;
    animation: slideIn 0.3s;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.quiz-question-title {
    font-size: 1.8rem;
    color: var(--primary);
    margin-bottom: 10px;
    font-weight: 700;
}

.quiz-question-text {
    font-size: 1.1rem;
    color: var(--text-dark);
    margin-bottom: 20px;
}

.quiz-question-multiple {
    font-size: 0.9rem;
    color: #c62828;
    font-style: italic;
    margin-bottom: 20px;
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

.quiz-option {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 15px;
    border: 2px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    background: var(--white);
}

.quiz-option:hover {
    border-color: var(--primary);
    background: var(--bg-light);
}

.quiz-option input[type="checkbox"],
.quiz-option input[type="radio"] {
    margin-top: 3px;
    cursor: pointer;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.quiz-option.selected {
    border-color: var(--primary);
    background: rgba(139, 69, 19, 0.05);
}

.quiz-option-label {
    flex: 1;
    cursor: pointer;
    color: var(--text-dark);
    font-size: 1rem;
}

.quiz-other-input {
    margin-top: 10px;
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 4px;
    display: none;
}

.quiz-other-input.show {
    display: block;
}

.quiz-input-group {
    margin-bottom: 20px;
}

.quiz-input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-dark);
}

.quiz-input-group input,
.quiz-input-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
}

.quiz-input-group textarea {
    min-height: 100px;
    resize: vertical;
}

.quiz-phone-hint {
    font-size: 0.8rem;
    color: #c62828;
    margin-top: 4px;
}

.quiz-navigation {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.btn-quiz-prev {
    background: var(--white);
    color: var(--primary);
    border: 2px solid var(--primary);
    padding: 12px 30px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s;
    font-family: 'Lato', sans-serif;
}

.btn-quiz-prev:hover {
    background: var(--bg-ivory);
    border-color: var(--primary-dark);
    color: var(--primary-dark);
}

.btn-quiz-next {
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s;
    font-family: 'Lato', sans-serif;
    margin-left: auto;
}

.btn-quiz-next:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.quiz-success {
    text-align: center;
    padding: 60px 20px;
    display: none;
}

.quiz-success.active {
    display: block;
}

.quiz-success-icon {
    font-size: 4rem;
    color: var(--accent);
    margin-bottom: 20px;
}

.quiz-success-title {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 15px;
}

.quiz-success-text {
    font-size: 1.2rem;
    color: var(--text-light);
    line-height: 1.8;
}

@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }

    .header-phones-mobile {
        display: flex;
    }

    .header-phones-desktop {
        display: none;
    }

    .nav-desktop {
        display: none;
    }

    .mobile-menu-toggle-wrap {
        display: flex;
        position: relative;
        z-index: 2;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .header-top {
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
        justify-content: space-between;
        padding: 8px 20px 8px;
        position: relative;
        min-height: 90px;
    }

    .header-right {
        display: flex;
        align-items: center;
        flex-shrink: 0;
    }

    .header-right-top {
        display: none !important;
    }

    .nav-desktop {
        display: none !important;
    }

    .mobile-menu-toggle-wrap {
        flex-shrink: 0;
        min-height: 35px;
        display: flex;
        align-items: center;
    }

    .header-mobile-right {
        display: flex;
        align-items: center;
        min-height: 35px;
        align-self: center;
        margin-left: 0;
    }

    .logo-container {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        min-width: 0;
        pointer-events: none;
        transition: opacity 0.2s ease, visibility 0.2s;
    }

    .logo-container .logo {
        margin: 0 auto;
    }

    .logo-container a {
        pointer-events: auto;
    }

    .header-mobile-right .header-actions {
        display: flex;
        align-items: center;
    }

    .logo-text {
        font-size: 9px;
        max-width: 220px;
        text-align: center;
        white-space: normal;
        line-height: 1.3;
    }

    /* Hide logo when mobile menu is expanded to avoid overlap */
    .header.menu-open .logo-container {
        visibility: hidden;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.2s ease, visibility 0.2s;
    }

    .quiz-navigation {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }

    .btn-quiz-prev,
    .btn-quiz-next {
        padding: 10px 20px;
        font-size: 14px;
        min-width: 0;
    }

    .directions-section,
    .properties-section,
    .about-section,
    .services-section,
    .why-us-section,
    .team-section,
    .clients-section,
    .contacts-section {
        padding: 60px 20px;
    }

    .directions-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .section-title {
        font-size: 2rem;
    }

    .hero {
        height: 90vh;
        min-height: 500px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .filter-form {
        flex-direction: column;
    }

    .filter-form select,
    .filter-form input {
        width: 100%;
    }

    .properties-grid {
        grid-template-columns: 1fr;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .team-grid {
        grid-template-columns: 1fr;
    }

    .contacts-content {
        grid-template-columns: 1fr;
    }

    .cookie-content {
        flex-direction: column;
        text-align: center;
    }

    .property-detail-header h1 {
        font-size: 1.8rem;
    }

    .gallery-main {
        height: 300px;
    }

    .property-single-image {
        height: 300px;
    }

    .specs-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero {
        height: 90vh;
        min-height: 400px;
    }

    .hero-title {
        font-size: 1.8rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .section-title {
        font-size: 1.5rem;
    }
}

/* Toast notifications (contact form success/error) */
.toast-container {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    pointer-events: none;
    max-width: calc(100% - 32px);
}

.toast {
    padding: 14px 24px;
    border-radius: 8px;
    font-size: 0.95rem;
    line-height: 1.4;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transform: translateY(-12px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: auto;
    max-width: 420px;
}

.toast.toast-visible {
    opacity: 1;
    transform: translateY(0);
}

.toast-success {
    background: var(--accent, #6B8E5A);
    color: var(--white);
}

.toast-error {
    background: #c45c5c;
    color: var(--white);
}

.toast-info {
    background: var(--primary, #A67C52);
    color: var(--white);
}

/* Floating phone button */
.floating-phone-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
}
.floating-phone-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--white);
    position: relative;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, background 0.2s;
}
.floating-phone-btn:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}
.floating-phone-icon-rotating {
    display: flex;
    align-items: center;
    justify-content: center;
    color: inherit;
}
.floating-phone-icon-rotating svg {
    flex-shrink: 0;
}
.floating-phone-list {
    position: absolute;
    bottom: 64px;
    right: 0;
    display: none;
    flex-direction: column;
    gap: 6px;
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    padding: 8px;
    min-width: 140px;
}
.floating-phone-widget.open .floating-phone-list {
    display: flex;
}
.floating-phone-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    text-decoration: none;
    color: var(--text-dark);
    border-radius: 6px;
    font-size: 14px;
}
.floating-phone-item:hover {
    background: var(--bg-light);
    opacity: 1;
}
.floating-phone-item:nth-child(1) { color: #25D366; }
.floating-phone-item:nth-child(2) { color: #0088cc; }
.floating-phone-item:nth-child(3) { color: #7360f2; }
.floating-phone-item svg { fill: currentColor; }
