/*
Theme Name:   True North Child
Template:     blankslate
Description:  Child theme for True North Equine Ranch website. Protects customizations from parent theme updates.
Author:       True North Equine
Version:      1.0.0
*/

/* Add your custom CSS below this line */

/* ========== BLOG CTA BUTTON SPACING ========== */
/* Add breathing room above CTA buttons in blog posts */
.entry-content p .btn.tner-cta,
article p .btn.tner-cta {
    margin-top: 3rem !important;
    display: inline-block;
}

/* Ensure mobile spacing is consistent */
@media (max-width: 768px) {
    .entry-content p .btn.tner-cta,
    article p .btn.tner-cta {
        margin-top: 3rem !important;
    }
}

/* ========== RESPONSIVE TABLE STYLES ========== */
/* Prevent tables from overflowing on mobile devices */

/* Desktop: Tables display normally */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

/* Make table cells responsive */
table td,
table th {
    padding: 12px 15px;
    text-align: left;
    border: 1px solid #e5e7eb;
    word-wrap: break-word;
}

table th {
    background-color: #f9fafb;
    font-weight: 600;
    color: #2b2f31;
}

table tr:nth-child(even) {
    background-color: #fafafa;
}

/* Table wrapper for mobile scrolling */
.table-wrapper {
    width: 100%;
    margin: 1.5rem 0;
}

/* Mobile: Make table wrapper scrollable */
@media (max-width: 768px) {
    .table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    }
    
    .table-wrapper table {
        min-width: 600px; /* Minimum width to prevent cramping */
        margin: 0; /* Remove margin since wrapper has it */
        border: none; /* Remove border since wrapper has it */
    }

    /* Prevent text wrapping in table cells */
    .table-wrapper table td,
    .table-wrapper table th {
        padding: 10px 12px;
        font-size: 14px;
        white-space: nowrap;
    }
}

/* Extra small mobile devices */
@media (max-width: 480px) {
    .table-wrapper table {
        min-width: 500px; /* Slightly smaller minimum for very small screens */
    }

    .table-wrapper table td,
    .table-wrapper table th {
        padding: 8px 10px;
        font-size: 13px;
    }
}

/* ========== HOME PAGE TITLE FIX ========== */
/* Hide empty page title and remove all spacing on home page */
.home .entry-title:empty,
.home .entry-title {
    display: none !important;
}

.home .header,
.home .entry-header {
    display: none !important;
}

.home article {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.home .entry-content {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.home .tn-hero__content {
    padding-top: 0 !important;
}

/* Hide empty paragraph tags that create spacing */
.home .entry-content > p:first-child {
    display: none !important;
}
