/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-secondary);
    line-height: 1.6;
    color: var(--text);
    background: url('https://images.unsplash.com/photo-1507525428034-b723cf961d3e?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80') no-repeat center center fixed;
    background-size: cover;
    background-attachment: fixed;
    position: relative;
    padding-top: 60px;
}

/* Overlay for Text Readability */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(247, 244, 243, 0.8);
    z-index: -1;
}

/* Color Theme */
:root {
    --primary: #a8d5ba; /* Sage Green */
    --selected: #e8e7e6; /* Light Gray */
    --secondary: #d9c2e6; /* Lavender */
    --accent: #f4e9d8; /* Cream */
    --text: #333;
	--font-logo: 'Love Light', cursive;
    --font-primary: 'Oswald', serif;
    --font-secondary: 'Montserrat', sans-serif;
    --section-padding: 4rem 2rem;
    --mobile-section-padding: 2rem 1rem;
    --content-max-width: 600px;
    --mobile-font-size: 0.9rem;
    --mobile-small-font-size: 0.85rem;
}

/* Header */
header {
    background: rgba(217, 194, 230, 0.9);
    padding: 1rem 2rem;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 60px;
    transition: padding 0.3s, min-height 0.3s;
    overflow: visible;
}

header.scrolled {
    padding: 0.5rem 2rem;
    min-height: 50px;
}

/* Logo Container */
.logo-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
}

.header-logo {
    width: 40px;
    height: auto;
    display: block;
    transition: width 0.3s;
}

header.scrolled .header-logo {
    width: 32px;
}

.logo-text {
	font-family: var(--font-logo);
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text);
    transition: font-size 0.3s;
}

header.scrolled .logo-text {
    font-size: 1.2rem;
}

/* Booking Button */
.booking-btn {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.5rem 1.5rem;
    background: var(--primary);
    color: var(--text);
    text-decoration: none;
    border-radius: 5px;
    font-size: 0.8rem;
    font-weight: bold;
    text-align: center;
    transition: background 0.3s, transform 0.2s, padding 0.3s, font-size 0.3s;
}

header.scrolled .booking-btn {
    padding: 0.4rem 1.2rem;
    font-size: 0.9rem;
}

.booking-btn:hover {
    background: var(--selected);
    transform: translateX(-50%) scale(1.05);
}

/* Language Selector */
.language-selector {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    margin-left: 1rem;
    font-size: 0.85rem;
    line-height: 1.2;
    transition: opacity 0.3s;
}

.lang-option {
    color: var(--text);
    cursor: pointer;
    text-transform: uppercase;
    transition: opacity 0.3s, color 0.3s, transform 0.2s;
}

.lang-option:hover {
    color: var(--primary);
    transform: scale(1.1);
}

.lang-option.active {
    color: var(--selected);
    font-weight: bold;
}

/* Navigation */
nav {
    display: flex;
    align-items: center;
    flex: 1;
    justify-content: flex-end;
}

nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

nav ul li {
    margin-left: 2rem;
}

nav a {
    color: var(--text);
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.3s;
}

nav a.active, nav a:hover {
    color: var(--selected);
}

nav a:hover {
    color: var(--primary);
}

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text);
}

/* Main Sections */
section {
    padding: var(--section-padding);
    text-align: center;
    opacity: 0;
    transform: translateY(20px); 
    transition: opacity 0.5s, transform 0.5s;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    margin: 0 auto;
    max-width: 1200px;
}

section.visible {
    opacity: 1;
    transform: translateY(0);
}

h1, h2, h3 {
    color: var(--text);
    margin-bottom: 1rem;
    font-family: var(--font-primary);
}

