/* ===================================
   RESET E CONFIGURAÇÕES BÁSICAS
   =================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    height: 100%;
    font-size: 16px;
}

/* ===================================
   TIPOGRAFIA E ESTILOS GERAIS
   =================================== */

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #4a5568;
    background-color: #f7fafc;
    min-height: 100%;
    display: flex;
    flex-direction: column;
}

/* ===================================
   HEADER E NAVEGAÇÃO
   =================================== */

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

header h1 {
    margin-bottom: 1rem;
    font-weight: 600;
    font-size: 1.75rem;
}

/* Navegação */
nav ul {
    list-style: none;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

nav a {
    color: #ffffff;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-weight: 600;
    display: block;
    /* improve legibility on gradient backgrounds */
    text-shadow: 0 1px 2px rgba(0,0,0,0.45);
}

nav a:hover {
    background-color: rgba(255, 255, 255, 0.18);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.12);
}

nav a.active,
nav a[aria-current="page"] {
    /* stronger, high-contrast selected state */
    background-color: rgba(0,0,0,0.36);
    box-shadow: 0 4px 14px rgba(0,0,0,0.25);
    transform: translateY(-1px);
}

/* keyboard focus visible */
nav a:focus,
nav a:focus-visible {
    outline: 3px solid #ffd54f; /* warm yellow ring for strong visibility */
    outline-offset: 2px;
    background-color: rgba(0,0,0,0.28);
}

/* --- stronger contrast variant: make nav items pill-like over the gradient --- */
nav ul {
    /* give nav items a subtle contrasting bar against the header */
    align-items: center;
}

/* default pills (slightly dark) so white text reads reliably across the gradient) */
nav a {
    /* stronger default pill so white text contrasts across the gradient */
    background-color: rgba(0,0,0,0.28);
    border: 1px solid rgba(255,255,255,0.12);
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.45);
}

nav a:hover {
    background-color: rgba(0,0,0,0.42);
}

/* selected / current page: high contrast yellow with black text */
nav a.active,
nav a[aria-current="page"] {
    background-color: #ffd54f;
    color: #000000;
    text-shadow: none;
    box-shadow: 0 6px 20px rgba(0,0,0,0.18);
    border-color: rgba(0,0,0,0.08);
    font-weight: 700;
}

nav a:focus,
nav a:focus-visible {
    /* keep focus visible but keep white text for non-selected items */
    color: #ffffff;
    background-color: rgba(0,0,0,0.42);
    outline: 3px solid #ffd54f;
    outline-offset: 2px;
}

/* explicitly target non-selected items to ensure strong text contrast */
nav a:not(.active):not([aria-current="page"]) {
    color: #ffffff; /* explicit white */
    font-weight: 700; /* bolder for legibility */
    letter-spacing: 0.01em;
}

/* ===================================
   CONTEÚDO PRINCIPAL
   =================================== */

main {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    flex: 1;
    width: 100%;
}

section {
    margin-bottom: 2rem;
}

section h2 {
    color: #2d3748;
    margin-bottom: 1rem;
    font-weight: 600;
    font-size: 1.875rem;
}

/* ===================================
   RODAPÉ
   =================================== */

footer {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    /* center footer content horizontally and vertically and stack items */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1.5rem;
    width: 100%;
    margin-top: auto;
}

footer .data-sources {
    font-size: 0.875rem;
    margin-top: 0.5rem;
    opacity: 0.9;
}

footer p {
    margin: 0.25rem 0;
    max-width: 1100px; /* keep lines readable on very wide screens */
}

/* ===================================
   BOTÃO DE DOAÇÕES
   =================================== */

.donation-container {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.donation-message {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.95);
    font-style: italic;
    margin: 0;
}

