/* ===== BARBEARIA PREMIUM - CSS OTIMIZADO PARA PERFORMANCE ===== */

/* Reset básico e otimizado */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Variáveis CSS otimizadas */
:root {
    /* Cores base (serão sobrescritas pelo PHP) */
    --primary: #1a1a1a;
    --secondary: #d4af37;
    --accent: #8b0000;
    
    /* Cores funcionais */
    --dark: #111111;
    --light: #f8f8f8;
    --gray: #eaeaea;
    --text: #333333;
    
    /* Status colors */
    --success: #2ecc71;
    --danger: #e74c3c;
    --warning: #f39c12;
    
    /* Shadows otimizadas para performance */
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-strong: 0 8px 24px rgba(0, 0, 0, 0.12);
    
    /* Border radius consistentes */
    --border-radius: 12px;
    
    /* Transições suaves mas leves */
    --transition: all 0.3s ease;
}

/* Estilos base do corpo - OTIMIZADO */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.5;
    color: var(--text);
    background: var(--light);
    overflow-x: hidden;
    min-height: 100svh; /* Usar svh em vez de vh para Safari */
}

/* Container principal */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== NAVBAR OTIMIZADA ===== */
.navbar {
    background: var(--primary);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem 0;
    border-bottom: 3px solid var(--secondary);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-weight: bold;
    font-size: 1.2rem;
}

.logo-text {
    color: white;
    font-size: 1.3rem;
    font-weight: 700;
}

.logo-text span {
    color: var(--secondary);
}

/* Menu mobile toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
}

/* Links de navegação */
.nav-links {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    transition: var(--transition);
}

.nav-links a:hover {
    background: var(--secondary);
    color: var(--primary);
}

.btn-marcar {
    background: var(--secondary);
    color: var(--primary) !important;
    font-weight: 600;
}

.btn-admin {
    background: transparent;
    border: 2px solid var(--secondary);
}

/* ===== HERO SECTION OTIMIZADA ===== */
.hero {
    min-height: 100svh;
     background: 
        linear-gradient(rgba(0,0,0,0.85), rgba(0,0,0,0.9)),
        url('https://images.unsplash.com/photo-1585747860715-2ba37e788b70?ixlib=rb-4.0.3&auto=format&fit=crop&w=1600&q=80');
    display: flex;
    align-items: center;
    padding: 120px 0 60px;
    position: relative;
    overflow: hidden;
}

.hero-content {
    color: white;
    max-width: 600px;
    z-index: 1;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: white;
}

.hero-title span {
    color: var(--secondary);
}

.hero-subtitle {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    max-width: 500px;
}

.btn-hero {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--secondary);
    color: var(--primary);
    padding: 1rem 2rem;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    transition: var(--transition);
}

.btn-hero:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.3);
}

/* ===== SERVIÇOS OTIMIZADOS ===== */
.servicos {
    padding: 80px 0;
    background: var(--light);
}

.section-title {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 2rem;
    color: var(--primary);
}

.servicos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 40px;
}

.servico-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 2px solid transparent;
}

.servico-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-strong);
    border-color: var(--secondary);
}

.servico-icon {
    height: 100px;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--secondary);
}

.servico-content {
    padding: 1.5rem;
}

.servico-content h3 {
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
    color: var(--primary);
}

.servico-content p {
    color: #666;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.servico-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--gray);
}

.servico-duracao {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #666;
    font-size: 0.85rem;
}

.servico-preco {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--secondary);
}

/* ===== MARCAÇÃO OTIMIZADA ===== */
.marcar-section {
    padding: 80px 0;
    background: #f5f7fa;
    min-height: 100svh;
}

.marcar-container {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
    margin-top: 30px;
}

.marcar-form {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    border: 2px solid var(--secondary);
}

.marcar-form h2 {
    color: var(--primary);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--primary);
    font-size: 0.9rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* Inputs básicos e otimizados */
input, select, textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--gray);
    border-radius: 8px;
    font-size: 1rem;
    transition: var(--transition);
    background: white;
    font-family: inherit;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--secondary);
}

/* Horários disponíveis - simplificado */
.horarios-disponiveis {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 8px;
    margin-top: 10px;
}

.horario-btn {
    padding: 10px 5px;
    border: 2px solid var(--gray);
    border-radius: 6px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
    background: white;
    font-size: 0.85rem;
}

.horario-livre {
    background: #d1fae5;
    color: #065f46;
    border-color: #10b981;
}

