/**
 * ESTILO INDEX (HOME) - VERSÃO 20.23
 * Ajuste: Centralização de botões via Padding (Definitivo)
 */

/* ==================== 1. RESET E VARIÁVEIS ==================== */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  /* Cores Principais */
  --color-primary: #ff5722;
  --color-primary-light: #ff8a50;
  --color-primary-dark: #e64a19;
  --color-secondary: #4caf50;
  --color-secondary-light: #66bb6a;
  --color-text-primary: #333;
  --color-text-secondary: #666;
  --color-background-light: #f8f8f8;
  --color-white: #ffffff;
  --color-info: #2196f3;
  --color-warning: #ffc107;
  --color-error: #f44336;

  /* Espaçamento */
  --spacing-sm: 10px;
  --spacing-md: 15px;
  --spacing-lg: 20px;
  --spacing-xl: 25px;

  /* Sombras e Bordas */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 5px 15px rgba(0, 0, 0, 0.08);
  --radius-md: 12px;
  --radius-xl: 20px;
  --radius-circle: 50%;
  --radius-pill: 50px;

  /* Altura Padrão do Header */
  --header-height: 80px;
}

body {
  font-family: "Poppins", sans-serif;
  background-color: var(--color-background-light);
  min-height: 100vh;
  color: var(--color-text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  display: flex; flex-direction: column;
}

/* ==================== 2. LAYOUT PRINCIPAL ==================== */
.principal {
  max-width: 1400px; width: 100%; margin: 0 auto; padding: var(--spacing-lg);
  flex: 1; display: flex; flex-direction: column; gap: var(--spacing-xl);
}

/* ==================== 3. HEADER ==================== */
.header-section {
  background: var(--color-white); border-radius: var(--radius-xl);
  height: var(--header-height); padding: 0 var(--spacing-xl);
  box-shadow: var(--shadow-md); display: flex; justify-content: space-between; align-items: center;
  border: 1px solid rgba(0, 0, 0, 0.05); margin-bottom: var(--spacing-lg);
}

.logo-container { display: flex; align-items: center; gap: var(--spacing-md); }
.logo-icon {
  width: 50px; height: 50px; background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
  border-radius: var(--radius-circle); display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-sm); color: white; font-size: 24px;
}
.logo-text h1 { font-size: 20px; font-weight: 700; color: var(--color-primary); margin: 0; line-height: 1.2; }
.logo-subtitle { font-size: 12px; color: var(--color-text-secondary); margin: 0; }

.header-actions { display: flex; align-items: center; gap: 15px; }
.user-welcome { font-size: 14px; color: var(--color-text-secondary); display: flex; align-items: center; gap: 5px; }
.user-welcome strong { color: var(--color-primary); }

