/*
Theme Name: Meeta Child
Theme URI: https://www.kungsors-mbk.se
Description: Child theme for Meeta - Kungsörs Motorbåtsklubb
Author: Kungsörs MBK
Author URI: https://www.kungsors-mbk.se
Template: meeta
Version: 1.1.0
*/

/* ==========================================================================
   Kungsörs MBK - Moderniserad design
   ========================================================================== */

/* ---------- Grundläggande ---------- */

body {
    font-family: "Roboto", "Segoe UI", system-ui, -apple-system, sans-serif;
    color: #2d3436;
    line-height: 1.7;
    background: #f0f2f5;
    -webkit-font-smoothing: antialiased;
}

a {
    color: #2070b4;
    transition: color 0.2s ease;
}

a:hover {
    color: #1a5a8a;
    text-decoration: none;
}

/* ---------- Layout ---------- */

.wide {
    border: none;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    margin-top: 40px;
}

/* ---------- Header ---------- */

#header {
    background: #1b2d3e;
    padding: 5px 0;
}

#logo h1 a {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* ---------- Navigation ---------- */

.dropdown a {
    font-size: 14px;
    font-weight: 500;
    padding: 10px 14px;
    transition: color 0.2s ease, background-color 0.2s ease;
    border-radius: 4px;
}

.dropdown a:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.1);
    text-decoration: none;
}

.dropdown ul {
    background: #1b2d3e;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 8px 0;
}

.dropdown li ul li a {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 400;
}

.dropdown li ul li a:hover {
    background-color: rgba(255, 255, 255, 0.08);
}

/* ---------- Innehåll ---------- */

#main {
    padding-top: 25px;
}

.post h2.title a, .post h1.title a {
    color: #1b2d3e;
    font-size: 26px;
    font-weight: 600;
    letter-spacing: -0.3px;
    transition: color 0.2s ease;
}

.post h2.title a:hover, .post h1.title a:hover {
    color: #2070b4;
    text-decoration: none;
}

.entry {
    font-size: 15px;
    line-height: 1.8;
    color: #3d4852;
}

.entry h1, .entry h2, .entry h3, .entry h4 {
    color: #1b2d3e;
    font-weight: 600;
    margin-top: 20px;
    margin-bottom: 14px;
}

.entry p, .entry li {
    margin-bottom: 16px;
}

.entry blockquote {
    border-left: 4px solid #2070b4;
    background: #f8f9fa;
    padding: 18px 24px;
    margin: 20px 0;
    font-style: italic;
    border-radius: 0 6px 6px 0;
}

.entry img {
    border-radius: 6px;
}

/* ---------- Post meta ---------- */

.post-meta {
    border-bottom: 1px solid #eef0f2;
    padding: 8px 30px;
}

.post-meta span {
    font-size: 12px;
    color: #8a9bae;
    border-right-color: #eef0f2;
}

.post-meta a {
    color: #8a9bae;
    transition: color 0.2s ease;
}

.post-meta a:hover {
    color: #2070b4;
}

.top-meta {
    color: #8a9bae;
    font-size: 13px;
}

/* ---------- Sidebar ---------- */

#sidebar {
    border-left: 1px solid #eef0f2;
    padding-top: 25px;
}

#sidebar .widget {
    border-bottom: 1px solid #eef0f2;
    padding: 0 28px 24px;
    margin-bottom: 24px;
}

.widget h3.title {
    color: #1b2d3e;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid #2070b4;
}

.widget ul {
    line-height: 1.8;
}

.widget ul li a {
    transition: color 0.2s ease;
}

.widget ul li a:hover {
    color: #2070b4;
    text-decoration: none;
}

/* ---------- Formulär & knappar ---------- */

input[type="text"],
input[type="email"],
input[type="url"],
input[type="search"],
textarea {
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    font-family: inherit;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input[type="search"]:focus,
textarea:focus {
    border-color: #2070b4;
    box-shadow: 0 0 0 3px rgba(32, 112, 180, 0.15);
    outline: none;
}

input[type="submit"],
#searchsubmit {
    background: #2070b4;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 10px 22px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    font-family: inherit;
}

