:root {
    --cor-primaria: #f0a345;
    --cor-fundo: #050505;
    --cor-texto: #f5f5f5;
}

/* PWA Safe Area para iPhone - Apenas em modo standalone */
@media all and (display-mode: standalone) {
    @supports (padding-top: env(safe-area-inset-top)) {
        body {
            padding-top: env(safe-area-inset-top);
        }
        .main-header {
            top: env(safe-area-inset-top);
        }
    }
}

/* Largura máxima padrão para todas as seções */
.container {
    max-width: 1300px !important;
}

body {
    background: linear-gradient(180deg, rgba(0,0,0,0.98) 0%, rgba(0,0,0,0.88) 100%);
    background-attachment: fixed;
    color: var(--cor-texto);
    font-family: 'Poppins', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.main-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: transparent;
    border-bottom: none !important;
    transition: all 0.3s ease;
}

.main-header.scrolled {
    background: rgba(5, 5, 5, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* Páginas sem hero precisam de padding para o header fixo */
body.has-hero .hero-section {
    margin-top: 0;
}

body:not(.has-hero) main {
    padding-top: 200px;
}

.logo-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #f0a345, #7a4a22 70%);
}

.logo-text {
    letter-spacing: 0.18em;
    font-size: 0.9rem;
    text-transform: uppercase;
}

/* Header logo */
.header-logo {
    display: inline-block;
}

.header-logo-img {
    max-height: 120px;
    width: auto;
}

.nav-link-sm {
    color: #e0e0e0;
    text-decoration: none;
    letter-spacing: 0.18em;
}

.nav-link-sm:hover {
    color: var(--cor-primaria);
}

.btn-primary,
.btn-gold {
    background: var(--cor-primaria);
    border: none;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-size: 0.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 0.5rem;
    position: relative;
}

.btn-gold i,
.btn-primary i {
    position: static !important;
    display: inline-flex;
    align-items: center;
}

.btn-primary:hover,
.btn-gold:hover {
    background: var(--cor-primaria);
    filter: brightness(1.15);
}

.card-dark {
    background-color: #111111;
    border: 1px solid #252525;
    border-radius: 1rem;
}

.form-control, .form-select {
    background-color: #151515;
    border-color: #333333;
    color: #f5f5f5;
}

.form-control:focus, .form-select:focus {
    background-color: #151515;
    border-color: var(--cor-primaria);
    box-shadow: 0 0 0 0.2rem rgba(240, 163, 69, 0.25);
}

.main-footer {
    background-color: #050505;
}

.mobile-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: 60px;
    background-color: #050505;
    border-top: 1px solid #333;
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1030;
}

.mobile-nav-item {
    flex: 1;
    text-align: center;
    color: #aaaaaa;
    text-decoration: none;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
}

.mobile-nav-item.active,
.mobile-nav-item:hover {
    color: var(--cor-primaria);
}

/* Texto gold */
.text-gold {
    color: var(--cor-primaria) !important;
}

/* Melhorias gerais */
.form-label {
    font-weight: 500;
    margin-bottom: 0.4rem;
}

/* Animações suaves */
.card-dark {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-dark:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

/* Hero section com vídeo */
.hero-section {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.hero-image {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: url('../img/9.jpg') center/cover no-repeat !important;
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.70);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    padding: 0 1rem;
    padding-top: 120px;
}

@media (min-width: 768px) {
    .hero-content {
        padding-top: 0;
    }
}

.hero-content .btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem;
}

.hero-content .btn i {
    position: static !important;
    flex-shrink: 0;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    text-shadow: 2px 2px 20px rgba(0, 0, 0, 0.5);
}

@media (max-width: 768px) {
    .hero-section {
        height: auto;
        min-height: 420px;
        padding-top: 30px;
        padding-bottom: 20px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
}

/* Serviços cards */
.service-card {
    background-color: #111111;
    border: 1px solid #252525;
    border-radius: 1rem;
    padding: 1.5rem;
    height: 100%;
    transition: all 0.3s ease;
}

.service-card:hover {
    border-color: var(--cor-primaria);
    transform: translateY(-4px);
}

.service-card .price {
    color: var(--cor-primaria);
    font-size: 1.25rem;
    font-weight: 600;
}

/* Barbeiro card */
.barber-card {
    background-color: #111111;
    border: 1px solid #252525;
    border-radius: 1rem;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.barber-card:hover {
    border-color: var(--cor-primaria);
}

.barber-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--cor-primaria);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 600;
    color: #fff;
    margin: 0 auto 1rem;
}

/* Sucesso page */
.success-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.2), rgba(25, 135, 84, 0.2));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.success-icon i {
    font-size: 2.5rem;
    color: #28a745;
}

/* Loading spinner */
.spinner-gold {
    color: var(--cor-primaria);
}

/* Select option styling */
.form-select option {
    background-color: #151515;
    color: #f5f5f5;
}

