:root {
    --primary: #FF7E5F; /* Warm Orange/Salmon */
    --primary-hover: #fa6846;
    --text: #333333;
    --text-light: #666666;
    --bg: #ffffff;
    --bg-alt: #f8f9fa;
    --border-radius: 16px;
    --spacing: 20px;
    --max-width: 600px; /* Mobile focused max width for content */
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text);
    background-color: var(--bg);
    line-height: 1.5;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--spacing);
}

/* Typography */
h1, h2, h3 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.5em;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.75rem; text-align: center; margin-bottom: 1em; }
h3 { font-size: 1.25rem; }

p { margin-bottom: 1em; color: var(--text-light); }

/* Buttons */
.btn {
    display: inline-block;
    padding: 14px 28px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    text-align: center;
    transition: transform 0.1s, opacity 0.2s;
    cursor: pointer;
    font-size: 1rem;
    width: 100%; /* Mobile first: full width */
    margin-bottom: 10px;
}

.btn:active { transform: scale(0.98); }

.btn-primary {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 126, 95, 0.4);
}

.btn-primary:hover { background-color: var(--primary-hover); }

.btn-secondary {
    background-color: transparent;
    color: var(--text);
    border: 2px solid #eee;
}

.btn-outline {
    border: 2px solid var(--primary);
    color: var(--primary);
    background: transparent;
}

/* Sections */
.section { padding: 60px 0; }
.section-gray { background-color: var(--bg-alt); }

/* Hero */
.hero {
    padding: 80px 0 60px;
    text-align: center;
}

.hero-subtitle {
    font-size: 1.1rem;
    margin-bottom: 30px;
}

.hero-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.hero-trust {
    font-size: 0.85rem;
    color: var(--text-light);
    opacity: 0.8;
}

/* How It Works */
.steps {
    display: grid;
    gap: 30px;
    text-align: center;
}

.step-icon {
    font-size: 3rem;
    margin-bottom: 10px;
}

/* Gallery */
.gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.gallery-item {
    aspect-ratio: 9/16;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 0.9rem;
}

/* Pricing */
.pricing-cards {
    display: grid;
    gap: 20px;
}

.card {
    background: white;
    padding: 30px;
    border-radius: var(--border-radius);
    border: 1px solid #eee;
    text-align: center;
    position: relative;
}

.card-popular {
    border: 2px solid var(--primary);
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
}

.price {
    font-size: 2.5rem;
    font-weight: 800;
    margin: 10px 0 20px;
    color: var(--text);
}

