/* Thimar Brand Colors */
:root {
    --thimar-primary-green: #1C7C54;
    --thimar-secondary-green: #4CAF50;
    --thimar-harvest-gold: #D49A27;
    --thimar-dark-text: #203030;
    --thimar-light-bg: #F5F7F5;
}

/* Override Bootstrap primary colors */
:root {
    --bs-primary: var(--thimar-primary-green);
    --bs-primary-rgb: 28, 124, 84;
    --bs-secondary: var(--thimar-secondary-green);
    --bs-secondary-rgb: 76, 175, 80;
}

/* Global Styles */
html, body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--thimar-light-bg);
    color: var(--thimar-dark-text);
}

/* Layout */
.page {
    position: relative;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

.sidebar {
    background-image: linear-gradient(180deg, var(--thimar-primary-green) 0%, #155a3a 70%);
}

.top-row {
    background-color: #fff;
    border-bottom: 1px solid #d6d5d5;
    justify-content: flex-start;
    height: 3.5rem;
    display: flex;
    align-items: center;
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.top-row .brand-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--thimar-primary-green);
    margin: 0;
}

.logo-small {
    height: 40px;
    width: auto;
}

/* Navigation */
.navbar-toggler {
    background-color: rgba(255, 255, 255, 0.1);
}

.navbar-brand {
    font-size: 1.1rem;
    color: white;
    font-weight: 600;
}

.oi {
    width: 2rem;
    font-size: 1.1rem;
    vertical-align: text-top;
    top: -2px;
}

.nav-item {
    font-size: 0.9rem;
    padding-bottom: 0.5rem;
}

.nav-item:first-of-type {
    padding-top: 1rem;
}

.nav-item:last-of-type {
    padding-bottom: 1rem;
}

.nav-item ::deep a {
    color: #d7d7d7;
    border-radius: 4px;
    height: 3rem;
    display: flex;
    align-items: center;
    line-height: 3rem;
    transition: all 0.3s;
}

.nav-item ::deep a.active {
    background-color: rgba(255,255,255,0.25);
    color: white;
    font-weight: 600;
}

.nav-item ::deep a:hover {
    background-color: rgba(255,255,255,0.1);
    color: white;
}

/* Content */
.content {
    padding-top: 1.1rem;
    min-height: calc(100vh - 3.5rem);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--thimar-primary-green) 0%, var(--thimar-secondary-green) 100%);
    color: white;
    padding: 4rem 0;
    margin: -1.1rem -1rem 0 -1rem;
    border-radius: 0 0 20px 20px;
}

.hero-section h1 {
    color: white;
}

.hero-section .btn-primary {
    background-color: var(--thimar-harvest-gold);
    border-color: var(--thimar-harvest-gold);
    color: white;
    font-weight: 600;
}

.hero-section .btn-primary:hover {
    background-color: #b8851f;
    border-color: #b8851f;
}

.hero-section .btn-outline-primary {
    border-color: white;
    color: white;
}

.hero-section .btn-outline-primary:hover {
    background-color: white;
    color: var(--thimar-primary-green);
}

.hero-logo {
    max-height: 300px;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
}

/* Feature Cards */
.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    text-align: center;
    height: 100%;
    transition: transform 0.3s, box-shadow 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    color: var(--thimar-primary-green);
    margin-bottom: 1rem;
}

/* Listing Cards */
.listing-card {
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    transition: all 0.3s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.listing-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
    border-color: var(--thimar-primary-green);
}

.listing-card .card-title {
    color: var(--thimar-primary-green);
    font-weight: 600;
}

.listing-card .text-primary {
    color: var(--thimar-harvest-gold) !important;
    font-weight: 700;
}

/* Buttons */
.btn-primary {
    background-color: var(--thimar-primary-green);
    border-color: var(--thimar-primary-green);
}

.btn-primary:hover {
    background-color: #155a3a;
    border-color: #155a3a;
}

.btn-outline-primary {
    color: var(--thimar-primary-green);
    border-color: var(--thimar-primary-green);
}

.btn-outline-primary:hover {
    background-color: var(--thimar-primary-green);
    border-color: var(--thimar-primary-green);
}

/* Badges */
.badge.bg-secondary {
    background-color: var(--thimar-secondary-green) !important;
}

/* Responsive */
@media (max-width: 640.98px) {
    .top-row:not(.auth) {
        display: none;
    }

    .top-row.auth {
        justify-content: space-between;
    }

    .top-row a, .top-row .btn-link {
        margin-left: 0;
    }
}

@media (min-width: 641px) {
    .page {
        flex-direction: row;
    }

    .sidebar {
        width: 250px;
        height: 100vh;
        position: sticky;
        top: 0;
    }

    .top-row {
        position: sticky;
        top: 0;
        z-index: 1;
    }

    .top-row, article {
        padding-left: 2rem !important;
        padding-right: 1.5rem !important;
    }
}

/* Error UI */
#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

