/*
Theme Name:  NineFiveOne
Theme URI:   https://ninefiveone.ca
Description: Kadence child theme — Ontario's Porsche 944 & 968 community
Author:      Roger Stopford
Template:    kadence
Version:     1.0
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ─── Global palette (Kadence CSS vars) ─── */
:root {
    --global-palette1: #CC0000;
    --global-palette2: #b30000;
    --global-palette3: #1C1C1C;
    --global-palette4: #333333;
    --global-palette5: #555555;
    --global-palette6: #888888;
    --global-palette7: #f4f4f4;
    --global-palette8: #f9f9f9;
    --global-palette9: #ffffff;
    --global-fallback-font: 'Inter', sans-serif;
}

/* ─── Base typography ─── */
body {
    font-family: 'Inter', sans-serif;
    color: #1C1C1C;
    background: #ffffff;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    letter-spacing: -0.025em;
    color: #1C1C1C;
    line-height: 1.2;
}

p, li, td, input, textarea, select {
    font-family: 'Inter', sans-serif;
}

a {
    color: #CC0000;
}

a:hover {
    color: #b30000;
}

/* ─── Header ─── */
.site-header,
#masthead {
    background: #ffffff !important;
    border-bottom: 1px solid #eeeeee;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.site-branding .site-title a,
.site-branding .site-title {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 1.3rem;
    letter-spacing: -0.03em;
    color: #1C1C1C !important;
}

/* ─── Navigation ─── */
.primary-navigation a,
.nav--toggle-sub a,
#site-navigation a {
    font-family: 'Inter', sans-serif !important;
    font-weight: 500;
    font-size: 0.82rem;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: #1C1C1C !important;
    transition: color 0.15s ease;
}

.primary-navigation a:hover,
#site-navigation a:hover {
    color: #CC0000 !important;
}

/* Kadence header nav */
.header-navigation .menu-container > ul > li > a {
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: #1C1C1C;
}

.header-navigation .menu-container > ul > li > a:hover {
    color: #CC0000;
}

/* ─── Buttons ─── */
.wp-block-button__link,
.wp-element-button,
.button,
.btn,
input[type="submit"],
.tribe-events .tribe-events-c-nav__next,
.tribe-events .tribe-events-c-nav__prev {
    background-color: #CC0000 !important;
    border-color: #CC0000 !important;
    color: #ffffff !important;
    font-family: 'Inter', sans-serif !important;
    font-weight: 600;
    font-size: 0.82rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 13px 28px;
    border-radius: 3px;
    transition: background-color 0.2s ease;
    text-decoration: none !important;
}

.wp-block-button__link:hover,
.button:hover,
input[type="submit"]:hover {
    background-color: #b30000 !important;
    border-color: #b30000 !important;
}

.wp-block-button.is-style-outline .wp-block-button__link {
    background-color: transparent !important;
    color: #CC0000 !important;
    border: 2px solid #CC0000 !important;
}

.wp-block-button.is-style-outline .wp-block-button__link:hover {
    background-color: #CC0000 !important;
    color: #ffffff !important;
}

/* ─── Post / Article cards ─── */
.wp-block-post {
    border: 1px solid #ebebeb;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    background: #ffffff;
}

.wp-block-post:hover {
    box-shadow: 0 6px 24px rgba(0,0,0,0.09);
    transform: translateY(-2px);
}

.wp-block-post-featured-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.wp-block-post-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
    padding: 1rem 1rem 0;
}

.wp-block-post-title a {
    color: #1C1C1C !important;
    text-decoration: none;
}

.wp-block-post-title a:hover {
    color: #CC0000 !important;
}

.wp-block-post-date {
    font-size: 0.78rem;
    color: #888888;
    padding: 0 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.wp-block-post-excerpt {
    font-size: 0.9rem;
    color: #555555;
    padding: 0.5rem 1rem 1.25rem;
    line-height: 1.6;
}

/* ─── Section layout ─── */
.wp-block-group.alignfull {
    padding-left: clamp(1.5rem, 5vw, 80px);
    padding-right: clamp(1.5rem, 5vw, 80px);
    max-width: 100%;
}

.nfo-section-title {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: 700;
    text-align: center;
    margin-bottom: 0.5rem;
}

.nfo-section-subtitle {
    text-align: center;
    color: #666666;
    margin-bottom: 2.5rem;
    font-size: 1rem;
}

/* ─── Hero / Cover block ─── */
.wp-block-cover {
    min-height: 580px !important;
}

.wp-block-cover .wp-block-cover__inner-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 1rem;
    padding: 2rem;
}

