/* ========================================
   CSS VARIABLES & GENERAL STYLING
   ======================================== */

:root {
    --primary-text: #000;
    --secondary-text: #888;
    --light-text: #ddd;
    --border-color: #e1e5e9;
    --background-white: #fff;
    --background-gray: rgb(243, 244, 246);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: var(--primary-text);
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

/* Content wrapper that constrains width */
.content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* ========================================
   HEADER SECTION
   ======================================== */

.header-section {
    background-color: var(--background-gray);
    width: 100%;
}

.header {
    display: flex;
    flex-direction: column;
    padding: 24px 0 40px 0;
}

.top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo-section {
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.logo {
    font-size: 48px;
    font-weight: 700;
    color: var(--primary-text);
    letter-spacing: -2px;
    margin-bottom: -8px;
}

.logo-subtitle {
    font-size: 14px;
    color: var(--secondary-text);
    font-weight: 400;
    letter-spacing: 0.5px;
}

.connect-wallet-btn {
    background-color: transparent;
    border: 1px solid var(--border-color);
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    color: var(--primary-text);
    cursor: pointer;
    transition: all 0.2s ease;
}

.connect-wallet-btn:hover {
    background-color: #f1f3f4;
    border-color: #d2d6da;
}

.wallet-separator {
    margin-top: 16px;
    height: 1px;
    background-color: #e0e0e0; /* Light gray */
    width: 100%;
}

.wallet-address {
    margin-top: 12px;
    font-size: 20px;
    font-weight: 500;
    color: var(--primary-text);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.wallet-welcome {
    font-size: 14px;
    color: var(--secondary-text);
    font-weight: 400;
    letter-spacing: 0.5px;
}

/* Wallet Portfolio Button - clone discover-btn */
.wallet-portfolio {
    background-color: var(--primary-text);
    color: var(--background-white);
    border: none;
    padding: 16px 32px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    align-self: flex-start;
    margin-top: 16px; /* small spacing below welcome */
}

.wallet-portfolio:hover {
    background-color: #333;
    transform: translateY(-1px);
}


/* ========================================
   HERO SECTION
   ======================================== */

.main-content-section {
    background-color: var(--background-gray);
    width: 100%;
}

.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 120px;
    align-items: start;
    padding: 0 0 0 0;
}

.hero-section {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.hero-title {
    font-size: 64px;
    font-weight: 600;
    line-height: 1.1;
    color: var(--primary-text);
    letter-spacing: -1px;
}

.hero-description {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding-top: 0;
    gap: 32px;
}

.hero-description p {
    font-size: 18px;
    color: var(--secondary-text);
    line-height: 1.6;
    margin-bottom: 0;
}

.discover-btn {
    background-color: var(--primary-text);
    color: var(--background-white);
    border: none;
    padding: 16px 32px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    align-self: flex-start;
}

.discover-btn:hover {
    background-color: #333;
    transform: translateY(-1px);
}

/* ========================================
   STEPS SECTION
   ======================================== */

.steps-section-wrapper {
    background: linear-gradient(to bottom, var(--background-gray) 0%, var(--background-gray) 50%, var(--background-white) 50%, var(--background-white) 100%);
    width: 100%;
}

.steps-section {
    background-color: var(--background-white);
    border-radius: 16px;
    padding: 60px 48px;
    border: 1px solid var(--border-color);
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0;
}

.step {
    position: relative;
    padding: 0px 32px;
    border-right: 1px solid var(--border-color);
}

.step:last-child {
    border-right: none;
}

.step-number {
    font-size: 120px;
    font-weight: 200;
    color: var(--light-text);
    line-height: 0.8;
    margin-bottom: 24px;
    letter-spacing: -3px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.step-title {
    font-size: 22px;
    font-weight: 600;
    color: var(--primary-text);
    margin-bottom: 16px;
    line-height: 1.2;
}

.step-description {
    font-size: 16px;
    color: var(--secondary-text);
    line-height: 1.5;
    max-width: 300px;
}

/* ========================================
   PROJECTS SECTION
   ======================================== */

.projects-section-wrapper {
    background-color: var(--background-white);
    width: 100%;
    padding: 40px 0 80px 0;
}

/* Projects Tabs */
.projects-tabs {
    display: flex;
    align-items: center;
    gap: 40px;
    margin-bottom: 40px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 16px;
}

.tab-btn {
    background: none;
    border: none;
    font-size: 16px;
    font-weight: 500;
    color: var(--secondary-text);
    cursor: pointer;
    padding: 8px 0;
    transition: color 0.2s ease;
    position: relative;
}

.tab-btn.active {
    color: var(--primary-text);
    font-weight: 600;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -17px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: var(--primary-text);
}

.tab-btn:hover {
    color: var(--primary-text);
}

.list-project-btn {
    background-color: transparent;
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    color: var(--primary-text);
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: auto;
}

.list-project-btn:hover {
    background-color: var(--background-gray);
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

/* Project Card */
.project-card {
    background-color: var(--background-white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    min-height: 200px;
}

.project-card:hover {
    border-color: #ccc;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Project Left Content */
.project-left-content {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Project Header */
.project-header {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    margin-bottom: 16px;
}

.project-logo {
    width: 64px;
    height: 64px;
    background-color: var(--light-text);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-logo img {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    object-fit: cover;
}

.project-arrow {
    background-color: var(--background-gray);
    border: none;
    font-size: 16px;
    color: var(--secondary-text);
    cursor: pointer;
    padding: 8px 10px;
    border-radius: 6px;
    transition: all 0.2s ease;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 24px;
    right: 24px;
}

.project-arrow:hover {
    background-color: #d1d5db;
    color: var(--primary-text);
}

/* Project Info */
.project-info {
    margin-bottom: 20px;
}

.project-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-text);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.project-symbol {
    font-size: 14px;
    font-weight: 500;
    color: var(--secondary-text);
}

.project-website {
    font-size: 14px;
    color: var(--secondary-text);
    margin: 0;
}

/* Project Stats */
.project-stats {
    margin-top: auto;
}

.total-funds-label {
    font-size: 14px;
    color: var(--secondary-text);
    margin-bottom: 4px;
}

.total-funds {
    font-size: 24px;
    font-weight: 600;
    color: var(--primary-text);
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.eth-price {
    font-size: 14px;
    font-weight: 400;
    color: var(--secondary-text);
}

/* Project Chart */
.project-chart {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.project-chart svg {
    width: 100%;
    height: 80%;
    opacity: 0.7;
}

/* Show More */
.show-more-container {
    display: flex;
    justify-content: center;
    margin-top: 40px;
}

.show-more-btn {
    background-color: transparent;
    border: 1px solid var(--border-color);
    padding: 12px 32px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    color: var(--primary-text);
    cursor: pointer;
    transition: all 0.2s ease;
}

.show-more-btn:hover {
    background-color: var(--background-gray);
}

/* ========================================
   FAQ SECTION
   ======================================== */

.faq-section-wrapper {
    background-color: var(--background-white);
    width: 100%;
    padding: 80px 0;
}

.faq-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: start;
}

.faq-left {
    position: sticky;
    top: 100px;
}

.faq-title {
    font-size: 48px;
    font-weight: 600;
    color: var(--primary-text);
    margin-bottom: 16px;
    line-height: 1.1;
}

.faq-subtitle {
    font-size: 16px;
    color: var(--secondary-text);
    margin-bottom: 32px;
}

.contact-btn {
    background-color: var(--primary-text);
    color: var(--background-white);
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.contact-btn:hover {
    background-color: #333;
}

.faq-right {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.faq-item {
    border-bottom: 1px solid var(--border-color);
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-text);
    cursor: pointer;
    transition: all 0.2s ease;
}

.faq-question:hover {
    color: #555;
}

.faq-toggle {
    font-size: 24px;
    font-weight: 300;
    color: var(--secondary-text);
    transition: transform 0.3s ease;
}

.faq-toggle.open {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0;
}

.faq-answer.open {
    max-height: 200px;
    padding-bottom: 24px;
}

.faq-answer p {
    font-size: 16px;
    color: var(--secondary-text);
    line-height: 1.6;
    margin: 0;
}

/* ========================================
   CTA SECTION
   ======================================== */

.cta-section-wrapper {
    background-color: #4a5568;
    width: 100%;
    padding: 80px 0;
}

.cta-container {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.cta-content {
    margin-bottom: 0;
}

.cta-subtitle {
    font-size: 16px;
    color: #a0aec0;
    margin-bottom: 24px;
}

.cta-title {
    font-size: 40px;
    font-weight: 600;
    color: var(--background-white);
    line-height: 1.2;
    margin-bottom: 40px;
}

.highlight {
    color: #81c784;
}

.cta-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.learn-more-btn {
    background-color: transparent;
    border: 1px solid #718096;
    color: var(--background-white);
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.learn-more-btn:hover {
    background-color: #718096;
}

.integrate-btn {
    background-color: var(--background-white);
    color: var(--primary-text);
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.integrate-btn:hover {
    background-color: #f7fafc;
}

/* ========================================
   FOOTER SECTION
   ======================================== */

.footer-section-wrapper {
    background-color: var(--background-white);
    width: 100%;
    padding: 40px 0;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.footer-logo {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-text);
    letter-spacing: -1px;
}

/* Footer Links Styling */
.footer-links {
    display: flex;
    gap: 20px;
}

.footer-link {
    color: var(--primary-text);
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: color 0.2s ease;
}

.footer-link:hover {
    color: var(--secondary-text);
}

.footer-social {
    display: flex;
    gap: 16px;
}

.social-link {
    color: var(--secondary-text);
    transition: color 0.2s ease;
    text-decoration: none;
}

.social-link:hover {
    color: var(--primary-text);
}

/* ========================================
   RESPONSIVE DESIGN - GENERAL
   ======================================== */

@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr;
        gap: 60px;
    }
    
    .hero-title {
        font-size: 48px;
    }
    
    .steps-section {
        grid-template-columns: 1fr;
        gap: 48px;
    }
}

@media (max-width: 768px) {
    .content-wrapper {
        padding: 0 16px;
    }
    
    .header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
        margin-bottom: 40px;
    }
    
    .logo {
        font-size: 36px;
    }
    
    .hero-title {
        font-size: 36px;
    }
    
    .steps-section {
        padding: 32px 24px;
        grid-template-columns: 1fr;
        gap: 48px;
    }
    
    .step-number {
        font-size: 120px;
        top: -10px;
    }
    
    .step-title {
        font-size: 20px;
    }
    
    /* Footer responsive styling */
    .footer-content {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .footer-links {
        order: 2;
    }
    
    .footer-social {
        order: 3;
    }
}

/* ========================================
   RESPONSIVE DESIGN - FAQ AND CTA
   ======================================== */

@media (max-width: 1024px) {
    .faq-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .faq-left {
        position: static;
        text-align: center;
    }
    
    .cta-title {
        font-size: 32px;
    }
}

@media (max-width: 768px) {
    .faq-title {
        font-size: 36px;
    }
    
    .cta-title {
        font-size: 28px;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .cta-buttons button {
        width: 200px;
    }
}

/* ========================================
   RESPONSIVE DESIGN - PROJECTS
   ======================================== */

@media (max-width: 768px) {
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .projects-tabs {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }
    
    .tab-btn {
        text-align: left;
        padding: 12px 0;
    }
    
    .list-project-btn {
        margin-left: 0;
        align-self: flex-start;
    }
    
    .project-card {
        padding: 20px;
    }
    
    .total-funds {
        font-size: 20px;
    }
}

/* ===== Custom Modal Styling ===== */
#customPopup {
  font-family: 'Inter', sans-serif;
  background-color: #1f2937; /* dark gray */
  color: #111827;
  padding: 24px;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
  max-width: 400px;
  width: 90%;
  text-align: center;
  z-index: 10000;
}

#customPopup #popupContent {
  font-size: 16px;
  margin-bottom: 20px;
  white-space: pre-wrap; /* Preserve line breaks from \n */
}

#customPopup button {
  background-color: #3b82f6; /* blue-500 */
  border: none;
  border-radius: 6px;
  padding: 10px 16px;
  color: white;
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

#customPopup button:hover {
  background-color: #2563eb; /* blue-600 */
}

#customPopup button + button {
  background-color: #374151; /* gray-700 */
  margin-left: 10px;
}

#customPopup button + button:hover {
  background-color: #4b5563; /* gray-600 */
}