:root {
    --main-color: #6a8d73;
    --text-color: #333;
    --light-bg: #f5f5f5;
    --accent-color: #a6c6a5;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

body {
    color: var(--text-color);
    line-height: 1.6;
    background: #EBFCEF;
    background-attachment: fixed;
    min-height: 100vh;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        /* Main organic blobs with lighter contrast */
        radial-gradient(ellipse 280px 420px at 15% 25%, rgba(106, 141, 115, 0.12) 0%, rgba(106, 141, 115, 0.06) 35%, transparent 70%),
        radial-gradient(ellipse 350px 180px at 85% 15%, rgba(82, 120, 91, 0.10) 0%, rgba(106, 141, 115, 0.04) 50%, transparent 80%),
        radial-gradient(ellipse 220px 380px at 75% 85%, rgba(166, 198, 165, 0.11) 0%, rgba(106, 141, 115, 0.05) 40%, transparent 75%),
        
        /* Medium contrast irregular shapes */
        radial-gradient(ellipse 450px 280px at 5% 70%, rgba(106, 141, 115, 0.08) 0%, rgba(166, 198, 165, 0.04) 45%, transparent 72%),
        radial-gradient(ellipse 320px 520px at 95% 60%, rgba(166, 198, 165, 0.09) 0%, rgba(106, 141, 115, 0.03) 55%, transparent 78%),
        radial-gradient(ellipse 180px 250px at 45% 10%, rgba(82, 120, 91, 0.09) 0%, transparent 60%),
        radial-gradient(ellipse 380px 200px at 25% 90%, rgba(166, 198, 165, 0.08) 0%, rgba(106, 141, 115, 0.03) 50%, transparent 82%),
        
        /* Smaller scattered blobs */
        radial-gradient(ellipse 150px 350px at 65% 35%, rgba(106, 141, 115, 0.07) 0%, transparent 65%),
        radial-gradient(ellipse 280px 160px at 35% 65%, rgba(166, 198, 165, 0.06) 0%, transparent 70%),
        radial-gradient(ellipse 120px 200px at 88% 40%, rgba(82, 120, 91, 0.08) 0%, transparent 55%),
        radial-gradient(ellipse 200px 120px at 12% 55%, rgba(106, 141, 115, 0.06) 0%, transparent 60%),
        
        /* Very light wash areas */
        radial-gradient(ellipse 600px 400px at 50% 30%, rgba(235, 252, 239, 0.25) 0%, rgba(166, 198, 165, 0.03) 65%, transparent 90%),
        radial-gradient(ellipse 500px 350px at 20% 80%, rgba(240, 253, 242, 0.20) 0%, rgba(106, 141, 115, 0.02) 60%, transparent 85%);
    pointer-events: none;
    z-index: 1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 2;
}

/* Header and Navigation - UPDATED FOR BETTER SPACING */
header {
    padding: 10px 0; /* Reduced from 20px */
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 10px; /* Reduced from 20px */
}

/* Logo container - BIGGER but RESPONSIVE */
.logo-container {
    width: 200px; /* Increased from 160px */
    height: 200px; /* Increased from 160px */
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 4px 15px rgba(106, 141, 115, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    background: white;
    z-index: 20;
    overflow: hidden;
    padding: 0; /* Remove padding to maximize space */
    flex-shrink: 0;
    transition: transform 0.3s ease;
    position: relative;
}

.logo-container:hover {
    transform: scale(1.05);
}

.logo-image {
    width: auto;
    height: auto;
    max-width: 180%; /* Allow image to be larger than container */
    max-height: 180%;
    object-fit: cover; /* Changed from contain to cover */
    object-position: center center; /* Center the image */
    transform: scale(0.85); /* Increased scale to show more of the logo */
}

nav {
    display: flex;
    justify-content: center;
    flex-grow: 1;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin: 0 20px;
}

nav ul li a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: bold;
    padding: 10px 0;
    position: relative;
    transition: color 0.3s;
}

nav ul li a:hover {
    color: var(--main-color);
}

nav ul li a.active {
    color: var(--main-color);
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--main-color);
    transition: width 0.3s;
}

nav ul li a:hover::after,
nav ul li a.active::after {
    width: 100%;
}

/* Content Sections - REDUCED TOP PADDING */
section {
    padding: 20px 0; /* Reduced from 40px */
    display: none;
    min-height: 80vh;
}

section.active {
    display: block;
}

/* Photo container styling - NO FLICKERING VERSION */
.photo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 30px auto;
    overflow: hidden;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: rgba(255, 255, 255, 0.5);
    max-width: 100%;
}

.photo-container img {
    max-width: 100%;
    max-height: 400px;
    object-fit: contain;
    display: block;
}

