/*
================================================================================
File: index-hub.css
Location: ubec_platform/static/css/index-hub.css
================================================================================

UBEC Platform - Hub/Index Page Styles

Professional, cohesive design with gradient flow from header through content.

Copyright (C) 2024-2025 UBEC DAO
License: GNU General Public License version 3 (GPL-3.0)

This project uses the services of Claude and Anthropic PBC to inform our
decisions and recommendations. This project was made possible with the
assistance of Claude and Anthropic PBC.
================================================================================
*/

/* ============================================================================
   PAGE FOUNDATION
   ============================================================================ */

body.theme-landing {
    background: #f0ebe5;
    min-height: 100vh;
}


/* ============================================================================
   HEADER - Compact gradient section with strong border
   ============================================================================ */

header {
    padding: 1rem 2rem 1.75rem;
    text-align: center;
    position: relative;
    background: linear-gradient(135deg, 
        #5a8a5a 0%, 
        #6b9b6b 25%,
        #7aaa7a 50%,
        #6b9b8a 75%,
        #5a9a9a 100%);
    border-bottom: 5px solid #3d6a3d;
    box-shadow: 0 6px 30px rgba(0,0,0,0.2);
}

header .logo {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

header h1 {
    font-size: 2rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 0.25rem;
    letter-spacing: -0.5px;
}

header .tagline {
    font-size: 1rem;
    color: rgba(255,255,255,0.95);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.ubuntu-quote {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.85);
    max-width: 500px;
    margin: 0 auto;
    font-style: italic;
}

/* Header Navigation - Top Right */
.header-nav {
    position: absolute;
    top: 0.75rem;
    right: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    z-index: 100;
}

/* Language Switcher */
header .lang-switcher {
    display: flex;
    gap: 0.25rem;
    background: rgba(0,0,0,0.2);
    padding: 0.2rem;
    border-radius: 6px;
    backdrop-filter: blur(8px);
}

header .lang-switcher a {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    padding: 0.3rem 0.6rem;
    border-radius: 5px;
    font-size: 0.75rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

header .lang-switcher a:hover {
    background: rgba(255,255,255,0.2);
}

header .lang-switcher a.active {
    background: rgba(255,255,255,0.95);
    color: #2d5016;
}


/* ============================================================================
   AUTH - Login Button & User Menu
   ============================================================================ */

.auth-container {
    position: relative;
}

.login-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(255,255,255,0.95);
    color: #2d5016;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.2s ease;
    border: none;
}

.login-btn:hover {
    background: white;
    box-shadow: 0 2px 12px rgba(0,0,0,0.2);
    transform: translateY(-1px);
}

.user-menu {
    display: none;
    position: relative;
}

.user-menu.visible {
    display: block;
}

.user-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(255,255,255,0.95);
    color: #2d5016;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.user-btn:hover {
    background: white;
    box-shadow: 0 2px 12px rgba(0,0,0,0.2);
    transform: translateY(-1px);
}

.user-avatar {
    font-size: 1rem;
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s ease;
    z-index: 1000;
    overflow: hidden;
}

.user-menu:hover .user-dropdown,
.user-btn:focus + .user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    padding: 1rem 1.25rem;
    background: #faf8f5;
    border-bottom: 1px solid #e8e0d5;
}

.dropdown-header .name {
    font-weight: 700;
    color: #4a3f2f;
}

.dropdown-header .email {
    font-size: 0.85rem;
    color: #7a6b5a;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1.25rem;
    color: #5d4e37;
    text-decoration: none;
    transition: background 0.15s ease;
    font-weight: 500;
}

.dropdown-item:hover {
    background: #f5f2ed;
}

.dropdown-item.danger {
    color: #c53030;
}

.dropdown-item.danger:hover {
    background: #fff5f5;
}

.dropdown-divider {
    height: 1px;
    background: #e8e0d5;
}


/* ============================================================================
   STATUS BAR - Distinct section with borders
   ============================================================================ */

.status-bar {
    display: flex;
    justify-content: center;
    gap: 2.5rem;
    padding: 0.75rem 2rem;
    flex-wrap: wrap;
    background: #ffffff;
    border-bottom: 2px solid #e0d8cc;
    box-shadow: 0 2px 8px rgba(93, 78, 55, 0.05);
}

