/* ═══════════════════════════════════════════════════════════
   home-revised-v2.css
   
   Requires: troqc-base.css loaded first (provides :root vars).
   
   Changes from home-revised.css:
   - Removed :root block (now in troqc-base.css)
   - All hardcoded colors replaced with var() references
   - .site-orientation homepage override lives here (base rule in troqc-base.css)
   - All layout and structure identical
   
   Location: wp-content/themes/troqc/css/home-revised-v2.css
   ═══════════════════════════════════════════════════════════ */

/* ─── BASE LAYOUT ─── */

.home-page {
    display: block;
    width: 100%;
    max-width: 100%;
    padding: 0;
}

main.home-page > .home-wrapper {
    padding: 2rem;
    text-align: center;
    position: relative;
}

.home-inner {
    background: var(--surface-card);
    max-width: 1100px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

/* ─── HERO ─── */

.home-hero-titles {
    margin-bottom: 1.5rem;
}

.home-logo {
    width: clamp(200px, 50vw, 600px); /* Min 200px, preferred 50% of viewport width, max 600px */
    height: auto; /* Maintain aspect ratio */
    display: block;
    margin: 0 auto;
}

.home-tagline {
    font-family: var(--font-handwritten);
    font-size: clamp(1rem, 3vw, 2rem); /* Increased min from 1.25rem to 1rem to prevent super small fonts */
    color: var(--text-secondary);
    margin: 0;
    font-weight: 400;
}

.home-hero-image-wrap {
    max-width: 800px;
    margin: 2rem auto 0;
}

.home-hero-image {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ─── HERO BUTTONS ─── */

.home-hero-buttons {
    display: flex;
    flex-flow: wrap;
    gap: 0.75rem;
    align-items: center;
    justify-content: center;
    margin-top: 1.5rem;
}

.home-hero-secondary {
    margin-top: 0.6rem;
    text-align: center;
}

.home-secondary-link {
    color: var(--brand-teal);
    text-decoration: none;
    font-size: 0.9rem;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
}

.home-secondary-link:hover {
    border-bottom-color: var(--brand-teal) !important;
}

/* ─── DIVIDER STARS ─── */

.ranch-divider-stars {
    text-align: center;
    margin: 40px 0 20px;
    font-size: 1.5rem;
    color: #ccc;
    letter-spacing: 0.5em;
}

/* ─── ORIENTATION LINE ─── */

.site-orientation {
    font-family: var(--font-handwritten);
    font-size: 2rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

/* ─── CTA CARDS ─── */

.cta-section-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    max-width: 1000px;
    margin: 2rem auto;
    padding: 0 2rem;
}

.cta-card {
    background: var(--surface-card);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-card);
    padding: 2rem 1.5rem;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.cta-card-link-wrap {
    text-decoration: none;
    color: inherit;
    display: block;
    cursor: pointer;
    position: relative;
}

/* Suppress global a::after sliding underline on card links */
.cta-card-link-wrap::after,
.latest-card::after,
.cast-teaser::after {
    display: none !important;
}

.cta-card-link-wrap:hover {
    box-shadow: var(--shadow-card-hover) !important;
    border-color: var(--brand-wine) !important;
    transform: translateY(-3px) !important;
}

.cta-card-illustration {
    display: block;
    max-width: 220px;
    height: auto;
    margin: 0 auto;
}

.cta-card-heading {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--text-heading);
    margin: 0 0 0.3rem;
}

.cta-card-text {
    font-size: 1rem; /* Increased from 0.9rem to match base font-size in style.css and prevent super small fonts */
    color: var(--text-secondary);
    margin: 0;
}

.cta-card-link-wrap .cta-card-link {
    display: inline-block;
    margin-top: 0.8rem;
    font-size: 1rem; /* Increased from 0.85rem to match base font-size in style.css and prevent super small fonts */
    color: var(--brand-teal);
    font-weight: 600;
    border-bottom: 1px solid var(--brand-teal);
    transition: color 0.2s, border-color 0.2s;
}

.cta-card-link-wrap:hover .cta-card-link {
    color: var(--brand-wine) !important;
    border-bottom-color: var(--brand-wine) !important;
}

/* Right CTA card: text group bottom-justified */
.cta-section-wrapper .cta-card-link-wrap:last-child {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}
.cta-section-wrapper .cta-card-link-wrap:last-child .cta-card-illustration {
    width: 80%;
    max-width: 80%;
}

/* ─── WELCOME / RANCH INTRO ─── */

.ranch-intro {
    max-width: 700px;
    margin: 2rem auto;
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-card);
    padding: 2.5rem 3rem;
}

