/* ========================================
   CODGUS - Tema Medieval/Steampunk
   ======================================== */

/* Variaveis CSS */
:root {
    --gold: #b8860b;
    --gold-light: #d4a520;
    --gold-dark: #8b6914;
    --gold-glow: rgba(184, 134, 11, 0.3);
    --bg-dark: #0a0a0a;
    --bg-card: #111111;
    --bg-card-hover: #1a1a1a;
    --text: #e5e5e5;
    --text-muted: #888888;
    --border: rgba(184, 134, 11, 0.2);
    --font-title: 'Cinzel', serif;
    --font-body: 'Inter', sans-serif;
}

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--bg-dark);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
}

/* Container */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ========================================
   PRELOADER
   ======================================== */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s, visibility 0.5s;
}

#preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

.preloader-content {
    text-align: center;
}

.preloader-logo {
    font-family: var(--font-title);
    font-size: 3rem;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 2rem;
    text-shadow: 0 0 30px var(--gold-glow);
}

.preloader-bar {
    width: 200px;
    height: 4px;
    background: rgba(184, 134, 11, 0.2);
    border-radius: 2px;
    overflow: hidden;
    margin: 0 auto 1rem;
}

.preloader-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--gold), var(--gold-light));
    animation: loading 2s ease-in-out infinite;
}

@keyframes loading {
    0% { width: 0; transform: translateX(-100%); }
    50% { width: 100%; transform: translateX(0); }
    100% { width: 100%; transform: translateX(100%); }
}

.preloader-text {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* ========================================
   HEADER
   ======================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

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

/* Logo */
.logo {
    display: flex;
    flex-direction: column;
}

.logo-text {
    font-family: var(--font-title);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--gold);
    line-height: 1;
}

.logo-badge {
    font-size: 0.625rem;
    color: var(--text-muted);
    letter-spacing: 0.1em;
}

/* Navegacao Desktop */
.nav-desktop {
    display: none;
    align-items: center;
    gap: 0.5rem;
}

@media (min-width: 1024px) {
    .nav-desktop {
        display: flex;
    }
}

.nav-link {
    padding: 0.5rem 1rem;
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 0.5rem;
    transition: all 0.3s;
}

.nav-link:hover,
.nav-link.active {
    color: var(--gold);
    background: rgba(184, 134, 11, 0.1);
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Busca */
.search-box {
    display: none;
    position: relative;
}

@media (min-width: 768px) {
    .search-box {
        display: block;
    }
}

.search-box input {
    width: 200px;
    padding: 0.5rem 2.5rem 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    color: var(--text);
    font-size: 0.875rem;
    transition: all 0.3s;
}

.search-box input:focus {
    outline: none;
    border-color: var(--gold);
    width: 280px;
}

.search-box input::placeholder {
    color: var(--text-muted);
}

.search-btn {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
}

/* Seletor de Idioma */
.language-selector select {
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    color: var(--text);
    font-size: 0.875rem;
    cursor: pointer;
}

/* Botoes */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: var(--bg-dark);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--gold-light), var(--gold));
    transform: translateY(-2px);
    box-shadow: 0 4px 20px var(--gold-glow);
}

.btn-outline {
    background: transparent;
    color: var(--gold);
    border: 1px solid var(--gold);
}

.btn-outline:hover {
    background: var(--gold);
    color: var(--bg-dark);
}

/* Menu Mobile Toggle */
.menu-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

@media (min-width: 1024px) {
    .menu-toggle {
        display: none;
    }
}

.menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text);
    transition: all 0.3s;
}

/* Menu Mobile */
.nav-mobile {
    display: none;
    flex-direction: column;
    padding: 1rem;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
}

.nav-mobile.active {
    display: flex;
}

.nav-mobile .nav-link {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
}

/* ========================================
   HERO SECTION
   ======================================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 7rem 1.5rem 4rem;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse at center, transparent 0%, var(--bg-dark) 70%),
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" fill="none" stroke="%23b8860b" stroke-width="0.5" opacity="0.1"/></svg>');
    background-size: cover, 200px;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 800px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(184, 134, 11, 0.1);
    border: 1px solid var(--border);
    border-radius: 2rem;
    color: var(--gold);
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

.hero-badge .pulse {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.hero-title {
    font-family: var(--font-title);
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 700;
    color: var(--gold);
    text-shadow: 0 0 40px var(--gold-glow);
    margin-bottom: 1rem;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.hero-actions .btn {
    padding: 1rem 2rem;
    font-size: 1rem;
}

/* ========================================
   CARDS
   ======================================== */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1.5rem;
    transition: all 0.3s;
}

.card:hover {
    border-color: var(--gold);
    transform: translateY(-4px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.card-title {
    font-family: var(--font-title);
    font-size: 1.25rem;
    color: var(--gold);
    margin-bottom: 0.75rem;
}

.card-text {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* ========================================
   SECTIONS
   ======================================== */
.section {
    padding: 5rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-family: var(--font-title);
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    color: var(--gold);
    margin-bottom: 0.75rem;
}

.section-subtitle {
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* Grid */
.grid {
    display: grid;
    gap: 1.5rem;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

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

.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    padding: 4rem 0 2rem;
}

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

.footer-logo {
    font-family: var(--font-title);
    font-size: 1.5rem;
    color: var(--gold);
    margin-bottom: 1rem;
}

.footer-description {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.social-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(184, 134, 11, 0.1);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    color: var(--text-muted);
    transition: all 0.3s;
}

.social-link:hover {
    background: var(--gold);
    color: var(--bg-dark);
    border-color: var(--gold);
}

.footer-links h4 {
    font-family: var(--font-title);
    color: var(--gold);
    margin-bottom: 1rem;
}

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

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

.footer-links a {
    color: var(--text-muted);
    font-size: 0.875rem;
    transition: color 0.3s;
}

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

.footer-newsletter h4 {
    font-family: var(--font-title);
    color: var(--gold);
    margin-bottom: 1rem;
}

.footer-newsletter p {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.newsletter-form {
    display: flex;
    gap: 0.5rem;
}

.newsletter-form input {
    flex: 1;
    padding: 0.625rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    color: var(--text);
    font-size: 0.875rem;
}

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

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.875rem;
}

.footer-legal a {
    color: var(--gold);
}

.footer-legal a:hover {
    text-decoration: underline;
}

/* ========================================
   SCROLL TO TOP
   ======================================== */
.scroll-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gold);
    color: var(--bg-dark);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 100;
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 20px var(--gold-glow);
}

/* ========================================
   COOKIE CONSENT
   ======================================== */
.cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    padding: 1rem;
    z-index: 1000;
    transform: translateY(100%);
    transition: transform 0.3s;
}

.cookie-consent.active {
    transform: translateY(0);
}

.cookie-content {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.cookie-content p {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.cookie-content a {
    color: var(--gold);
}

/* ========================================
   UTILITARIOS
   ======================================== */
.text-gold { color: var(--gold); }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mt-4 { margin-top: 2rem; }

/* Glow effect */
.glow {
    text-shadow: 0 0 20px var(--gold-glow);
}

/* Divider */
.divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    margin: 2rem 0;
}

/* Status badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 1rem;
}

.badge-online {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.badge-offline {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.badge-maintenance {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}