.features {
    list-style: none;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.features li { margin-bottom: 8px; }

/* FAQ */
details {
    margin-bottom: 15px;
    background: white;
    padding: 15px;
    border-radius: 12px;
}

summary {
    font-weight: 600;
    cursor: pointer;
}

summary::marker { color: var(--primary); }

details p {
    margin-top: 10px;
    margin-bottom: 0;
    font-size: 0.95rem;
}

/* Footer */
.footer {
    padding: 40px 0;
    text-align: center;
    font-size: 0.9rem;
    border-top: 1px solid #eee;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.footer a {
    color: var(--text-light);
    text-decoration: none;
}

.copyright { color: #999; }

/* Responsive */
/* Shelters Section */
.shelter-category {
    margin-bottom: 20px;
    border: 1px solid #eee;
    border-radius: 12px;
    overflow: hidden;
}

.shelter-category summary {
    padding: 15px;
    background-color: var(--bg-alt);
    font-weight: 700;
    cursor: pointer;
    list-style: none; /* Remove default triangle */
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.shelter-category summary:after {
    content: '+';
    font-size: 1.2rem;
    color: var(--text-light);
}

.shelter-category[open] summary:after {
    content: '-';
}

.shelter-list-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 20px;
}

.shelter-items {
    list-style: none;
}

.shelter-items li {
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.shelter-items li:last-child {
    border-bottom: none;
}

.shelter-items a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.shelter-items span {
    color: var(--text-light);
    font-size: 0.9rem;
}

.receipt-placeholder {
    background-color: #f8f9fa;
    border: 2px dashed #ddd;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 30px;
    color: #999;
    min-height: 200px;
}

.receipt-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

@media (min-width: 600px) {
    .container { max-width: 900px; }
    
    .hero-buttons {
        flex-direction: row;
        justify-content: center;
        max-width: 500px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .btn { width: auto; min-width: 200px; }

    .steps {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .pricing-cards {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .gallery {
        grid-template-columns: repeat(6, 1fr);
    }

    .shelter-list-container {
        grid-template-columns: 3fr 2fr; /* List takes more space, placeholder on right */
    }
}

/* --- NEW STYLES FOR REDESIGN --- */

/* Hero Redesign */
.hero-img-content {
    max-width: 100%;
    border-radius: 24px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
    margin-top: 20px;
}

/* Steps Redesign */
.steps-4 {
    display: grid;
    gap: 20px;
    text-align: center;
}

/* Shelter Grid (Transparency Section) */
.shelter-grid-container {
    margin-top: 40px;
}

.shelter-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.shelter-item {
    background: white;
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.9rem;
    color: var(--text);
    border: 1px solid #eee;
    box-shadow: 0 2px 5px rgba(0,0,0,0.03);
    transition: transform 0.2s;
    cursor: default;
}

.shelter-item:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
}

/* Small Section (Disclaimer) */
.section-small {
    padding: 20px 0;
    background-color: var(--bg-alt);
    border-top: 1px solid #eee;
}

/* Desktop Layout Enhancements */
@media (min-width: 768px) {
    .hero-container {
        display: flex;
        align-items: center;
        text-align: left;
        gap: 60px;
    }

    .hero-content {
        flex: 1;
        text-align: left;
    }

    .hero-image {
        flex: 1;
        display: block;
    }

    .hero-title {
        text-align: left;
        font-size: 2.5rem;
    }

    .hero-subtitle {
        text-align: left;
        font-size: 1.25rem;
    }

    .hero-buttons {
        justify-content: flex-start;
        margin-left: 0;
    }

    .hero-img-content {
        margin-top: 0;
    }
    
    .steps-4 {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* --- NEW REPORT COLUMNS STYLE --- */

.shelter-category-content {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    padding: 20px;
}

.shelter-list-col {
    flex: 2;
    min-width: 280px;
}

.shelter-reports-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
    min-width: 200px;
}

.report-box {
    background: white;
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 15px;
    text-align: center;
}

.report-title {
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 0.95rem;
}

.report-status {
    font-size: 0.85rem;
    color: var(--text-light);
}

.report-status.highlight {
    color: var(--primary);
    font-weight: 600;
}

/* Override previous shelter-grid specific hacks if needed or ensure compatibility */
/* The previous shelter-grid-container and shelter-grid are removed from HTML, so their CSS can stay dormant or be removed. */
/* Just ensure <details> styles are working. They were in original styles.css, let's make sure they are preserved or re-added if they were missing. */
/* Based on reading styles.css earlier, .shelter-category styles existed. */

/* --- GALLERY IMAGE STYLES --- */

.gallery-item {
    position: relative;
    overflow: hidden; /* Ensure image and overlay stay inside border-radius */
    padding: 0; /* Remove padding to let image fill full space */
    border: none; /* Remove border if image covers it */
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.05); /* Slight zoom on hover */
}

.pet-name {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    color: white;
    padding: 15px 10px 10px;
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
    z-index: 2;
}

/* Ensure placeholder items still look okay */
.gallery-item[style*="background-color"] {
    justify-content: center;
    align-items: center;
    /* Styles inline in HTML handle flex and direction */
}
/* --- SHELTER TABLE STYLES --- */

.shelters-legend {
    text-align: center;
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.shelter-table {
    display: flex;
    flex-direction: column;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    /* For header corners */
}

.shelter-row {
    display: flex;
    align-items: center;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.9rem;
}

.shelter-row:last-child {
    border-bottom: none;
}

.shelter-row.header {
    background-color: var(--bg-alt);
    font-weight: 700;
    color: var(--text);
}

.col-name {
    flex: 2;
    /* Takes more space */
    padding: 12px 15px;
    text-align: left;
    border-right: 1px solid #f0f0f0;
}

.col-name a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.col-name .note {
    color: var(--text-light);
    font-size: 0.8rem;
    font-weight: 400;
}

.col-report {
    flex: 1;
    padding: 12px 10px;
    text-align: center;
    border-right: 1px solid #f0f0f0;
    min-width: 80px;
    /* Ensure space for date/status */
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 0.85rem;
}

.col-report:last-child {
    border-right: none;
}

/* Header specific styles */
.header .col-report {
    color: var(--text);
    font-weight: 600;
}

/* Mobile responsiveness: Ensure table doesn't break too badly */
@media (max-width: 480px) {
    .col-name {
        padding: 10px;
        font-size: 0.85rem;
    }

    .col-report {
        padding: 10px 5px;
        font-size: 0.75rem;
        /* Smaller text on small screens */
    }
}
/* --- UI TWEAKS --- */

/* Larger Receipt Icons */
.receipt-link {
    font-size: 1.5rem;
    text-decoration: none;
    transition: transform 0.1s;
    display: inline-block;
}

.receipt-link:hover {
    transform: scale(1.2);
}

/* Gallery Link Wrapper Fixes */
a.gallery-item {
    display: block; /* Ensure link behaves like a block container */
    text-decoration: none;
    cursor: pointer;
}

/* Gallery Grid Alignment */
.gallery {
    justify-content: center; /* Center the grid content if items don't fill row */
}
/* --- GALLERY FLEXBOX REFACTOR --- */

.gallery {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 15px !important;
    /* Reset grid properties */
    grid-template-columns: none !important;
}

.gallery-item {
    width: calc(33.333% - 15px);
    /* 3 items per row on mobile (roughly) or maybe 2? */
    min-width: 140px;
    max-width: 180px;
    flex-grow: 0;
    flex-shrink: 0;
}

/* Adjust for larger screens */
@media (min-width: 600px) {
    .gallery-item {
        width: 160px;
        /* Fixed width for consistent cards */
    }
}

/* Ensure images cover the area */
.gallery-item img {
    height: 100%;
    width: 100%;
    object-fit: cover;
}