/* ================================
   Base styles (mobile-first)
   ================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
/* Layout scaffold + background gradient */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #667eea;
    background-image: url('./assets/community-bg.jpg');
    background-size: cover;
    background-position: right;
    background-repeat: no-repeat;
    background-attachment: fixed;
	/* opacity:.20; */
    min-height: 100vh;
    padding: 15px;
}

/* Floating back-to-top (fixed to viewport, always visible) */
.back-to-top-btn {
    position: fixed;
    right: max(12px, env(safe-area-inset-right));
    bottom: max(12px, env(safe-area-inset-bottom));
    z-index: 2500;
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 4px;
    background: rgba(33, 37, 41, 0.55);
    color: #ffffff;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(6px);
    -webkit-tap-highlight-color: transparent;
    transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.back-to-top-btn i {
    font-size: 18px;
    line-height: 1;
}

.back-to-top-btn:hover {
    background: rgba(33, 37, 41, 0.72);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}

.back-to-top-btn:active {
    transform: scale(0.96);
}

.back-to-top-btn:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}
/* Main content wrapper */
.container {
    max-width: 100%;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.header {
    background: #ffffff;
    color: #2c3e50;
    padding: 40px 15px 30px;
    text-align: center;
    border-bottom: 1px solid #e8ecef;
}

.header-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.header-logo {
    display: block;
    width: min(220px, 70vw);
    height: auto;
    max-height: 120px;
    object-fit: contain;
}

.header p {
    font-size: 1rem;
    color: #6c757d;
    font-weight: 400;
}

.header .subtitle {
    max-width: 720px;
    margin: 10px auto 0;
}

/* .controls {
    padding: 20px 15px;
    background: rgba(74, 172, 254, 0.05);
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: stretch;
} */

/* Search + filter toolbar */
.controls {
    padding: 25px 15px 20px;
    background: #f8f9fa;
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: stretch;
    position: sticky;
    top: 0;
    z-index: 999;
    border-bottom: 1px solid #e8ecef;
}

/* Search field styling */
.search-box input {
    width: 100%;
    padding: 14px 20px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s ease;
    background: #ffffff;
    color: #495057;
}

.search-box input::placeholder {
    color: #adb5bd;
}

/* Glow effect on focus */
.search-box input:focus {
    outline: none;
    border-color: #6c757d;
    box-shadow: 0 0 0 3px rgba(108, 117, 125, 0.1);
    background: #ffffff;
}

/* Category button group */
.category-filter {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

/* Pill buttons */
.category-btn {
    padding: 10px 18px;
    border: 1px solid #dee2e6;
    background: #ffffff;
    color: #495057;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    font-size: 0.9rem;
}

.category-btn:hover {
    background: #f8f9fa;
    border-color: #adb5bd;
    color: #212529;
}

.category-btn.active {
    background: #212529;
    color: #ffffff;
    border-color: #212529;
}

/* Footer shortcut buttons (Contactos / Apoia) */
.category-btn.scroll-btn {
    background: #f1f3f5;
    border-color: #ced4da;
    color: #343a40;
    font-weight: 600;
}

.category-btn.scroll-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
    color: #212529;
}

/* Cards layout grid */
.services-grid {
    padding: 20px 15px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

/* Individual service card */
.service-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid #f0f0f0;
    transition: all 0.3s ease;
}

.service-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

/* Card header layout */
.service-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 8px;
}

/* Service title */
.service-name {
    font-size: 1.1rem;
    font-weight: bold;
    color: #333;
}

/* Category chip */
.service-category {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.service-info {
    margin-bottom: 12px;
}

/* Phone line */
.service-phone {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 6px;
}

/* Service Description paragraph */
.service-description {
    color: #777;
    line-height: 1.4;
    font-size: 0.85rem;
}

/* Social media section */
.service-social {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    gap: 10px;
    align-items: center;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    transition: all 0.3s ease;
    text-decoration: none;
}

.facebook-link {
    color: #1877f2;
    background: rgba(24, 119, 242, 0.1);
}

.facebook-link:hover {
    background: #1877f2;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(24, 119, 242, 0.3);
}

.instagram-link {
    color: #e4405f;
    background: rgba(228, 64, 95, 0.1);
}

.instagram-link:hover {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(228, 64, 95, 0.3);
}

.google-link {
    color: #db4437;
    background: rgba(219, 68, 55, 0.12);
}

.google-link:hover {
    background: #db4437;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(219, 68, 55, 0.3);
}

.website-link {
    color: #0d6efd;
    background: rgba(13, 110, 253, 0.12);
}

.website-link:hover {
    background: #0d6efd;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(13, 110, 253, 0.3);
}

.social-link i {
    font-size: 18px;
}

/* Ratings footer */
.rating-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
    flex-wrap: wrap;
    gap: 8px;
}