.status-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #5d4e37;
    font-size: 0.9rem;
}

.status-item strong {
    font-weight: 700;
    color: #4a3f2f;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2); }
    50% { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0.1); }
}


/* ============================================================================
   MAIN CONTENT - Distinct section with subtle earth tone
   ============================================================================ */

main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2.5rem 2rem 3rem;
    background: #fdfcfa;
    min-height: 60vh;
}

.section-title {
    text-align: center;
    font-size: 1.6rem;
    font-weight: 700;
    color: #4a3f2f;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e0d8cc;
}


/* ============================================================================
   SERVICES GRID
   ============================================================================ */

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}

.service-card {
    background: linear-gradient(145deg, #faf8f5 0%, #f5f2ed 100%);
    border-radius: 14px;
    padding: 1.75rem;
    box-shadow: 0 2px 8px rgba(93, 78, 55, 0.08);
    transition: all 0.25s ease;
    border: 2px solid #e0d8cc;
    border-left: 5px solid #8b7355;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(93, 78, 55, 0.12);
    border-color: #c9bfad;
    border-left-color: #6b5540;
}

.service-card.featured {
    background: linear-gradient(145deg, #f5f9f2 0%, #eef5e8 100%);
    border: 2px solid #c5d9b8;
    border-left: 5px solid #4a7c23;
}

.service-card.featured:hover {
    border-color: #a8c898;
    border-left-color: #3d6a1d;
}

.service-icon {
    font-size: 2.25rem;
    margin-bottom: 1rem;
}

.service-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #4a3f2f;
    margin-bottom: 0.5rem;
}

.service-card p {
    font-size: 0.9rem;
    color: #6b5d4d;
    margin-bottom: 1.25rem;
    line-height: 1.55;
}

.service-links {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.service-link {
    color: #2d5016;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.service-link:hover {
    color: #4a7c23;
}

.service-link.dashboard {
    background: linear-gradient(135deg, #2d5016, #4a7c23);
    color: white;
    padding: 0.45rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
}

.service-link.dashboard:hover {
    background: linear-gradient(135deg, #3d6020, #5a8c33);
    box-shadow: 0 2px 8px rgba(45, 80, 22, 0.3);
}

.service-link.api-link {
    font-size: 0.8rem;
    color: #7a9a7a;
    font-weight: 500;
}

.service-link.api-link:hover {
    color: #2d5016;
}
/* =============================================================================
   GAIA-X SERVICE CARD STYLING
   Add this to ubec_platform/static/css/index-landing.css or index-hub.css
   ============================================================================= */

/* Gaia-X Card - European Blue Theme */
.service-card.gaiax-card {
    border-top: 3px solid #003399;
    position: relative;
}

.service-card.gaiax-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #003399 0%, #0044cc 50%, #003399 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.service-card.gaiax-card:hover {
    border-top-color: #0044cc;
}

.service-card.gaiax-card:hover::before {
    opacity: 1;
}

.service-card.gaiax-card .service-icon {
    background: linear-gradient(135deg, #e6ecf5 0%, #ccd9eb 100%);
    border: 1px solid #b3c7e0;
}

/* Optional: Gaia-X Badge */
.service-card.gaiax-card .gaiax-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: #003399;
    color: white;
    font-size: 0.65rem;
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
/* ============================================================================
   SOIL SECTION
   ============================================================================ */

.soil-section {
    background: linear-gradient(135deg, #f5f2eb 0%, #f0ece3 50%, #ebe6dc 100%);
    border-radius: 16px;
    padding: 2.5rem;
    margin-bottom: 2.5rem;
    border: 2px solid #d8cfc0;
    border-left: 5px solid #6b8c52;
    box-shadow: 0 2px 12px rgba(93, 78, 55, 0.08);
}

.soil-section h2 {
    text-align: center;
    color: #4a3f2f;
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
}

.soil-subtitle {
    text-align: center;
    color: #6b5d4d;
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

.questions-preview {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.question-card {
    background: linear-gradient(145deg, #fffdf9 0%, #faf6f0 100%);
    padding: 1.25rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(93, 78, 55, 0.06);
    transition: transform 0.2s ease;
    border: 2px solid #e8dfd2;
    border-left: 4px solid #8b7355;
}

.question-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(93, 78, 55, 0.1);
    border-color: #d8ccba;
    border-left-color: #6b5540;
}

.question-card .category {
    font-size: 0.8rem;
    font-weight: 700;
    color: #5d4e37;
    margin-bottom: 0.5rem;
}

.question-card p {
    font-size: 0.85rem;
    color: #4a3f2f;
    line-height: 1.45;
    margin: 0;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #2d5016, #4a7c23);
    color: white;
    padding: 0.85rem 2rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    transition: all 0.25s ease;
    box-shadow: 0 2px 8px rgba(45, 80, 22, 0.25);
}

.cta-button:hover {
    background: linear-gradient(135deg, #3d6020, #5a8c33);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(45, 80, 22, 0.35);
}


/* ============================================================================
   API SECTION
   ============================================================================ */

.api-section {
    background: linear-gradient(135deg, #f8f6f2 0%, #f5f2ed 100%);
    border-radius: 16px;
    padding: 2.5rem;
    border: 2px solid #e0d8cc;
    border-left: 5px solid #8b7355;
    box-shadow: 0 2px 12px rgba(93, 78, 55, 0.06);
}

.api-section h2 {
    text-align: center;
    color: #4a3f2f;
    margin-bottom: 1.75rem;
    font-size: 1.5rem;
    font-weight: 700;
}

.endpoints-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
}

.endpoint {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    background: linear-gradient(145deg, #fdfcfa 0%, #f8f5f0 100%);
    border-radius: 10px;
    border: 2px solid #e5ddd0;
    border-left: 4px solid #8b7355;
    transition: all 0.2s ease;
}

.endpoint:hover {
    background: linear-gradient(145deg, #faf8f5 0%, #f5f0e8 100%);
    border-color: #d5c9b8;
    border-left-color: #6b5540;
}

.endpoint code {
    font-size: 0.8rem;
    color: #4a3f2f;
    font-family: 'SF Mono', 'Fira Code', monospace;
}

.method {
    font-size: 0.65rem;
    font-weight: 800;
    padding: 0.25rem 0.5rem;
    border-radius: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

.method.get {
    background: #dcfce7;
    color: #166534;
}

.method.post {
    background: #dbeafe;
    color: #1e40af;
}

.method.put {
    background: #fef3c7;
    color: #92400e;
}

.method.delete {
    background: #fee2e2;
    color: #991b1b;
}


/* ============================================================================
   FOOTER - Distinct dark section
   ============================================================================ */

footer {
    background: #1e3a1e;
    color: white;
    padding: 2.5rem 2rem;
    text-align: center;
    border-top: 5px solid #2d5016;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
}

footer strong {
    font-weight: 700;
}

footer p {
    margin-bottom: 0.5rem;
    color: rgba(255,255,255,0.9);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 1.75rem;
    flex-wrap: wrap;
    margin: 1.25rem 0;
}

.footer-links a {
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: white;
}


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

@media (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .questions-preview {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .endpoints-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    header {
        padding: 3rem 1.5rem 1.5rem;
    }
    
    header h1 {
        font-size: 1.5rem;
    }
    
    header .logo {
        font-size: 2.5rem;
    }
    
    .header-nav {
        top: 0.5rem;
        right: 0.5rem;
        gap: 0.5rem;
    }
    
    header .lang-switcher a {
        padding: 0.35rem 0.5rem;
        font-size: 0.75rem;
    }
    
    .login-btn, .user-btn {
        padding: 0.4rem 0.75rem;
        font-size: 0.8rem;
    }
    
    .status-bar {
        gap: 1.5rem;
    }
    
    main {
        padding: 0 1rem 2rem;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .questions-preview {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .soil-section,
    .api-section {
        padding: 1.75rem;
        border-radius: 16px;
    }
    
    .endpoints-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 0.75rem;
    }
}

@media (max-width: 480px) {
    header .logo {
        font-size: 2rem;
    }
    
    header h1 {
        font-size: 1.25rem;
    }
    
    .questions-preview {
        grid-template-columns: 1fr;
    }
    
    .service-card {
        padding: 1.25rem;
    }
}