/* Placeholder styling */
.form-control::placeholder {
    color: #666;
}

/* Input text color */
.form-control,
.form-select {
    color: #fff !important;
}

.form-control:focus,
.form-select:focus {
    color: #fff !important;
}

/* Focus states */
.btn:focus,
.form-control:focus,
.form-select:focus {
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(240, 163, 69, 0.25);
}

/* Disabled states */
.form-control:disabled,
.form-select:disabled {
    background-color: #0a0a0a;
    opacity: 0.6;
}

/* Alert improvements */
.alert {
    border-radius: 0.75rem;
    border: none;
}

.alert-success {
    background-color: rgba(40, 167, 69, 0.15);
    color: #28a745;
    border: 1px solid rgba(40, 167, 69, 0.3);
}

.alert-danger {
    background-color: rgba(220, 53, 69, 0.15);
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.3);
}

/* ============================================
   RESPONSIVIDADE COMPLETA - MOBILE FIRST
   ============================================ */

/* Mobile Bottom Navigation - Estilo App */
.mobile-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: 65px;
    background: rgba(10, 10, 10, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1050;
    padding: 0 10px;
    padding-bottom: env(safe-area-inset-bottom);
}

.mobile-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #888;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 8px 5px;
    transition: all 0.2s ease;
    gap: 4px;
}

.mobile-nav-item i {
    font-size: 1.3rem;
    transition: transform 0.2s ease;
}

.mobile-nav-item.active,
.mobile-nav-item:hover {
    color: var(--cor-primaria);
}

.mobile-nav-item.active i {
    transform: scale(1.1);
}

/* Botão central destacado (Agendar) */
.mobile-nav-item.nav-main {
    background: var(--cor-primaria);
    color: #000;
    border-radius: 50%;
    width: 56px;
    height: 56px;
    margin-top: -20px;
    box-shadow: 0 4px 15px rgba(240, 163, 69, 0.4);
}

.mobile-nav-item.nav-main i {
    font-size: 1.5rem;
}

.mobile-nav-item.nav-main span {
    display: none;
}

/* ============================================
   MOBILE (até 576px) - Smartphones
   ============================================ */
