/*
Theme Name: Service Pro Theme
Theme URI: [https://www.serviceproltd.co.uk/](https://www.serviceproltd.co.uk/)
Author: Service Pro Ltd
Author URI: [https://www.serviceproltd.co.uk/](https://www.serviceproltd.co.uk/)
Description: A custom, lightweight theme for Service Pro Ltd, focusing on performance and local SEO for electrical services in Kent.
Version: 5.67
Requires at least: 5.0
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: [https://www.gnu.org/licenses/gpl-2.0.html](https://www.gnu.org/licenses/gpl-2.0.html)
Text Domain: servicepro
*/

/* --- Global Styles --- */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    color: #333;
    background-color: #ffffff;
    line-height: 1.6;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    color: #c0392b;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

h1, h2, h3, h4 {
    color: #333333; /* Dark Gray from Logo */
    line-height: 1.3;
}

/* --- Header --- */
.site-header {
    background-color: #fff;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    position: relative;
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.site-branding {
    flex-shrink: 0;
}

.site-branding img {
    height: 60px; /* Desktop logo height */
    width: auto;
    object-fit: contain;
}

.header-right-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.contact-banner-link {
    text-decoration: none;
    border: 2px solid #c0392b;
    padding: 5px 15px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.contact-banner-link:hover {
    background-color: #c0392b;
    text-decoration: none;
}

.contact-banner-link:hover .contact-banner p,
.contact-banner-link:hover .contact-banner .phone-number {
    color: #fff;
}

.contact-banner {
    text-align: right;
}

.contact-banner p {
    margin: 0;
    font-size: 1.1em;
    color: #2c3e50;
}

.contact-banner .phone-number {
    font-weight: bold;
    color: #c0392b;
    font-size: 1.4em;
}

/* --- Navigation --- */
.main-navigation {
    display: block;
}

.menu-toggle {
    display: none; /* Hidden on desktop */
    background: none;
    border: 2px solid #333;
    padding: 8px 10px;
    border-radius: 5px;
    cursor: pointer;
}

.menu-toggle .icon-bar {
    display: block;
    width: 22px;
    height: 2px;
    background-color: #333;
    margin: 4px 0;
    transition: transform 0.3s, opacity 0.3s;
}

/* Animate hamburger to X */
.menu-toggle[aria-expanded="true"] .icon-bar:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}
.menu-toggle[aria-expanded="true"] .icon-bar:nth-child(2) {
    opacity: 0;
}
.menu-toggle[aria-expanded="true"] .icon-bar:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}


.primary-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 25px;
}

.primary-menu li a {
    text-decoration: none;
    color: #333;
    font-weight: bold;
    padding: 10px 0;
    border-bottom: 2px solid transparent;
    transition: border-color 0.3s, color 0.3s;
}

.primary-menu li a:hover,
.primary-menu .current-menu-item > a {
    color: #c0392b;
    border-bottom-color: #c0392b;
}

/* --- New Hero Section (Split Layout) --- */
.hero-split {
    background-color: #f0f2f5;
    padding: 80px 0;
}

.hero-split-container {
    display: flex;
    align-items: center;
    gap: 40px;
}

.hero-text {
    flex: 1;
    padding-right: 20px;
}

.hero-text h1 {
    font-size: 3em;
    color: #333333;
    margin-bottom: 20px;
}

.hero-text p {
    font-size: 1.2em;
    margin-bottom: 30px;
    max-width: 500px;
}

.hero-buttons {
    display: flex;
    gap: 15px;
}

.button-outline {
    background-color: transparent;
    color: #333333;
    border: 2px solid #333333;
}

.button-outline:hover {
    background-color: #333333;
    color: #fff;
}

.hero-image {
    flex: 1;
}

.hero-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

/* Page Hero (for inner pages) */
.page-hero {
    background: #ffffff;
    text-align: left;
    padding: 40px 0;
    border-bottom: 1px solid #eee;
}

.page-hero h1 {
    color: #333333;
    margin: 0;
    font-size: 2.5em;
    padding-bottom: 10px;
    border-bottom: 3px solid #c0392b;
    display: inline-block;
}

.page-content {
    padding: 40px 0;
}

/* --- Homepage Sections --- */
.section {
    padding: 60px 0;
    text-align: center;
}

.section-grey {
    background-color: #f0f2f5;
}