p {
    max-width: var(--content-max-width);
    margin: 0 auto;
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.service-card {
    background: var(--accent);
    padding: 1.5rem;
    border-radius: 8px;
    transition: transform 0.3s;
    display: flex;
    flex-direction: column;
    height: 350px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.service-card:hover {
    transform: translateY(-5px);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    gap: 0.75rem;
}

.card-icon {
    width: 30px;
    height: auto;
    transition: transform 0.3s;
}

.card-icon:hover {
    transform: scale(1.1);
}

.service-card h3 {
    color: var(--text);
    font-size: 1.25rem;
    margin: 0;
}

.service-card .card-content {
    flex: 1;
    max-height: 200px;
    overflow-y: auto;
    padding-right: 0.5rem;
    font-size: 0.9rem;
    line-height: 1.4;
}

.service-card p {
    margin-bottom: 0.75rem;
}

.service-card .card-content::-webkit-scrollbar {
    width: 6px;
}

.service-card .card-content::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 3px;
}

.more-btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--primary);
    color: var(--text);
    text-decoration: none;
    border-radius: 5px;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    transition: background 0.3s;
}

.more-btn:hover {
    background: var(--secondary);
}

/* Slideshow */
.slideshow {
    position: relative;
    max-width: 400px;
    margin: 2rem auto;
    overflow: hidden;
    min-height: 200px;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.slide.active {
    opacity: 1;
    position: relative;
}

.slide img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
}

.prev, .next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    font-size: 1.5rem;
    z-index: 10;
}

.prev {
    left: 10px;
}

.next {
    right: 10px;
}

/* Contact and Payment Sections */
.contact-wrapper, .payment-wrapper {
    max-width: var(--content-max-width);
    margin: 0 auto;
    text-align: left;
}

.contact-info, .payment-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.payment-info {
	flex-direction: row;
	justify-content: center; /* Center items horizontally */
}

.contact-item, .payment-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text);
    font-size: 1rem;
    text-decoration: none;
    transition: color 0.3s;
}

.contact-item:hover {
    color: var(--primary);
}

.contact-icon, .payment-icon {
    width: 16px;
    height: auto;
    transition: transform 0.3s, filter 0.3s;
}

.contact-item:hover .contact-icon, .payment-item:hover .payment-icon {
    transform: scale(1.2);
    filter: hue-rotate(60deg) brightness(1.2);
}

.contact-item:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Content Sections */
#hermoratahieronta, #rentopure, #prices {
    & p {
        font-size: 0.95rem;
        line-height: 1.6;
        margin-bottom: 1rem;
        text-align: left;
        max-width: var(--content-max-width);
    }

    & ul {
        max-width: var(--content-max-width);
        margin: 0.5rem auto 1rem;
        padding-left: 1.5rem;
        font-size: 0.9rem;
        line-height: 1.5;
        list-style-type: disc;
        text-align: left;
    }

    & ul li {
        margin-bottom: 0.5rem;
    }
}

/* About Section */
.imgtxt-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
    align-items: center;
}

.wrapper-image {
    width: 100%;
    max-width: 300px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    object-fit: cover;
}

.wrapper-text {
    text-align: left;

    & p {
        font-size: 0.95rem;
        line-height: 1.6;
        margin-bottom: 1rem;
        max-width: none;
    }

    & ul {
        max-width: none;
        margin: 0.5rem 0 1rem;
        padding-left: 1.5rem;
        font-size: 0.9rem;
        line-height: 1.5;
        list-style-type: disc;
        text-align: left;
    }

    & ul li {
        margin-bottom: 0.5rem;
    }
}

/* Privacy Policy Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--accent);
    padding: 2rem;
    border-radius: 8px;
    max-width: var(--content-max-width);
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    text-align: left;
}

.modal-content h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.modal-content p {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    max-width: none;
}

.modal-content a {
    color: var(--primary);
    text-decoration: underline;
}

.modal-content a:hover {
    color: var(--secondary);
}

.modal-close {
    display: block;
    margin: 1rem auto 0;
    padding: 0.5rem 1.5rem;
    background: var(--primary);
    color: var(--text);
    border: none;
    border-radius: 5px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.3s;
}

.modal-close:hover {
    background: var(--secondary);
}

.modal-close:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Footer */
footer {
    background: var(--secondary);
    padding: 2rem;
    text-align: center;
}