/* Botões Header */
.btn-pill {
  padding: 10px 20px; border-radius: var(--radius-pill); font-weight: 600; font-size: 14px;
  text-decoration: none; display: flex; align-items: center; gap: 8px; transition: all 0.3s ease;
  border: none; cursor: pointer;
}
.btn-primary { background: var(--color-primary); color: white; box-shadow: 0 4px 10px rgba(255, 87, 34, 0.2); }
.btn-primary:hover { background: var(--color-primary-dark); transform: translateY(-2px); }
.btn-outline { background: transparent; color: var(--color-text-secondary); border: 1px solid #eee; }
.btn-outline:hover { border-color: var(--color-primary); color: var(--color-primary); background: #fff0eb; }
.btn-logout { background: #fff0eb; color: var(--color-primary); }
.btn-logout:hover { background: var(--color-primary); color: white; }

/* ==================== 4. STATUS CARD ==================== */
.status-card {
  background: var(--color-white); border-radius: var(--radius-md); padding: var(--spacing-lg);
  box-shadow: var(--shadow-sm); border-left: 4px solid var(--color-secondary);
  display: flex; align-items: center; justify-content: space-between;
}
.status-info { display: flex; flex-direction: column; gap: 5px; }
.status-indicator { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--color-secondary); font-size: 1.1rem; }
.status-dot { width: 10px; height: 10px; background: var(--color-secondary); border-radius: 50%; animation: blink 2s infinite; }
.current-time {
  font-weight: 700; color: var(--color-primary); background: rgba(255,87,34,0.1);
  padding: 5px 15px; border-radius: var(--radius-pill); font-size: 14px;
}
.available-services { display: flex; gap: 10px; margin-top: 5px; }
.service-tag { font-size: 12px; padding: 4px 12px; border-radius: 4px; font-weight: 500; display: flex; align-items: center; gap: 5px; }
.service-tag.available { background: #e8f5e9; color: #2e7d32; }
.service-tag.unavailable { background: #ffebee; color: #c62828; }

/* ==================== 5. MENU GRID ==================== */
.menu-grid {
  display: grid; gap: var(--spacing-xl);
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.menu-card {
  background: var(--color-white); border-radius: var(--radius-xl); padding: 30px;
  box-shadow: var(--shadow-md); display: flex; flex-direction: column; align-items: center; text-align: center;
  border: 1px solid rgba(0,0,0,0.05); transition: 0.3s;
}
.menu-card:hover { transform: translateY(-5px); border-color: var(--color-primary); }

.menu-card.featured {
    background: linear-gradient(180deg, #ffffff 0%, #fff8f5 100%);
    border: 1px solid #ffccbc;
}

.card-icon {
    width: 70px; height: 70px; background: #fff3e0; color: var(--color-primary);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 2rem; margin-bottom: 20px;
}
.menu-card:hover .card-icon { background: var(--color-primary); color: white; }

.menu-card h3 { font-size: 1.4rem; color: var(--color-text-primary); margin-bottom: 10px; }
.card-description { color: var(--color-text-secondary); font-size: 0.9rem; margin-bottom: 20px; flex-grow: 1; }

.quick-features { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; justify-content: center; }
.feature-item { background: var(--color-background-light); padding: 5px 10px; border-radius: 15px; font-size: 0.8rem; color: #666; }

/* --- CORREÇÃO FINAL: CENTRALIZAÇÃO VIA PADDING --- */
.btn-card {
    /* 1. Reset de Display */
    display: inline-flex; /* Melhor que flex para botões */
    align-items: center;
    justify-content: center;
    
    /* 2. Tamanho via Padding (Garante centro vertical) */
    width: 100%;
    padding: 14px 20px; /* 14px em cima e embaixo = centro perfeito */
    min-height: 50px;   /* Altura mínima garantida */
    
    /* 3. Reset de Estilos Nativos */
    border: none;
    outline: none;
    background: var(--color-primary); 
    color: var(--color-white);
    
    /* 4. Tipografia Controlada */
    font-family: "Poppins", sans-serif; /* Força a fonte */
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    line-height: 1.2; /* Espaço seguro para acentos */
    text-align: center;
    
    /* 5. Visual */
    border-radius: var(--radius-pill);
    box-shadow: 0 4px 10px rgba(255, 87, 34, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    box-sizing: border-box; /* Garante que padding não estoure */
}

/* Ajuste fino para ícones dentro do botão (se houver) */
.btn-card i {
    margin-right: 8px;
    display: flex; /* Centraliza o ícone também */
}

.btn-card:hover { 
    background: var(--color-primary-dark); 
    box-shadow: 0 6px 15px rgba(255, 87, 34, 0.4);
    transform: translateY(-2px);
    color: var(--color-white);
}

/* Garante estados de link */
a.btn-card, a.btn-card:visited, a.btn-card:active, a.btn-card:hover {
    color: var(--color-white);
    text-decoration: none;
    display: inline-flex; /* Força comportamento de caixa */
}

/* ==================== 6. CONTATOS ==================== */
.contatos-section {
    text-align: center; padding: 25px; background: var(--color-white);
    border-radius: var(--radius-xl); box-shadow: var(--shadow-md);
}
.contatos-title { font-weight: 600; margin-bottom: 15px; color: var(--color-primary); }
.contatos { display: flex; justify-content: center; gap: 15px; flex-wrap: wrap; }
.social-link {
    display: inline-flex; align-items: center; gap: 8px; padding: 10px 25px;
    border-radius: var(--radius-pill); color: white; font-weight: 600; font-size: 14px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
.social-link:hover { transform: translateY(-3px); }
.social-link.whatsapp { background: #25d366; }
.social-link.instagram { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.social-link.location { background: #4285F4; }

/* ==================== 7. MODAL ==================== */
.modal {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5); z-index: 1000; justify-content: center; align-items: center;
    backdrop-filter: blur(3px);
}
.modal-content {
    background: var(--color-white); padding: 30px; border-radius: var(--radius-md);
    width: 90%; max-width: 400px; text-align: center; box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    animation: slideUp 0.3s ease;
}
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes blink { 0%, 50% { opacity: 1; } 51%, 100% { opacity: 0.3; } }

.modal-header { display: flex; justify-content: space-between; margin-bottom: 20px; border-bottom: 1px solid #eee; padding-bottom: 10px; }
.modal-header h2 { font-size: 1.2rem; color: var(--color-text-primary); }
.close-btn { background: none; border: none; font-size: 1.5rem; cursor: pointer; }
.info-box { background: #e3f2fd; color: #1565c0; padding: 15px; border-radius: 8px; text-align: left; display: flex; gap: 10px; margin-bottom: 20px; }

/* ==================== 8. RESPONSIVIDADE ==================== */
@media (max-width: 768px) {
    .header-section { flex-direction: column; height: auto; padding: 20px; gap: 15px; }
    .header-actions { width: 100%; justify-content: center; }
    .status-card { flex-direction: column; text-align: center; gap: 15px; }
    .status-info { align-items: center; }
    .current-time { width: 100%; justify-content: center; }
    .menu-grid { grid-template-columns: 1fr; }
    .contatos { flex-direction: column; }
    .social-link { width: 100%; justify-content: center; }
}