/* EB-5 Risk Analysis Website Styles */

:root {
    --primary-color: #004976; /* Deep blue for real estate professionalism */
    --secondary-color: #008081; /* Teal for modern touch */
    --accent-color: #f26522; /* Orange for immigration/visa emphasis */
    --success-color: #27ae60; /* Green for positive indicators */
    --warning-color: #f39c12; /* Amber for caution */
    --light-bg: #f5f5f5; /* Light gray for clean backgrounds */
    --dark-bg: #003057; /* Darker blue for headers */
    --text-color: #2c3e50; /* Dark slate for readability */
    --light-text: #7f8c8d; /* Medium gray for secondary text */
    --border-color: #d9e2ec; /* Light blue-gray for borders */
    --shadow: 0 4px 15px rgba(0,0,0,0.08); /* Softer shadow */
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #fff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
header {
    background: linear-gradient(135deg, var(--primary-color), var(--dark-bg));
    color: white;
    padding: 3rem 0;
    text-align: center;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiPjxkZWZzPjxwYXR0ZXJuIGlkPSJwYXR0ZXJuIiBwYXR0ZXJuVW5pdHM9InVzZXJTcGFjZU9uVXNlIiB3aWR0aD0iMTAwIiBoZWlnaHQ9IjEwMCI+PHBhdGggZD0iTTAgMCBMIDUwIDAgTCA1MCA1MCBMIDAgNTAgeiIgZmlsbD0icmdiYSgyNTUsMjU1LDI1NSwwLjAzKSIvPjwvcGF0dGVybj48L2RlZnM+PHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgZmlsbD0idXJsKCNwYXR0ZXJuKSIvPjwvc3ZnPg==');
    opacity: 0.4;
}

.header-content {
    position: relative;
    z-index: 2;
}

.header-content h1 {
    font-size: 3rem;
    margin-bottom: 0.8rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.header-content p {
    font-size: 1.3rem;
    opacity: 0.95;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Navigation Styles */
nav {
    background: white;
    padding: 1.2rem 0;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

nav.scrolled {
    padding: 0.8rem 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

.nav-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.nav-item {
    padding: 0.7rem 1.8rem;
    background: transparent;
    border: 2px solid var(--primary-color);
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
    text-decoration: none;
    color: var(--primary-color);
    position: relative;
    overflow: hidden;
}

.nav-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
    z-index: -1;
}

.nav-item:hover::before, .nav-item.active::before {
    width: 100%;
}

.nav-item:hover, .nav-item.active {
    color: white;
    transform: translateY(-2px);
}

/* Section Styles */
.section {
    padding: 3rem 0;
    display: none;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.section.active {
    display: block;
    opacity: 1;
}

.section-title {
    font-size: 2.2rem;
    margin-bottom: 2rem;
    text-align: center;
    color: var(--primary-color);
    position: relative;
    transform: translateY(20px);
    opacity: 0;
    animation: slideUpFadeIn 0.8s forwards;
    animation-delay: 0.2s;
}

@keyframes slideUpFadeIn {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.section-title::after {
    content: '';
    display: block;
    width: 0;
    height: 3px;
    background: var(--secondary-color);
    margin: 1rem auto;
    transition: width 1s ease;
    animation: expandWidth 1s forwards;
    animation-delay: 0.8s;
}

@keyframes expandWidth {
    from {
        width: 0;
    }
    to {
        width: 80px;
    }
}

/* Card Styles */
.card {
    background: white;
    border-radius: 8px;
    padding: 2.5rem;
    margin-bottom: 2.5rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid rgba(0,0,0,0.05);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, var(--primary-color), var(--secondary-color));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.card:hover::before {
    opacity: 1;
}

.card-header {
    display: flex;
    align-items: center;
    margin-bottom: 1.8rem;
    padding-bottom: 1.2rem;
    border-bottom: 1px solid var(--border-color);
}

.card-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1.5rem;
    font-size: 1.8rem;
    color: white;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}

.card-icon::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.2), rgba(255,255,255,0));
    z-index: 1;
}

.risk-high { 
    background: var(--accent-color);
}

.risk-moderate { 
    background: var(--warning-color);
}

.risk-low { 
    background: var(--success-color);
}

.card-title {
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: -0.5px;
}

/* Comparison Grid */
.comparison-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 2rem 0;
}

/* Risk Assessment Styles */
.risk-meter {
    background: var(--light-bg);
    border-radius: 10px;
    padding: 1.5rem;
    margin: 1rem 0;
}

.risk-level {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.risk-bar {
    height: 20px;
    background: var(--light-bg);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.risk-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 1s ease;
}

.risk-fill.high { background: var(--accent-color); }
.risk-fill.moderate { background: var(--warning-color); }
.risk-fill.low { background: var(--success-color); }

/* Interactive Elements */
.accordion {
    margin: 1rem 0;
}

.accordion-item {
    border: 1px solid var(--border-color);
    border-radius: 5px;
    margin-bottom: 0.5rem;
    overflow: hidden;
}

.accordion-header {
    background: var(--light-bg);
    padding: 1rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

.accordion-header:hover {
    background: #d5dbdb;
}

.accordion-content {
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.accordion-content.active {
    max-height: 500px;
    padding: 1rem;
}

.accordion-icon {
    transition: transform 0.3s ease;
}

.accordion-item.active .accordion-icon {
    transform: rotate(180deg);
}

/* Timeline Styles */
.timeline {
    position: relative;
    padding: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--secondary-color);
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    margin: 2rem 0;
    padding: 0 2rem;
}

.timeline-item:nth-child(odd) {
    text-align: right;
    padding-right: calc(50% + 2rem);
}

.timeline-item:nth-child(even) {
    text-align: left;
    padding-left: calc(50% + 2rem);
}

.timeline-marker {
    position: absolute;
    top: 0;
    left: 50%;
    width: 20px;
    height: 20px;
    background: var(--secondary-color);
    border-radius: 50%;
    transform: translateX(-50%);
}

.timeline-content {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

/* Interactive Tools */
.calculator {
    background: var(--light-bg);
    padding: 2rem;
    border-radius: 10px;
    margin: 2rem 0;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--primary-color);
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.btn {
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

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

.btn-primary:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

.btn-danger {
    background: var(--accent-color);
    color: white;
}

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

/* Alert Styles */
.alert {
    padding: 1rem;
    border-radius: 5px;
    margin: 1rem 0;
    border-left: 4px solid;
}

.alert-warning {
    background: #fef9e7;
    border-color: var(--warning-color);
    color: #8a6d3b;
}

.alert-danger {
    background: #f2dede;
    border-color: var(--accent-color);
    color: #a94442;
}

.alert-success {
    background: #dff0d8;
    border-color: var(--success-color);
    color: #3c763d;
}

.alert-info {
    background: #d9edf7;
    border-color: var(--secondary-color);
    color: #31708f;
}

/* Footer */
footer {
    background: var(--primary-color);
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
}

.footer-content {
    max-width: 800px;
    margin: 0 auto;
}

.disclaimer {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-top: 1rem;
    line-height: 1.5;
}

/* Responsive Design */
@media (max-width: 768px) {
    .comparison-grid {
        grid-template-columns: 1fr;
    }
    
    .nav-container {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .header-content h1 {
        font-size: 2rem;
    }
    
    .timeline::before {
        left: 20px;
    }
    
    .timeline-item {
        padding-left: 3rem;
        text-align: left;
    }
    
    .timeline-item:nth-child(odd) {
        padding-right: 1rem;
        padding-left: 3rem;
        text-align: left;
    }
    
    .timeline-marker {
        left: 20px;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.8s ease-in forwards;
    opacity: 0;
}

@keyframes fadeIn {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

.slide-in-left {
    animation: slideInLeft 0.8s ease-out forwards;
    opacity: 0;
}

@keyframes slideInLeft {
    0% { opacity: 0; transform: translateX(-30px); }
    100% { opacity: 1; transform: translateX(0); }
}

.slide-in-right {
    animation: slideInRight 0.8s ease-out forwards;
    opacity: 0;
}

@keyframes slideInRight {
    0% { opacity: 0; transform: translateX(30px); }
    100% { opacity: 1; transform: translateX(0); }
}

/* Staggered animations for cards */
.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.2s; }
.card:nth-child(3) { animation-delay: 0.3s; }
.card:nth-child(4) { animation-delay: 0.4s; }
.card:nth-child(5) { animation-delay: 0.5s; }

/* Smooth hover transitions */
.card {
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
                box-shadow 0.4s ease;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

/* Print Styles */
@media print {
    .nav-container, .calculator, .btn {
        display: none;
    }
    
    .section {
        display: block !important;
        page-break-inside: avoid;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid var(--border-color);
    }
}