.wp-block-cover h1 {
    font-size: clamp(2.2rem, 5vw, 4rem);
    font-weight: 700;
    letter-spacing: -0.04em;
    color: #ffffff;
    margin: 0;
    text-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

.wp-block-cover p {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: rgba(255,255,255,0.9);
    margin: 0;
    max-width: 580px;
}

/* ─── Events Calendar ─── */
.tribe-events .tribe-event-url,
.tribe-events a:not(.tribe-events-c-search__button) {
    color: #CC0000 !important;
}

.tribe-events .tribe-events-c-nav__next-text,
.tribe-events .tribe-events-c-nav__prev-text {
    color: #CC0000;
}

.tribe-events .tribe-event-featured-image img {
    border-radius: 6px;
}

.tribe-common .tribe-common-c-btn-border,
.tribe-common .tribe-common-c-btn-border:active,
.tribe-common .tribe-common-c-btn-border:focus,
.tribe-common .tribe-common-c-btn-border:hover {
    border-color: #CC0000;
    color: #CC0000;
}

/* ─── Classifieds (classified-listing plugin) ─── */
.rtcl .listing-card,
.rtcl .rtcl-listing-card {
    border-radius: 8px;
    border: 1px solid #ebebeb;
    transition: box-shadow 0.2s ease;
}

.rtcl .listing-card:hover,
.rtcl .rtcl-listing-card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.09);
}

/* ─── SIG / MailPoet ─── */
.mailpoet_form .mailpoet_submit {
    background-color: #CC0000 !important;
    border-color: #CC0000 !important;
}

/* ─── Footer ─── */
.site-footer,
#colophon {
    background: #1C1C1C !important;
    color: #aaaaaa !important;
    padding: 3rem clamp(1.5rem, 5vw, 80px) !important;
    font-size: 0.88rem;
}

.site-footer a,
#colophon a {
    color: #aaaaaa;
    text-decoration: none;
}

.site-footer a:hover,
#colophon a:hover {
    color: #CC0000;
}

.site-footer .site-info,
.site-footer .copyright {
    color: #666666;
    font-size: 0.82rem;
}

/* ─── Utilities ─── */
.nfo-red { color: #CC0000; }
.nfo-divider {
    border: none;
    border-top: 2px solid #CC0000;
    width: 48px;
    margin: 1rem auto 2rem;
}

/* ─── Hide Kadence page title banner on home and blog pages ─── */
.home .entry-hero,
.home .entry-hero-container,
.home .entry-header,
.home .entry-title,
.home .page-title,
.home .site-main > article > header,
.blog .entry-hero,
.blog .entry-hero-container,
.blog .entry-header,
.blog .entry-title,
.blog .page-title,
.blog .site-main > header,
.archive .entry-hero,
.archive .entry-hero-container {
    display: none !important;
}

/* Remove top padding so hero butts up against the nav */
.home .site-main,
.home article.page,
.home .entry-content {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* Remove bottom margin artifacts */
.home .entry-content > *:first-child {
    margin-top: 0 !important;
}

/* ─── Photo cards (sobmw.ca style — full-height cards with image backgrounds) ─── */
.nfo-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    width: 100%;
}

.nfo-card {
    position: relative;
    height: 500px;
    background-size: cover;
    background-position: center;
    overflow: hidden;
    text-decoration: none;
    display: block;
}

.nfo-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.88) 0%,
        rgba(0, 0, 0, 0.35) 50%,
        rgba(0, 0, 0, 0.1) 100%
    );
    transition: background 0.35s ease;
    z-index: 1;
}

.nfo-card:hover::before {
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.92) 0%,
        rgba(0, 0, 0, 0.55) 100%
    );
}

.nfo-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.nfo-card:hover img {
    transform: scale(1.06);
}

.nfo-card__body {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem 2rem 2.25rem;
    z-index: 2;
}

.nfo-card__label {
    display: inline-block;
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #CC0000;
    margin-bottom: 0.6rem;
}

.nfo-card__title {
    font-family: 'Inter', sans-serif;
    font-size: 1.45rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.2;
    margin: 0 0 0.5rem;
    letter-spacing: -0.02em;
}

.nfo-card__sub {
    font-family: 'Inter', sans-serif;
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.75);
    margin: 0 0 1.25rem;
    line-height: 1.5;
}

.nfo-card__link {
    font-family: 'Inter', sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #ffffff !important;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    opacity: 0.7;
    transition: opacity 0.2s ease, gap 0.2s ease;
}

.nfo-card:hover .nfo-card__link {
    opacity: 1;
    gap: 0.65rem;
}

.nfo-card__link::after {
    content: '→';
}

@media (max-width: 768px) {
    .nfo-cards {
        grid-template-columns: 1fr;
    }
    .nfo-card {
        height: 320px;
    }
}

/* ─── Photo strip (3-column gallery, sobmw.ca style) ─── */
.nfo-photo-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    width: 100%;
}

.nfo-photo-strip__item {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    cursor: pointer;
}

.nfo-photo-strip__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.nfo-photo-strip__item:hover img {
    transform: scale(1.05);
}

.nfo-photo-strip__caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.72) 0%, transparent 100%);
    color: #ffffff;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 2.5rem 1.25rem 1rem;
    transform: translateY(4px);
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.nfo-photo-strip__item:hover .nfo-photo-strip__caption {
    opacity: 1;
    transform: translateY(0);
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
    .wp-block-cover {
        min-height: 420px !important;
    }

    .wp-block-cover h1 {
        font-size: 2rem;
    }
}
