/*
 * TitleSearchers.ca - Pages Component Styles
 * Custom CSS for content pages (What is Title Search, Advertise, etc.)
 * Compatible with Bootstrap 2.x
 * Author: TitleSearchers.ca
 * Version: 1.0
 */

/* ========================================
   CSS CUSTOM PROPERTIES (Variables)
   ======================================== */
:root {
    --color-primary: #8C7162;
    --color-text-dark: #352f2c;
    --color-bg-cream: #f9ecc4;
    --color-bg-light: #e8d9ad;
    --color-border-cream: #d4c49a;
    --color-accent-dark: #6e594a;
    --color-white: #ffffff;
    --color-text-muted: #666666;

    --spacing-xs: 10px;
    --spacing-sm: 15px;
    --spacing-md: 20px;
    --spacing-lg: 30px;
    --spacing-xl: 40px;

    --border-radius-sm: 2px;
    --border-radius-md: 4px;

    --font-family-headings: 'Contrail One', sans-serif;
    --font-family-body: 'PT Sans', sans-serif;
}

/* ========================================
   TYPOGRAPHY ENHANCEMENTS
   ======================================== */
.lead {
    font-size: 18px;
    line-height: 28px;
    font-weight: normal;
    color: var(--color-text-dark);
    margin-bottom: var(--spacing-md);
}

.text-muted {
    color: var(--color-text-muted);
}

.text-center {
    text-align: center;
}

/* ========================================
   HIGHLIGHT BOXES & CALLOUTS
   ======================================== */
.highlight-box {
    background: var(--color-bg-cream);
    border: 1px solid var(--color-border-cream);
    padding: var(--spacing-md);
    margin: var(--spacing-lg) 0;
}

.highlight-box h3:first-child {
    margin-top: 0;
}

.highlight-box--large {
    padding: var(--spacing-lg);
}

.highlight-box--center {
    text-align: center;
}

/* Callout box for CTAs */
.callout {
    background: var(--color-bg-cream);
    border: 1px solid var(--color-border-cream);
    padding: var(--spacing-lg);
    margin: var(--spacing-lg) 0;
    text-align: center;
}

.callout h3 {
    margin-top: 0;
    color: var(--color-text-dark);
}

.callout p {
    font-size: 16px;
    line-height: 24px;
}

.callout p.callout__lead {
    font-size: 18px;
    line-height: 28px;
    margin-bottom: var(--spacing-md);
}

/* ========================================
   TESTIMONIAL STYLES
   ======================================== */
.testimonial {
    background: var(--color-white);
    padding: var(--spacing-md);
    margin: var(--spacing-md) 0;
    border-left: 4px solid var(--color-primary);
}

.testimonial__quote {
    font-size: 16px;
    font-style: italic;
    line-height: 26px;
    margin-bottom: var(--spacing-sm);
}

.testimonial__attribution {
    text-align: right;
    margin: 0;
    font-weight: bold;
    color: var(--color-text-dark);
}

/* ========================================
   FEATURE COLUMNS & GRIDS
   ======================================== */
.feature-grid {
    margin: var(--spacing-lg) 0;
}

.feature-grid .span4 h3,
.feature-grid .span6 h3 {
    color: var(--color-text-dark);
    margin-bottom: var(--spacing-sm);
}

/* Mobile: Stack feature columns */
@media (max-width: 767px) {
    .feature-grid [class*="span"] {
        margin-bottom: var(--spacing-md);
    }
}

/* Benefits Grid - Modern Grid Layout */
.benefits-grid {
    display: block;
    margin: 30px 0;
}

.benefit-card {
    margin-bottom: 24px;
    padding: 16px;
    background: var(--color-white);
    border-radius: var(--border-radius-md);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.benefit-card h3 {
    margin-top: 0;
    color: var(--color-primary);
}

/* Tablet: 2 columns */
@media (min-width: 768px) {
    .benefits-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .benefit-card {
        margin-bottom: 0;
    }
}

/* Desktop: 3 columns */
@media (min-width: 1024px) {
    .benefits-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 24px;
    }
}

/* Features Grid - Two Column Layout */
.features-grid {
    display: block;
    margin: 20px 0;
}

.feature-column {
    margin-bottom: 24px;
}

.feature-column article {
    margin-bottom: 24px;
}

.feature-column h3 {
    color: var(--color-primary);
    margin-bottom: 12px;
}

.feature-column ul {
    margin: 0;
    padding-left: 24px;
}

.feature-column li {
    margin-bottom: 8px;
}

/* Tablet and Desktop: 2 columns */
@media (min-width: 768px) {
    .features-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 32px;
    }

    .feature-column {
        margin-bottom: 0;
    }
}

/* ========================================
   PRICING TABLE ENHANCEMENTS
   ======================================== */
.pricing-table {
    margin: var(--spacing-md) 0;
    min-width: 100%;
}

/* Ensure table is responsive */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 20px 0;
}

.table-note {
    margin-top: 8px;
    font-size: 14px;
    color: var(--color-text-muted);
}

