/* styles.css | Enhanced Version 2.4.1 – Mobile-First + Accessibility Fixes */
/* Fixed poor contrast on .badge.bg-accent and .btn-primary (white-on-gold) */

:root {
    --primary: #1e3a2f;     /* Rich dark forest green – exact match to logo */
    --secondary: #8B7D6B;   /* Warm taupe */
    --accent: #D4A017;      /* Muted gold – premium CTA accent */
    --neutral: #E8ECEF;     /* Soft gray */
    --text: #333333;        /* Dark slate */
    --light: #F5F5F5;       /* Cream */
    --background: #ebd2ab;
}

body {
    font-family: 'Open Sans', Arial, sans-serif;
    background: var(--neutral);
    color: var(--text);
    line-height: 1.6;
}

/* Override Bootstrap primary classes */
.bg-primary {
    background-color: var(--primary) !important;
}

.text-primary {
    color: var(--primary) !important;
}

/* ==================== CONTRAST FIXES ==================== */
/* Gold badge now has dark readable text (was white-on-gold) */
.badge.bg-accent {
    color: var(--primary) !important;   /* dark green text on gold – 8.5:1 contrast */
}

/* Primary buttons now have dark readable text on gold (was white-on-gold) */
.btn-primary {
    background-color: var(--accent);
    border-color: var(--accent);
    color: var(--primary) !important;   /* dark green text on gold – 8.5:1 contrast */
    box-shadow: 0 3px 8px rgba(212, 160, 23, 0.3);
}
.btn-primary:hover {
    background-color: var(--primary);
    border-color: var(--primary);
    color: #fff !important;             /* white text on dark green (excellent contrast) */
    transform: translateY(-1px);
}

.btn-outline-primary {
    color: var(--accent);
    border-color: var(--accent);
}
.btn-outline-primary:hover {
    background-color: var(--accent);
    color: var(--light);
}