.section h2 {
    font-size: 2.5em;
    margin-bottom: 40px;
}

/* Why Choose Us Section */
.why-choose-us-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    text-align: center;
}

.feature-item {
    background: #fff;
    border: 1px solid #eee;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.feature-item .icon {
    font-size: 2.5em;
    margin-bottom: 20px;
    color: #c0392b;
    height: 50px;
    line-height: 50px;
}


.feature-item h3 {
    font-size: 1.4em;
    margin-top: 0;
    margin-bottom: 15px;
    color: #c0392b;
}

.why-choose-us-grid p {
    margin-bottom: 0;
    line-height: 1.5;
}

.services-button-container {
    margin-top: 40px;
}

.button {
    background-color: #c0392b;
    color: #fff;
    padding: 15px 30px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    display: inline-block;
    border: none;
    cursor: pointer;
    font-size: 1em;
}

.button:hover {
    background-color: #a53125;
    color: #fff;
    text-decoration: none;
}

.eicr-info-section {
    padding-bottom: 40px;
}

.eicr-info-section .button {
    background-color: #c0392b;
    padding: 12px 25px;
    margin-top: 20px;
    border-radius: 0;
}

/* --- Services Page Grid --- */
.services-intro {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 40px;
    font-size: 1.1em;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    text-align: left;
}

.service-item {
    background: #fff;
    border: 1px solid #eee;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

/* Make clickable cards inherit text color and remove underline */
a.service-item, a.feature-item,
a.service-item:hover, a.feature-item:hover {
    text-decoration: none;
    color: inherit;
}

a.service-item:hover, a.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.service-item .icon {
    font-size: 2.5em;
    margin-bottom: 15px;
    color: #c0392b;
    height: 45px;
}

.service-item h3 {
    margin-top: 0;
    font-size: 1.4em;
    color: #c0392b;
}

/* --- Blog Page (home.php) --- */
.blog-post-item {
    border: 1px solid #eee;
    padding: 30px;
    margin-bottom: 30px;
    border-radius: 8px;
    background: #fff;
}

.blog-post-item .entry-title {
    margin-top: 0;
    margin-bottom: 10px;
}

.blog-post-item .entry-title a {
    text-decoration: none;
    color: #333333;
}

.blog-post-item .entry-title a:hover {
    color: #c0392b;
}

.post-meta {
    font-size: 0.9em;
    color: #777;
    margin-bottom: 20px;
}

.read-more-link {
    display: inline-block;
    margin-top: 20px;
    font-weight: bold;
}

/* Pagination */
.pagination {
    margin-top: 40px;
}
.nav-links {
    display: flex;
    justify-content: center;
    gap: 10px;
}
.page-numbers {
    padding: 10px 15px;
    border: 1px solid #ddd;
    text-decoration: none;
    color: #333;
    border-radius: 4px;
}
.page-numbers.current,
.page-numbers:hover {
    background-color: #c0392b;
    color: #fff;
    border-color: #c0392b;
}


/* --- Contact Form --- */
.contact-section {
    padding: 60px 0;
}

.contact-form-container {
    background: #fff;
    border: 1px solid #eee;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.contact-form-container h2 .icon {
    margin-right: 10px;
    color: #c0392b;
}

.contact-form {
    max-width: 700px;
    margin: 0 auto;
    text-align: left;
}

.contact-form p {
    margin-bottom: 20px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 20px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

.contact-form .form-submit {
    text-align: center;
}

/* Honeypot field for spam protection */
.nickname-field {
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
}

.form-status-message {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    text-align: center;
}
.form-status-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}
.form-status-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.contact-intro-text .tel-number {
    font-weight: bold;
    color: #c0392b;
    white-space: nowrap;
}

/* --- Footer --- */
.site-footer {
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 40px 0 20px;
    text-align: center;
}

.site-footer a {
    color: #fff;
    text-decoration: none;
}

.site-footer .footer-link {
    display: inline-block;
    margin: 0 15px;
}
.site-footer .footer-link:hover {
    text-decoration: underline;
}

.footer-info {
    font-size: 0.9em;
    color: #bdc3c7;
    margin-top: 20px;
}

.footer-info p {
    margin: 5px 0;
}

.footer-info .about-link {
    font-weight: normal;
    text-decoration: none;
}
.footer-info .about-link:hover {
    text-decoration: underline;
}

.footer-logos {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 25px;
}

.footer-logos img {
    height: 40px;
    width: auto;
}


/* --- Cookie Banner --- */
.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #34495e;
    color: white;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    display: none; /* Hidden by default */
}
.cookie-consent-banner p {
    margin: 0;
    padding-right: 15px;
}
.cookie-consent-banner a {
    color: #1abc9c;
}
#cookie-consent-accept {
    background-color: #1abc9c;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
}