.payment-note {
    margin-top: 8px;
    font-size: 14px;
    color: var(--color-text-muted);
}

/* Improve table header styling */
.table thead tr.TableHeader th {
    background-color: var(--color-accent-dark);
    color: var(--color-bg-light);
    font-weight: bold;
    text-align: left;
    padding: 12px;
    border: none;
}

/* Table body styling */
.table tbody td {
    padding: 10px 12px;
    vertical-align: middle;
}

.table tbody td strong {
    color: var(--color-text-dark);
    font-size: 16px;
}

/* Alternate row colors for readability */
.table-striped tbody > tr:nth-child(odd) > td,
.table-striped tbody > tr:nth-child(odd) > th {
    background-color: transparent;
}

.table-striped tbody > tr:nth-child(even) > td,
.table-striped tbody > tr:nth-child(even) > th {
    background-color: #f5f5f5;
}

/* Mobile: Transform table into card layout for better UX */
@media (max-width: 767px) {
    .pricing-table {
        font-size: 14px;
    }

    /* Hide table headers on mobile */
    .pricing-table thead {
        display: none;
    }

    /* Transform table structure into block elements */
    .pricing-table,
    .pricing-table tbody,
    .pricing-table tr,
    .pricing-table td {
        display: block;
        width: 100%;
    }

    /* Style each row as a card */
    .pricing-table tr {
        margin-bottom: 16px;
        border: 1px solid #ddd;
        border-radius: var(--border-radius-md);
        overflow: hidden;
    }

    .pricing-table td {
        text-align: right;
        padding: 12px;
        position: relative;
        border-bottom: 1px solid #eee;
    }

    .pricing-table td:last-child {
        border-bottom: none;
    }

    /* Add labels from data-label attribute */
    .pricing-table td::before {
        content: attr(data-label);
        position: absolute;
        left: 12px;
        font-weight: bold;
        text-align: left;
        color: var(--color-primary);
    }
}

/* ========================================
   BUTTON ENHANCEMENTS
   ======================================== */
.btn-primary {
    background: var(--color-primary);
    color: var(--color-white);
    border: 1px solid var(--color-primary);
    padding: 12px 24px;
    font-size: 16px;
    font-family: var(--font-family-headings);
    text-transform: uppercase;
    letter-spacing: -0.5px;
    border-radius: var(--border-radius-sm);
    display: inline-block;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-primary:hover,
.btn-primary:focus {
    background: #7a5f52;
    border-color: #7a5f52;
    color: var(--color-white);
    text-decoration: none;
}

.btn-large {
    padding: 15px 30px;
    font-size: 18px;
}

/* Ensure button text doesn't wrap awkwardly */
.btn {
    white-space: normal;
}

@media (max-width: 767px) {
    .btn-large {
        padding: 12px 24px;
        font-size: 16px;
    }
}

/* ========================================
   LIST ENHANCEMENTS
   ======================================== */
/* Nested lists */
.content-holder ul ul,
.content-holder ul ol,
.content-holder ol ul,
.content-holder ol ol {
    margin-top: 8px;
    margin-bottom: 8px;
}

/* ========================================
   BREADCRUMB STYLING
   ======================================== */
#BreadCrumb {
    margin-bottom: var(--spacing-md);
    padding: 10px 0;
    font-size: 13px;
    color: var(--color-text-muted);
}

#BreadCrumb a {
    color: var(--color-primary);
    text-decoration: none;
}

#BreadCrumb a:hover {
    text-decoration: underline;
}

/* ========================================
   SECTION SPACING
   ======================================== */
.section-spacing {
    margin: var(--spacing-lg) 0;
}

.section-spacing-large {
    margin: var(--spacing-xl) 0;
}

/* ========================================
   INFORMATION BANNER
   ======================================== */
.info-banner {
    background: var(--color-bg-cream);
    border: 1px solid var(--color-border-cream);
    padding: var(--spacing-md);
    margin: var(--spacing-md) 0;
    border-radius: var(--border-radius-md);
}

.info-banner h3 {
    margin-top: 0;
    color: var(--color-text-dark);
}

.info-banner ul {
    margin-bottom: 10px;
}

.info-banner p:last-child {
    margin-bottom: 0;
}

/* ========================================
   RESPONSIVE UTILITIES
   ======================================== */
/* Add spacing helpers */
.mb-10 { margin-bottom: 10px; }
.mb-15 { margin-bottom: 15px; }
.mb-20 { margin-bottom: 20px; }
.mb-30 { margin-bottom: 30px; }

.mt-10 { margin-top: 10px; }
.mt-15 { margin-top: 15px; }
.mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }

.p-15 { padding: 15px; }
.p-20 { padding: 20px; }
.p-30 { padding: 30px; }

/* ========================================
   CONTENT PAGE SPECIFIC
   ======================================== */
.content-holder h1 {
    margin-bottom: var(--spacing-md);
}

.content-holder h2 {
    margin-top: var(--spacing-lg);
    margin-bottom: var(--spacing-sm);
}

.content-holder h3 {
    margin-top: var(--spacing-md);
    margin-bottom: var(--spacing-sm);
}

