/* ==========================================================================
   Site improvements (desktop + mobile review, Sep 2026)
   Loaded after styles.css on every page.
   ========================================================================== */

/* ---------- Home: intro line above the project grid ---------- */
.home-intro {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 8px 16px;
    padding: 4px 2px 14px;
}
.home-intro h1 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: #111827;
}
.home-intro p {
    margin: 2px 0 0;
    font-size: 0.9rem;
    color: #6b7280;
}
.home-intro .category-filter {
    margin: 0 !important;
}
@media (min-width: 769px) {
    .home-intro h1 { font-size: 1.25rem; }
}

/* ---------- Project tiles: readable titles on every screen ---------- */
.project-tile:focus-visible {
    outline: 3px solid #dc2626;
    outline-offset: 2px;
}
.tile-text-content {
    flex-direction: column;
    align-items: flex-start !important;
    justify-content: flex-end !important;
    gap: 2px;
    padding: 10px 12px !important;
}
.project-title {
    white-space: normal !important;
    -webkit-line-clamp: 2 !important;
    font-size: 1.6rem !important;
    line-height: 1.15 !important;
}
.project-location {
    font-size: 0.95rem !important;
    opacity: 0.9;
}
@media (max-width: 1279px) {
    .project-title { font-size: 1.35rem !important; }
}
@media (max-width: 639px) {
    .project-title { font-size: 1.3rem !important; }
    .project-location { font-size: 0.875rem !important; }
}
/* Reserve space before a photo arrives, so lazy-loading only fetches
   what is on screen (otherwise every empty tile counts as "visible"). */
.project-tile:not(.is-loaded) .tile-image {
    aspect-ratio: 3 / 2;
    background: #f3f4f6;
}

/* Stronger gradient so white text stays legible on bright renders */
.tile-gradient-overlay {
    background: linear-gradient(to top, rgba(0,0,0,0.65) 0%, rgba(0,0,0,0.15) 45%, transparent 70%) !important;
}

/* ---------- Mobile: category chips instead of the hidden dropdown ---------- */
.mobile-category-chips {
    display: none;
}
@media (max-width: 768px) {
    .mobile-category-chips {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding: 2px 2px 12px;
        margin: 0 -2px;
    }
    .mobile-category-chips::-webkit-scrollbar { display: none; }
    .mobile-category-chips button {
        flex: 0 0 auto;
        min-height: 40px;
        padding: 8px 16px;
        border-radius: 999px;
        border: 1px solid #e5e7eb;
        background: #fff;
        color: #374151;
        font-size: 0.95rem;
        white-space: nowrap;
    }
    .mobile-category-chips button.active {
        background: #dc2626;
        border-color: #dc2626;
        color: #fff;
    }
    /* The home page no longer needs the old bottom-bar spacer */
    .main-content { padding-bottom: 24px !important; }
}

/* ---------- Tap targets (44px minimum) ---------- */
.nav-menu-toggle {
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
footer a[aria-label] {
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
footer .flex.items-center.space-x-4 > * + * { margin-left: 4px !important; }
footer ul.space-y-2 > li > a,
footer ul.space-y-2 > li > span {
    display: inline-block;
    padding: 6px 0;
}
footer a[href^="tel:"],
footer a[href^="mailto:"] {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 3px;
    display: inline-block;
    padding: 4px 0;
}

/* ---------- Keep the WhatsApp button off content ---------- */
footer { padding-bottom: 96px !important; }
@media (max-width: 768px) {
    .whatsapp-float { transform: scale(0.85); transform-origin: bottom right; }
}

/* ---------- About page: less dead space on phones ---------- */
@media (max-width: 767px) {
    main section.py-16 { padding-top: 2.5rem !important; padding-bottom: 2.5rem !important; }
    main .py-16 { padding-top: 2.5rem; padding-bottom: 2.5rem; }
}

/* ---------- Contact page ---------- */
.contact-phone-link {
    color: #ef4444;
    display: inline-block;
    padding: 2px 0;
}
.contact-phone-link:hover { text-decoration: underline; }

/* About > Features: keep a visible placeholder while a magazine image loads */
.feature-card img {
    min-width: 220px;
    background: #f3f4f6;
}

/* Home: "Load more projects" button (backup to automatic loading on scroll) */
.load-more-wrap { text-align: center; margin: 8px 0 32px; }
.load-more-btn {
    min-height: 44px;
    padding: 10px 28px;
    border-radius: 999px;
    border: 1px solid #dc2626;
    background: #fff;
    color: #dc2626;
    font-size: 1rem;
    cursor: pointer;
}
.load-more-btn:hover { background: #dc2626; color: #fff; }
