/* --- RESET E VARIÁVEIS --- */
:root {
    --primary-color: #6A7034; /* Verde Oliva */
    --primary-dark: #525727;
    --bg-color: #F4EBD9; /* Bege */
    --card-bg: #FFFFFF;
    --text-dark: #333333;
    --text-light: #666666;
    --border-radius: 16px;
    --shadow: 0 4px 12px rgba(0,0,0,0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Montserrat', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-color);
    color: var(--text-dark);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding-bottom: 70px; /* Espaço para o menu inferior no telemóvel */
}

/* --- HEADER --- */
.app-header {
    background-color: var(--bg-color);
    padding: 15px 20px;
    position: sticky;
    top: 0;
    z-index: 10;
}

.header-content {
    max-width: 1000px;
    margin: 0 auto;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    font-size: 32px;
    color: var(--primary-color);
}

.logo-area h1 {
    font-size: 18px;
    color: var(--primary-dark);
    letter-spacing: 1px;
    font-weight: 700;
}

.logo-area p {
    font-size: 12px;
    color: var(--primary-color);
    font-weight: 500;
}

/* --- CONTEÚDO PRINCIPAL --- */
.main-content {
    flex: 1;
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
    padding: 20px;
}

/* Hero Section */
.hero-section {
    text-align: center;
    padding: 20px 0 30px 0;
}

.hero-section h2 {
    font-size: 22px;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.hero-section p {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 25px;
}

/* Títulos de Secção */
.section-title {
    font-size: 18px;
    color: var(--primary-dark);
    margin-bottom: 15px;
    text-align: center;
}

/* --- BOTÕES --- */
button {
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    transition: all 0.2s ease;
    border: none;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    padding: 15px 20px;
    font-size: 15px;
    width: 100%;
}

.btn-primary:active { background-color: var(--primary-dark); }

.btn-large {
    font-size: 16px;
    padding: 18px;
    box-shadow: 0 4px 10px rgba(106, 112, 52, 0.3);
}

.btn-secondary {
    background-color: white;
    color: var(--text-dark);
    padding: 15px 20px;
    width: 100%;
    justify-content: space-between;
    border: 1px solid #ddd;
    margin-bottom: 12px;
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    padding: 15px 20px;
    width: 100%;
}

/* --- CARDS DE SERVIÇOS --- */
.services-grid {
    display: grid;
    grid-template-columns: 1fr; /* No telemóvel fica 1 por linha */
    gap: 15px;
    margin-bottom: 30px;
}

/* No PC/Tablet, fica 3 por linha */
@media (min-width: 600px) {
    .services-grid { grid-template-columns: repeat(3, 1fr); }
}

.card {
    background-color: var(--card-bg);
    padding: 20px;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.card-icon-wrapper {
    width: 60px;
    height: 60px;
    background-color: rgba(106, 112, 52, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: var(--primary-color);
}

.card h3 {
    font-size: 16px;
    color: var(--text-dark);
}

.card p {
    font-size: 13px;
    color: var(--text-light);
}

/* --- ACTIONS SECTION --- */
.actions-section {
    margin-top: 20px;
}

/* --- BOTTOM NAVIGATION (Menu de App) --- */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: white;
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
    z-index: 100;
}

/* Esconder o menu inferior em ecrãs grandes */
@media (min-width: 768px) {
    .bottom-nav { display: none; }
    body { padding-bottom: 20px; }
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #999;
    font-size: 11px;
    gap: 4px;
    transition: color 0.2s;
    background: none;
    border: none;
    padding: 5px 20px;
}

.nav-item i { font-size: 20px; }

.nav-item.active, .nav-item:active { color: var(--primary-color); }

/* --- MODAL --- */
.modal {
    display: none;
    position: fixed;
    z-index: 200;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    align-items: flex-end; /* No telemóvel sobe de baixo */
}

@media (min-width: 600px) {
    .modal { align-items: center; } /* No PC, fica no centro */
}

.modal-content {
    background-color: var(--bg-color);
    width: 100%;
    max-width: 500px;
    border-radius: 24px 24px 0 0;
    padding: 25px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

@media (min-width: 600px) {
    .modal-content { border-radius: 24px; }
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-header h2 {
    font-size: 20px;
    color: var(--primary-dark);
}

.close-btn {
    font-size: 28px;
    color: var(--text-light);
    cursor: pointer;
    line-height: 1;
}

/* Formulário */
.form-group {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 6px;
}

input, select {
    padding: 14px;
    border: 1px solid #ccc;
    border-radius: 10px;
    font-family: inherit;
    font-size: 15px;
    background-color: white;
    width: 100%;
}

input:focus, select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.btn-full {
    margin-top: 10px;
}

.status-msg {
    text-align: center;
    margin-top: 15px;
    font-size: 13px;
    font-weight: 600;
}

/* --- SELETOR DE IDIOMA --- */
.lang-selector {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 600;
    color: #999;
}

.lang-btn {
    background: none;
    border: none;
    color: #999;
    font-size: 12px;
    font-weight: 600;
    padding: 5px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
}

.lang-btn.active {
    color: var(--primary-color);
    background-color: rgba(106, 112, 52, 0.1);
}