input[type="submit"]:hover,
#searchsubmit:hover {
    background: #1a5a8a;
    transform: translateY(-1px);
}

/* ---------- Kommentarer ---------- */

.commentlist li.comment {
    border-bottom: 1px solid #eef0f2;
    padding-bottom: 20px;
    margin-bottom: 20px;
}

.comment-author cite {
    font-size: 15px;
    color: #1b2d3e;
}

#respond textarea {
    border-radius: 6px;
}

/* ---------- Footer ---------- */

#footer {
    background: #1b2d3e;
    color: #a0b0c0;
    padding: 30px 0;
}

#footer a {
    color: #c0d0e0;
    transition: color 0.2s ease;
}

#footer a:hover {
    color: #fff;
}

#footer .widget h3.title {
    color: #fff;
    border-bottom-color: rgba(255, 255, 255, 0.2);
}

/* ---------- Breadcrumbs ---------- */

.breadcrumbs {
    font-size: 13px;
    color: #8a9bae;
}

.breadcrumbs a {
    color: #8a9bae;
}

.breadcrumbs a:hover {
    color: #2070b4;
}

/* ---------- Taggar ---------- */

.single .tags_list a {
    border: 1px solid #d1d5db;
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 12px;
    color: #5a6874;
    transition: all 0.2s ease;
}

.single .tags_list a:hover {
    background: #2070b4;
    border-color: #2070b4;
    color: #fff;
    text-decoration: none;
}

/* ---------- MetaSlider ---------- */

.metaslider {
    max-height: 350px;
    overflow: hidden;
}

.metaslider .slides li {
    max-height: 350px;
}

.metaslider .slides li img {
    width: 100%;
    height: 350px;
    object-fit: cover;
    object-position: center;
}

/* ---------- Tablet (1060px och under) ---------- */

@media screen and (max-width: 1060px) {
    .wrap {
        width: 94%;
    }

    .wide {
        margin-top: 20px;
    }
}

/* ---------- Tablet porträtt (768px och under) ---------- */

