/*
Theme Name: K4 Kitchens New
Theme URI:  https://thepcgp.co.uk
Description: Custom theme for K4 Kitchens. Based on bb-theme-child with custom page templates and components.
Author:      Steve Austen
Author URI:  https://thepcgp.co.uk
Company:     The PCGP
Version:     1.0.2
License:     GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: k4-kitchens-new
*/

/* Import parent theme styles if needed */
/* @import url("../bb-theme/style.css"); */

/* ═══════════════════════════════════════════
   Base Styles
   ═══════════════════════════════════════════ */

/* Reset browser defaults */
*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
}

body {
    font-family: "Poppins", sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
}

/* Container helper */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Clearfix */
.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

/* Screen reader text */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ═══════════════════════════════════════════
   Content Layout
   ═══════════════════════════════════════════ */
/* Main content area */
.content-area {
    padding: 143px 0 60px; /* Top padding accounts for fixed header (33px top bar + 80px main header + 30px padding) */
}

/* Account for WordPress admin bar */
.admin-bar .content-area {
    padding-top: 175px; /* 143px header + 32px admin bar */
}

@media screen and (max-width: 782px) {
    .admin-bar .content-area {
        padding-top: 189px; /* 143px header + 46px admin bar */
    }
}

/* Post list */
.post-list {
    display: grid;
    gap: 40px;
}

/* Single post/article */
article {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

article:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

/* Entry header */
.entry-header {
    padding: 30px 30px 20px;
}

.entry-title {
    font-size: 28px;
    font-weight: 700;
    color: #231f20;
    margin: 0 0 10px 0;
    line-height: 1.2;
}

.entry-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.entry-title a:hover {
    color: #f3af2e;
}

/* Entry meta */
.entry-meta {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
}

.entry-meta a {
    color: inherit;
    text-decoration: none;
}

.entry-meta a:hover {
    color: #f3af2e;
}

.cat-links {
    margin-left: 10px;
}

/* Post thumbnail */
.post-thumbnail {
    margin: 0 30px 20px;
}

.post-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 6px;
}

/* Entry content */
.entry-content {
    padding: 0 30px 30px;
}

.entry-content p {
    margin-bottom: 1em;
    line-height: 1.8;
}

.read-more {
    display: inline-block;
    background: #f3af2e;
    color: #fff;
    padding: 10px 25px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    margin-top: 15px;
    transition: all 0.3s ease;
}

.read-more:hover {
    background: #e2a027;
    color: #fff;
    text-decoration: none;
    transform: translateY(-1px);
}

/* Entry footer */
.entry-footer {
    padding: 20px 30px 30px;
    border-top: 1px solid #eee;
    margin-top: 20px;
}

.tag-links {
    font-size: 14px;
    color: #666;
}

.tag-links a {
    color: #f3af2e;
    text-decoration: none;
}

.tag-links a:hover {
    text-decoration: underline;
}

/* Page header */
.page-header {
    margin-bottom: 40px;
    text-align: center;
}

.page-title {
    font-size: 42px;
    font-weight: 800;
    color: #231f20;
    margin: 0;
}

/* No results */
.no-results {
    text-align: center;
    padding: 60px 20px;
}

.no-results .page-title {
    margin-bottom: 20px;
}

.no-results .page-content p {
    font-size: 18px;
    color: #666;
    margin-bottom: 30px;
}

/* Search form */
.search-form {
    max-width: 400px;
    margin: 0 auto;
}

.search-form label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
}

.search-form input[type="search"] {
    width: 100%;
    padding: 12px 20px;
    border: 1px solid #ddd;
    border-radius: 50px;
    font-size: 16px;
}

.search-form input[type="submit"] {
    background: #f3af2e;
    color: #fff;
    border: none;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 15px;
    transition: background 0.3s ease;
}

.search-form input[type="submit"]:hover {
    background: #e2a027;
}

/* Pagination */
.pagination {
    margin-top: 60px;
    text-align: center;
}