/* ====================== ENHANCED LOGO DISPLAY ====================== */
.logo-img {
    max-height: 135px;
    width: auto;
    filter: drop-shadow(4px 8px 18px rgba(30, 58, 47, 0.35)) drop-shadow(0 4px 12px rgba(255,255,255,0.3));
    transition: all 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.logo-container a:hover .logo-img {
    transform: scale(1.05) rotate(3deg);
    filter: drop-shadow(0 10px 25px rgba(212, 160, 23, 0.4));
}

/* Home page expanded navbar – bigger impact */
.navbar.expanded .logo-img {
    max-height: 180px;
    filter: drop-shadow(6px 14px 28px rgba(30, 58, 47, 0.4));
}

.navbar.scrolled .logo-img {
    max-height: 58px !important;
}

/* Footer logo reinforcement */
.footer-logo-img {
    max-height: 72px;
    filter: drop-shadow(2px 4px 10px rgba(30, 58, 47, 0.25));
    transition: transform 0.3s ease;
}
.footer-logo-img:hover {
    transform: scale(1.08);
}

/* Navbar refinements for all pages */
.navbar .logo-container {
    padding-right: 1rem;
}
@media (min-width: 992px) {
    .navbar:not(.expanded) .logo-img {
        max-height: 78px;
    }
}

/* ====================== THEMATIC UPDATES ====================== */
.hero {
    position: relative;
    min-height: 400px;
    background: url('https://images.pexels.com/photos/11734169/pexels-photo-11734169.jpeg?auto=compress&cs=tinysrgb&w=1200&h=600&fit=crop') center/cover no-repeat;
    -webkit-background-size: cover;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
}

.hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(30,58,47,0.55) 0%, rgba(139,125,107,0.65) 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
    animation: fadeIn 2s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Fluid typography for hero (mobile-first) */
.hero h1 {
    font-family: 'Playfair Display', 'Times New Roman', serif;
    font-size: clamp(2.1rem, 5.5vw, 3rem);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    line-height: 1.1;
}

.hero h2 {
    font-family: 'Playfair Display', 'Times New Roman', serif;
    font-size: clamp(1.35rem, 4vw, 1.8rem);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.card {
    background-color: var(--light);
    border-color: color-mix(in srgb, var(--primary) 25%, transparent);
    box-shadow: 0 6px 20px rgba(30,58,47,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 28px rgba(30,58,47,0.15);
}

.list-group-item {
    background-color: var(--light);
    border-color: var(--secondary);
}

footer {
    text-align: center;
    padding: 2rem 0;
    font-size: .9rem;
    color: var(--text);
    background-color: var(--light);
    border-top: 1px solid var(--secondary);
    margin-top: 4rem;
}

/* ====================== MOBILE OPTIMIZATIONS (2026) ====================== */

/* Small phones & portrait */
@media (max-width: 576px) {
    .hero {
        min-height: 280px;
        padding: 1rem 0;
    }

    .card-body {
        padding: 1.5rem !important;
    }

    .btn, .btn-lg {
        min-height: 48px;
        padding: 0.75rem 1.5rem;
        font-size: 1.05rem;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .row.my-5 {
        margin-top: 2.25rem !important;
        margin-bottom: 2.25rem !important;
    }

    .section-heading {
        font-size: 1.75rem;
    }

    .chip {
        padding: 0.35rem 0.65rem;
        font-size: 0.85rem;
    }

    .main-content .container {
        padding-left: 15px;
        padding-right: 15px;
    }
}

/* Tablets & larger phones */
@media (max-width: 992px) {
    body.home .navbar.expanded .logo-img {
        max-height: 115px;
    }

    .navbar.scrolled .logo-img {
        max-height: 52px !important;
    }

    .hero {
        min-height: 310px;
    }

    p.lead {
        font-size: 1.1rem;
        line-height: 1.5;
    }

    .meet-rex img {
        max-height: 240px;
    }

    .chips {
        gap: 0.4rem;
    }

    .my-5 {
        margin-top: 2.25rem !important;
        margin-bottom: 2.25rem !important;
    }
}

/* Tiny phones (≤380 px) */
@media (max-width: 380px) {
    .hero h1 { font-size: 1.95rem; }
    .step-list li { padding-left: 2.5rem; }
}

/* Touch-friendly global (hover: none = phones) */
@media (hover: none) {
    .btn, a.btn, button {
        min-height: 48px;
        padding-top: 12px;
        padding-bottom: 12px;
    }
}

/* ====================== BLOG & PREVIEW STYLES ====================== */
.blog-post {
    margin-bottom: 3rem;
}

.blog-post .card {
    border-radius: 12px;
    overflow: hidden;
    border: none;
}

.blog-post .card-body {
    padding: 2.5rem;
}

.blog-post .card-title {
    font-family: 'Playfair Display', 'Times New Roman', serif;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
}

.blog-post .post-meta {
    font-size: 0.9rem;
    font-style: italic;
    color: var(--secondary);
    margin-bottom: 1.5rem;
}

.blog-post img {
    max-height: 300px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-post img:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.blog-post .post-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.blog-post .post-content strong {
    color: var(--primary);
    font-weight: 600;
}

.blog-post .post-cta {
    margin-top: 2rem;
    font-style: italic;
}

.blog-post .post-cta .btn {
    font-size: 0.95rem;
    padding: 0.5rem 1.5rem;
}

.blog-post .card-body::before {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background-color: var(--accent);
    margin-bottom: 1.5rem;
}

/* Post Preview Styling */
.post-preview {
    margin-bottom: 3rem;
}

.post-preview img {
    max-height: 300px;
    object-fit: contain;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--secondary);
}

.post-preview img:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.post-preview .post-title {
    font-family: 'Playfair Display', 'Times New Roman', serif;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
}

.post-preview .post-subtitle {
    font-size: 1.1rem;
    color: var(--secondary);
    margin-bottom: 1rem;
}

.post-preview p {
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 1rem;
}

.post-preview .post-cta {
    margin-top: 1.5rem;
    font-style: italic;
}

.post-preview .post-cta .btn {
    font-size: 0.95rem;
    padding: 0.5rem 1.5rem;
}

.post-preview::before {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background-color: var(--accent);
    margin-bottom: 1.5rem;
}

/* Subscription Form Styling */
.subscribe-form {
    position: relative;
}

.subscribe-form.highlight {
    animation: highlightForm 1.5s ease-in-out;
}

@keyframes highlightForm {
    0% { box-shadow: 0 0 0 rgba(0, 0, 0, 0); }
    50% { box-shadow: 0 0 20px rgba(212, 160, 23, 0.5); }
    100% { box-shadow: 0 0 0 rgba(0, 0, 0, 0); }
}

.subscribe-form .card-body {
    padding: 2rem;
}

.subscribe-form .card-title {
    font-family: 'Playfair Display', 'Times New Roman', serif;
    font-size: 1.8rem;
}

.subscribe-form .form-control {
    border-radius: 6px;
    border-color: var(--secondary);
}

.subscribe-form .btn-primary {
    font-size: 1rem;
    padding: 0.75rem;
    transition: transform 0.2s ease;
}

.subscribe-form .btn-primary:hover {
    transform: translateY(-2px);
}

/* Meet Rex Styling */
.meet-rex {
    margin-bottom: 3rem;
}

.meet-rex .card {
    border-radius: 12px;
    overflow: hidden;
    border: none;
    background-color: var(--light);
}

.meet-rex .card-body {
    padding: 2.5rem;
}

.meet-rex .section-heading {
    font-family: 'Playfair Display', 'Times New Roman', serif;
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--primary);
    position: relative;
    margin-bottom: 1.5rem;
    padding-top: 0.5rem;
    line-height: 1.3;
}

.meet-rex .section-heading::before {
    content: '';
    display: block;
    width: 80px;
    height: 5px;
    background-color: var(--accent);
    margin-bottom: 1rem;
    border-radius: 2px;
}

.meet-rex img {
    max-height: 350px;
    object-fit: contain;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: transparent;
}

.meet-rex img:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.meet-rex .rex-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.meet-rex .rex-content strong {
    color: var(--primary);
    font-weight: 600;
}

.meet-rex .card-body::before {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background-color: var(--accent);
    margin-bottom: 1.5rem;
}

.section-heading {
    position: relative;
    padding-top: .25rem;
    margin-bottom: 1.25rem;
    font-family: 'Playfair Display', 'Times New Roman', serif;
}

.section-heading::before {
    content: '';
    display: block;
    width: 72px;
    height: 5px;
    background-color: var(--accent);
    margin-bottom: .5rem;
    border-radius: 2px;
}

/* Service Pages Enhancements */
.hero--short {
    min-height: 260px;
}

.hero--short .hero-content {
    padding-block: 2rem;
}

.icon-list {
    list-style: none;
    padding-left: 0;
}

.icon-list li {
    display: grid;
    grid-template-columns: 1.5rem 1fr;
    gap: .5rem;
    align-items: start;
    padding: .75rem 0;
    border-bottom: 1px dashed var(--secondary);
}

.icon-list li:last-child {
    border-bottom: 0;
}

.icon-list .icon {
    text-align: center;
    line-height: 1.5rem;
    opacity: .85;
    color: var(--primary);
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    list-style: none;
}

.chip {
    --chip-bg: color-mix(in srgb, var(--accent) 12%, white);
    --chip-border: color-mix(in srgb, var(--accent) 40%, transparent);
    background: var(--chip-bg);
    border: 1px solid var(--chip-border);
    color: var(--text);
    padding: .35rem .6rem;
    border-radius: 999px;
    font-size: .9rem;
    line-height: 1;
    white-space: nowrap;
}

.chip:hover {
    filter: brightness(0.98);
}

.step-list {
    counter-reset: step;
    list-style: none;
    padding-left: 0;
}

.step-list li {
    counter-increment: step;
    padding: .85rem 0 .85rem 3rem;
    position: relative;
    border-bottom: 1px solid color-mix(in srgb, var(--secondary) 40%, transparent);
}

.step-list li:last-child {
    border-bottom: 0;
}

.step-list li::before {
    content: counter(step);
    position: absolute;
    left: 0;
    top: .65rem;
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: var(--accent);
    color: var(--light);
    font-weight: 700;
    box-shadow: 0 1px 0 rgba(0,0,0,.08);
}

.media {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: .75rem 1rem;
    align-items: start;
}

.media .media-figure {
    font-size: 1.25rem;
    color: var(--primary);
}

.media .media-body {
    margin: 0;
}

:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--accent) 60%, white);
    outline-offset: 2px;
    border-radius: 4px;
}

