@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700;900&family=Noto+Sans:wght@400;600&family=Playfair+Display:wght@700;900&display=swap');

:root {
    --primary-color: #FF7A3D;
    /* Orange from site */
    --secondary-color: #FF5100;
    /* Darker orange */
    --text-color: #575250;
    --title-color: #1E1810;
    --bg-color: #F8F5F4;
    --white-color: #FFFFFF;

    --body-font: 'Noto Sans', sans-serif;
    --title-font: 'Montserrat', sans-serif;
}

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

body {
    font-family: var(--body-font);
    font-size: 18px;
    /* Set to ~1.125rem for global +2pt increase */
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 3rem;
    /* Increased from 1.5rem for better side spacing */
}

/* --- HEADER --- */
.header {
    background-color: var(--white-color);
    padding: 0.5rem 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    position: relative;
    z-index: 1000;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.nav__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.nav__logo img {
    width: 80px;
}

.nav__controls {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav__phone {
    font-family: var(--title-font);
    font-weight: bold;
    color: var(--primary-color);
    font-size: 1.1rem;
}

/* Burger Button */
.nav__toggle {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    border-radius: 4px;
    cursor: pointer;
    border: none;
    padding: 0;
    transition: background-color 0.3s;
}

.nav__toggle:hover {
    background-color: var(--secondary-color);
}

.nav__icon {
    position: relative;
    width: 24px;
    height: 2px;
    background-color: white;
    transition: all 0.3s ease;
    display: block;
}

.nav__icon::before,
.nav__icon::after {
    content: '';
    position: absolute;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: white;
    transition: all 0.3s ease;
}

.nav__icon::before {
    top: -8px;
}

.nav__icon::after {
    top: 8px;
}

/* Toggle Animation */
.nav__icon.open {
    background-color: transparent;
}

.nav__icon.open::before {
    top: 0;
    transform: rotate(45deg);
}

.nav__icon.open::after {
    top: 0;
    transform: rotate(-45deg);
}

/* Nav List (The Menu) */
.nav__list {
    display: none;
    width: 100%;
    flex-direction: column;
    margin-top: 1rem;
    border-top: 1px solid #eee;
}

.nav__list.active {
    display: flex;
}

.nav__list li {
    width: 100%;
}

.nav__link {
    display: block;
    padding: 1rem 0;
    color: var(--title-color);
    font-weight: 500;
    text-transform: none;
    /* Changed based on screenshot usually being normal case, keeping uppercase if preferred */
    font-size: 1.1rem;
    transition: 0.3s;
    border-bottom: 1px solid #f5f5f5;
}

.nav__link:hover,
.nav__link.active {
    color: var(--primary-color);
}

/* --- RESPONSIVE / DESKTOP STYLES --- */
@media screen and (min-width: 992px) {
    .nav {
        flex-wrap: nowrap;
    }

    /* Unwrap the header container so children are direct nav children */
    .nav__header {
        display: contents;
    }

    .nav__logo {
        order: 1;
        margin-right: auto;
        /* Push everything else to right if needed, or use justify-content: space-between on .nav */
    }

    /* Hide the burger button */
    .nav__toggle {
        display: none;
    }

    /* Controls (Phone) go last */
    .nav__controls {
        order: 3;
        gap: 0;
        /* No gap needed if toggle is hidden */
    }

    /* Show the Menu List */
    .nav__list {
        display: flex;
        /* Always show on desktop */
        flex-direction: row;
        width: auto;
        margin-top: 0;
        border-top: none;
        order: 2;
        column-gap: 2rem;
        margin-right: 2rem;
        /* Spacing between menu and phone */
    }

    .nav__list li {
        width: auto;
    }

    .nav__link {
        padding: 0;
        /* Reset padding */
        border-bottom: none;
        font-size: 0.9rem;
        font-weight: 600;
        text-transform: uppercase;
    }
}

/* --- HERO / INTRO --- */
.hero {
    text-align: center;
    padding: 4rem 0;
    background-color: var(--white-color);
    margin-bottom: 2rem;
}

.hero__subtitle {
    font-family: var(--title-font);
    font-size: 1.5rem;
    color: var(--title-color);
    margin-bottom: 1rem;
}

.hero__title {
    font-family: var(--title-font);
    font-size: 4rem;
    color: var(--title-color);
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 2rem;
}

.hero__title--serif {
    font-family: 'Playfair Display', serif;
    font-weight: 900;
}

.button {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--white-color);
    padding: 1rem 2.5rem;
    border-radius: 30px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    transition: 0.3s;
}

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

/* --- COTTAGES SECTION --- */
.section {
    padding: 4rem 0;
}

.section__title {
    text-align: center;
    font-family: var(--title-font);
    font-size: 2.2rem;
    color: var(--title-color);
    text-transform: uppercase;
    margin-bottom: 3rem;
}

.cards__container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.card {
    background-color: var(--white-color);
    border-radius: 8px;
    /* Optional rounded corners */
    overflow: hidden;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card__img {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.card__content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card__content .button {
    margin-top: auto;
    align-self: center;
}

.card__title {
    font-family: var(--title-font);
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--title-color);
}

.card__text {
    margin-bottom: 1.5rem;
}

/* --- ABOUT SECTION --- */
.about__container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    background-color: var(--white-color);
    padding: 3rem;
    border-radius: 8px;
}

.about__text {
    font-size: 1.15rem;
    /* Increased by ~2pt (from 1rem) */
}

/* --- SOCIAL SECTION --- */
.social-section {
    padding: 3rem 0;
    background-color: var(--white-color);
    border-top: 1px solid #eee;
}

.social-section .container {
    display: flex;
    justify-content: center;
    /* Changed from space-between to bring items closer */
    align-items: center;
    flex-wrap: wrap;
    gap: 4rem;
    /* Specific gap to keep them close but distinct */
}

.social-section__title {
    font-family: var(--title-font);
    font-weight: 800;
    font-size: 2.2rem;
    text-transform: uppercase;
    color: var(--title-color);
    margin: 0;
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 8px;
    transition: transform 0.2s, opacity 0.2s;
    color: white;
    text-decoration: none;
}

.social-icon svg {
    width: 32px;
    height: 32px;
    fill: currentColor;
}

.social-icon:hover {
    transform: translateY(-5px);
    opacity: 0.9;
}

.social-icon--vk {
    background-color: #4c6c91;
}

.social-icon--instagram {
    background-color: #262626;
}

.social-icon--telegram {
    background-color: #2ca5e0;
}

/* --- FOOTER --- */
.footer {
    background-color: #1a1a10;
    /* Darker, slightly warm as in screenshot */
    color: #ffffff;
    padding: 3rem 0;
    /* More compact */
    text-align: center;
}

.footer__contact {
    font-size: 1rem;
    margin-bottom: 1.5rem;
    opacity: 0.9;
    line-height: 1.6;
}

.footer__socials {
    display: flex;
    justify-content: center;
    gap: 40px;
}

.footer__social-link {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #ffffff;
    font-weight: 500;
    font-size: 1.1rem;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.footer__social-link:hover {
    opacity: 0.8;
}

.footer__social-link svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

.footer__copyright {
    font-size: 0.95rem;
    opacity: 0.7;
    margin-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
}

/* --- MOBILE --- */
/* --- MOBILE RESPONSIVE STYLES --- */
@media screen and (max-width: 768px) {

    /* Container padding */
    .container {
        padding: 0 1.5rem;
    }

    /* Typography */
    .hero__title {
        font-size: 2.2rem !important;
        line-height: 1.2;
    }

    .hero__subtitle {
        font-size: 1.1rem;
    }

    .section__title {
        font-size: 1.8rem;
    }

    .about__text,
    .card__text {
        font-size: 1rem;
    }

    /* Hero section */
    .hero {
        padding: 4rem 0 !important;
        margin-left: -1.5rem;
        margin-right: -1.5rem;
        width: calc(100% + 3rem);
    }

    .hero .container {
        padding: 0 1.5rem;
    }

    /* Cards */
    .cards__container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .card {
        max-width: 100%;
    }

    /* About section */
    .about__container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .about__img {
        order: -1;
        /* Image first on mobile */
    }

    /* Comfort section grid */
    div[style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }

    /* Image grids */
    div[style*="display: grid"][style*="grid-template-columns: repeat(2, 1fr)"] {
        gap: 0.5rem !important;
    }

    /* Buttons */
    .button {
        padding: 0.9rem 2rem;
        font-size: 0.85rem;
        width: 70%;
        max-width: 300px;
        text-align: center;
        display: block;
        margin: 0 auto;
    }

    /* Section spacing */
    .section {
        padding: 2rem 0;
    }

    /* Footer */
    .footer {
        padding: 2rem 0;
        text-align: center;
    }

    .footer__contact {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }

    .footer__socials {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 1.5rem;
        justify-content: center;
    }

    /* Social section */
    .social-section {
        padding: 2rem 0;
    }

    .social-section__title {
        font-size: 1.5rem;
    }

    .social-icons {
        gap: 1.5rem;
    }

    .social-icon {
        width: 50px;
        height: 50px;
    }

    /* Alternating sections */
    .section-alt {
        display: flex !important;
        flex-direction: column !important;
        gap: 1.5rem;
        margin-bottom: 4rem;
    }

    .section-alt__content {
        text-align: center;
        order: 1 !important;
    }

    .section-alt__content h2,
    .section-alt__content h3 {
        text-align: center;
    }

    .section-alt__img {
        order: 2 !important;
    }

    .section-alt__img>img {
        max-height: 300px;
        margin: 0 auto;
        display: block;
        width: 100%;
    }

    /* Sub galleries - ENABLE on mobile for mini-album */
    .sub-gallery {
        display: flex !important;
        flex-wrap: wrap;
        gap: 0.5rem;
        margin-top: 1rem;
        order: 3 !important;
        justify-content: center;
    }

    .sub-gallery.expanded {
        display: flex !important;
        flex-wrap: wrap;
        gap: 0.5rem;
        margin-top: 1rem;
        order: 3 !important;
        justify-content: center;
    }

    .sub-gallery img {
        width: 70px !important;
        /* Fixed width for standard thumbnail look on mobile */
        height: 70px !important;
        object-fit: cover;
        flex-grow: 0;
    }

    /* Gallery grid */
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.3rem;
        padding: 0 0.5rem;
    }

    /* Lightbox */
    .lightbox-content {
        width: 95%;
        height: 80vh;
    }

    .lightbox-prev,
    .lightbox-next {
        font-size: 28px;
        padding: 15px;
    }

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }

    .lightbox-thumbnails {
        height: 70px;
        bottom: 10px;
    }

    .lightbox-thumb {
        height: 60px;
        width: 60px;
    }

    /* Phone number in nav */
    .nav__phone {
        font-size: 0.95rem;
    }

    /* Burger button */
    .nav__toggle {
        width: 45px;
        height: 45px;
    }

    /* Logo */
    .nav__logo img {
        width: 60px;
    }
}

