/* ============================================================
   WARM & ORGANIC THEME (SAGE & EARTH)
   ============================================================ */

/* 1. RESET & THEME OVERRIDES */
.page-header, .entry-header, .header-hero, .page-title-container {
    display: none !important;
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    visibility: hidden !important;
}

/* Reduce icon footprint globally to free more inline space on narrow screens */
.pet-checklist-icon {
    width: clamp(20px, 5vw, 36px) !important;
    height: clamp(20px, 5vw, 36px) !important;
    font-size: clamp(12px, 3vw, 18px) !important;
}

#primary, #content {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* 2. THE GLOBAL FRAME */
.pet-guide-wrapper {
    width: 100% !important;
    max-width: 1100px !important;
    margin: 0 auto !important;
    padding: 0 15px !important;
    box-sizing: border-box !important;
    background-color: #fcfaf7 !important; /* Creamy Paper Background */
    color: #434a42 !important; /* Soft Charcoal for readability */
}

/* 3. TYPOGRAPHY (Clamped) */
.pet-guide-wrapper h1 { 
    font-size: clamp(1.8rem, 5vw, 2.5rem) !important; 
    color: #4a6741 !important; /* Sage Green */
    margin-bottom: 1.5rem !important; 
}
.pet-guide-wrapper h2 { 
    font-size: clamp(1.4rem, 4vw, 2rem) !important; 
    color: #6b7a5f !important; /* Muted Sage */
    margin-top: 2.5rem !important; 
}
.pet-guide-wrapper p, .pet-checklist-text { 
    font-size: clamp(1rem, 2.5vw, 1.15rem) !important; 
    line-height: 1.6 !important; 
}

/* 4. THE HUB GRID & CARDS */
.pet-hub-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(240px, 320px)) !important; 
    justify-content: center !important;
    gap: 25px !important;
    margin: 40px auto !important;
}

.pet-hub-grid > div {
    background: #ffffff !important;
    border: 1px solid #e8e2d9 !important; /* Warm Sand Border */
    border-radius: 20px !important; /* Softer, friendlier corners */
    padding: 20px;
    transition: all 0.3s ease !important;
    cursor: pointer;
}

/* Normalize the small icon/emoji block above headings and make headings align */
.pet-hub-grid > div > div:first-child {
    margin-bottom: 12px !important; /* consistent spacing above the h3 */
    font-size: clamp(1.6rem, 4.5vw, 2.2rem) !important; /* keep emoji proportional */
    line-height: 1 !important;
}

.pet-hub-grid > div h3 {
    font-size: clamp(1.05rem, 2.6vw, 1.3rem) !important;
    margin: 0 0 10px 0 !important;
    line-height: 1.12 !important;
    min-height: 2.6rem !important; /* reserve space so multi-line wraps align */
}

.pet-hub-grid > div:hover {
    transform: translateY(-8px) !important;
    box-shadow: 0 15px 30px rgba(107, 122, 95, 0.15) !important;
    border-color: #4a6741 !important; /* Sage Green Highlight */
}

/* 5. CHECKLIST LOGIC (Fixed Alignment & Indentation) */
.pet-checklist-item {
    display: flex !important;
    flex-direction: row !important; /* Forces horizontal layout */
    align-items: center !important;  /* Centers icon and text vertically */
    justify-content: flex-start !important; /* Keeps everything left-aligned */
    width: 100% !important;
    max-width: none !important; /* avoid fixed max-width that can force odd wrapping */
    margin: 0 0 12px 0 !important;
    background: #f4f1ea !important; 
    padding: 10px 10px !important; /* Balanced internal spacing */
    border-radius: 10px;
    gap: 0 !important; /* remove extra gap since icon will be hidden */
    flex-wrap: nowrap !important; /* keep icon + text on a single flex line */
    -webkit-column-break-inside: avoid !important;
    break-inside: avoid !important;
}

.pet-checklist-icon {
    /* hide the inline glyph to free space; we style the li instead */
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
}

