/**
 * Landing Page Styles - African Infrastructure Database
 * Modern, clean design for infrastructure platform
 */

:root {
    --primary-color: #712a2a;
    --primary-dark: #5a2121;
    --primary-light: #8b3434;
    --secondary-color: #3b82f6;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --dark: #1f2937;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--gray-800);
    background-color: #ffffff;
}

/* Navigation */
.navbar {
    background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.25rem 3rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    position: relative;
}

.nav-brand {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.nav-text {
    display: flex;
    flex-direction: column;
}

.nav-title {
    font-size: 1.125rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2.5rem;
    align-items: center;
    margin: 0;
    padding: 0;
    flex-wrap: nowrap;
    white-space: nowrap;
}

/* Hide mobile-only auth links on desktop */
.nav-menu-auth {
    display: none;
}

/* Hamburger Button - hidden on desktop */
.nav-hamburger {
    display: none !important;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    background: none;
    border: 1.5px solid var(--gray-200);
    border-radius: 8px;
    cursor: pointer;
    padding: 7px;
    flex-shrink: 0;
    transition: all 0.2s;
}
.nav-hamburger:hover {
    border-color: var(--primary-color);
    background: var(--gray-50);
}
.nav-hamburger span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--gray-700);
    border-radius: 2px;
    transition: all 0.3s;
}
.nav-hamburger.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.nav-hamburger.active span:nth-child(2) {
    opacity: 0;
}
.nav-hamburger.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.nav-link {
    text-decoration: none;
    color: var(--gray-700);
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
    position: relative;
}

.nav-link:hover {
    color: var(--primary-color);
    transform: translateY(-1px);
}

.nav-link.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.nav-actions {
    display: flex;
    gap: 0.625rem;
    align-items: center;
    flex-shrink: 0;
    flex-wrap: nowrap;
    white-space: nowrap;
}

/* Buttons */
.btn {
    padding: 0.45rem 1.1rem;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s;
    border: 2px solid transparent;
    cursor: pointer;
    font-size: 0.875rem;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(113, 42, 42, 0.3);
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.0625rem;
}

/* Hero Section */
.hero {
    background: #f9fafb;
    padding: 4rem 2rem;
    position: relative;
    overflow: hidden;
}

.hero-container {
    max-width: 1280px;
    margin: 0 auto;
}

.hero-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-left {
    padding-right: 2rem;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    color: var(--gray-900);
}

.hero-subtitle {
    font-size: 1.125rem;
    margin-bottom: 2.5rem;
    color: var(--gray-600);
    line-height: 1.6;
}

.hero-right {
    position: relative;
}

.hero-image-wrapper {
    position: relative;
}

.hero-image {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

.hero-illustration {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.1));
}

/* Main Search Bar */
.search-main {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.search-bar-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
    margin-bottom: 1rem;
}

.search-icon {
    position: absolute;
    left: 1.25rem;
    color: var(--gray-400);
    pointer-events: none;
}

.search-input-main {
    flex: 1;
    padding: 1rem 1rem 1rem 3.5rem;
    border: 2px solid var(--gray-300);
    border-radius: 8px;
    font-size: 1rem;
    color: var(--gray-800);
    background: white;
    transition: all 0.2s;
}

.search-input-main:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(113, 42, 42, 0.1);
}

.search-input-main::placeholder {
    color: var(--gray-400);
}

.search-btn-main {
    padding: 1rem 2rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.search-btn-main:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(113, 42, 42, 0.3);
}

.search-btn-main svg {
    flex-shrink: 0;
}

/* Filters Row */
.search-filters-row {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-700);
}

.filter-select {
    padding: 0.5rem 2.5rem 0.5rem 0.75rem;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    font-size: 0.875rem;
    color: var(--gray-700);
    background: white;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%234b5563' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    transition: all 0.2s;
}

.filter-select:hover {
    border-color: var(--primary-color);
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(113, 42, 42, 0.1);
}

.filter-clear {
    padding: 0.5rem 1rem;
    background: transparent;
    color: var(--gray-600);
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    margin-left: auto;
}

.filter-clear:hover {
    background: var(--gray-50);
    border-color: var(--gray-400);
    color: var(--gray-700);
}

.search-results {
    background: white;
    border-radius: 8px;
    margin-top: 1rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    max-height: 500px;
    overflow-y: auto;
}

.search-result-item {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    cursor: pointer;
    transition: background 0.2s;
}

.search-result-item:hover {
    background: var(--gray-50);
}

.search-result-item:last-child {
    border-bottom: none;
}