.pagination .nav-links {
    display: flex;
    justify-content: center;
    gap: 10px;
    align-items: center;
}

.pagination a, .pagination span {
    display: inline-block;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    text-decoration: none;
    color: #231f20;
    transition: all 0.3s ease;
}

.pagination a:hover {
    background: #f3af2e;
    border-color: #f3af2e;
    color: #fff;
}

.pagination .current {
    background: #231f20;
    border-color: #231f20;
    color: #fff;
}

/* Sidebar layout */
.content-area + .sidebar {
    width: 300px;
    margin-left: 40px;
}

/* Two column layout for blog/archive */
@media (min-width: 992px) {
    .content-area {
        display: flex;
        gap: 40px;
    }
    
    .content-area > .post-list {
        flex: 1;
    }
    
    .content-area > .sidebar {
        flex-shrink: 0;
        margin-left: 0;
    }
}

/* ═══════════════════════════════════════════
   Header Styles
   ═══════════════════════════════════════════ */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: #fff;
}

/* Account for WordPress admin bar */
.admin-bar .site-header {
    top: 32px;
}

/* WordPress admin bar changes at 782px and below to 46px height */
@media screen and (max-width: 782px) {
    .admin-bar .site-header {
        top: 46px;
    }
}

/* Between 783px and 924px, ensure header stays below the full admin bar */
@media screen and (min-width: 783px) and (max-width: 924px) {
    .admin-bar .site-header {
        top: 32px;
        z-index: 999;
    }
    
    /* Ensure admin bar stays on top */
    .admin-bar #wpadminbar {
        z-index: 99999;
    }
}

/* Top Bar – replicates BB theme .fl-page-bar structure */
.top-bar {
    background: #f3af2e;
    color: #fff;
    font-size: 12px;
    line-height: 14px;
}

.top-bar .container {
    padding-top: 5px;
    padding-bottom: 5px;
}

.top-bar-row {
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
}

.top-bar-col-left {
    flex: 1;
    text-align: left;
    white-space: nowrap;
}

.top-bar-col-right {
    flex-shrink: 0;
    text-align: right;
    margin-left: 20px;
}

.top-bar-item {
    display: inline-block;
    vertical-align: middle;
    color: #fff;
    text-decoration: none;
    padding: 5px 0;
    margin-right: 15px;
    transition: opacity 0.3s ease;
}

.top-bar-item:hover {
    opacity: 0.8;
    color: #fff;
    text-decoration: none;
}

.top-bar-item i {
    font-size: 13px;
    vertical-align: middle;
    margin-right: 5px;
}

.top-bar-item span {
    vertical-align: middle;
}

.top-bar-tagline {
    font-weight: 500;
}

.top-bar-social {
    display: inline-block;
    vertical-align: middle;
    color: #fff;
    text-decoration: none;
    padding: 2px;
    transition: opacity 0.3s ease;
}

.top-bar-social:hover {
    opacity: 0.8;
    color: #fff;
}

.top-bar-social i {
    font-size: 14px;
    vertical-align: middle;
    width: 24px;
    height: 24px;
    line-height: 24px;
    text-align: center;
}

/* Main Header */
.main-header {
    background: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: relative;
}

.main-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
    min-height: 80px;
}

/* Logo */
.site-logo {
    flex-shrink: 0;
}

.site-logo img {
    height: auto;
    width: auto;
    max-height: 80px;
    display: block;
}

/* Main Navigation */
.main-navigation {
    flex: 1;
    display: flex;
    justify-content: center;
    margin: 0 40px;
}

.primary-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
    gap: 35px;
}

.primary-menu li {
    margin: 0;
}

.primary-menu a {
    color: #231f20;
    text-decoration: none;
    font-weight: 400;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
    white-space: nowrap;
}

.primary-menu a:hover {
    color: #f3af2e;
}

/* Contact Button */
.header-contact {
    flex-shrink: 0;
}

.contact-btn {
    background: #231f20;
    color: #fff;
    padding: 12px 28px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    display: inline-block;
}