.donation-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background-color: rgba(255, 255, 255, 0.15);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.donation-button:hover {
    background-color: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.donation-button:focus {
    outline: 3px solid #ffd54f;
    outline-offset: 2px;
}

.donation-icon {
    font-size: 1.125rem;
}

/* ===================================
   HERO SECTION
   =================================== */

.hero {
    text-align: center;
    padding: 3rem 1rem;
    margin-bottom: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.hero h2 {
    font-size: 2rem;
    color: #2d3748;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero p {
    font-size: 1.125rem;
    color: #718096;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ===================================
   CARDS
   =================================== */

.cards-container {
    margin-bottom: 3rem;
}

.cards-container > h2 {
    text-align: center;
    color: #2d3748;
    margin-bottom: 2rem;
    font-size: 1.875rem;
    font-weight: 600;
}

/* ===================================
   DADOS DO MUNICÍPIO (GEO API PT)
   =================================== */

.dados-faro-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.dados-municipio h3 {
    color: #2d3748;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    font-weight: 600;
    text-align: center;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.info-item {
    display: flex;
    flex-direction: column;
    padding: 1rem;
    background: #f7fafc;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.info-label {
    font-size: 0.875rem;
    color: #718096;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.info-value {
    font-size: 1.25rem;
    color: #2d3748;
    font-weight: 600;
}

.fonte-dados {
    text-align: center;
    font-size: 0.875rem;
    color: #a0aec0;
    margin-top: 1rem;
    font-style: italic;
}

.loading {
    text-align: center;
    padding: 2rem;
    color: #718096;
}

.loading p {
    font-size: 1.125rem;
}

.erro-dados {
    text-align: center;
    padding: 2rem;
    color: #e53e3e;
}

.erro-dados p {
    margin-bottom: 0.5rem;
}

/* ===================================
   CARDS GRID
   =================================== */

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    padding: 0;
}

/* Card Styles */
.card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    text-decoration: none;
    color: #4a5568;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    display: block;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    border-color: #667eea;
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.card h3 {
    color: #2d3748;
    margin-bottom: 0.75rem;
    font-size: 1.5rem;
    font-weight: 600;
}

.card p {
    color: #718096;
    font-size: 1rem;
    line-height: 1.6;
}

/* ===================================
   BOTÕES
   =================================== */

/* ===================================
   MAPA
   =================================== */

#mapa-section {
    margin-top: 2rem;
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

#mapa-section h2 {
    text-align: center;
    margin-bottom: 1.5rem;
}

#servicos-controls {
    margin-bottom: 1.5rem;
    text-align: center;
}

#servicos-controls h3 {
    font-size: 1rem;
    color: #4a5568;
    margin: 1rem 0 0.75rem 0;
    font-weight: 600;
}

#filtros-servicos {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-top: 1rem;
    padding: 1rem;
    background: #f7fafc;
    border-radius: 8px;
}

.filtro-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    color: #4a5568;
}

.filtro-checkbox:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.filtro-checkbox input[type="checkbox"] {
    cursor: pointer;
    width: 18px;
    height: 18px;
}

.filtro-checkbox input[type="checkbox"]:checked + .filtro-icon {
    filter: grayscale(0);
}

.filtro-checkbox input[type="checkbox"]:not(:checked) + .filtro-icon {
    filter: grayscale(100%);
    opacity: 0.5;
}

.filtro-icon {
    font-size: 1.25rem;
    transition: all 0.2s ease;
}

#mapa {
    height: 500px;
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background-color: #edf2f7;
    color: #4a5568;
    border: 1px solid #cbd5e0;
}

.btn-secondary:hover {
    background-color: #e2e8f0;
    border-color: #a0aec0;
}

.btn-outline {
    background-color: transparent;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-outline:hover {
    background-color: #667eea;
    color: white;
}

/* ===================================
   DESIGN RESPONSIVO (MOBILE-FIRST)
   =================================== */
/* Tablet e desktop (768px+) */
@media (max-width: 768px) {
    nav ul {
        justify-content: center;
        gap: 0.5rem;
    }
    
    nav a {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }
    
    .hero {
        padding: 2rem 1rem;
    }
    
    .hero h2 {
        font-size: 1.5rem;
    }
    
    .hero p {
        font-size: 1rem;
    }

    .dados-faro-section {
        padding: 1.5rem;
    }

    .info-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .info-value {
        font-size: 1.125rem;
    }
    
    .cards-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    main {
        padding: 1rem;
    }
    
    section h2 {
        font-size: 1.5rem;
    }

    #mapa-section {
        padding: 1.5rem;
    }

    #filtros-servicos {
        flex-direction: column;
        gap: 0.75rem;
    }

    .filtro-checkbox {
        justify-content: center;
        width: 100%;
    }

    #mapa {
        height: 400px;
    }
}

/* Mobile pequeno (480px ou menos) */
@media (max-width: 480px) {
    html {
        font-size: 14px;
    }
    
    header {
        padding: 0.75rem;
    }
    
    header h1 {
        font-size: 1.25rem;
        margin-bottom: 0.75rem;
    }
    
    nav ul {
        gap: 0.25rem;
    }
    
    nav a {
        padding: 0.4rem 0.6rem;
        font-size: 0.85rem;
    }
    
    main {
        padding: 0.75rem;
    }
    
    .hero {
        padding: 1.5rem 0.75rem;
    }

    .dados-faro-section {
        padding: 1rem;
    }

    .dados-municipio h3 {
        font-size: 1.25rem;
    }

    .info-item {
        padding: 0.75rem;
    }

    .info-value {
        font-size: 1rem;
    }
    
    .card {
        padding: 1.5rem;
    }
    
    .card-icon {
        font-size: 2.5rem;
    }
    
    .card h3 {
        font-size: 1.25rem;
    }
    
    .btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.9rem;
    }
    
    footer {
        padding: 1rem;
        font-size: 0.9rem;
    }

    .donation-button {
        font-size: 0.8rem;
        padding: 0.4rem 0.875rem;
    }

    .donation-icon {
        font-size: 1rem;
    }

    #mapa-section {
        padding: 1rem;
    }

    #servicos-controls h3 {
        font-size: 0.9rem;
    }

    #filtros-servicos {
        padding: 0.75rem;
        gap: 0.5rem;
    }

    .filtro-checkbox {
        padding: 0.4rem 0.75rem;
        font-size: 0.9rem;
    }

    .filtro-icon {
        font-size: 1rem;
    }

    #mapa {
        height: 300px;
    }
}

