/*====================
  VARIABLES & SETTINGS
====================*/
:root {
    /* Layout dimensions */
    --sidebar-width: 164px;
    --header-height: 90px;
    --footer-height: 60px;
    --gallery-nav-height: 60px;
    
    /* Spacing */
    --spacing-xs: 5px;
    --spacing-sm: 10px;
    --spacing-md: 20px;
    --spacing-lg: 30px;
    
    /* Colors */
    --color-primary: #F6D7B8;
    --color-secondary: #E0C2A1;
    --color-accent: #D4B28F;
    --color-white: #FFFFFF;
    --color-black: #000000;
    --color-success: #00cc00;
    --color-error: #ff0000;
    --color-border: #ccc;
    
    /* Effects */
    --shadow-light: 0 0 10px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 2px 5px rgba(0, 0, 0, 0.2);
    --transition-fast: 0.2s ease-in-out;
    
    /* Breakpoints */
    --breakpoint-desktop: 769px;
}

/*====================
  BASE STYLES
====================*/
html {
    height: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

*, *::before, *::after {
    box-sizing: inherit;
}

body {
    height: 100%;
    margin: 0;
    font-family: Verdana, Arial, Helvetica, sans-serif;
    background-color: var(--color-white);
    color: var(--color-black);
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    width: 100%;
}

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

strong {
    color: #23241f
}

/*====================
  MOBILE-FIRST LAYOUT (Default)
====================*/
.container {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding-top: var(--header-height);
    width: 100%;
}

.sidebar {
    display: none;
}

/* Mobile Header */
.mobile-top-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: var(--color-white);
    box-shadow: var(--shadow-medium);
    display: flex;
    flex-direction: column;
}

.mobile-header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-sm) var(--spacing-md);
}

header {
    flex: 1;
    padding: 0;
    text-align: left;
    background-color: transparent;
}

.header-text {
    display: none;
    max-width: 200px;
}

.mobile-menu-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6em;
    cursor: pointer;
    padding: var(--spacing-sm);
    background-color: var(--color-primary);
    border-radius: 4px;
    width: 45px;
    height: 45px;
    flex-shrink: 0;
}

/* Mobile Navigation */
.mobile-nav-menu {
    display: none;
    flex-direction: column;
    width: 100%;
    background-color: var(--color-primary);
    box-shadow: var(--shadow-medium);
    position: fixed;
    top: var(--header-height);
    left: 0;
    z-index: 1001;
}

.mobile-nav-menu.active {
    display: flex;
}

.mobile-nav-menu a {
    padding: 15px;
    text-align: center;
    text-decoration: none;
    color: var(--color-black);
    border-bottom: 1px solid var(--color-secondary);
}

.mobile-nav-menu a:hover,
.mobile-nav-menu a:focus {
    background-color: var(--color-secondary);
}

/* Main Content */
.main-content {
    flex: 1;
    padding: var(--spacing-md);
    width: 100%;
}

.content-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    width: 100%;
    text-align: center;
    max-width: 960px;
    margin: var(--spacing-md) auto;
}

.image-column,
.text-column {
    width: 100%;
}

.image-column img {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.text-column p,
.info-section p,
.info-section ul {
    text-align: left;
    margin: 0 0 1em 0;
}

.info-section ul {
    list-style-position: inside;
    padding-left: 0;
    line-height: 1.6;
}

/* Footer */
footer {
    text-align: center;
    padding: var(--spacing-sm);
    background-color: var(--color-primary);
    font-size: 0.8em;
    width: 100%;
}

footer p {
    margin: 0;
}

/*====================
  DESKTOP STYLES (min-width: 769px)
====================*/
@media (min-width: 769px) {
    .mobile-top-bar,
    .mobile-nav-menu {
        display: none !important;
    }

    .container {
        flex-direction: row;
        padding-top: 0;
    }

    .sidebar {
        display: block;
        width: var(--sidebar-width);
        flex-shrink: 0;
        background-color: var(--color-primary);
        background-image: url('kuvat/viiva3.jpg');
        background-repeat: repeat-y;
        background-position: center top;
        height: 100vh;
        position: fixed;
        top: 0;
        left: 0;
        z-index: 100;
    }

    .sidebar nav {
        margin-top: 100px;
    }

    header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: var(--spacing-md);
        margin-left: var(--sidebar-width);
        width: calc(100% - var(--sidebar-width));
    }
    
    header::after {
        content: '';
        background-image: url('kuvat/Logo1_3.jpg');
        background-size: contain;
        background-repeat: no-repeat;
        background-position: center;
        width: 100px;
        height: 80px;
        flex-shrink: 0;
        margin-left: var(--spacing-md);
    }

    .header-text {
        display: block;
        flex: 1;
        max-width: none;
    }

    .main-content {
        margin-left: var(--sidebar-width);
        width: calc(100% - var(--sidebar-width));
    }

    .content-section {
        flex-direction: row;
        align-items: flex-start;
        text-align: left;
    }

    .center-content {
        max-width: 960px;
        margin: 0 auto;
        padding: var(--spacing-lg);
    }

    footer {
        margin-left: var(--sidebar-width);
        width: calc(100% - var(--sidebar-width));
    }
}

