/* =========================================
   DRIVOLO 2.0 - PREMIUM UI BASE STYLES
   ========================================= */

/* 1. IMPORTS & FONTS */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

/* 2. VARIABLES & THEME CONFIG */
:root {
    /* Core Palette */
    --brand-dark: #0f111a;       /* Fundo Profundo */
    --brand-surface: #1a1e2e;    /* Superfícies de Cartões */
    --brand-red: #E53E3E;        /* Vermelho Drivolo */
    --brand-red-hover: #c53030;
    --brand-accent: #3B82F6;     /* Azul Elétrico (Secundário) */
    
    /* Glassmorphism System */
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-blur: blur(20px);
    
    /* Typography & Text */
    --text-primary: #FFFFFF;
    --text-secondary: #94a3b8;
    --font-main: 'Plus Jakarta Sans', sans-serif;
    
    /* Layout */
    --navbar-height: 80px;
}

/* 3. GLOBAL RESETS */
body {
    background-color: var(--brand-dark);
    font-family: var(--font-main);
    color: var(--text-primary);
    overflow-x: hidden; /* Evita scroll horizontal indesejado */
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; }

/* 4. NAVBAR (Transparent Premium Overlay) */
.navbar-autobuy {
    background: rgba(15, 17, 26, 0.85) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    position: fixed; /* Fixa no topo */
    top: 0;
    width: 100%;
    z-index: 1000;
    height: var(--navbar-height);
    transition: all 0.3s ease;
}

.navbar-brand {
    font-weight: 800;
    letter-spacing: -1px;
    font-size: 1.6rem;
    color: var(--text-primary) !important;
}

/* Nav Links Styling */
.navbar-nav .nav-link {
    font-weight: 500;
    color: var(--text-secondary) !important;
    transition: color 0.2s;
}
.navbar-nav .nav-link:hover, 
.navbar-nav .nav-link.active {
    color: var(--text-primary) !important;
}

/* 5. HERO SECTION "THE ENGINE" */
.hero-wrapper {
    background: var(--brand-dark);
    position: relative;
    overflow: hidden;
    min-height: 90vh; /* Altura imersiva */
    display: flex;
    align-items: center;
    padding-top: var(--navbar-height);
}

/* Background Animated Blob */
.hero-glow-blob {
    position: absolute;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(229,62,62,0.12) 0%, rgba(0,0,0,0) 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 1;
    animation: pulse-glow 8s infinite alternate;
}

/* 6. SEARCH ENGINE CARD (The Centerpiece) */
.match-engine-container {
    background: rgba(30, 35, 50, 0.6);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 10px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 10;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s;
}

.match-engine-container:focus-within {
    transform: translateY(-2px);
    box-shadow: 0 40px 70px -12px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(229, 62, 62, 0.3);
    border-color: rgba(229, 62, 62, 0.3);
}

/* Input Styles */
.engine-input-group {
    display: flex;
    align-items: center;
    background: transparent;
    border-radius: 20px;
    padding: 6px;
}

.engine-icon {
    color: var(--text-secondary);
    padding-left: 1.5rem;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
}

.engine-input {
    background: transparent !important;
    border: none !important;
    color: white !important;
    font-size: 1.1rem !important;
    font-weight: 500;
    height: 60px;
    box-shadow: none !important;
    padding-left: 1rem !important;
    width: 100%;
}

.engine-input::placeholder { 
    color: #64748b !important; 
    font-weight: 400; 
}

/* Divisor Vertical entre inputs */
.engine-divider {
    width: 1px;
    height: 32px;
    background: rgba(255,255,255,0.1);
    margin: 0 10px;
}

/* Custom Select Dropdown Arrow */
select.engine-input {
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 16 16' fill='%2394a3b8'%3E%3Cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 1rem center !important;
    padding-right: 2.5rem !important;
}

/* Button "Search" */
.btn-engine-go {
    background: var(--brand-red);
    color: white;
    border: none;
    border-radius: 16px;
    height: 56px;
    padding: 0 32px;
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(229, 62, 62, 0.4);
    white-space: nowrap;
}

.btn-engine-go:hover {
    background: var(--brand-red-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(229, 62, 62, 0.6);
    color: white;
}

/* 7. QUICK ACTION CARDS (Below Search) */
.quick-card {
    display: block;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 1.25rem 1rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    height: 100%;
}

.quick-card:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.15);
}

.quick-card i { 
    font-size: 1.5rem; 
    margin-bottom: 0.75rem; 
    display: block;
    color: var(--brand-red);
    transition: transform 0.3s;
}

.quick-card:hover i { transform: scale(1.1); }

.quick-card span { 
    color: var(--text-secondary); 
    font-size: 0.9rem; 
    font-weight: 600; 
    transition: color 0.3s;
}

.quick-card:hover span { color: white; }

/* 8. ANIMATIONS */
@keyframes pulse-glow {
    0% { opacity: 0.4; transform: translate(-50%, -50%) scale(0.95); }
    100% { opacity: 0.7; transform: translate(-50%, -50%) scale(1.05); }
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

/* 9. MOBILE RESPONSIVENESS */
@media (max-width: 991px) {
    .hero-wrapper { 
        padding-top: 120px; /* Mais espaço para navbar */
        min-height: auto; 
        padding-bottom: 80px; 
    }
    
    .match-engine-container {
        padding: 15px;
    }

    .engine-input-group { 
        flex-direction: column; 
        align-items: stretch; 
        gap: 0; 
        padding: 0;
    }
    
    .engine-divider { display: none; }
    .engine-icon { display: none; } 
    
    .engine-input { 
        border-bottom: 1px solid rgba(255,255,255,0.1) !important; 
        height: 55px; 
        padding-left: 0.5rem !important;
        border-radius: 0;
    }
    
    .btn-engine-go { 
        width: 100%; 
        margin-top: 15px; 
    }
}

/* ===== Global page offset under navbar (works for all pages) ===== */
:root{
  --nav-offset: 96px;           /* desktop */
  --nav-offset-mobile: 112px;   /* mobile */
}

/* Use this class on pages that need consistent spacing under the navbar */
.page-shell{
  padding-top: var(--nav-offset);
  padding-bottom: 3rem;
}

/* Mobile */
@media (max-width: 576px){
  .page-shell{
    padding-top: var(--nav-offset-mobile);
  }
}