.contact-btn:hover {
    background: #f3af2e;
    color: #fff;
    text-decoration: none;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    padding: 10px;
    cursor: pointer;
}

.hamburger-line {
    display: block;
    width: 25px;
    height: 3px;
    background: #231f20;
    margin: 5px 0;
    transition: all 0.3s ease;
}

.menu-toggle.is-active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.is-active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.menu-toggle.is-active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* ═══════════════════════════════════════════
   Footer Styles – replicates original K4 footer
   ═══════════════════════════════════════════ */

/* Full-width light background */
.site-footer {
    background: #f9f9f9;
    color: #333;
    padding: 0;
    border-top: 3px solid #f3af2e;
}

/* Main footer area */
.footer-main {
    padding: 50px 0 30px;
}

/* 4-column grid */
.footer-columns {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1.2fr 1.2fr;
    gap: 40px;
    margin-bottom: 30px;
}

/* Column titles */
.footer-title {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 20px 0;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Column 1: Logo & About */
.footer-logo {
    margin-bottom: 15px;
}

.footer-logo img {
    max-height: 70px;
    width: auto;
    display: block;
}

.footer-description {
    color: #666;
    line-height: 1.7;
    font-size: 14px;
    margin: 0 0 20px 0;
}

.footer-social-title {
    font-size: 14px;
    font-weight: 700;
    margin: 0 0 10px 0;
    color: #333;
}

/* Social link circles */
.footer-social {
    display: flex;
    gap: 10px;
}

.social-link {
    width: 36px;
    height: 36px;
    background: #f3af2e;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 16px;
}

.social-link:hover {
    background: #231f20;
    color: #fff;
    transform: translateY(-2px);
}

/* Column 2: Quick Links */
.footer-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-menu li {
    margin-bottom: 8px;
}

.footer-menu a {
    color: #555;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.footer-menu a:hover {
    color: #f3af2e;
}

/* Columns 3 & 4: Detail items with icons */
.footer-detail-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.footer-detail-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.footer-detail-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    background: #f3af2e;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 14px;
}

.footer-detail-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.footer-detail-content strong {
    font-size: 14px;
    font-weight: 700;
    color: #333;
}

.footer-detail-content span,
.footer-detail-content a {
    font-size: 14px;
    color: #555;
    text-decoration: none;
    line-height: 1.5;
}

.footer-detail-content a:hover {
    color: #f3af2e;
}

/* Checkatrade logo */
.footer-checkatrade {
    padding: 10px 0 0;
}

.checkatrade-logo {
    max-height: 50px;
    width: auto;
    display: block;
}

/* Bottom bar – yellow background, full width */
.footer-bottom-bar {
    background: #f3af2e;
    padding: 12px 0;
}

.footer-bottom-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-bottom-bar .copyright {
    margin: 0;
    font-size: 13px;
    color: #fff;
    font-style: italic;
}

/* Quick links in bottom bar */
.quick-links-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 8px;
    align-items: center;
}

.quick-links-menu li {
    display: flex;
    align-items: center;
}

/* Separator between quick links */
.quick-links-menu li + li::before {
    content: '|';
    margin-right: 8px;
    color: #fff;
    font-size: 13px;
}

.quick-links-menu a {
    color: #fff;
    text-decoration: underline;
    font-size: 13px;
    transition: opacity 0.3s ease;
}

.quick-links-menu a:hover {
    opacity: 0.8;
    color: #fff;
}

/* Hide duplicate Contact Us from nav menu */
.hide-contact-us {
    display: none !important;
}

/* ═══════════════════════════════════════════
   Responsive
   ═══════════════════════════════════════════ */

/* Large tablets / small desktops – tighten spacing */
@media (max-width: 1200px) {
    .primary-menu {
        gap: 20px;
    }
    
    .main-navigation {
        margin: 0 25px;
    }
    
    .primary-menu a {
        font-size: 14px;
    }
    
    .contact-btn {
        padding: 10px 20px;
        font-size: 12px;
    }
}

