/*
Theme Name:  Tidaholms Theme
Description: Custom theme for Tidaholms Autocenter
Version:     1.1.6
Requires at least: 5.6
License:     GNU General Public License v2 or later
*/

/* ============================================================
   RESET & BASE
   ============================================================ */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: #222;
    background: #fff;
}

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

a {
    color: inherit;
    text-decoration: none;
}

/* ============================================================
   LAYOUT — centred content column
   ============================================================ */

.site-container {
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 24px;
    padding-right: 24px;
}

/* ============================================================
   HEADER
   ============================================================ */

.site-header {
    background: #fff;
    border-bottom: 1px solid #e5e5e5;
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-header .site-container {
    max-width: 960px;
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 160px;
    gap: 24px;
}

/* --- Logo --- */

.site-logo {
    flex-shrink: 0;
    max-width: 500px;
}

.site-logo a {
    display: block;
}

.site-logo img {
    max-width: 500px;
    max-height: 160px;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* Fallback text logo when no image is set */
.site-logo .site-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: #222;
    white-space: nowrap;
}

/* --- Primary navigation --- */

.primary-nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.primary-nav a {
    display: block;
    padding: 8px 14px;
    border-radius: 4px;
    font-size: 0.95rem;
    font-weight: 500;
    color: #000;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}

.primary-nav a:hover,
.primary-nav .current-menu-item > a,
.primary-nav .current-page-ancestor > a {
    background: #f0f0f0;
    color: #111;
}

/* Mobile nav toggle (hidden on desktop) */
.nav-toggle {
    display: none;
    background: none;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 8px 10px;
    cursor: pointer;
    flex-shrink: 0;
}

.nav-toggle__bar {
    display: block;
    width: 22px;
    height: 2px;
    background: #444;
    margin: 4px 0;
    transition: transform 0.2s, opacity 0.2s;
}

/* ============================================================
   MAIN CONTENT
   ============================================================ */

.site-main {
    padding-top: 48px;
    padding-bottom: 64px;
}

.entry-content {
    max-width: 860px;
    margin-left: auto;
    margin-right: auto;
}

/* Basic typography inside content */
.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4 {
    line-height: 1.25;
    margin-top: 1.6em;
    margin-bottom: 0.5em;
    color: #111;
}

.entry-content h1 { font-size: 2rem; }
.entry-content h2 { font-size: 1.5rem; }
.entry-content h3 { font-size: 1.25rem; }
.entry-content h4 { font-size: 1.1rem; }

.entry-content p,
.entry-content ul,
.entry-content ol {
    margin-bottom: 1.2em;
}

.entry-content ul,
.entry-content ol {
    padding-left: 1.5em;
}

.entry-content a {
    color: #0066cc;
    text-decoration: underline;
}

.entry-content a:hover {
    color: #004499;
}

.entry-content img {
    margin-top: 1em;
    margin-bottom: 1em;
    border-radius: 4px;
}

/* WordPress alignment classes */
.entry-content .aligncenter {
    margin-left: auto;
    margin-right: auto;
}

.entry-content .alignleft {
    float: left;
    margin-right: 1.5em;
    margin-bottom: 0.5em;
}

.entry-content .alignright {
    float: right;
    margin-left: 1.5em;
    margin-bottom: 0.5em;
}

/* ============================================================
   BLOCKQUOTES / TESTIMONIALS
   ============================================================ */

.entry-content .wp-block-quote {
    border-left: 4px solid #e5e5e5;
    padding: 16px 20px;
    margin-bottom: 24px;
    background: #fafafa;
    border-radius: 0 4px 4px 0;
}

.entry-content .wp-block-quote p {
    margin-bottom: 8px;
    font-style: italic;
}

.entry-content .wp-block-quote cite {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: #555;
    font-style: normal;
}

/* ============================================================
   FOOTER
   ============================================================ */

.site-footer {
    background: #f7f7f7;
    border-top: 1px solid #e5e5e5;
    padding: 32px 0;
    text-align: center;
    font-size: 0.875rem;
    color: #666;
}

.site-footer a {
    color: #444;
    text-decoration: underline;
}

.site-footer a:hover {
    color: #111;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 768px) {

    .nav-toggle {
        display: block;
    }

    .primary-nav {
        display: none;
        width: 100%;
        border-top: 1px solid #e5e5e5;
        padding: 12px 0;
    }

    .primary-nav.is-open {
        display: block;
    }

    .site-header__inner {
        flex-wrap: wrap;
        padding-top: 12px;
        padding-bottom: 12px;
    }

    .primary-nav ul {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }

    .primary-nav a {
        width: 100%;
    }

    .site-logo img {
        max-width: 280px;
        max-height: 60px;
    }

    .site-logo {
        max-width: 280px;
    }

    .entry-content h1 { font-size: 1.6rem; }
    .entry-content h2 { font-size: 1.3rem; }
}

/* ============================================================
   TABLES
   ============================================================ */

.entry-content table {
    border-collapse: collapse;
    width: 100%;
}

.entry-content table,
.entry-content th,
.entry-content td {
    border: none;
}

.entry-content td,
.entry-content th {
    padding: 6px 16px 6px 0;
    vertical-align: top;
}