/* Alternating Sections - Simple 2-column layout for natural flow */
.section-alt {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    grid-template-areas:
        "content mainimg"
        "gallery gallery";
    gap: 2rem 3rem;
    margin-bottom: 8rem;
    align-items: start;
}

.section-alt__content {
    grid-area: content;
}

.section-alt__img {
    grid-area: mainimg;
    width: 100%;
}

.section-alt__img>img {
    width: 100%;
    height: auto;
    max-height: 450px;
    /* Reduced as requested */
    object-fit: contain;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    cursor: pointer;
}

/* All sections now follow the same 'Text Left, Photo Right' pattern */

/* Sub-galleries now flow within their parent containers */
.sub-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.8rem;
    margin-top: 0.8rem;
}

.sub-gallery.expanded {
    grid-area: gallery;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    margin-top: 2rem;
}

.sub-gallery img {
    width: 100%;
    height: 100px;
    /* Consistent height for horizontal alignment */
    object-fit: cover;
    /* Changed to cover for better thumbnail look */
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.sub-gallery img:hover {
    transform: scale(1.05);
}

.sub-gallery img.active {
    border-color: var(--primary-color);
    transform: scale(1.05);
}

/* Lightbox Styles */
.lightbox {
    display: none;
    position: fixed;
    z-index: 10000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    user-select: none;
}

.lightbox.active {
    display: flex;
}

/* Lightbox UI Elements */
.lightbox-counter {
    position: absolute;
    top: 25px;
    left: 30px;
    color: white;
    font-size: 1.1rem;
    font-weight: 500;
    opacity: 0.8;
}

.lightbox-controls {
    position: absolute;
    top: 20px;
    right: 30px;
    display: flex;
    gap: 15px;
    align-items: center;
    z-index: 10;
}

.lightbox-btn {
    color: white;
    font-size: 24px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 10px;
    opacity: 0.7;
    transition: opacity 0.2s, transform 0.2s;
}

.lightbox-btn:hover {
    opacity: 1;
    transform: scale(1.1);
}

.lightbox-close {
    font-size: 32px;
}

/* Main Image Wrapper for Zoom */
.lightbox-img-wrapper {
    width: 100%;
    height: 70%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Navigation Arrows */
.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 40px;
    cursor: pointer;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    transition: 0.3s;
    z-index: 5;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

/* Thumbnails Catalog */
.lightbox-thumbnails {
    position: absolute;
    bottom: 20px;
    width: 90%;
    height: 100px;
    display: flex;
    justify-content: center;
    gap: 10px;
    overflow-x: auto;
    padding: 10px;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) rgba(255, 255, 255, 0.1);
}

.lightbox-thumb {
    height: 80px;
    width: 80px;
    object-fit: cover;
    border-radius: 5px;
    cursor: pointer;
    opacity: 0.5;
    border: 2px solid transparent;
    transition: 0.3s;
    flex-shrink: 0;
}

.lightbox-thumb.active {
    opacity: 1;
    border-color: var(--primary-color);
    transform: scale(1.1);
}

.lightbox-thumb:hover {
    opacity: 0.8;
}

/* --- GALLERY --- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 0.5rem;
    padding: 0 1rem;
}

.gallery-item {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 4px;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

/* Cottage Features */
.features-list {
    list-style: none;
    padding: 0;
    margin-top: 1.5rem;
}

.features-list li {
    padding-left: 2rem;
    position: relative;
    margin-bottom: 0.8rem;
    line-height: 1.6;
}

.features-list li::before {
    content: "✔";
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}