/* --- Floating Call Button --- */
.floating-call-button {
    display: none; /* Hidden by default on desktop */
}

/* --- Service Areas Grid (on page) --- */
.service-areas-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px 20px;
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.service-areas-grid .postcode {
    font-size: 0.85em;
    color: #777;
    margin-left: 8px;
    font-style: italic;
}

/* --- Location & Data Centre Page Two-Column Layout --- */
.location-page-content, .data-centre-page {
    display: flex;
    gap: 40px;
}

.location-page-content .main-content {
    flex: 2;
}

.location-page-content .sidebar-content {
    flex: 1;
}

.service-highlight-box {
    background: #f9f9f9;
    border: 1px solid #eee;
    padding: 25px;
    border-radius: 5px;
}

.service-highlight-box h3 {
    margin-top: 0;
    font-size: 1.4em;
    color: #2c3e50;
    border-bottom: 2px solid #c0392b;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.service-highlight-box .icon {
    margin-right: 10px;
    color: #c0392b;
}

.service-highlight-box ul {
    list-style: none;
    padding: 0;
}

.service-highlight-box li {
    margin-bottom: 15px;
}

.service-highlight-box p {
    margin: 0 0 15px;
}

.service-highlight-box strong {
    display: block;
    color: #333;
}

.data-centre-page .main-content .intro {
    font-size: 1.1em;
    font-style: italic;
    color: #555;
    margin-bottom: 30px;
}


/* --- Responsive Styles --- */

/* Tablet & Smaller Desktop */
@media (max-width: 900px) {
    .menu-toggle {
        display: block;
    }

    .main-navigation {
        order: 3;
    }
    
    .header-right-content {
        order: 2;
        margin-left: auto;
    }

    .primary-menu {
        display: none;
        flex-direction: column;
        background-color: #fff;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        z-index: 99;
        border-top: 1px solid #eee;
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
        padding: 10px 0;
    }
    .primary-menu.toggled-on {
        display: flex;
    }
    .primary-menu li {
        text-align: center;
    }
    .primary-menu li a {
        padding: 15px;
        display: block;
        border-bottom: 1px solid #eee;
    }
    .primary-menu li:last-child a {
        border-bottom: none;
    }
    
    .site-header .container {
        flex-wrap: wrap;
    }
}

/* Mobile Devices */
@media (max-width: 768px) {
    .hero-split-container {
        flex-direction: column;
        text-align: center;
    }
    .hero-text {
        padding-right: 0;
    }
    .hero-buttons {
        justify-content: center;
        width: 100%;
    }
    .hero-text h1 {
        font-size: 2.5em;
    }

    .page-hero h1 {
        font-size: 1.8em;
    }
    .section h2 {
        font-size: 2em;
    }
    .why-choose-us-grid, .service-areas-grid, .services-grid {
        grid-template-columns: 1fr;
    }
    
    .location-page-content, .data-centre-page {
        flex-direction: column;
    }
    
    .site-header .container {
        flex-wrap: nowrap;
    }

    .site-branding {
        margin-left: -10px; /* Nudge logo slightly to the left on mobile */
    }

    .site-branding img {
        height: 45px; /* Final fix: reduce logo size on mobile */
    }

    .contact-banner-link {
        padding: 2px 8px;
    }

    .contact-banner p {
        font-size: 0.8em;
    }

    .contact-banner .phone-number {
        font-size: 1em;
    }

    .cookie-consent-banner {
        flex-direction: column;
        text-align: center;
    }
    .cookie-consent-banner p {
        padding-right: 0;
        margin-bottom: 10px;
    }

    .floating-call-button {
        display: block;
        position: fixed;
        bottom: 20px;
        right: 20px;
        background-color: #25D366;
        color: white;
        width: 60px;
        height: 60px;
        border-radius: 50%;
        text-align: center;
        line-height: 60px;
        box-shadow: 2px 2px 10px rgba(0,0,0,0.2);
        z-index: 999;
    }
}
