/*
Theme Name: Lakeuden Viesti Theme
Theme URI: https://example.com
Author: Taivaspaikka Oy
Author URI: https://example.com
Description: A minimal starter theme for WordPress.
Version: 1.0
Requires at least: 5.0
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: custom-test-theme
Tags: lightweight, minimal
*/

body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
    line-height: 1.5;
    color: #111;
    background: #fff;
    text-align: center;
}

a { color: inherit; text-decoration: underline; }
header, footer, main, nav, article { display: block; }
img { max-width: 100%; height: auto; display: block; }
.container { max-width: 1000px; margin: 0 auto; padding: 1rem; text-align: center; }
h1, h2, h3 { margin: 0 0 .5rem 0; font-weight: 600; }
p { margin: 0 0 1rem 0; }


.site-header {
    text-align: center;
    background: #ffffff; 
    padding: 2rem 1rem;
    margin: 0;
}

/* Style title */
.site-title a {
    font-size: 3rem;
    font-weight: 700;
    color: #009045; /* Green tone similar to the image */
    text-decoration: none;
}

/* Tagline under title */
.site-description {
    font-size: 1.5rem;
    color: #007a38;
    margin-top: .25rem;
}

/* Navigation container centered */
.primary-menu {
    list-style: none;
    padding: 0;
    margin: 1.5rem auto 0 auto;
    display: flex;
    gap: 0;
    border: 2px solid #4db8ff;
    border-radius: .25rem;
    overflow: visible;
    justify-content: center;
}

/* Nav links styled like boxes */
.primary-menu li {
    margin: 0;
    list-style: none;
}

.primary-menu a {
    display: block;
    padding: .75rem 1.5rem;
    text-decoration: none;
    border-right: 2px solid #4db8ff;
    color: #0064a6;
    background: #ffffff;
    font-size: 1rem;
}

/* Remove right border from last */
.primary-menu li:last-child a {
    border-right: none;
}

/* Hover / active states */
.primary-menu a:hover,
.primary-menu .current-menu-item > a {
    background: #e6f5ff;
    color: #004a75;
}

.site-branding .custom-logo img,
.custom-logo img {
    width: 800px;       /* adjust this value to make the logo smaller/larger */
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* smaller on very small screens */
@media (max-width: 480px) {
    .custom-logo img { width: 120px; }
}
a:has(> img.aligncenter) {
  display: block;
  text-align: center;
  margin: 0 auto;
}

a > img.aligncenter {
  display: block;
  margin: 0 auto;
}

/* Submenu: hidden by default, shown on hover/focus, smaller sizing */
.primary-menu li {
    position: relative;
}

.primary-menu .sub-menu {
    display: none;
    position: absolute;
    left: 0;
    /* overlap parent border slightly to avoid a hover gap */
    top: calc(100% - 1px);
    background: #ffffff;
    border: 2px solid #4db8ff;
    border-radius: .25rem;
    min-width: 180px;
    padding: 0.25rem 0;
    z-index: 9999;
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
    pointer-events: auto;
}

/* Show submenu when hovering/focusing the parent OR when hovering the submenu itself */
.primary-menu li:hover > .sub-menu,
.primary-menu li:focus-within > .sub-menu,
.primary-menu a:hover + .sub-menu,
.primary-menu a:focus + .sub-menu,
.primary-menu .sub-menu:hover {
    display: block;
}

.primary-menu .sub-menu li {
    margin: 0;
}

.primary-menu .sub-menu a {
    display: block;
    padding: .4rem 1rem;
    font-size: .9rem;
    color: #0064a6;
    background: transparent;
    border-right: none;
    white-space: nowrap;
}

.primary-menu .sub-menu a:hover {
    background: #e6f5ff;
    color: #004a75;
}

/* Ensure submenus don't expand the main menu layout */
.primary-menu .sub-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
}


