/* ============================================
   BASE RESET & VARIABLES
   ============================================ */

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --gold:        #C9AA71;
    --gold-light:  #F4E4BC;
    --gold-dim:    rgba(201, 170, 113, 0.15);
    --gold-border: rgba(201, 170, 113, 0.3);
    --bg-deep:     #0A1628;
    --bg-mid:      #0F2035;
    --glass:       rgba(255, 255, 255, 0.05);
    --glass-solid: rgba(20, 35, 55, 0.95); /* Fallback for broken backdrop-filter */
    --border:      rgba(255, 255, 255, 0.08);
    --text-muted:  rgba(255, 255, 255, 0.5);
    --text-soft:   rgba(255, 255, 255, 0.75);
    --radius-lg:   20px;
    --radius-md:   14px;
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.35);
    --shadow-gold: 0 0 40px rgba(201, 170, 113, 0.12);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: #080E1A; /* Solid fallback */
    background: -webkit-linear-gradient(290deg, #080E1A 0%, #0F2035 45%, #152840 100%);
    background: linear-gradient(160deg, #080E1A 0%, #0F2035 45%, #152840 100%);
    color: #ffffff;
    min-height: 100vh;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0; right: 0; bottom: 0; left: 0;
    /* Disabled by default for Samsung/older WebKit compatibility */
    background-image: none;
    pointer-events: none;
    z-index: 0;
    opacity: 0.4;
}

/* Enable noise texture only on browsers with reliable SVG filter support */
@supports (filter: url(#x)) {
    body::before {
        background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
    }
}

nav section {
    padding-top: 80px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}

/* Menu overlay (mobile) */
.menu-overlay {
    display: none;
    position: fixed;
    top: 0; right: 0; bottom: 0; left: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.menu-overlay.active {
    display: block;
}

/* ============================================
   HEADER
   ============================================ */

.header {
    padding: 22px 0;
    border-bottom: 1px solid var(--border);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
}

.logo i {
    font-size: 1.8rem;
    color: var(--gold);
    filter: drop-shadow(0 0 8px rgba(201,170,113,0.4));
}

.logo h1 {
    font-family: 'Cinzel', serif;
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #fff;
}

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

.nav-link {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    margin-left: 28px;
    letter-spacing: 0.03em;
    transition: color 0.2s;
}

.nav-link:hover,
.nav-link.active {
    color: var(--gold);
}

.header-hamburguer {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.header-hamburguer span {
    width: 25px;
    height: 3px;
    background: var(--gold);
    border-radius: 2px;
    transition: 0.3s;
}

/* ── Language switcher ── */
.lang-switcher {
    position: relative;
    margin-left: 20px;
}

.lang-globe-btn {
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 1rem;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
}

.lang-globe-btn:hover {
    border-color: var(--gold-border);
    color: var(--gold);
}

.lang-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: rgba(10, 22, 40, 0.97);
    border: 1px solid var(--gold-border);
    border-radius: 10px;
    overflow: hidden;
    z-index: 9999;
    min-width: 160px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.lang-dropdown.open {
    display: block;
}

.lang-btn {
    display: block;
    width: 100%;
    padding: 11px 16px;
    background: transparent;
    border: none;
    color: var(--text-soft);
    font-size: 0.85rem;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    letter-spacing: 0.02em;
}

.lang-btn:hover {
    background: var(--glass-hover);
    color: #fff;
}

.lang-btn.active {
    color: var(--gold);
    background: var(--gold-dim);
}

/* ============================================
   HERO / SEARCH SECTION
   ============================================ */

.searchTitle {
    text-align: center;
}

.searchTitle-content {
    max-width: 820px;
    margin: 0 auto;
}

.searchTitle-text {
    margin-bottom: 48px;
}

.searchTitle-title {
    font-family: 'Cinzel', serif;
    font-size: 2.8rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
    color: var(--gold); /* Solid fallback for browsers without gradient text support */
    background: -webkit-linear-gradient(315deg, var(--gold), var(--gold-light));
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.searchTitle-description {
    font-size: 1.1rem;
    color: var(--text-soft);
    line-height: 1.7;
    max-width: 600px;
    margin: 0 auto;
}

/* ============================================
   SEARCH FORM
   ============================================ */

.search-form {
    background: var(--glass-solid);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    padding: 40px;
    border: 1px solid var(--border);
    max-width: 500px;
    margin: 0 auto;
    box-shadow: var(--shadow-card);
    animation: slideUp 0.6s ease-out both;
    border-radius: 14px;
}

.search-form h3 {
    font-family: 'Cinzel', serif;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 28px;
    color: var(--gold);
    letter-spacing: 0.04em;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 13px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
    transition: border-color 0.2s, background 0.2s;
    outline: none;
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--gold-border);
    background: rgba(255, 255, 255, 0.08);
}

.form-group input::placeholder {
    color: var(--text-muted);
}

.form-group select option {
    background: var(--bg-mid);
    color: #fff;
}

.btn-primary {
    width: 100%;
    padding: 14px;
    background: -webkit-linear-gradient(315deg, var(--gold), var(--gold-light));
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    color: var(--bg-deep);
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    letter-spacing: 0.02em;
    margin-top: 8px;
}

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(201, 170, 113, 0.3);
}

.btn-primary:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}

/* Loading */
.loading {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    color: var(--text-soft);
    font-size: 0.9rem;
}

.spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--border);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   FEATURES SECTION
   ============================================ */

.features-content h2 {
    font-family: 'Cinzel', serif;
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 48px;
    color: var(--gold);
    background: -webkit-linear-gradient(315deg, var(--gold), var(--gold-light));
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.feature-card {
    background: var(--glass-solid);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    text-align: center;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
                background 0.25s ease,
                border-color 0.25s ease,
                box-shadow 0.25s ease;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(to right, transparent, var(--gold-border), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.feature-card:hover {
    transform: translateY(-6px);
    background: var(--glass-hover);
    border-color: var(--gold-border);
    box-shadow: var(--shadow-card), var(--shadow-gold);
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 18px;
    border-radius: 50%;
    background: var(--gold-dim);
    border: 1px solid var(--gold-border);
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-icon i {
    font-size: 1.5rem;
    color: var(--gold);
}

.feature-card h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #fff;
}

.feature-card p {
    font-size: 0.88rem;
    line-height: 1.6;
    color: var(--text-muted);
}

/* ============================================
   ABOUT SECTION
   ============================================ */

.about-wrapper {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 0;
    align-items: center;
    background: var(--glass-solid);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-card);
}

.about-text {
    padding: 48px;
}

.about-text h2 {
    font-family: 'Cinzel', serif;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--gold);
    background: -webkit-linear-gradient(315deg, var(--gold), var(--gold-light));
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.about-text p {
    font-size: 0.95rem;
    line-height: 1.75;
    color: var(--text-soft);
    margin-bottom: 14px;
}

.about-text strong {
    color: var(--gold-light);
}

.about-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.about-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
    border-top: 1px solid var(--border);
    text-align: center;
    margin: 48px 0 24px;
    padding-top: 24px;
}

.footer-content p {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 10px;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 8px;
}

.social-link {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 1.1rem;
    transition: color 0.25s, filter 0.25s;
}

.social-link:hover {
    color: var(--gold);
    filter: drop-shadow(0 0 6px rgba(201,170,113,0.5));
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes slideUp {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 940px) {
    .about-wrapper {
        grid-template-columns: 1fr;
    }

    .about-image {
        order: -1;
        max-height: 320px;
        border-bottom: 1px solid var(--border);
    }

    .about-text {
        padding: 32px 28px;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .searchTitle-title { font-size: 2rem; }
    .search-form       { padding: 28px 20px; }
    .logo h1           { font-size: 1.4rem; }

    .header-content {
        flex-wrap: nowrap;
        align-items: center;
        gap: 8px;
    }

    /* ordem: logo | spacer | lang | hamburger */
    .logo        { flex: 1; }
    .nav         { order: 5; }
    .lang-switcher {
        order: 3;
        position: relative;
        margin-left: 0;
        margin-right: 10px;
    }
    .header-hamburguer { order: 4; display: flex; z-index: 1002; }

    .header-hamburguer:hover {
        background: rgba(255,255,255,0.06);
        border-radius: 6px;
    }

    .nav {
        position: fixed;
        top: 4px;
        right: 4px;
        min-height: 20%;
        width: 98%;
        background: var(--bg-mid);
        border: 1px solid var(--border);
        border-radius: var(--radius-lg);

        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 28px;

        transform: translateX(110%);
        transition: transform 0.3s ease;
        z-index: 1001;
    }

    .nav.active {
        transform: translateX(0);
        box-shadow: var(--shadow-card);
    }

    .nav-link {
        margin: 0;
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .container { padding: 0 14px; }
    .logo h1   { font-size: 1.25rem; }
    .features-grid { grid-template-columns: 1fr; }
}

/* ============================================
   BARRA DE PROGRESSO
   ============================================ */

.progress-wrap {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.progress-msg {
    font-size: 0.88rem;
    color: var(--text-soft);
    text-align: center;
    min-height: 1.2em;
}

.progress-track {
    width: 100%;
    height: 6px;
    background: var(--border);
    border-radius: 100px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: -webkit-linear-gradient(left, var(--gold), var(--gold-light));
    background: linear-gradient(90deg, var(--gold), var(--gold-light));
    border-radius: 100px;
    transition: width 0.4s ease;
}

.progress-bar.indeterminate {
    animation: indeterminate 1.4s ease-in-out infinite;
    width: 40% !important;
}

@keyframes indeterminate {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(300%); }
}

.progress-pct {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.04em;
    min-height: 1em;
}

/* ============================================
   ERRO INLINE
   ============================================ */

.error-box {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px;
    background: rgba(255, 99, 99, 0.08);
    border: 1px solid rgba(255, 99, 99, 0.3);
    border-radius: var(--radius-md);
    text-align: center;
}

.error-box i {
    font-size: 1.5rem;
    color: rgba(255, 99, 99, 0.8);
}

.error-box p {
    font-size: 0.9rem;
    color: var(--text-soft);
    line-height: 1.5;
}

.error-close {
    padding: 8px 20px;
    background: transparent;
    border: 1px solid rgba(255, 99, 99, 0.4);
    border-radius: 100px;
    color: rgba(255, 99, 99, 0.8);
    font-size: 0.82rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

.error-close:hover {
    background: rgba(255, 99, 99, 0.1);
    border-color: rgba(255, 99, 99, 0.6);
}

/* ============================================
   GLASS EFFECT — PROGRESSIVE ENHANCEMENT
   Only apply transparent glass where backdrop-filter is supported
   ============================================ */
@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
    .search-form,
    .feature-card,
    .about-wrapper {
        background: var(--glass);
    }
}