.ranch-intro h2 {
    font-family: var(--font-display);
    font-size: clamp(38px, 4vw, 54px);
    color: var(--text-heading);
    margin: 0 0 10px;
    text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.55);
}

.ranch-intro p {
    font-family: var(--font-body);
    font-size: 1rem; /* Increased from 15px to match base font-size in style.css and prevent super small fonts */
    color: var(--text-body);
    line-height: 1.6;
    max-width: 640px;
}

.ranch-intro .ranch-tagline,
.ranch-intro .ranch-tagline em {
    font-size: 1.625rem;
    color: var(--text-secondary);
    margin: 24px auto 0;
    font-style: normal;
    text-align: center;
    font-family: var(--font-handwritten) !important;
}

/* ─── LATEST FROM THE RANCH ─── */

.latest-section {
    max-width: 900px;
    margin: 2rem auto;
    text-align: left;
}

.latest-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 1.2rem;
    padding: 0 0.5rem;
}

.latest-header h2 {
    font-family: 'Caveat', cursive;
    font-size: clamp(24px, 4vw, 36px); /* Minimum 24px for Caveat readability, scales up to 36px */
    font-weight: 400;
    color: var(--text-heading);
    margin: 0;
}

.latest-see-all {
    color: var(--brand-teal);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}

.latest-see-all:hover {
    border-bottom-color: var(--brand-teal) !important;
}

.latest-posts {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.2rem;
}

.latest-card {
    background: var(--surface-card);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-card);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    display: flex;
    flex-direction: column;
}

.latest-card:hover {
    box-shadow: var(--shadow-card-hover) !important;
    border-color: var(--brand-wine) !important;
    transform: translateY(-2px) !important;
}

.latest-card-image {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.latest-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.latest-card-image-empty {
    font-size: 2rem;
}

.latest-card-body {
    padding: 1rem 1.2rem 1.2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    text-align: left;
}

.latest-card-meta {
    font-size: 1rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.4rem;
}

.latest-card-title {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-heading);
    line-height: 1.35;
    margin: 0 0 0.5rem;
}

.latest-card-excerpt {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.5;
    flex: 1;
    margin: 0;
}

.latest-card-categories {
    margin-top: 0.8rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.latest-card-categories span {
    font-size: 1rem;
    color: var(--text-secondary);
    padding: 0.15rem 0.5rem;
    border-radius: 3px;
}

/* ─── MEET THE CAST TEASER ─── */

.cast-teaser {
    max-width: 800px;
    margin: 2rem auto;
    background: var(--surface-card);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-card);
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.cast-teaser:hover {
    box-shadow: var(--shadow-card-hover) !important;
    border-color: var(--brand-wine) !important;
    transform: translateY(-2px) !important;
}

.cast-portraits {
    display: flex;
    gap: 0.4rem;
    flex-shrink: 0;
}

.cast-portrait {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    overflow: hidden;
    background: #fff;
    border: 2px solid var(--surface-border);
    display: flex;
    align-items: center;
    justify-content: center;
}

.cast-portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cast-teaser-text {
    text-align: left;
}

.cast-teaser-text h3 {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-heading);
    margin: 0 0 0.2rem;
}

.cast-teaser-text p {
    font-size: 1rem; /* Increased from 0.88rem to match base font-size in style.css and prevent super small fonts */
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

.cast-teaser-link {
    display: inline-block;
    margin-top: 0.4rem;
    font-size: 1rem; /* Increased from 0.85rem to match base font-size in style.css and prevent super small fonts */
    color: var(--brand-teal);
    font-weight: 600;
}

/* ─── RESPONSIVE ─── */

@media (max-width: 768px) {

    .cta-section-wrapper {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0;
    }

    .latest-posts {
        grid-template-columns: 1fr;
    }

    .cast-teaser {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }

    .cast-teaser-text {
        text-align: center;
    }

    .ranch-intro {
        padding: 2rem 1.5rem;
    }

    .ranch-intro h2 {
        font-size: 2.375rem;
    }

    .latest-header {
        flex-direction: column;
        gap: 0.5rem;
    }

    main.home-page > .home-wrapper {
        border-width: 12px;
        padding: 1rem;
    }

    .home-inner {
        padding: 2rem 1rem;
    }
}

@media (max-width: 480px) {
    .cast-portraits {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* ─── HIDE GENERATEPRESS/WP DEFAULTS ─── */

.page-template-home-revised-v2 .entry-header,
.page-template-home-revised-v2 .entry-title {
    display: none;
}