.horario-ocupado {
    background: #fee2e2;
    color: #991b1b;
    border-color: #ef4444;
    cursor: not-allowed;
}

.horario-pausa {
    background: #fef3c7;
    color: #92400e;
    border-color: #f59e0b;
    cursor: not-allowed;
}

.horario-livre:hover:not(.horario-selecionado) {
    transform: translateY(-2px);
}

.horario-selecionado {
    background: var(--secondary);
    color: var(--primary);
    border-color: var(--secondary);
}

/* Botão principal */
.btn-primary {
    background: var(--secondary);
    color: var(--primary);
    border: none;
    padding: 1rem 2rem;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 1.5rem;
}

.btn-primary:hover {
    transform: translateY(-2px);
}

/* Info box lateral */
.info-box {
    background: white;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    border: 2px solid var(--secondary);
    height: fit-content;
    position: sticky;
    top: 100px;
}

.info-box h3 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-box ul {
    list-style: none;
    margin-bottom: 1.5rem;
}

.info-box li {
    margin-bottom: 0.75rem;
    padding-left: 1.5rem;
    position: relative;
}

.info-box li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--secondary);
    font-weight: bold;
}

.horario-info {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1.5rem;
}

.horario-info h4 {
    color: var(--primary);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ===== FOOTER OTIMIZADO ===== */
.footer {
    background: var(--primary);
    color: white;
    padding: 60px 0 30px;
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--secondary);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1rem;
}

.footer-logo h2 {
    color: white;
    font-size: 1.3rem;
}

.footer-links h4 {
    color: var(--secondary);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var(--secondary);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.6);
    font-size: 0.85rem;
}

/* ===== BARBER POLE OTIMIZADO ===== */
.barber-pole {
    position: fixed;
    right: 15px;
    bottom: 15px;
    width: 12px;
    height: 60px;
    background: linear-gradient(45deg, 
        var(--accent) 25%, 
        var(--light) 25%, 
        var(--light) 50%, 
        var(--accent) 50%, 
        var(--accent) 75%, 
        var(--light) 75%, 
        var(--light) 100%
    );
    background-size: 15px 15px;
    animation: barberPole 3s linear infinite; /* Animação mais lenta */
    border-radius: 6px;
    z-index: 999;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

@keyframes barberPole {
    0% { background-position: 0 0; }
    100% { background-position: 0 30px; }
}

/* ===== LOADING SIMPLIFICADO ===== */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.4s ease;
}

.loading.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-content {
    text-align: center;
    color: var(--secondary);
}

.loading-scissors {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* ===== MODAL OTIMIZADO (sem backdrop-filter) ===== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.85); /* Sem blur para performance */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal.active {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    max-width: 400px;
    width: 90%;
    text-align: center;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--primary);
}

.modal-icon {
    font-size: 3rem;
    color: var(--secondary);
    margin-bottom: 1rem;
}

/* ===== RESPONSIVIDADE OTIMIZADA ===== */
@media (max-width: 1024px) {
    .marcar-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .info-box {
        position: static;
        margin-top: 1rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    /* Esconder barber pole em mobile para performance */
    .barber-pole {
        display: none;
    }
    
    /* Menu mobile */
    .menu-toggle {
        display: block;
    }
    
    .nav-links {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--primary);
        flex-direction: column;
        padding: 1.5rem;
        gap: 0.5rem;
        transform: translateY(-100%);
        opacity: 0;
        transition: var(--transition);
        pointer-events: none;
        box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    }
    
    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: all;
    }
    
    .nav-links a {
        width: 100%;
        text-align: center;
    }
    
    .hero {
        padding: 100px 0 40px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .servicos-grid {
        grid-template-columns: 1fr;
    }
    
    .horarios-disponiveis {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.8rem;
    }
    
    .section-title {
        font-size: 1.6rem;
    }
    
    .marcar-form,
    .info-box {
        padding: 1.5rem;
    }
    
    .horarios-disponiveis {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .servico-card {
        margin-bottom: 1rem;
    }
}

/* ===== ANIMAÇÕES CONDICIONAIS PARA PERFORMANCE ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .barber-pole {
        animation: none;
    }
    
    .loading-scissors {
        animation: none;
    }
}

/* Hardware acceleration apenas onde necessário */
.navbar,
.hero,
.servico-card:hover,
.btn-primary:hover {
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* Melhorar scroll performance */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Otimizar imagens */
img {
    max-width: 100%;
    height: auto;
    content-visibility: auto;
}


