/**
 * COMARBS — CSS Principal
 * Identidade Visual: Navy, Dourado, Vinho, Off-white
 * Fontes: Playfair Display, Cinzel, Lato
 */

/* ===================================================
   BASE & RESET
   =================================================== */
:root {
    --navy: #1a1a5e;
    --navy-dark: #0e0e32;
    --navy-light: #2d2d84;
    --gold: #c9a84c;
    --gold-dark: #9a7528;
    --gold-light: #e5ca75;
    --wine: #8B0000;
    --wine-dark: #5a0000;
    --wine-light: #c01818;
    --offwhite: #f8f6f0;
}

::selection {
    background-color: var(--gold);
    color: var(--navy);
}

/* Scrollbar customizada */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--offwhite);
}
::-webkit-scrollbar-thumb {
    background: var(--gold);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--gold-dark);
}

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

/* ===================================================
   NAVBAR — Desktop
   =================================================== */
.nav-link {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    white-space: nowrap;
}
.nav-link:hover {
    color: var(--gold);
    background-color: rgba(255, 255, 255, 0.05);
}
.nav-active {
    color: var(--gold) !important;
    background-color: rgba(201, 168, 76, 0.1);
}

/* Dropdown */
.nav-dropdown {
    position: relative;
}
.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: var(--navy);
    border: 1px solid rgba(201, 168, 76, 0.15);
    border-radius: 0.75rem;
    padding: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 0.2s ease;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    z-index: 60;
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown.open .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.nav-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
    border-radius: 0.5rem;
    transition: all 0.15s ease;
}
.nav-dropdown-item:hover {
    color: var(--gold);
    background-color: rgba(201, 168, 76, 0.1);
}

/* ===================================================
   NAVBAR — Mobile
   =================================================== */
.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.9375rem;
    border-radius: 0.5rem;
    transition: all 0.15s ease;
}
.mobile-nav-link:hover {
    color: var(--gold);
    background-color: rgba(255, 255, 255, 0.05);
}
.mobile-nav-sublink {
    display: block;
    padding: 0.5rem 1rem;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
    border-radius: 0.375rem;
    transition: all 0.15s ease;
}
.mobile-nav-sublink:hover {
    color: var(--gold);
    background-color: rgba(255, 255, 255, 0.05);
}

/* ===================================================
   ADMIN SIDEBAR
   =================================================== */
.admin-nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8125rem;
    border-radius: 0.5rem;
    transition: all 0.15s ease;
}
.admin-nav-link:hover {
    color: white;
    background-color: rgba(255, 255, 255, 0.05);
}
.admin-nav-active {
    color: var(--gold) !important;
    background-color: rgba(201, 168, 76, 0.1) !important;
}

/* ===================================================
   GRADIENTS & BACKGROUNDS
   =================================================== */
.bg-gradient-navy {
    background: linear-gradient(135deg, var(--navy), var(--navy-dark));
}
.bg-gradient-navy-wine {
    background: linear-gradient(135deg, var(--navy), var(--wine-dark));
}
.bg-gradient-gold {
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
}

/* Padrão com textura sutil */
.bg-pattern {
    background-image: radial-gradient(circle at 1px 1px, rgba(201, 168, 76, 0.05) 1px, transparent 0);
    background-size: 40px 40px;
}

/* ===================================================
   CARDS & COMPONENTES
   =================================================== */
.card {
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    overflow: hidden;
}
.card:hover {
    box-shadow: 0 8px 30px rgba(26, 26, 94, 0.12);
    transform: translateY(-2px);
}

/* Divider dourado */
.divider-gold {
    height: 3px;
    width: 60px;
    background: linear-gradient(90deg, var(--gold), transparent);
    border-radius: 3px;
}

/* Tag / Badge */
.tag {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-family: 'Cinzel', serif;
    font-size: 0.625rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
}
.tag-gold {
    background: rgba(201, 168, 76, 0.1);
    color: var(--gold-dark);
    border: 1px solid rgba(201, 168, 76, 0.2);
}
.tag-navy {
    background: rgba(26, 26, 94, 0.1);
    color: var(--navy);
    border: 1px solid rgba(26, 26, 94, 0.15);
}
.tag-wine {
    background: rgba(139, 0, 0, 0.08);
    color: var(--wine);
    border: 1px solid rgba(139, 0, 0, 0.15);
}

/* ===================================================
   BUTTONS
   =================================================== */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.5rem;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: var(--navy);
    font-weight: 700;
    font-size: 0.875rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(201, 168, 76, 0.3);
}
.btn-primary:hover {
    box-shadow: 0 4px 16px rgba(201, 168, 76, 0.4);
    transform: translateY(-1px);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.5rem;
    background: var(--navy);
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}
.btn-secondary:hover {
    background: var(--navy-light);
}

.btn-wine {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.5rem;
    background: linear-gradient(135deg, var(--wine), var(--wine-dark));
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}
.btn-wine:hover {
    box-shadow: 0 4px 16px rgba(139, 0, 0, 0.3);
}

/* ===================================================
   FORM ELEMENTS
   =================================================== */
.form-input {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    background: white;
}
.form-input:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.15);
}
.form-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.375rem;
}

/* ===================================================
   SECTION TITLES
   =================================================== */
.section-title {
    font-family: 'Playfair Display', serif;
    color: var(--navy);
    font-weight: 700;
}
.section-subtitle {
    font-family: 'Cinzel', serif;
    color: var(--gold);
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

/* ===================================================
   SCROLL REVEAL ANIMATION
   =================================================== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered animation */
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ===================================================
   GOLDEN PARTICLES (Canvas overlay)
   =================================================== */
#particles-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

/* ===================================================
   FLASH MESSAGES
   =================================================== */
.flash-message {
    padding: 0.875rem 1.25rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: flashIn 0.3s ease;
}
.flash-success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}
.flash-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}
.flash-warning {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
}
.flash-info {
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}
@keyframes flashIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===================================================
   AVATAR PLACEHOLDER
   =================================================== */
.avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--navy), var(--navy-light));
    color: var(--gold);
    font-family: 'Cinzel', serif;
    font-weight: 700;
}

/* ===================================================
   PAGE HERO (Páginas internas)
   =================================================== */
.page-hero {
    background: linear-gradient(135deg, var(--navy), var(--navy-dark));
    padding: 3rem 0 2.5rem;
    position: relative;
    overflow: hidden;
}
.page-hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(to top, var(--offwhite), transparent);
}

/* ===================================================
   UTILITIES
   =================================================== */
.text-gradient-gold {
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.border-gold-subtle {
    border-color: rgba(201, 168, 76, 0.2);
}

/* Hover image zoom */
.img-zoom {
    overflow: hidden;
}
.img-zoom img {
    transition: transform 0.4s ease;
}
.img-zoom:hover img {
    transform: scale(1.05);
}

/* Print */
@media print {
    .no-print { display: none !important; }
    body { background: white; }
}