.pet-checklist-text {
    flex: 1 1 auto !important;
    min-width: 0 !important; 
    min-inline-size: 0 !important; /* helps Safari calculate flex sizing correctly */
    overflow-wrap: break-word !important;
    margin: 0 !important; /* Removes default paragraph spacing */
    text-align: left !important; /* Ensures text doesn't center itself */
    display: block !important;
}
/* Ensure parent card lists are not treated as multi-column flows and remove default UL indent */
.pet-hub-grid > div ul,
.pet-hub-grid ul,
.pet-guide-wrapper ul {
    column-count: 1 !important;
    -webkit-column-count: 1 !important;
    column-gap: 0 !important;
    -webkit-column-gap: 0 !important;
    -webkit-column-break-inside: avoid !important;
    break-inside: avoid !important;
    padding-left: 0 !important; /* remove default list indent that can squeeze text */
    margin-left: 0 !important;
    list-style: none !important;
}
/* ============================================================
   6. CALL TO ACTION (CTA) BUTTONS
   ============================================================ */

.pet-cta-container {
    text-align: center !important;
    margin: 50px auto !important;
    padding: 20px !important;
}

.pet-button {
    display: inline-block !important;
    background-color: #4a6741 !important; /* Sage Green */
    color: #ffffff !important;
    padding: 18px 35px !important;
    font-size: clamp(1.1rem, 2vw, 1.25rem) !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    border-radius: 50px !important; /* Pill shape */
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 15px rgba(74, 103, 65, 0.2) !important;
    border: 2px solid transparent !important;
}

.pet-button:hover {
    background-color: #ffffff !important;
    color: #4a6741 !important;
    border-color: #4a6741 !important;
    transform: scale(1.05) !important;
    box-shadow: 0 8px 25px rgba(74, 103, 65, 0.3) !important;
}
.ms-form-container {
    box-shadow: 0 20px 40px rgba(0,0,0,0.05) !important;
    border: 1px solid #e8e2d9 !important; /* Matches your Sage/Earth Sand border */
    margin: 20px auto !important;
    max-width: 600px !important;
}

/* Forces the Microsoft Form to be responsive on your iPhone */
.ms-form-container iframe {
    width: 100% !important;
    min-height: 500px !important; /* Adjust based on your form's length */
}

/* ============================================================
   Responsive checklist icon + iOS text-adjust fixes
   Ensures checkmarks shrink on iOS and don't force layout overflow
   ============================================================ */

/* Prevent iOS Safari from auto-enlarging text */
html { -webkit-text-size-adjust: 100%; }

.pet-checklist-icon {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 auto !important;
    width: clamp(28px, 6vw, 44px) !important;
    height: clamp(28px, 6vw, 44px) !important;
    font-size: clamp(14px, 3.5vw, 20px) !important;
    line-height: 1 !important;
    -webkit-font-smoothing: antialiased !important;
}

.pet-checklist-text {
    min-width: 0 !important;
    overflow-wrap: break-word !important;
    white-space: normal !important;
    word-break: break-word !important;
}

/* Additional iOS-specific adjustments to avoid multi-column/odd wrapping */
@supports (-webkit-touch-callout: none) {
    .pet-checklist-item {
        /* allow the flex item to shrink correctly inside narrow containers */
        min-inline-size: 0 !important;
        -webkit-hyphens: auto !important;
        hyphens: auto !important;
    }

    .pet-checklist-text {
        overflow-wrap: anywhere !important; /* allow breaks anywhere if needed */
        word-break: normal !important;
        -webkit-line-break: after-white-space !important;
    }

    /* Defensive: stop any multi-column flow from creating columns on Safari */
    .pet-hub-grid > div ul,
    .pet-hub-grid ul,
    .pet-guide-wrapper ul {
        -webkit-column-count: 1 !important;
        column-count: 1 !important;
        -webkit-column-gap: 0 !important;
        column-gap: 0 !important;
        -webkit-column-fill: auto !important;
        column-fill: auto !important;
    }
}

/* iOS / narrow-device: shrink pet-hub-grid cards and headings for better readability */
@supports (-webkit-touch-callout: none) {
    @media (max-width: 820px) {
        .pet-hub-grid {
            grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)) !important;
            gap: 16px !important;
            margin: 20px auto !important;
        }

        .pet-hub-grid > div {
            padding: 10px 12px !important;
            border-radius: 12px !important;
        }

        .pet-hub-grid > div h3,
        .pet-hub-grid > div h2 {
            font-size: clamp(1rem, 2.5vw, 1.15rem) !important;
            margin-bottom: 8px !important;
            line-height: 1.15 !important;
        }

        .pet-hub-grid > div p,
        .pet-hub-grid > div .pet-checklist-text {
            font-size: clamp(0.9rem, 2.2vw, 1rem) !important;
            margin-bottom: 8px !important;
        }
    }
}