.content-holder p {
    margin-bottom: 10px;
}

/* ========================================
   MOBILE OPTIMIZATIONS
   ======================================== */
@media (max-width: 767px) {
    /* Reduce spacing on mobile */
    .highlight-box,
    .callout,
    .info-banner {
        padding: var(--spacing-sm);
    }

    /* Stack elements better on mobile */
    .feature-grid {
        margin: var(--spacing-md) 0;
    }

    /* Improve readability */
    .lead {
        font-size: 16px;
        line-height: 24px;
    }

    /* Testimonials on mobile */
    .testimonial__quote {
        font-size: 15px;
        line-height: 24px;
    }
}

/* ========================================
   CTA (CALL TO ACTION) SECTIONS
   ======================================== */
.cta-section {
    margin: 32px 0;
}

.cta-box {
    background: var(--color-bg-cream);
    padding: 32px 24px;
    border: 1px solid var(--color-border-cream);
    border-radius: var(--border-radius-md);
    text-align: center;
}

.cta-box h2 {
    margin-top: 0;
}

.cta-box h3 {
    margin: 8px 0 16px;
    font-size: 24px;
}

.cta-description {
    font-size: 18px;
    margin: 16px 0;
    line-height: 1.6;
}

.cta-button-container {
    margin: 24px 0;
}

.cta-button {
    display: inline-block;
    min-width: 200px;
    padding: 16px 32px;
    font-size: 18px;
    text-decoration: none;
    border-radius: var(--border-radius-md);
    transition: all 0.3s ease;
    /* Touch target minimum 44x44px for accessibility */
    min-height: 44px;
}

.cta-button:hover,
.cta-button:focus {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.cta-button:active {
    transform: translateY(0);
}

.cta-login {
    margin: 16px 0 0;
    font-size: 16px;
}

/* Tablet and Desktop: Larger CTA */
@media (min-width: 768px) {
    .cta-box {
        padding: 40px 32px;
    }

    .cta-button {
        min-width: 250px;
        padding: 18px 40px;
        font-size: 20px;
    }
}

/* ========================================
   TESTIMONIAL CARDS
   ======================================== */
.testimonials-container {
    display: block;
    margin: 20px 0;
}

.testimonial-card {
    background: var(--color-white);
    padding: 20px;
    margin: 0 0 20px 0;
    border-left: 4px solid var(--color-primary);
    border-radius: 0 var(--border-radius-md) var(--border-radius-md) 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.testimonial-card p {
    font-size: 16px;
    font-style: italic;
    margin-bottom: 12px;
    line-height: 1.6;
}

.testimonial-card footer {
    text-align: right;
    margin: 0;
}

.testimonial-card cite {
    font-style: normal;
    font-weight: bold;
    color: var(--color-text-dark);
}

/* Tablet: 2 columns */
@media (min-width: 768px) {
    .testimonials-container {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .testimonial-card {
        margin-bottom: 0;
    }
}

/* Desktop: Increase spacing */
@media (min-width: 1024px) {
    .testimonials-container {
        gap: 24px;
    }
}

/* ========================================
   CONTACT & UTILITY LISTS
   ======================================== */
.contact-list {
    list-style: none;
    padding-left: 0;
}

.contact-list li {
    margin-bottom: 12px;
    padding: 8px 0;
}

/* ========================================
   PAGE FOOTER STYLES
   ======================================== */
.page-footer {
    margin-top: 32px;
    padding-top: 16px;
    border-top: 1px solid var(--color-border-cream);
    font-size: 14px;
    color: var(--color-text-muted);
}

/* ========================================
   ACCESSIBILITY ENHANCEMENTS
   ======================================== */
/* Enhanced focus styles for keyboard navigation */
a:focus,
button:focus,
.btn:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* Skip to content link (for screen readers) */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--color-primary);
    color: var(--color-white);
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-to-content:focus {
    top: 0;
}

/* ========================================
   SECTION SPACING & STRUCTURE
   ======================================== */
section {
    margin-bottom: 40px;
}

section:last-of-type {
    margin-bottom: 24px;
}

/* Desktop: Increase spacing */
@media (min-width: 1024px) {
    section {
        margin-bottom: 48px;
    }
}

/* ========================================
   PRINT STYLES
   ======================================== */
@media print {
    .highlight-box,
    .callout,
    .info-banner {
        border: 1px solid #000;
        background: #fff;
    }

    .btn-primary,
    .cta-button {
        display: none;
    }

    .cta-box,
    .cta-section {
        border: 2px solid var(--color-border-cream);
    }

    .testimonial-card {
        page-break-inside: avoid;
    }

    section {
        page-break-inside: avoid;
    }
}

/* ========================================
   FALLBACK FOR OLDER BROWSERS
   ======================================== */
/* For browsers that don't support CSS variables */
.no-cssvariables .highlight-box {
    background: #f9ecc4;
    border-color: #d4c49a;
}

.no-cssvariables .btn-primary {
    background: #8C7162;
    border-color: #8C7162;
}

.no-cssvariables .testimonial {
    border-left-color: #8C7162;
}
