/*
Theme Name:   Blocksy Child
Theme URI:    https://yoursite.com
Description:  Child theme for Blocksy
Author:       Your Name
Author URI:   https://yoursite.com
Template:     blocksy
Version:      1.0.0
Text Domain:  blocksy-child
*/

/* =============================================================
   Services Grid – services-grid.css
   Place in: /wp-content/themes/your-theme/css/services-grid.css
   ============================================================= */

/* ── Custom properties ───────────────────────────────────────── */
:root {
    --sg-gap:            2rem;
    --sg-col-min:        260px;      /* minimum card width before wrapping */
    --sg-radius:         8px;
    --sg-shadow:         0 2px 12px rgba(0, 0, 0, 0.08);
    --sg-shadow-hover:   0 6px 24px rgba(0, 0, 0, 0.14);
    --sg-bg:             #ffffff;
    --sg-border:         #e8e8e8;
    --sg-text:           #333333;
    --sg-text-light:     #666666;
    --sg-accent:         #0073aa;    /* swap for your brand colour */
    --sg-accent-hover:   #005f8d;
    --sg-thumb-ratio:    56.25%;     /* 16 : 9 thumbnail aspect ratio */
    --sg-transition:     0.22s ease;
}

.container {
    width:1300px;
    margin: 0px auto;
}

.btn {
    background: #d52a2b;
    color: #fff;
    font-weight: bold;
    padding: 12px 32px;
    border-radius: 8px;
    text-align:center;
}

.hero-section {
    position:relative;
}

.hero-overlay {
    background:rgba(0,0,0,.5);
    width:100%;
    height:100%;
    position:absolute;
    top: 0;
    left: 0;
    z-index:10;
}

.hero-section .container {
    position:relative;
    z-index: 20;
}

.hero-content {
    padding: 150px 0;
    width: 50%;
    min-width: 300px;
}

.hero-content * {
    color: #fff;
}

.hero-section a.wp-block-button__link {
    font-size:24px;
    width:auto;
}

article.service .entry-header,
article.repair-service .entry-header,
article.manufacturer .entry-header {
    display:none;
}

/* ── Grid container ──────────────────────────────────────────── */
.services-grid {
    display:         flex;
    flex-wrap:       wrap;
    gap:             var(--sg-gap);
    list-style:      none;
    margin:          0;
    padding:         0;
}


/* ── Individual card ─────────────────────────────────────────── */
.services-grid__item {
    /* Three equal columns; falls back to 2 then 1 via flex-basis */
    flex:            1 1 calc(33.333% - var(--sg-gap));
    min-width:       var(--sg-col-min);

    display:         flex;
    flex-direction:  column;

    background:      var(--sg-bg);
    border:          1px solid var(--sg-border);
    border-radius:   var(--sg-radius);
    box-shadow:      var(--sg-shadow);
    overflow:        hidden;
    transition:      box-shadow var(--sg-transition),
                     transform  var(--sg-transition);
}

.services-grid__item:hover {
    box-shadow: var(--sg-shadow-hover);
    transform:  translateY(-3px);
}


/* ── Thumbnail ───────────────────────────────────────────────── */
.services-grid__thumbnail {
    position:        relative;
    width:           100%;
    padding-bottom:  var(--sg-thumb-ratio); /* aspect-ratio lock */
    overflow:        hidden;
    background:      #f0f0f0;
}

.services-grid__thumbnail a {
    display: block;
}

.services-grid__img {
    position:   absolute;
    inset:      0;
    width:      100%;
    height:     100%;
    object-fit: cover;
    transition: transform var(--sg-transition);
}

.services-grid__item:hover .services-grid__img {
    transform: scale(1.04);
}


/* ── Card body ───────────────────────────────────────────────── */
.services-grid__body {
    display:        flex;
    flex-direction: column;
    flex:           1;          /* pushes CTA to bottom of card */
    padding:        1.5rem;
    gap:            0.75rem;
}