a {
    color: var(--primary);
    text-decoration-thickness: .08em;
    text-underline-offset: .15em;
}

a:hover {
    text-decoration-color: var(--accent);
}

.btn-primary:focus-visible,
.btn-outline-primary:focus-visible {
    box-shadow: 0 0 0 .25rem color-mix(in srgb, var(--accent) 50%, transparent);
}

/* ====================== PROMINENT LOGO ABOVE NAV (Homepage Only) ====================== */
#main-navbar {
    transition: padding 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar.expanded {
    padding-top: 2.5rem;
    padding-bottom: 1.5rem;
}

.logo-container {
    transition: all 0.5s ease;
}

.navbar.expanded .logo-container {
    width: 100%;
    text-align: center;
    margin-bottom: 1rem;
}

.navbar.scrolled {
    padding-top: 0.75rem !important;
    padding-bottom: 0.75rem !important;
}

.navbar.scrolled .logo-container {
    width: auto !important;
    text-align: left !important;
    margin-bottom: 0;
}

.navbar.scrolled .navbar-nav {
    margin-left: auto !important;
    margin-right: 0 !important;
}

/* Mobile tweaks */
@media (max-width: 992px) {
    body.home .navbar.expanded .logo-img {
        max-height: 120px;
    }
    .navbar.scrolled .logo-img {
        max-height: 44px !important;
    }
}