.result-type {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--gray-100);
    color: var(--gray-700);
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.result-type.project { background: #dbeafe; color: #1e40af; }
.result-type.country { background: #d1fae5; color: #065f46; }
.result-type.region { background: #fef3c7; color: #92400e; }
.result-type.sector { background: #e9d5ff; color: #6b21a8; }

.result-title {
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.25rem;
}

.result-description {
    font-size: 0.875rem;
    color: var(--gray-600);
}

/* Statistics Badges */
.stat-badge {
    position: absolute;
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    z-index: 10;
    animation: float 3s ease-in-out infinite;
}

.stat-badge-1 {
    top: 20px;
    right: 20px;
    text-align: right;
}

.stat-badge-2 {
    bottom: 80px;
    left: -20px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.stat-badge-number {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--primary-color);
    line-height: 1;
    margin-bottom: 0.25rem;
}

.stat-badge-label {
    font-size: 0.875rem;
    color: var(--gray-600);
    font-weight: 500;
}

.stat-badge-avatars {
    display: flex;
    gap: 0.25rem;
}

.avatar {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Map Section */
.map-section {
    padding: 5rem 2rem;
    background: var(--gray-50);
}

.map-container {
    max-width: 1280px;
    margin: 0 auto;
}

.map-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--gray-600);
}

.map-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    align-items: start;
}

.map-wrapper {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.africa-svg {
    width: 100%;
    height: auto;
}

.region-group {
    cursor: pointer;
    transition: all 0.3s;
}

.region-group:hover .region-path {
    opacity: 0.8;
    filter: brightness(1.1);
}

.region-path {
    transition: all 0.3s;
    stroke: white;
    stroke-width: 2;
}

.region-label {
    fill: white;
    font-size: 24px;
    font-weight: 700;
    text-anchor: middle;
    pointer-events: none;
    font-family: 'Inter', sans-serif;
}

.region-info {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 100px;
}

.region-info h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 1rem;
}

.region-info p {
    color: var(--gray-600);
    margin-bottom: 1.5rem;
}

.region-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.region-stat {
    text-align: center;
    padding: 1rem;
    background: var(--gray-50);
    border-radius: 8px;
}

.stat-value {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-color);
}

.stat-text {
    display: block;
    font-size: 0.875rem;
    color: var(--gray-600);
    margin-top: 0.25rem;
}

/* Sectors Section */
.sectors-section {
    padding: 5rem 2rem;
    background: white;
}

.sectors-container {
    max-width: 1280px;
    margin: 0 auto;
}

.sectors-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
}

.sectors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.sector-card {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    padding: 2rem;
    transition: all 0.3s;
    cursor: pointer;
}

.sector-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    transform: translateY(-4px);
}

.sector-icon {
    width: 64px;
    height: 64px;
    background: var(--gray-50);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    transition: all 0.3s;
}

.sector-card:hover .sector-icon {
    background: var(--primary-color);
    color: white;
}

.sector-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.75rem;
}

.sector-description {
    color: var(--gray-600);
    line-height: 1.6;
    margin-bottom: 1rem;
    font-size: 0.9375rem;
}

.sector-count {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.875rem;
}

.sector-card-cta {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    border: none;
}

.sector-card-cta:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(113, 42, 42, 0.3);
}

.sector-cta-number {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.sector-cta-text {
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
    opacity: 0.95;
}

.sector-card-cta .btn {
    background: white;
    color: var(--primary-color);
}

.sector-card-cta .btn:hover {
    background: var(--gray-50);
}

/* CTA Section */
.cta-section {
    padding: 5rem 2rem;
    background: linear-gradient(135deg, #712a2a 0%, #8b3434 100%);
    color: white;
    text-align: center;
}

.cta-container {
    max-width: 800px;
    margin: 0 auto;
}

.cta-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.cta-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.cta-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Footer */
.footer {
    background: var(--gray-900);
    color: white;
    padding: 3rem 2rem 1.5rem;
}

.footer-container {
    max-width: 1280px;
    margin: 0 auto;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.footer-section p {
    color: var(--gray-400);
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: var(--gray-400);
    text-decoration: none;
    transition: color 0.2s;
}

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

.footer-bottom {
    border-top: 1px solid var(--gray-800);
    padding-top: 1.5rem;
    text-align: center;
    color: var(--gray-400);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .map-content {
        grid-template-columns: 1fr;
    }
    
    .region-info {
        position: static;
    }
}

@media (max-width: 1024px) {
    .hero-split {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .hero-left {
        padding-right: 0;
    }
    
    .search-bar-wrapper {
        flex-direction: column;
    }
    
    .search-btn-main {
        width: 100%;
        justify-content: center;
    }
    
    .search-filters-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .filter-select {
        flex: 1;
    }
    
    .filter-clear {
        margin-left: 0;
        width: 100%;
    }
}

@media (max-width: 992px) {
    .nav-hamburger {
        display: flex !important;
    }
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #ffffff;
        flex-direction: column;
        gap: 0;
        padding: 8px 0;
        box-shadow: 0 8px 24px rgba(0,0,0,0.12);
        border-top: 1px solid var(--gray-200);
        z-index: 999;
    }
    .nav-menu.open {
        display: flex;
    }
    .nav-menu li {
        width: 100%;
    }
    .nav-menu .nav-link {
        display: block;
        padding: 12px 24px;
        border-bottom: none;
        white-space: normal;
    }
    .nav-menu .nav-link:hover {
        background: var(--gray-50);
        transform: none;
    }
    .nav-menu.open .nav-menu-auth {
        display: list-item;
    }
    .nav-menu.open .nav-menu-auth:first-of-type {
        border-top: 1px solid var(--gray-200);
        margin-top: 4px;
        padding-top: 4px;
    }
    .nav-container {
        padding: 12px 16px;
    }
}

@media (max-width: 768px) {
    .navbar {
        position: sticky;
    }
    .nav-actions .btn-outline { display: none; }
    .nav-actions .btn-primary { padding: 8px 16px; font-size: 13px; }
    
    .hero-title {
        font-size: 2.25rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero {
        padding: 2rem 1rem;
    }
    
    .stat-badge {
        position: static;
        margin-bottom: 1rem;
    }
    
    .stat-badge-2 {
        left: 0;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .cta-title {
        font-size: 2rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 12px;
    }
    .nav-title {
        font-size: 0.75rem;
    }
    .nav-actions .btn {
        padding: 7px 12px;
        font-size: 0.75rem;
    }
    
    .nav-logo {
        height: 40px;
    }
    
    .hero {
        padding: 2rem 1rem;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .search-main {
        padding: 1rem;
    }
    
    .search-input-main {
        font-size: 0.9375rem;
    }
    
    .search-btn-main {
        padding: 0.875rem 1.5rem;
        font-size: 0.9375rem;
    }
}

/* Loading States */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

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

/* Selection */
::selection {
    background: var(--primary-color);
    color: white;
}