/* ── Title ───────────────────────────────────────────────────── */
h3.services-grid__title {
    margin:      0 !important;
    font-size:   1.15rem;
    font-weight: 700;
    line-height: 1.3;
    color:       var(--sg-text);
}

.services-grid__title a {
    display:flex;
    justify-content:space-between;
}

.services-grid__title a {
    color:           inherit;
    text-decoration: none;
    transition:      color var(--sg-transition);
}

.services-grid__title a:hover,
.services-grid__title a:focus {
    color: #d52a2b;
}


/* ── Excerpt ─────────────────────────────────────────────────── */
.services-grid__excerpt {
    margin:      0;
    font-size:   0.9rem;
    line-height: 1.65;
    color:       var(--sg-text-light);
    flex:        1;
}

.services-grid__excerpt p {
    margin: 0;
}


/* ── CTA link ────────────────────────────────────────────────── */
.services-grid__cta {
    display:         inline-flex;
    align-items:     center;
    gap:             0.3em;
    align-self:      flex-start;
    margin-top:      auto;

    font-size:       0.875rem;
    font-weight:     600;
    text-decoration: none;
    color:           var(--sg-accent);
    transition:      color var(--sg-transition),
                     gap   var(--sg-transition);
}

.services-grid__cta:hover,
.services-grid__cta:focus {
    color: var(--sg-accent-hover);
    gap:   0.5em;   /* subtle arrow nudge on hover */
}


/* ── Empty state ─────────────────────────────────────────────── */
.services-grid__empty {
    width:       100%;
    text-align:  center;
    color:       var(--sg-text-light);
    font-style:  italic;
    padding:     2rem 0;
}

/* SERVICE SINGLE */
.service-cta {
    position:relative;
}
.service-cta .container {
    display:flex;
    flex-wrap:wrap;
    border-top-left-radius:12px;
    border-top-right-radius:12px;
    overflow:hidden;
}
.service-cta-content {
    width:50%;
    background: #d52a2b;
    color: #fff;
    padding: 32px;
}
.service-cta-content h2,
.service-cta-content h3,
.service-cta-content h4 {
    color: #fff;
}
.service-cta-content a {
    width: auto;
    background: #fff;
    color: #d52a2b;
}
.service-cta-image {
    width:50%;
}

/* CAREERS GRID */
.careers-grid {
    display:flex;
}
.careers-grid {
    display:flex;
    flex-wrap:wrap;
}
.careers-grid__body {
    display:flex;
    justify-content:space-between;
    padding: 16px;
    align-items:flex-start;
}
.careers-grid__body a {
    padding: 16px;
    min-width: 125px;
    margin-left: 32px;
}
.careers-grid__item {
    width:100%;
    margin: 0 0 8px 0;
    border: 1px solid #ddd;
    border-radius: 6px;
}

/* PREFOOTER */
.pre-footer {
    padding: 48px 0;
    background: #333;
    color: #fff;
}
.pre-footer .container {
    display:flex;
    flex-wrap:wrap;
}
.pre-footer-left {
    width:50%;
}
.contact-item {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 24px;
}
.pre-footer-right {
    width:50%;
}
.pre-footer .wpforms-wrapper {
    margin-left: 48px;
}

.footer-title {
    color:#fff;
}
.contact-item {
    display:flex;
}
.contact-item i {
    width: 40px;
    font-size: 40px;
    margin-right: 24px;
}

/* BLOG */
article.post .entry-header .page-title {
    display:none;
}
article.post .entry-meta .meta-author {
    display:none;
}
.entry-card .entry-meta {
    display:none;
}

.blog-hero {
    padding: 150px 0;
    text-align:center;
}

.blog-hero h1 {
    padding:0 48px;
    color: #fff;
}


/* ── Responsive breakpoints ──────────────────────────────────── */

/* 2 columns on tablets */
@media ( max-width: 900px ) {
    .services-grid__item {
        flex-basis: calc(50% - var(--sg-gap));
    }
}

/* 1 column on mobile */
@media ( max-width: 560px ) {
    .services-grid__item {
        flex-basis: 100%;
    }
}