/* ===================================
   SISTEMA DE PESQUISA GLOBAL
   =================================== */

.search-container {
    margin: 1rem 0;
    position: relative;
    max-width: 600px;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.search-icon {
    position: absolute;
    left: 1rem;
    font-size: 1.25rem;
    color: #718096;
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 0.875rem 3rem 0.875rem 3rem;
    font-size: 1rem;
    border: 2px solid transparent;
    border-radius: 8px;
    outline: none;
    transition: all 0.3s ease;
    font-family: inherit;
    background: white;
    color: #2d3748;
}

.search-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-input::placeholder {
    color: #a0aec0;
}

.search-clear-btn {
    position: absolute;
    right: 0.75rem;
    background: none;
    border: none;
    font-size: 1.25rem;
    color: #718096;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: none;
}

.search-clear-btn:hover {
    background-color: #f7fafc;
    color: #2d3748;
}

.search-results {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.search-results.show {
    display: block;
}

.search-results-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.search-result-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #f7fafc;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background-color: #f7fafc;
}

.search-result-item:focus {
    outline: 2px solid #667eea;
    outline-offset: -2px;
}

.result-icon {
    font-size: 1.75rem;
    margin-right: 1rem;
    flex-shrink: 0;
}

.result-content {
    flex: 1;
    min-width: 0;
}

.result-title {
    font-size: 1rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.25rem;
}

.result-title mark {
    background-color: #fef08a;
    color: #854d0e;
    padding: 0.125rem 0.25rem;
    border-radius: 3px;
    font-weight: 700;
}

.result-meta {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

.result-type {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    background: #667eea;
    color: white;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.result-description {
    font-size: 0.875rem;
    color: #718096;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-no-results {
    padding: 2rem;
    text-align: center;
}

.search-no-results p {
    color: #718096;
    margin-bottom: 0.5rem;
}

.search-tip {
    font-size: 0.875rem;
    color: #a0aec0;
}

/* ===================================
   SISTEMA DE FAVORITOS
   =================================== */

.btn-favorite {
    background: none;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 3rem;
}

.btn-favorite:hover {
    border-color: #667eea;
    transform: scale(1.1);
}

.btn-favorite.is-favorite {
    border-color: #fbbf24;
    background-color: #fffbeb;
}

.favorites-count {
    display: inline-block;
    background: #e53e3e;
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    margin-left: 0.5rem;
    min-width: 1.5rem;
    text-align: center;
}

.favorites-group {
    margin-bottom: 2rem;
}

.favorites-group h3 {
    color: #2d3748;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.favorites-group .count {
    font-size: 0.875rem;
    color: #718096;
    font-weight: 500;
}

.favorites-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.favorite-item {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s ease;
}

.favorite-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-color: #667eea;
}

.favorite-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
    min-width: 0;
}

.favorite-icon {
    font-size: 1.75rem;
    flex-shrink: 0;
}

.favorite-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
}

.favorite-title {
    color: #2d3748;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: color 0.2s ease;
}

.favorite-title:hover {
    color: #667eea;
    text-decoration: underline;
}

.favorite-date {
    font-size: 0.75rem;
    color: #a0aec0;
}

