/* =============================================
   Team8 Fintech Fund II - Investor Data Room
   Clean, Professional, Modern Design
   ============================================= */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background-color: #f5f7fa;
    color: #1a1a2e;
    line-height: 1.6;
}

/* =============================================
   Header Styles
   ============================================= */
.header {
    background: linear-gradient(135deg, #1a56db 0%, #1e40af 50%, #1e3a8a 100%);
    color: white;
    padding: 2rem 0;
    box-shadow: 0 4px 20px rgba(26, 86, 219, 0.3);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.logo-icon {
    width: 70px;
    height: 70px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    backdrop-filter: blur(10px);
}

.title-section h1 {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    font-weight: 400;
}

.header-meta {
    text-align: right;
}

.last-updated {
    font-size: 0.9rem;
    opacity: 0.85;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 20px;
}

/* =============================================
   Main Content Area
   ============================================= */
.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* =============================================
   Section Dividers
   ============================================= */
.section-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 3rem 0 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e2e8f0;
}

.section-divider:first-child {
    margin-top: 0;
}

.section-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #1a56db 0%, #1e40af 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.3rem;
    box-shadow: 0 4px 12px rgba(26, 86, 219, 0.25);
}

.section-divider h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #1a1a2e;
    letter-spacing: 1px;
}

/* =============================================
   Management Team Section
   ============================================= */
.management-section {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.subsection-title {
    font-size: 1.2rem;
    color: #374151;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.subsection-title i {
    color: #1a56db;
}

/* Partner Cards */
.partner-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.partner-card {
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.partner-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(26, 86, 219, 0.15);
    border-color: #1a56db;
}

.partner-avatar {
    margin-bottom: 1rem;
}

.partner-avatar img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid #1a56db;
    box-shadow: 0 4px 15px rgba(26, 86, 219, 0.25);
}

.partner-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 0.25rem;
}

.partner-title {
    font-size: 0.95rem;
    color: #6b7280;
    margin-bottom: 1rem;
}

.view-bio-btn {
    background: linear-gradient(135deg, #1a56db 0%, #1e40af 100%);
    color: white;
    border: none;
    padding: 0.6rem 1.5rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
}

.view-bio-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(26, 86, 219, 0.35);
}

.partner-docs {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.doc-icon {
    width: 36px;
    height: 36px;
    background: #f1f5f9;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
}

.doc-icon:hover {
    background: #1a56db;
    color: white;
}

/* =============================================
   Folder Grid
   ============================================= */
.folder-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1rem;
}

.subfolder-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    margin-top: 1.5rem;
}

/* Folder Cards */
.folder-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.folder-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border-color: #1a56db;
}

.folder-card.expanded {
    border-color: #1a56db;
    box-shadow: 0 10px 25px rgba(26, 86, 219, 0.15);
}

.folder-card.expanded .expand-icon {
    transform: rotate(180deg);
}

.folder-icon {
    width: 55px;
    height: 55px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: white;
}

/* Folder Icon Colors */
.folder-icon.blue { background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%); }
.folder-icon.purple { background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%); }
.folder-icon.teal { background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%); }
.folder-icon.green { background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%); }
.folder-icon.orange { background: linear-gradient(135deg, #f97316 0%, #ea580c 100%); }
.folder-icon.pink { background: linear-gradient(135deg, #ec4899 0%, #db2777 100%); }
.folder-icon.red { background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%); }
.folder-icon.maroon { background: linear-gradient(135deg, #be123c 0%, #9f1239 100%); }
.folder-icon.brown { background: linear-gradient(135deg, #a16207 0%, #854d0e 100%); }
.folder-icon.navy { background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%); }
.folder-icon.yellow { background: linear-gradient(135deg, #eab308 0%, #ca8a04 100%); }
.folder-icon.gray { background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%); }
.folder-icon.advisors { background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%); }
.folder-icon.village { background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%); }

.folder-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.file-count {
    font-size: 0.8rem;
    color: #6b7280;
    background: #f1f5f9;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    display: inline-block;
}

.file-count.empty {
    background: #fef3c7;
    color: #92400e;
}

.expand-icon {
    position: absolute;
    top: 1rem;
    right: 1rem;
    color: #9ca3af;
    transition: transform 0.3s ease;
    font-size: 0.9rem;
}

/* =============================================
   Folder Contents
   ============================================= */
.folder-contents {
    display: none;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1rem;
    margin: 0.5rem 0 1.5rem;
}

.folder-contents.visible {
    display: block;
    animation: slideDown 0.3s ease;
}

/* Inline drawer - spans full width of grid row */
.folder-contents.inline-drawer {
    grid-column: 1 / -1;
    margin: 0 0 1rem 0;
    position: relative;
    overflow: visible;
}

/* Arrow pointing to parent folder */
.folder-contents.inline-drawer::before {
    content: '';
    position: absolute;
    top: -8px;
    left: var(--drawer-arrow-position, 50px);
    width: 16px;
    height: 16px;
    background: #f8fafc;
    border-left: 1px solid #e2e8f0;
    border-top: 1px solid #e2e8f0;
    transform: rotate(45deg);
    z-index: 1;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.file-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: white;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: #374151;
    transition: all 0.2s ease;
    cursor: pointer;
}

.file-item:last-child {
    margin-bottom: 0;
}

.file-item:hover {
    background: #e0e7ff;
    transform: translateX(5px);
}

.file-item.subfolder {
    background: #fef9c3;
}

.file-item.subfolder:hover {
    background: #fde047;
}

/* File Icons */
.pdf-icon {
    color: #dc2626;
    font-size: 1.1rem;
}

.excel-icon {
    color: #16a34a;
    font-size: 1.1rem;
}

.folder-icon-small {
    color: #eab308;
    font-size: 1.1rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 2rem;
    color: #9ca3af;
}

.empty-state i {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    opacity: 0.5;
}

.empty-state p {
    font-size: 0.9rem;
}

/* =============================================
   Footer
   ============================================= */
.footer {
    background: #1a1a2e;
    color: #9ca3af;
    text-align: center;
    padding: 1.5rem;
    margin-top: 3rem;
    font-size: 0.85rem;
}

/* =============================================
   Responsive Design
   ============================================= */
@media (max-width: 1024px) {
    .folder-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .partner-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .logo-section {
        flex-direction: column;
    }

    .header-meta {
        text-align: center;
    }

    .folder-grid {
        grid-template-columns: 1fr;
    }

    .partner-cards {
        grid-template-columns: 1fr;
    }

    .title-section h1 {
        font-size: 1.5rem;
    }

    .section-divider h2 {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 1rem;
    }

    .management-section {
        padding: 1rem;
    }

    .partner-card {
        padding: 1.5rem;
    }
}

/* =============================================
   Animations & Polish
   ============================================= */
.folder-card,
.partner-card,
.file-item,
.view-bio-btn,
.doc-icon {
    will-change: transform;
}

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

/* Selection color */
::selection {
    background: #1a56db;
    color: white;
}