@media screen and (max-width: 768px) {
    /* Layout — en kolumn */
    #main {
        width: 100% !important;
        float: none;
        border-right: none;
    }

    #sidebar {
        width: 100% !important;
        float: none;
        border-left: none;
        border-top: 1px solid #eef0f2;
        margin-left: 0;
        padding-top: 20px;
    }

    /* Hamburger-meny */
    #navbar {
        float: none;
        margin: 0;
        padding: 0;
    }

    #navbar .dropdown {
        display: none;
        float: none;
        width: 100%;
        background: #1b2d3e;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    #navbar .dropdown.open {
        display: block;
    }

    #navbar .dropdown li {
        float: none;
        display: block;
    }

    #navbar .dropdown a {
        display: block;
        padding: 12px 20px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        border-radius: 0;
        font-size: 15px;
    }

    #navbar .dropdown ul {
        position: static;
        width: 100%;
        box-shadow: none;
        border-radius: 0;
        padding: 0;
        background: rgba(0, 0, 0, 0.15);
    }

    #navbar .dropdown li:hover ul,
    #navbar .dropdown li.sfHover ul {
        top: auto;
        left: auto;
    }

    #navbar .dropdown ul li a {
        padding-left: 36px;
        font-size: 14px;
    }

    #navbar .dropdown ul ul li a {
        padding-left: 52px;
    }

    #navbar .mobile-toggle {
        display: block;
        cursor: pointer;
        padding: 12px 20px;
        color: #fff;
        font-size: 1.1em;
        text-align: right;
        font-weight: 500;
        user-select: none;
    }

    /* Header / logo */
    #header {
        padding: 8px 0;
    }

    #logo {
        float: none;
        text-align: center;
        margin: 5px 16px;
    }

    #logo img {
        max-height: 50px;
        width: auto;
    }

    /* Slider */
    .metaslider {
        max-height: 200px;
    }

    .metaslider .slides li,
    .metaslider .slides li img {
        max-height: 200px;
        height: 200px;
    }

    /* Wrap */
    .wide {
        margin-top: 0;
        box-shadow: none;
        border: none;
    }

    .wrap {
        width: 100%;
    }

    /* Innehåll */
    .post h2.title a, .post h1.title a {
        font-size: 20px;
        letter-spacing: 0;
    }

    .post h2.title, .post h1.title {
        margin-bottom: 8px;
    }

    #main {
        padding-top: 16px;
    }

    #main .post-content {
        padding: 0 16px;
    }

    .entry {
        font-size: 15px;
        line-height: 1.75;
    }

    .entry img {
        border-radius: 4px;
    }

    .entry blockquote {
        padding: 14px 16px;
        margin: 16px 0;
    }

    /* Post meta */
    .post-meta {
        padding: 8px 16px;
    }

    .post-meta span {
        float: none;
        display: inline-block;
        margin: 0 8px 4px 0;
        padding: 0;
        border-right: none;
    }

    .post-meta .readmore {
        float: none;
        border-left: none;
        padding: 6px 0;
        display: block;
    }

    /* Sidebar widgets */
    #sidebar .widget {
        padding: 0 16px 20px;
    }

    .widget h3.title {
        font-size: 15px;
    }

    /* Kommentarer */
    #comments {
        padding: 0 16px;
    }

    .commentlist li.comment {
        padding-left: 0;
    }

    .commentlist .avatar {
        position: static;
        float: left;
        margin: 0 12px 8px 0;
    }

    .comment-meta {
        float: none;
        display: block;
        margin-bottom: 8px;
    }

    /* Formulär */
    #respond .form_fields {
        float: none;
        width: 100%;
        margin-right: 0;
    }

    #respond .form_fields input {
        width: 100%;
    }

    #respond .comment-form-comment {
        width: 100%;
    }

    #respond textarea {
        width: 100%;
        box-sizing: border-box;
    }

    input[type="submit"],
    #searchsubmit {
        width: 100%;
        padding: 12px;
        font-size: 16px;
    }

    /* Sökformulär */
    #searchform {
        display: flex;
        gap: 8px;
    }

    #searchform #s {
        flex: 1;
        min-width: 0;
    }

    #searchform #searchsubmit {
        width: auto;
        flex-shrink: 0;
    }

    /* Footer */
    #footer {
        padding: 24px 16px;
    }

    #footer div.column {
        float: none;
        width: 100% !important;
        margin-right: 0;
        margin-bottom: 20px;
    }

    .copyright {
        text-align: center;
    }

    .copyright .left,
    .copyright .right {
        float: none;
        display: block;
        text-align: center;
    }

    /* Breadcrumbs */
    .breadcrumbs {
        padding: 8px 16px;
        font-size: 12px;
    }

    .breadcrumbs h1 {
        font-size: 16px;
    }

    /* Tabeller */
    #wp-calendar {
        font-size: 13px;
    }

    #wp-calendar tbody td {
        padding: 5px;
    }

    /* Bilder i gallerier */
    .entry .gallery .gallery-item {
        max-width: 45% !important;
        margin: 6px 2%;
    }

    /* Archive widget */
    .widget_archive li {
        width: 100%;
        float: none;
    }
}

/* ---------- Liten mobil (480px och under) ---------- */

@media screen and (max-width: 480px) {
    .metaslider {
        max-height: 150px;
    }

    .metaslider .slides li,
    .metaslider .slides li img {
        max-height: 150px;
        height: 150px;
    }

    .post h2.title a, .post h1.title a {
        font-size: 18px;
    }

    .entry {
        font-size: 14px;
    }

    .entry .gallery .gallery-item {
        max-width: 100% !important;
        margin: 6px 0;
    }

    #navbar .dropdown a {
        padding: 14px 20px;
        font-size: 16px;
    }

    #navbar .dropdown ul li a {
        padding-left: 32px;
        font-size: 15px;
    }
}

/* ---------- Desktop — dölj hamburger ---------- */

@media (min-width: 769px) {
    #navbar .mobile-toggle {
        display: none;
    }
}