/*====================
  SIDEBAR NAVIGATION
====================*/
.sidebar nav a {
    display: block;
    padding: var(--spacing-xs) 0;
    text-decoration: none;
    color: var(--color-white);
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2.0em;
    text-align: center;
    transition: var(--transition-fast);
    text-shadow: 2px 2px 18px #8b4513eb;
    -webkit-text-stroke-width: 0.5px;
    -webkit-text-stroke-color: #00000080;
    width: var(--sidebar-width);
    box-sizing: border-box;
}

.sidebar nav a:hover,
.sidebar nav a:focus {
    color: #8B4513;
    text-shadow: none;
    background-color: rgba(224, 194, 161, 0.9);
}

/*====================
  COMPONENT STYLES (Shared)
====================*/
/* Center Content */
.center-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    padding: var(--spacing-xs);
}

.center-content > img {
    margin-bottom: var(--spacing-lg);
    max-width: 400px;
}

/* Contact Info */
.contact-info {
    margin: var(--spacing-lg) 0;
    text-align: center;
    font-size: 1.1em;
    line-height: 1.6;
}

.contact-info p {
    margin: 0;
}

.contact-info a {
    color: var(--color-black);
    text-decoration: none;
}

.contact-info a:hover,
.contact-info a:focus {
    text-decoration: underline;
    color: var(--color-accent);
}

/* Decorative Info Box */
.info-box {
    background-color: rgba(246, 215, 184, 0.3);
    border: 2px solid var(--color-secondary);
    border-radius: 6px;
    padding: var(--spacing-md);
    margin: var(--spacing-md) auto;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    max-width: 960px;
}

.info-box p {
    margin: 0.5em 0;
    text-align: left;
}

.info-box ul {
    text-align: left;
    margin: 0.5em 0;
    list-style-position: inside;
    padding-left: 0;
    line-height: 1.5;
}

/* Decorative Divider */
.decorative-divider {
    width: 100%;
    height: 2px;
    background: linear-gradient(to right, transparent, var(--color-secondary), transparent);
    margin: var(--spacing-lg) 0;
    position: relative;
}

/* Language Selector */
.language-selector {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    align-items: center;
    margin-top: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
}

.language-selector a {
    display: block;
    text-decoration: none;
    transition: transform var(--transition-fast);
}

.language-selector a:hover,
.language-selector a:focus {
    transform: scale(1.1);
    outline-offset: 2px;
}

.language-selector img {
    width: 40px;
    border-radius: 4px;    
}

/* Form Styles */
.form-section {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.form-intro {
    margin-bottom: var(--spacing-md);
    text-align: center;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-group label {
    font-weight: bold;
}

.form-group input,
.form-group textarea {
    padding: 8px;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    width: 100%;
}

.form-group input[type="submit"] {
    background-color: var(--color-secondary);
    color: var(--color-black);
    font-weight: bold;
    cursor: pointer;
    padding: var(--spacing-sm);
    border: none;
    align-self: flex-start;
}

.form-group input[type="submit"]:hover,
.form-group input[type="submit"]:focus {
    background-color: var(--color-accent);
}

/* Gallery Styles */
.gallery-nav-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-sm);
}

.gallery-main-image {
    max-width: 100%;
    max-height: calc(100vh - var(--header-height) - var(--footer-height) - 90px);
    object-fit: contain;
}

.gallery-section {
    text-align: center;
    padding: var(--spacing-md);
}

.gallery-section p {
    margin-bottom: var(--spacing-md);
}

.gallery-section img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

.image-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
    max-width: 600px;
    margin: 0 auto;
    background-color: #8B6F47;
    border: 3px solid #8B6F47;
    box-shadow: 0 0 0 2px #CE9A61;
}

.gallery-item {
    background-color: #FFCC99;
    display: flex;
    justify-content: center;
    align-items: center;
    aspect-ratio: 4/3;
    padding: 3px;
}

.gallery-item a {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    line-height: 0;
    box-sizing: border-box;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: none;
    transition: transform 0.2s ease-in-out;
}

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

/* Price Table Styles */
.price-container {
    max-width: 590px;
    width: 100%;
    margin: 0px auto;
    font-size: 14px;
}

.price-header {
    background-color: var(--color-primary);
    padding: 20px 10px;
    text-align: center;
    margin-bottom: 20px;
}

.price-header h3 {
    margin: 0;
}

.price-category {
    background-color: var(--color-primary);
    padding: 5px;
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

.price-title {
    font-weight: bold;
    padding-left: 5px;
    flex: 2;
}

.price-season-title {
    font-weight: bold;
    text-align: right;
    flex: 1;
    padding-right: 5px;
}

.price-row {
    display: flex;
    padding: 5px 0;
}

.price-item {
    flex: 2;
    padding-left: 20px;
}

.price-value {
    flex: 1;
    text-align: center;
    font-weight: bold;
}

/* Accessibility */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/*====================
  RESPONSIVE ADJUSTMENTS
====================*/
@media (max-width: 600px) {
    .image-gallery-grid {
        grid-template-columns: repeat(3, 1fr);
        max-width: 100%;
        gap: 2px;
    }
    
    .gallery-item {
        padding: 2px;
    }
}

@media (min-width: 769px) {
    .gallery-section {
        max-width: 960px;
        margin: 0 auto;
    }
}