.btn-remove-favorite {
    background: none;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    font-size: 1.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.btn-remove-favorite:hover {
    background-color: #fee;
    border-color: #e53e3e;
}

.empty-favorites {
    background: white;
    border-radius: 12px;
    padding: 3rem 2rem;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.empty-favorites p {
    color: #718096;
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

.empty-favorites p:first-child {
    font-size: 1.125rem;
    font-weight: 600;
    color: #2d3748;
}

/* ===================================
   NOTIFICAÇÕES
   =================================== */

.notification {
    position: fixed;
    top: 2rem;
    right: 2rem;
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.3s ease;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    max-width: 300px;
}

.notification.show {
    transform: translateX(0);
    opacity: 1;
}

.notification-success {
    border-left: 4px solid #48bb78;
    color: #276749;
}

.notification-error {
    border-left: 4px solid #e53e3e;
    color: #9b2c2c;
}

.notification-info {
    border-left: 4px solid #4299e1;
    color: #2c5282;
}

/* ===================================
   RESPONSIVO - PESQUISA E FAVORITOS
   =================================== */

@media (max-width: 768px) {
    .search-container {
        max-width: 100%;
        /* avoid overlap with fixed top controls (dark-mode, lang, accessibility) */
        margin-top: 5rem;
    }
    
    .search-input {
        font-size: 0.9rem;
        padding: 0.75rem 2.75rem 0.75rem 2.75rem;
    }
    
    .search-results {
        max-height: 300px;
    }
    
    .result-icon {
        font-size: 1.5rem;
        margin-right: 0.75rem;
    }
    
    .result-title {
        font-size: 0.9rem;
    }
    
    .result-description {
        display: none;
    }
    
    .favorite-item {
        padding: 0.875rem;
    }
    
    .favorite-icon {
        font-size: 1.5rem;
    }
    
    .notification {
        top: 1rem;
        right: 1rem;
        left: 1rem;
        max-width: none;
    }
}

@media (max-width: 480px) {
    .search-input {
        padding: 0.625rem 2.5rem 0.625rem 2.5rem;
        font-size: 0.875rem;
    }

    /* slightly larger offset for very small screens */
    .search-container {
        margin-top: 4rem;
    }
    
    .search-icon {
        left: 0.75rem;
        font-size: 1rem;
    }
    
    .search-clear-btn {
        right: 0.5rem;
        font-size: 1rem;
    }
    
    .search-result-item {
        padding: 0.75rem;
    }
    
    .result-icon {
        font-size: 1.25rem;
        margin-right: 0.5rem;
    }
    
    .result-title {
        font-size: 0.875rem;
    }
    
    .result-type {
        font-size: 0.65rem;
        padding: 0.2rem 0.4rem;
    }
    
    .btn-favorite {
        font-size: 1.25rem;
        padding: 0.4rem 0.6rem;
        min-width: 2.5rem;
    }
    
    .favorite-content {
        gap: 0.75rem;
    }
    
    .favorite-icon {
        font-size: 1.25rem;
    }
    
    .favorite-title {
        font-size: 0.9rem;
    }
    
    .btn-remove-favorite {
        font-size: 1rem;
        padding: 0.4rem 0.6rem;
    }
}

/* ===================================
   PREMIUM GUIDE STYLES
   =================================== */

/* Premium notice banner on homepage */
.premium-notice {
    margin-top: 2rem;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-left: 4px solid #667eea;
    border-radius: 8px;
}

.premium-notice p {
    margin: 0;
    color: #2d3748;
    font-size: 0.95rem;
    line-height: 1.6;
}

.premium-notice a {
    color: #667eea;
    font-weight: 600;
    text-decoration: underline;
}

.premium-notice .notice-label {
    font-weight: 600;
    color: #667eea;
}

.premium-notice .notice-disclaimer {
    font-style: italic;
    opacity: 0.9;
}

/* Premium card styling on homepage */
.card-premium {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: 2px solid #764ba2;
}

.card-premium h3 {
    color: white;
}

.card-premium p {
    color: rgba(255, 255, 255, 0.95);
}

/* ===================================
   LANGUAGE SWITCHER
   =================================== */

#lang-switcher {
    display: flex;
    gap: 0.25rem;
    align-items: center;
    justify-content: flex-end;
    margin-bottom: 1rem;
    background: rgba(0, 0, 0, 0.15);
    padding: 0.25rem;
    border-radius: 8px;
    width: fit-content;
    margin-left: auto;
    /* On larger screens place the language switcher near the dark-mode toggle */
    position: fixed;
    top: 1rem;
    right: calc(1rem + 3.5rem);
    z-index: 9998;
}

#lang-switcher button {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

#lang-switcher button:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

#lang-switcher button.active {
    background: rgba(255, 255, 255, 0.95);
    color: #667eea;
    border-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

#lang-switcher button:focus,
#lang-switcher button:focus-visible {
    outline: 2px solid #ffd54f;
    outline-offset: 2px;
}

/* Responsive language switcher */
@media (max-width: 768px) {
    #lang-switcher {
        /* keep the top-right fixed arrangement on mobile, but use smaller spacing */
        position: fixed;
        top: 0.75rem;
        right: calc(0.75rem + 2.75rem);
        margin: 0;
        padding: 0.15rem;
        background: rgba(0,0,0,0.08);
    }
    
    #lang-switcher button {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }
}