footer ul {
    list-style: none;
    display: flex;
    justify-content: center;
    margin-top: 1rem;
}

footer li {
    margin: 0 1rem;
}

footer a {
    color: var(--text);
    text-decoration: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding-top: 80px;
    }

    /* Header */
    header {
        padding: 0.75rem 1rem;
        flex-wrap: nowrap;
        gap: 0.5rem;
    }

    header.scrolled {
        min-height: 60px;
    }

    .header-logo {
        width: 36px;
    }

    header.scrolled .header-logo {
        width: 24px;
    }

    .logo-text {
        font-size: 1.1rem;
    }

    header.scrolled .logo-text {
        font-size: 0.9rem;
    }

    .logo-container {
        flex: 0 0 auto;
        margin-right: 1rem;
        max-width: 50%;
    }

    .booking-btn {
        position: relative;
        left: auto;
        transform: none;
        margin: 0.5rem 0;
        padding: 0.4rem 1rem;
        font-size: 0.85rem;
        flex: 0 0 auto;
        white-space: nowrap;
    }

    header.scrolled .booking-btn {
        padding: 0.3rem 0.6rem;
        font-size: 0.75rem;
        max-width: 100px;
    }

    .language-selector {
        gap: 0.5rem;
        margin-left: 0.5rem;
        font-size: 0.8rem;
        z-index: 1001;
        position: relative;
    }

    .lang-option {
        font-size: 0.8rem;
    }

    /* Navigation */
    nav {
        width: auto;
        flex: 0 0 auto;
        margin-left: auto;
    }

    nav ul {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--secondary);
        padding: 1rem;
    }

    nav ul.active {
        display: flex;
    }

    nav ul li {
        margin: 0.5rem 0;
    }

    .menu-toggle {
        display: block;
        margin-left: 1rem;
        font-size: 1.2rem;
    }

    /* Sections */
    section {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: var(--mobile-section-padding);
    }

    section p, section ul, section .services-grid, section .contact-wrapper, section .payment-wrapper {
        margin-left: auto;
        margin-right: auto;
        text-align: left;
        width: 100%;
        max-width: var(--content-max-width);
    }

    .contact-wrapper, .payment-wrapper {
        max-width: 100%;
        padding: 0 1rem;
    }

    .contact-item, .payment-item {
        font-size: 0.95rem;
    }

    .contact-icon, .payment-icon {
        width: 14px;
        vertical-align: middle;
    }

    /* Services Grid */
    .services-grid {
        grid-template-columns: 1fr;
    }

    .service-card {
        height: auto;
        padding: 1rem;
    }

    .service-card .card-content {
        max-height: none;
        overflow-y: visible;
    }

    .service-card h3 {
        font-size: 1.1rem;
    }

    .card-icon {
        width: 25px;
    }

    .service-card p, .service-card ul {
        font-size: var(--mobile-small-font-size);
    }

    /* Content Sections */
    #hermoratahieronta, #rentopure, #prices, #about .wrapper-text {
        max-width: 100%;

        & h3 {
            font-size: 1.1rem;
            margin-bottom: 0.75rem;
            margin-top: 1rem;
        }

        & p {
            font-size: var(--mobile-font-size);
        }

        & ul {
            max-width: 100%;
            margin: 0.5rem 0 0.75rem;
            padding-left: 1.25rem;
            font-size: var(--mobile-small-font-size);
        }
    }

    #about .imgtxt-wrapper {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    #about .wrapper-image {
        max-width: 250px;
        margin: 0 auto;
    }

    /* Modal */
    .modal-content {
        padding: 1.5rem;
        width: 90vw;
        max-height: 70vh;
    }

    .modal-content h2 {
        font-size: 1.3rem;
    }

    .modal-content p {
        font-size: var(--mobile-font-size);
    }

    .modal-close {
        padding: 0.4rem 1.2rem;
        font-size: var(--mobile-small-font-size);
    }

    /* Footer */
    footer ul.nav-links {
        flex-direction: column;
        align-items: center;
        margin-top: 0.5rem;
        padding: 0;
        max-width: 100%;
    }

    footer li {
        margin: 0.5rem 0;
    }

    footer a {
        font-size: var(--mobile-font-size);
    }
}