@media (max-width: 576px) {
    /* Ajustes gerais */
    body {
        font-size: 14px;
    }
    
    body:not(.has-hero) main {
        padding-top: 120px;
    }
    
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    /* Header mobile */
    .main-header {
        padding: 10px 0 !important;
        margin-bottom: 20px;
    }
    
    .header-logo-img {
        max-height: 90px;
    }
    
    /* Hero section */
    .hero-section {
        height: auto !important;
        min-height: 420px !important;
        padding-top: 30px !important;
        padding-bottom: 20px !important;
    }
    
    .hero-title {
        font-size: 1.6rem !important;
        line-height: 1.3;
    }
    
    .hero-content .lead {
        font-size: 0.9rem;
    }
    
    .hero-content .btn {
        width: 100%;
        margin-bottom: 10px;
        padding: 12px 20px !important;
        font-size: 0.7rem !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 0.5rem !important;
    }
    
    .hero-content .btn i {
        position: static !important;
        margin: 0 !important;
    }
    
    /* Seções */
    section {
        padding: 40px 0 !important;
    }
    
    section h2 {
        font-size: 1.5rem;
    }
    
    /* Cards de serviço */
    .service-card {
        padding: 1rem;
    }
    
    .service-card h5 {
        font-size: 1rem;
    }
    
    .service-card .price {
        font-size: 1rem;
    }
    
    /* Cards de barbeiro */
    .barber-card {
        padding: 1rem;
    }
    
    .barber-avatar {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .barber-card h5 {
        font-size: 0.95rem;
    }
    
    /* Diferenciais (apenas dentro do main, não no footer) */
    main .col-6.col-md-3 .p-3 {
        padding: 0.5rem !important;
    }
    
    main .col-6.col-md-3 i {
        font-size: 1.8rem !important;
    }
    
    main .col-6.col-md-3 h6 {
        font-size: 0.7rem;
    }
    
    main .col-6.col-md-3 p {
        font-size: 0.65rem !important;
    }
    
    /* Formulários */
    .form-control, .form-select {
        font-size: 16px; /* Evita zoom no iOS */
        padding: 12px 15px;
    }
    
    .btn {
        padding: 12px 20px;
        font-size: 0.75rem;
    }
    
    .btn-lg {
        padding: 14px 25px !important;
        font-size: 0.8rem !important;
    }
    
    /* Footer */
    .main-footer {
        padding-bottom: 90px !important;
    }
    
    .main-footer .row > div {
        margin-bottom: 10px;
    }
    
    main {
        padding-bottom: 80px;
    }
    
    /* Ocultar menu desktop */
    .d-md-flex.justify-content-center.gap-4 {
        display: none !important;
    }
    
    /* Ajustes de texto */
    .text-uppercase.small {
        font-size: 0.65rem;
        letter-spacing: 0.1em;
    }
    
    /* Cards escalonados */
    .row.g-4 {
        --bs-gutter-y: 1rem;
        --bs-gutter-x: 0.75rem;
    }
    
    /* Seção contato */
    .card-dark.p-4 {
        padding: 1rem !important;
    }
    
    /* Página de agendamento */
    .card-dark.p-4.p-md-5 {
        padding: 1.25rem !important;
    }
}

/* ============================================
   TABLETS (577px - 768px)
   ============================================ */
@media (min-width: 577px) and (max-width: 768px) {
    body:not(.has-hero) main {
        padding-top: 150px;
    }
    
    .header-logo-img {
        max-height: 80px;
    }
    
    .hero-section {
        height: 600px !important;
    }
    
    .hero-title {
        font-size: 2rem !important;
    }
    
    section {
        padding: 50px 0 !important;
    }
    
    .barber-avatar {
        width: 70px;
        height: 70px;
    }
    
    .main-footer {
        padding-bottom: 85px !important;
    }
    
    main {
        padding-bottom: 75px;
    }
}

/* ============================================
   TABLETS GRANDES / iPads (769px - 992px)
   ============================================ */
@media (min-width: 769px) and (max-width: 992px) {
    body:not(.has-hero) main {
        padding-top: 180px;
    }
    
    .header-logo-img {
        max-height: 100px;
    }
    
    .hero-section {
        height: 700px !important;
    }
    
    .hero-title {
        font-size: 2.5rem !important;
    }
    
    /* Ocultar nav mobile em tablets grandes */
    .mobile-bottom-nav {
        display: none !important;
    }
}

/* ============================================
   LAPTOPS PEQUENOS (993px - 1200px)
   ============================================ */
@media (min-width: 993px) and (max-width: 1200px) {
    .header-logo-img {
        max-height: 100px;
    }
    
    .hero-title {
        font-size: 3rem !important;
    }
    
    /* Ocultar nav mobile */
    .mobile-bottom-nav {
        display: none !important;
    }
}

/* ============================================
   DESKTOPS (1201px+)
   ============================================ */
@media (min-width: 1201px) {
    /* Ocultar nav mobile */
    .mobile-bottom-nav {
        display: none !important;
    }
}

/* ============================================
   AJUSTES PARA TELAS MUITO PEQUENAS (< 360px)
   ============================================ */
@media (max-width: 360px) {
    .hero-title {
        font-size: 1.4rem !important;
    }
    
    .header-logo-img {
        max-height: 50px;
    }
    
    .mobile-nav-item {
        font-size: 0.55rem;
    }
    
    .mobile-nav-item i {
        font-size: 1.1rem;
    }
    
    .mobile-nav-item.nav-main {
        width: 48px;
        height: 48px;
    }
    
    .col-6 {
        padding-left: 5px;
        padding-right: 5px;
    }
}

/* ============================================
   ORIENTAÇÃO LANDSCAPE EM MOBILE
   ============================================ */
@media (max-width: 896px) and (orientation: landscape) {
    .hero-section {
        min-height: 400px !important;
        height: auto !important;
        padding: 80px 0 40px;
    }
    
    .mobile-bottom-nav {
        height: 55px;
    }
    
    .mobile-nav-item.nav-main {
        width: 48px;
        height: 48px;
        margin-top: -15px;
    }
}

/* ============================================
   SAFE AREA PARA IPHONE X+ (Notch)
   ============================================ */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .mobile-bottom-nav {
        padding-bottom: calc(8px + env(safe-area-inset-bottom));
    }
    
    .main-footer {
        padding-bottom: calc(90px + env(safe-area-inset-bottom)) !important;
    }
}

/* ============================================
   ANIMAÇÕES SUAVES
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
    .mobile-nav-item {
        transition: color 0.2s ease, transform 0.2s ease;
    }
    
    .card-dark, .service-card, .barber-card {
        transition: transform 0.2s ease, box-shadow 0.2s ease;
    }
}

/* ============================================
   CARROSSEL HORIZONTAL
   ============================================ */
.carousel-scroll {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 10px 0 20px;
    cursor: grab;
}
.carousel-scroll::-webkit-scrollbar {
    display: none;
}
.carousel-scroll:active {
    cursor: grabbing;
}
.carousel-item-custom {
    scroll-snap-align: start;
    flex-shrink: 0;
}

/* Desktop: centralizar carrossel */
@media (min-width: 992px) {
    .carousel-scroll {
        justify-content: center;
        overflow-x: visible;
    }
}

/* ============================================
   MODO ESCURO FORÇADO (PWA)
   ============================================ */
@media (prefers-color-scheme: dark) {
    :root {
        color-scheme: dark;
    }
}