/* Tablets – further reduce */
@media (max-width: 991px) {
    /* Top bar – hide tagline on tablet */
    .top-bar-tagline {
        display: none;
    }
    
    /* Main header – reduce sizes */
    .main-header-inner {
        padding: 10px 0;
        min-height: 60px;
    }
    
    .site-logo img {
        max-height: 55px;
    }
    
    .main-navigation {
        margin: 0 15px;
    }
    
    .primary-menu {
        gap: 12px;
    }
    
    .primary-menu a {
        font-size: 13px;
        letter-spacing: 0.3px;
    }
    
    .contact-btn {
        padding: 8px 16px;
        font-size: 11px;
    }
    
    .footer-columns {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
}

/* Mobile breakpoint – hamburger menu */
@media (max-width: 810px) {
    /* Top bar – show only phone and social icons */
    .top-bar-col-left,
    .top-bar-col-right {
        width: 50%;
        text-align: center;
    }
    
    .top-bar-col-left {
        text-align: left;
    }
    
    .top-bar-col-right {
        text-align: right;
        margin-left: 0;
        margin-top: 0;
    }
    
    .top-bar-row {
        flex-wrap: nowrap;
    }
    
    /* Hide all items except phone in left column */
    .top-bar-col-left .top-bar-item {
        display: none;
    }
    
    .top-bar-col-left .top-bar-item[href^="tel"] {
        display: inline-block;
        margin-right: 0;
    }
    
    /* Main header – mobile layout */
    .main-header-inner {
        padding: 10px 0;
        min-height: 60px;
        flex-wrap: nowrap;
    }
    
    .site-logo img {
        max-height: 45px;
    }
    
    /* Show hamburger toggle */
    .menu-toggle {
        display: block;
        order: 3;
    }
    
    /* Hide the separate contact button on mobile (it goes inside the menu) */
    .header-contact {
        display: none;
    }
    
    /* Navigation – off-canvas dropdown */
    .main-navigation {
        position: static;
        margin: 0;
        flex: 0 0 auto;
        order: 3;
    }
    
    .primary-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        flex-direction: column;
        padding: 0;
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
        gap: 0;
        z-index: 999;
    }
    
    .primary-menu.is-open {
        display: flex;
    }
    
    .primary-menu li {
        margin: 0;
        border-bottom: 1px solid #eee;
    }
    
    .primary-menu li:last-child {
        border-bottom: none;
    }
    
    .primary-menu a {
        display: block;
        padding: 14px 20px;
        font-size: 14px;
        letter-spacing: 0.3px;
    }
    
    .primary-menu a:hover {
        background: #f9f9f9;
    }
    
    /* Show Contact Us inside the mobile menu */
    .primary-menu .hide-contact-us {
        display: list-item !important;
    }
    
    .primary-menu .hide-contact-us a {
        background: #231f20;
        color: #fff;
        text-align: center;
        font-weight: 600;
    }
    
    .primary-menu .hide-contact-us a:hover {
        background: #f3af2e;
    }
    
    /* Footer responsive – 2 columns on mobile */
    .footer-columns {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
    
    .footer-detail-icon {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }
    
    .footer-bottom-inner {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .quick-links-menu {
        justify-content: center;
    }
}

/* Small mobile – single column footer */
@media (max-width: 600px) {
    .footer-columns {
        grid-template-columns: 1fr;
    }
    
    .footer-col {
        text-align: center;
    }
    
    .footer-logo img {
        margin: 0 auto 15px;
    }
    
    .footer-social {
        justify-content: center;
    }
    
    .footer-detail-item {
        justify-content: center;
    }
}

/* Small mobiles */
@media (max-width: 480px) {
    /* Hide hours and tagline on very small screens */
    .top-bar-item:not([href]) {
        display: none;
    }
    
    .top-bar-item {
        margin-right: 10px;
        font-size: 11px;
    }
    
    .site-logo img {
        max-height: 38px;
    }
    
    .primary-menu a {
        padding: 12px 15px;
        font-size: 13px;
    }
}