/* Footer */
footer {
    background: var(--secondary);
    padding: 2rem;
    text-align: center;
    position: relative;
    width: 100%;
}

.footer-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    width: 100%;
    max-width: 1200px; /* Cap for wide screens */
    margin: 0 auto;
    position: relative;
}

.links-container {
    max-width: var(--content-max-width); /* 600px */
    margin: 0 auto; /* Center links */
}

.footer-links {
    list-style: none;
    display: flex;
    justify-content: center; /* Center links within 600px */
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin: 0 1rem;
}

.footer-links a {
    color: var(--text);
    text-decoration: none;
    font-size: 1rem;
}

.footer-logo {
    position: absolute;
    right: 10px; /* Closer to page border */
    display: flex;
    align-items: center;
}

.footer-logo-img {
    width: auto; /* Ensure larger size */
    height: auto;
    max-height: 80px; /* Prevent footer expansion */
}

/* Desktop (≥992px) */
@media (min-width: 992px) {
    .footer-container {
        flex-direction: row;
    }

    .links-container {
        max-width: var(--content-max-width);
        margin: 0 auto;
    }

    .footer-links {
        justify-content: center;
    }

    .footer-logo {
        right: 10px;
        margin: 0;
    }
}

/* Mobile (768px–991px) */
@media (max-width: 991px) {
    .footer-container {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 1rem;
		align-items: center;
		justify-content: center;
    }

    .links-container {
        max-width: 100%;
        margin: 0;
    }

    .footer-links {
        flex-direction: column;
        
        
        margin-right: 1rem;
        margin-top: 0;
    }

    .footer-links li {
        margin: 0.5rem 0;
    }

    .footer-links a {
        font-size: 0.9rem;
    }

    .footer-logo {
        margin-top: 0;
        display: flex;
    }
}

li[data-text="prices_p2_hermoratahieronta"] a {
    color: var(--primary);
    text-decoration: underline;
}
li[data-text="prices_p2_hermoratahieronta"] a:hover {
    color: var(--accent);
}

/* Existing mobile styles for header */
@media (max-width: 768px) {
  header {
    padding: 0.75rem 1rem;
    flex-wrap: nowrap;
    gap: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .logo-container {
    flex: 0 0 auto;
    margin-right: 0.5rem;
    max-width: 50%;
  }

  /* Updated booking-btn styles */
  .booking-btn {
    position: relative;
    left: auto;
    transform: none;
    margin: 0 0.5rem; /* Add consistent margin to prevent shifting */
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
    flex: 0 0 auto;
    white-space: nowrap;
    order: 2; /* Ensure button appears after logo-container and before nav */
    text-align: center;
  }

  /* Ensure button resets position after focus/active */
  .booking-btn:focus, .booking-btn:active {
    position: relative;
    left: auto;
    transform: none;
    margin: 0 0.5rem;
  }

  header.scrolled .booking-btn {
    padding: 0.3rem 0.8rem; /* Slightly adjusted for scrolled state */
    font-size: 0.75rem;
  }

  /* Language selector adjustments */
  .language-selector {
    margin-left: 0.5rem;
    font-size: 0.8rem;
    flex: 0 0 auto;
    order: 1; /* Place before booking-btn */
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }

  /* Navigation */
  nav {
    flex: 0 0 auto;
    order: 3; /* Place nav last */
    margin-left: auto;
  }

  .menu-toggle {
    display: block;
    margin-left: 0.5rem;
    font-size: 1.2rem;
  }
}

@media (max-width: 768px) {
  section {
    padding: var(--mobile-section-padding);
    margin-top: 1rem; /* Add small margin to sections for better spacing */
  }
}