/* Stars wrapper */
.stars {
    display: flex;
    gap: 4px;
}

/* Disable pointer when already rated */
.stars.rated .star {
    cursor: not-allowed;
    opacity: 0.6;
}

.stars.rated .star:hover {
    transform: none;
}

/* "You rated" text */
.rated-indicator {
    color: #28a745;
    font-weight: 600;
    font-size: 0.8rem;
}

/* Individual star */
.star {
    font-size: 1.1rem;
    color: #ddd;
    cursor: pointer;
    transition: all 0.2s ease;
}

.star:hover,
.star.filled {
    color: #ffd700;
    transform: scale(1.1);
}

/* Rating metadata */
.rating-info {
    font-size: 0.85rem;
    color: #666;
}

/* Empty-state placeholder */
.empty-state {
    text-align: center;
    padding: 40px 15px;
    color: #666;
}

/* Empty-state heading */
.empty-state h3 {
    margin-bottom: 8px;
    font-size: 1.25rem;
}

/* Footer section */
.footer {
    margin-top: 40px;
    padding: 40px 20px 25px;
    background: #f8f9fa;
    border-top: 1px solid #e8ecef;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
    margin-bottom: 20px;
    justify-items: center;
}

.contact-section {
    width: 100%;
    max-width: 860px;
}

.footer-section h3 {
    color: #1a1a1a;
    font-size: 1.1rem;
    margin-bottom: 12px;
    font-weight: 600;
    letter-spacing: -0.3px;
}

.footer-section p {
    color: #6c757d;
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 8px;
}

.footer-section a {
    color: #495057;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-section a:hover {
    color: #212529;
    text-decoration: underline;
}

/* Contact section in footer */
.contact-section {
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 16px;
}

.contact-section h3 {
    color: #1a1a1a;
    font-size: 1.05rem;
    margin-bottom: 10px;
    font-weight: 600;
    letter-spacing: -0.2px;
}

.contact-intro {
    color: #6c757d;
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 14px;
}

.contact-options {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 14px;
}

.contact-item {
    border: 1px solid #edf0f2;
    border-radius: 10px;
    background: #f8f9fa;
    padding: 10px 12px;
}

.contact-item strong {
    display: block;
    color: #212529;
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.contact-item p {
    color: #6c757d;
    font-size: 0.85rem;
    line-height: 1.5;
    margin: 0;
}

.contact-details {
    border-top: 1px dashed #dee2e6;
    padding-top: 10px;
}

.contact-details p {
    margin-bottom: 6px;
    color: #495057;
}

.contact-details a {
    color: #495057;
    text-decoration: none;
}

.contact-details a:hover {
    color: #212529;
    text-decoration: underline;
}

.support-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-top: 10px;
}

.support-icon {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid #dee2e6;
    background: #ffffff;
    color: #212529;
    text-decoration: none;
    transition: transform 0.1s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
    font-size: 0.9rem;
    font-weight: 600;
}

.support-icon i {
    font-size: 18px;
}

.support-icon:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    border-color: #adb5bd;
}

.support-icon-coffee i {
    color: #c56d2d;
}

.support-icon-kofi i {
    color: #f16061;
}

.support-icon-img {
    width: 22px;
    height: 22px;
    object-fit: contain;
    flex-shrink: 0;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #dee2e6;
    color: #6c757d;
    font-size: 0.85rem;
}

.footer-support {
    margin-bottom: 14px;
}

.footer-support h3 {
    color: #1a1a1a;
    font-size: 1rem;
    margin-bottom: 6px;
    font-weight: 600;
}

.footer-support p {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.footer-support .support-icons {
    justify-content: center;
}

/* Larger screens (tablet & desktop) */
@media (min-width: 600px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }

    .contact-options {
        grid-template-columns: repeat(3, 1fr);
    }

    .footer-content {
        grid-template-columns: 1fr;
    }
}

/* Extra-large screens */
@media (min-width: 900px) {
    .container {
        max-width: 1200px;
        border-radius: 20px;
    }

    .services-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 25px;
    }

    .header-logo {
        width: min(280px, 50vw);
        max-height: 150px;
    }

    .header p {
        font-size: 1.1rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }
}