.kela-info {
    margin: 20px 0 30px 0;
    font-style: italic;
    color: var(--main-color);
}

/* Content box - REDUCED TOP MARGIN */
.content-box {
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 40px;
    margin-top: 20px; /* Reduced from 40px */
    background-color: rgba(245, 245, 245, 0.9);
    backdrop-filter: blur(10px);
    overflow: visible;
    box-shadow: 0 8px 32px rgba(106, 141, 115, 0.1);
    animation: fadeIn 0.5s ease-out forwards;
}

.section-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px 0;
    text-align: center;
}

/* Home Section */
#etusivu .section-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.welcome-message {
    margin-bottom: 30px;
}

.welcome-description {
    margin-bottom: 40px;
}

/* Home page photo - maintain aspect ratio but limit size */
#etusivu .photo-container {
    max-width: 300px;
}

#etusivu .photo-container img {
    max-height: 350px;
}

.siiri-photo {
    float: right;
    margin: 0 0 20px 30px;
    max-width: 220px;
}

.siiri-photo img {
    max-height: 280px;
}

/* Contact info styling */
.contact-info {
    text-align: left;
    max-width: 400px;
    margin: 0 auto;
}

.contact-info div {
    margin-bottom: 10px;
    padding: 5px 0;
}

/* Decorative elements */
.leaf-decoration {
    position: absolute;
    bottom: -20px;
    right: -10px;
    width: 80px;
    opacity: 0.7;
    z-index: 10;
}

/* Text styling */
h1, h2, h3 {
    margin-bottom: 20px;
    color: var(--main-color);
}

section h1 {
    animation: slideIn 0.5s ease-out forwards;
}

p {
    margin-bottom: 20px;
    text-align: left;
}

#etusivu p {
    text-align: center;
}

/* Link styling */
a {
    color: var(--main-color);
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

/* Pricing layout */
.pricing-container {
    max-width: 600px;
    margin: 0 auto;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.pricing-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.pricing-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.pricing-item .time {
    font-size: 1.2em;
    font-weight: bold;
    color: var(--main-color);
    margin-bottom: 10px;
}

.pricing-item .price {
    font-size: 1.1em;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { transform: translateX(-30px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes scaleIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.nav-link {
    transition: color 0.3s ease;
}

/* Mobile responsiveness - IMPROVED BREAKPOINTS */

/* Tablet screens */
@media (max-width: 900px) {
    .nav-container {
        flex-direction: column;
        gap: 10px; /* Reduced gap */
        margin-top: 5px; /* Reduced margin */
    }
    
    /* Logo scales down on tablet */
    .logo-container {
        width: 140px; /* Medium size */
        height: 140px;
        padding: 0;
    }
    
    .logo-image {
        transform: scale(0.5); /* Slightly smaller scale */
    }
    
    header {
        padding: 5px 0; /* Less padding on tablet */
    }
    
    section {
        padding: 15px 0; /* Less section padding */
    }
    
    .content-box {
        margin-top: 15px; /* Less top margin */
    }
}

/* Mobile screens */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 10px;
        margin-top: 5px;
    }
    
    /* Hide logo on mobile to save space and avoid cropping issues */
    .logo-container {
        display: none; /* Hide logo on mobile */
    }
    
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
        margin-top: 10px;
    }
    
    nav ul li {
        margin: 5px 10px;
    }
    
    .section-content {
        padding: 0 20px;
    }
    
    .content-box {
        padding: 20px;
        margin-top: 10px; /* Minimal top margin on mobile */
    }
    
    .siiri-photo {
        float: none;
        margin: 0 auto 20px auto;
        max-width: 200px;
    }
    
    .siiri-photo img {
        max-height: 250px;
    }
    
    #etusivu .photo-container {
        max-width: 250px;
    }
    
    #etusivu .photo-container img {
        max-height: 300px;
    }
    
    .pricing-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    header {
        padding: 5px 0;
    }
    
    section {
        padding: 10px 0;
    }
}

/* Small mobile screens */
@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    .content-box {
        padding: 15px;
        margin-top: 10px;
    }
    
    nav ul li {
        margin: 3px 8px;
    }
    
    nav ul li a {
        font-size: 0.9em;
    }
    
    /* Logo hidden on very small screens */
    .logo-container {
        display: none; /* Hide logo on small mobile */
    }
    
    #etusivu .photo-container {
        max-width: 200px;
    }
    
    #etusivu .photo-container img {
        max-height: 250px;
    }
    
    .siiri-photo {
        max-width: 180px;
    }
    
    .siiri-photo img {
        max-height: 220px;
    }
    
    header {
        padding: 5px 0;
    }
    
    .nav-container {
        margin-top: 5px;
    }
    
    section {
        padding: 10px 0;
    }
}