/* ARMOR-Med Color Palette */
:root {
    --primary-dark: #750014ff;
    --accent-light: #99ebffff;
    --accent-blue: #1966ffff;
    --dark-bg: #212326ff;
    --white: #ffffffff;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: 
        radial-gradient(ellipse 150% 150% at 0% 0%, var(--accent-light) 0%, transparent 50%),
        radial-gradient(ellipse 150% 150% at 100% 100%, var(--accent-light) 0%, transparent 50%),
        var(--white);
    min-height: 100vh;
    color: var(--dark-bg);
    line-height: 1.6;
}

.homepage-wrapper {
    background: 
        radial-gradient(ellipse 150% 150% at 0% 0%, var(--accent-light) 0%, transparent 50%),
        radial-gradient(ellipse 150% 150% at 100% 100%, var(--accent-light) 0%, transparent 50%),
        var(--white);
    min-height: 100vh;
}

/* Site Header */
.site-header {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    padding: 0;
    margin: 0;
}

.site-logo {
    height: 60px;
    width: auto;
    display: block;
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

.site-logo:hover {
    opacity: 1;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 100px 20px 20px;
    width: 100%;
}

.container:has(.homepage-wrapper) {
    padding: 0;
    max-width: 100%;
}

/* Introduction Page */
.intro-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
    padding: 40px 20px;
}

.intro-content {
    text-align: center;
    max-width: 800px;
    width: 100%;
}

.main-title {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 10px;
    letter-spacing: -1px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.homepage-logo-link {
    display: inline-block;
    text-decoration: none;
    transition: transform 0.3s ease;
    vertical-align: middle;
}

.homepage-logo-link:hover {
    transform: translateY(-2px);
}

.homepage-logo {
    height: 160px;
    width: auto;
    vertical-align: middle;
    display: inline-block;
}

.subtitle {
    font-size: 1.5rem;
    color: #212326;
    margin-bottom: 40px;
    font-weight: 500;
}

.description-box {
    background: var(--white);
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(33, 35, 38, 0.1);
    margin-bottom: 40px;
    text-align: left;
}

.description {
    font-size: 1.1rem;
    color: var(--dark-bg);
    margin-bottom: 20px;
    line-height: 1.8;
}

.description:last-child {
    margin-bottom: 0;
}

/* Buttons */
.btn-primary {
    display: inline-block;
    padding: 16px 48px;
    background: var(--primary-dark);
    color: var(--white);
    text-decoration: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(117, 0, 20, 0.3);
}

.btn-primary:hover {
    background: #8a0019;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(117, 0, 20, 0.4);
}

.btn-secondary {
    display: inline-block;
    padding: 16px 48px;
    background: var(--white);
    color: var(--primary-dark);
    text-decoration: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid var(--primary-dark);
    cursor: pointer;
}

.btn-secondary:hover {
    background: var(--accent-light);
    transform: translateY(-2px);
}

/* Selection Pages */
.selection-page, .upload-page {
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 20px;
}

.page-header {
    text-align: center;
    margin-bottom: 50px;
}

.page-header h1 {
    font-size: 2.5rem;
    color: var(--primary-dark);
    margin-bottom: 10px;
    font-weight: 700;
}

.page-subtitle {
    font-size: 1.2rem;
    color: var(--dark-bg);
    opacity: 0.8;
}

/* Form Elements */
.form-group {
    margin-bottom: 30px;
}

.form-label {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 10px;
}

.form-input {
    width: 100%;
    padding: 14px 20px;
    font-size: 1rem;
    border: 2px solid var(--accent-light);
    border-radius: 8px;
    background: var(--white);
    color: var(--dark-bg);
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(25, 102, 255, 0.1);
}

.form-help {
    font-size: 0.9rem;
    color: var(--dark-bg);
    opacity: 0.7;
    margin-top: 8px;
    line-height: 1.5;
}

.selection-form, .upload-form {
    background: var(--white);
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(33, 35, 38, 0.1);
}

/* Joint Options */
.joint-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.joint-option, .task-option {
    display: block;
    cursor: pointer;
}

.joint-option input[type="radio"],
.task-option input[type="checkbox"] {
    display: none;
}

.option-card {
    background: var(--white);
    border: 3px solid var(--accent-light);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    transition: all 0.3s ease;
    height: 100%;
}

.joint-option input[type="radio"]:checked + .option-card,
.task-option input[type="checkbox"]:checked + .option-card {
    border-color: var(--primary-dark);
    background: linear-gradient(135deg, var(--accent-light) 0%, var(--white) 100%);
    box-shadow: 0 4px 16px rgba(117, 0, 20, 0.2);
}

.option-card:hover {
    border-color: var(--accent-blue);
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(25, 102, 255, 0.2);
}

.option-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.option-card h3 {
    font-size: 1.5rem;
    color: var(--primary-dark);
    margin-bottom: 10px;
    font-weight: 600;
}

.option-card p {
    color: var(--dark-bg);
    opacity: 0.7;
    font-size: 0.95rem;
}

/* Task Options */
.task-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

/* Video Source Question */
.video-source-question {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid var(--accent-light);
}

.video-source-question h3 {
    font-size: 1.2rem;
    color: var(--primary-dark);
    margin-bottom: 20px;
    font-weight: 600;
}

.radio-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.radio-option {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 15px;
    background: var(--white);
    border: 2px solid var(--accent-light);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.radio-option:hover {
    border-color: var(--accent-blue);
    background: var(--accent-light);
}

.radio-option input[type="radio"] {
    margin-right: 12px;
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.radio-option span {
    font-size: 1rem;
    color: var(--dark-bg);
    font-weight: 500;
}

.radio-option input[type="radio"]:checked + span {
    color: var(--primary-dark);
    font-weight: 600;
}

/* Form Actions */
.form-actions {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 30px;
}

.form-actions .btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Upload Page */
.video-uploads {
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin-bottom: 40px;
}

.video-upload-item {
    width: 100%;
}

.upload-label {
    display: block;
    width: 100%;
}

.task-name {
    display: block;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 12px;
}

.file-input {
    display: none;
}

.file-input-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: var(--white);
    border: 2px solid var(--accent-light);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.file-input-display:hover {
    border-color: var(--accent-blue);
    background: var(--accent-light);
}

.file-name {
    color: var(--dark-bg);
    flex: 1;
}

.file-browse {
    color: var(--primary-dark);
    font-weight: 600;
    padding: 8px 16px;
    background: var(--white);
    border-radius: 6px;
    border: 1px solid var(--primary-dark);
}

/* Results Page */
.results-page {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
}

.results-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

.result-card {
    background: var(--white);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(33, 35, 38, 0.1);
    display: flex;
    flex-direction: column;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--accent-light);
    flex-wrap: wrap;
    gap: 10px;
}

.result-header h2 {
    font-size: 1.3rem;
    color: var(--primary-dark);
    font-weight: 600;
}

.max-value {
    display: flex;
    align-items: center;
    gap: 12px;
}

.max-label {
    font-size: 1.1rem;
    color: var(--dark-bg);
    opacity: 0.7;
}

.max-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-dark);
    background: var(--accent-light);
    padding: 8px 20px;
    border-radius: 8px;
}

.plot-container {
    width: 100%;
    overflow-x: auto;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    background: linear-gradient(to bottom, #fafafa 0%, #ffffff 100%);
    border-radius: 12px;
    margin: 15px 0;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.result-plot {
    width: 100%;
    height: auto;
    border-radius: 8px;
    max-height: 300px;
    image-rendering: auto;
    -ms-interpolation-mode: bicubic;
}

/* Plotly chart styling */
.plotly-chart {
    width: 100%;
    min-height: 500px;
    border-radius: 8px;
    background: white;
}

/* Ensure Plotly charts are responsive */
.plotly-chart .js-plotly-plot {
    width: 100% !important;
}

/* Style Plotly modebar */
.plotly .modebar {
    padding: 8px;
    background: rgba(255, 255, 255, 0.9) !important;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.plotly .modebar-btn {
    color: #2C3E50 !important;
}

.plotly .modebar-btn:hover {
    background-color: rgba(44, 62, 80, 0.1) !important;
}

.error-message {
    padding: 20px;
    background: #fee;
    border: 2px solid #fcc;
    border-radius: 8px;
    color: #c00;
}

.results-decision {
    background: var(--white);
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(33, 35, 38, 0.1);
    margin: 40px auto;
    max-width: 600px;
    text-align: center;
}

.results-decision h3 {
    font-size: 1.3rem;
    color: var(--primary-dark);
    margin-bottom: 25px;
    font-weight: 600;
}

.results-decision.saved-message {
    background: linear-gradient(135deg, var(--accent-light) 0%, var(--white) 100%);
    border: 2px solid var(--primary-dark);
}

.results-decision.saved-message h3 {
    color: var(--primary-dark);
    margin-bottom: 0;
    font-size: 1.4rem;
}

.decision-options {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-decision {
    min-width: 200px;
    padding: 16px 32px;
    font-size: 1.1rem;
}

.results-actions {
    text-align: center;
    margin-top: 40px;
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.longitudinal-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.data-summary {
    padding: 20px;
    background: var(--accent-light);
    border-radius: 8px;
    margin-top: 15px;
}

.data-summary p {
    margin: 8px 0;
    font-size: 0.95rem;
    color: var(--dark-bg);
}

.info-message {
    background: var(--white);
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 8px 32px rgba(33, 35, 38, 0.1);
    text-align: center;
    margin-bottom: 40px;
}

.info-message p {
    font-size: 1.1rem;
    color: var(--dark-bg);
    line-height: 1.8;
}

/* Record Videos Page */
.record-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.general-instructions {
    background: var(--white);
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(33, 35, 38, 0.1);
    margin-bottom: 40px;
}

.general-instructions h2 {
    font-size: 1.5rem;
    color: var(--primary-dark);
    margin-bottom: 20px;
    font-weight: 600;
}

.general-instructions ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.general-instructions li {
    font-size: 1rem;
    color: var(--dark-bg);
    line-height: 1.8;
    margin-bottom: 12px;
    padding-left: 24px;
    position: relative;
}

.general-instructions li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--primary-dark);
    font-weight: bold;
    font-size: 1.2rem;
}

.general-instructions li:last-child {
    margin-bottom: 0;
}

.recording-tasks {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-bottom: 40px;
}

.recording-task-item {
    background: var(--white);
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(33, 35, 38, 0.1);
}

.task-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.task-header h3 {
    font-size: 1.5rem;
    color: var(--primary-dark);
    font-weight: 600;
}

.task-content-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: start;
}

.video-section {
    display: flex;
    flex-direction: column;
    order: 2;
}

.instructions-section {
    background: var(--accent-light);
    border-radius: 12px;
    padding: 25px;
    border: 2px solid var(--primary-dark);
    order: 1;
}

.instructions-section h4 {
    font-size: 1.2rem;
    color: var(--primary-dark);
    margin-bottom: 15px;
    font-weight: 600;
}

.task-instructions {
    list-style: decimal;
    padding-left: 20px;
    margin: 0;
}

.task-instructions li {
    font-size: 0.95rem;
    color: var(--dark-bg);
    line-height: 1.7;
    margin-bottom: 10px;
}

.task-instructions li:last-child {
    margin-bottom: 0;
}

.animation-link {
    color: var(--accent-blue);
    text-decoration: underline;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s ease;
}

.animation-link:hover {
    color: #0056b3;
    text-decoration: underline;
}

.animation-video-container {
    width: 100%;
}

.btn-back-instructions {
    padding: 10px 20px;
    background: var(--primary-dark);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 15px;
    width: 100%;
}

.btn-back-instructions:hover {
    background: #8a0019;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(117, 0, 20, 0.3);
}

.animation-video {
    width: 100%;
    border-radius: 8px;
    background: var(--dark-bg);
}

.youtube-video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    border-radius: 8px;
}

.youtube-embed {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 8px;
}

.task-status {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    background: var(--accent-light);
    color: var(--dark-bg);
}

.task-status.recording {
    background: #ff4444;
    color: var(--white);
    animation: pulse 1.5s infinite;
}

.task-status.recorded {
    background: #44ff44;
    color: var(--dark-bg);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.video-container {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 0 auto 20px;
    background: var(--dark-bg);
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 16 / 9;
}

.video-preview,
.video-live {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: var(--dark-bg);
    color: var(--white);
    font-size: 1.1rem;
}

.recording-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.btn-record {
    padding: 14px 32px;
    background: var(--primary-dark);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-record:hover {
    background: #8a0019;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(117, 0, 20, 0.3);
}

.btn-stop {
    padding: 14px 32px;
    background: #ff4444;
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-stop:hover:not(:disabled) {
    background: #cc3333;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 68, 68, 0.3);
}

.btn-stop:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Processing Page */
.processing-page {
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 20px;
}

.progress-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-top: 40px;
}

.progress-item {
    background: var(--white);
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(33, 35, 38, 0.1);
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.progress-header h3 {
    font-size: 1.3rem;
    color: var(--primary-dark);
    font-weight: 600;
}

.progress-percentage {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--accent-blue);
}

.progress-bar-container {
    margin-bottom: 10px;
}

.progress-bar {
    width: 100%;
    height: 30px;
    background: var(--accent-light);
    border-radius: 15px;
    overflow: hidden;
    position: relative;
}

.progress-bar-fill {
    height: 100%;
    background: var(--accent-blue);
    border-radius: 15px;
    transition: width 0.3s ease;
    position: relative;
}

.progress-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.3) 50%,
        transparent 100%
    );
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-status {
    font-size: 0.9rem;
    color: var(--dark-bg);
    opacity: 0.7;
}

.progress-status.completed {
    color: #44ff44;
    opacity: 1;
    font-weight: 600;
}

.progress-status.error {
    color: #ff4444;
    opacity: 1;
    font-weight: 600;
}

.progress-status.processing {
    color: var(--accent-blue);
    opacity: 1;
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-title {
        font-size: 2.5rem;
    }
    
    .homepage-logo {
        height: 100px;
    }
    
    .site-logo {
        height: 45px;
    }
    
    .site-header {
        bottom: 10px;
        right: 10px;
    }
    
    .subtitle {
        font-size: 1.2rem;
    }
    
    .description-box {
        padding: 25px;
    }
    
    .joint-options,
    .task-options {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .result-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .results-container {
        grid-template-columns: 1fr;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
    
    .video-container {
        max-width: 100%;
    }
    
    .task-content-wrapper {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .instructions-section {
        order: 1;
    }
    
    .video-section {
        order: 2;
    }
    
    .recording-controls {
        flex-direction: column;
    }
    
    .btn-record,
    .btn-stop {
        width: 100%;
    }
    
    .radio-options {
        gap: 10px;
    }
    
    .longitudinal-container {
        grid-template-columns: 1fr;
    }
    
    .results-actions {
        flex-direction: column;
    }
    
    .results-actions .btn-primary,
    .results-actions .btn-secondary {
        width: 100%;
    }
    
    .decision-options {
        flex-direction: column;
    }
    
    .btn-decision {
        width: 100%;
    }
    
    .finger-joints-grid {
        grid-template-columns: 1fr;
    }
}

/* Finger Results Grid Layout */
.finger-result-row {
    background: var(--white);
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 8px 32px rgba(33, 35, 38, 0.1);
    margin-bottom: 30px;
}

.finger-name {
    font-size: 1.5rem;
    color: var(--primary-dark);
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--accent-light);
}

.finger-joints-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.finger-joint-card {
    background: var(--accent-light);
    border-radius: 12px;
    padding: 15px;
    display: flex;
    flex-direction: column;
}

.finger-joint-card .result-header {
    border-bottom: 1px solid rgba(117, 0, 20, 0.2);
    margin-bottom: 10px;
    padding-bottom: 10px;
}

.finger-joint-card .result-header h3 {
    font-size: 1.1rem;
    color: var(--primary-dark);
    font-weight: 600;
    margin-bottom: 5px;
}

.finger-joint-card .max-value {
    gap: 8px;
}

.finger-joint-card .max-label {
    font-size: 0.9rem;
}

.finger-joint-card .max-number {
    font-size: 1.2rem;
    padding: 5px 15px;
}

.finger-joint-card .plot-container {
    flex: 1;
    min-height: 200px;
}

.finger-joint-card .result-plot {
    max-height: 250px;
}

@media (max-width: 768px) {
    .finger-joints-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   BUSINESS WEBSITE STYLES
   ============================================ */

/* Navigation */
.main-nav {
    background: transparent;
    box-shadow: 0 2px 10px rgba(33, 35, 38, 0.1);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 0;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo img {
    height: 50px;
    width: auto;
}

.main-nav.homepage-nav {
    box-shadow: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
    align-items: center;
    margin: 0;
    padding: 0;
}

.nav-link {
    color: var(--dark-bg);
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: color 0.3s ease;
    padding: 5px 0;
}

.nav-link:hover {
    color: var(--primary-dark);
}

.nav-cta {
    background: var(--primary-dark);
    color: var(--white) !important;
    padding: 10px 24px;
    border-radius: 6px;
    font-weight: 600;
}

.nav-cta:hover {
    background: #8a0019;
    color: var(--white) !important;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    gap: 5px;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--primary-dark);
    transition: all 0.3s ease;
}

/* Hero Banner Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hero Banner */
.hero-banner {
    background: transparent;
    padding: 140px 20px 80px;
    text-align: center;
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-content {
    max-width: 900px;
    margin: 0 auto;
}

.hero-logo {
    height: 200px;
    width: auto;
    margin-bottom: 30px;
    opacity: 0;
    animation: fadeInUp 1s ease-out 0.3s forwards;
}

.hero-caption {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 20px;
    line-height: 1.2;
    opacity: 0;
    animation: fadeInUp 1s ease-out 0.6s forwards;
}

.hero-description {
    font-size: 1.3rem;
    color: var(--dark-bg);
    margin-bottom: 40px;
    line-height: 1.6;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0;
    animation: fadeInUp 1s ease-out 0.9s forwards;
}

.btn-hero {
    display: inline-block;
    padding: 18px 50px;
    background: var(--primary-dark);
    color: var(--white);
    text-decoration: none;
    border-radius: 8px;
    font-size: 1.2rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(117, 0, 20, 0.3);
    opacity: 0;
    animation: fadeInUp 1s ease-out 1.2s forwards;
}

.btn-hero:hover {
    background: #8a0019;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(117, 0, 20, 0.4);
}

/* Content Sections */
.content-section {
    padding: 80px 20px;
}

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

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 30px;
    text-align: center;
}

.section-content {
    background: var(--white);
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(33, 35, 38, 0.1);
}

.section-text {
    font-size: 1.1rem;
    color: var(--dark-bg);
    line-height: 1.8;
    margin-bottom: 20px;
}

.section-text:last-child {
    margin-bottom: 0;
}

/* Mission Section (About Page) */
.mission-section {
    padding: 80px 20px;
    background: transparent;
}

.mission-container {
    text-align: center;
    max-width: 980px;
}

.mission-title {
    font-size: calc(2.5rem + 2px);
    font-weight: 700;
    color: var(--primary-dark);
    margin: 0 0 40px;
    line-height: 1.35;
}

.mission-divider {
    width: 60%;
    max-width: 520px;
    height: 3px;
    margin: 0 auto 40px;
    background: linear-gradient(90deg, var(--white), var(--primary-dark), var(--white));
    border-radius: 999px;
}

.mission-description {
    font-size: calc(1.1rem + 2px);
    margin: 0 auto;
    max-width: 820px;
}

@media (max-width: 768px) {
    .mission-title {
        font-size: 2rem;
    }

    .mission-divider {
        width: 70%;
    }
}

/* Story Section (About Page) */
.story-section {
    background: transparent;
}

.story-container {
    max-width: 1200px;
}

.story-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 40px;
    align-items: center;
}

.story-title {
    text-align: left;
    margin-bottom: 20px;
}

.story-text {
    font-size: calc(1.1rem + 2px);
    margin-bottom: 0;
}

.story-brand {
    color: var(--primary-dark);
    font-weight: 700;
}

.story-image {
    width: auto;
    max-width: 240px;
    height: auto;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(33, 35, 38, 0.12);
    display: block;
}

.story-media {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

@media (max-width: 900px) {
    .story-grid {
        grid-template-columns: 1fr;
    }

    .story-title {
        text-align: center;
    }

    .story-copy {
        text-align: center;
    }
}

/* Solution Section (About Page) */
.solution-section {
    background: transparent;
}

.solution-container {
    display: block;
}

.solution-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    width: 100%;
}

.solution-favicon {
    width: 270px;
    max-width: 100%;
    height: auto;
    justify-self: center;
    object-fit: contain;
    filter: drop-shadow(0 6px 14px rgba(33, 35, 38, 0.15));
}

.solution-content {
    max-width: 560px;
    text-align: left;
    justify-self: end;
}

.solution-title {
    text-align: center;
    margin-bottom: 20px;
}

.solution-text {
    font-size: calc(1.1rem + 2px);
    margin-bottom: 0;
}

.solution-brand {
    color: var(--primary-dark);
    font-weight: 700;
}

@media (max-width: 900px) {
    .solution-row {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .solution-favicon {
        height: auto;
        width: 180px;
    }

    .solution-content {
        text-align: center;
        justify-self: center;
    }
}

/* Problem & Solution Combined Section */
.problem-solution-section {
    background: transparent;
    padding: 60px 20px;
    position: relative;
    overflow: hidden;
}

.section-background-decoration {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse 80% 80% at 20% 30%, rgba(153, 235, 255, 0.3) 0%, transparent 60%),
        radial-gradient(ellipse 60% 60% at 80% 70%, rgba(153, 235, 255, 0.2) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

.section-background-decoration::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, rgba(117, 0, 20, 0.05) 0%, transparent 70%);
    border-radius: 50%;
    transform: rotate(45deg);
}

.section-background-decoration::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 300px;
    height: 300px;
    background: linear-gradient(45deg, rgba(25, 102, 255, 0.05) 0%, transparent 70%);
    border-radius: 50%;
    transform: rotate(-30deg);
}

.section-container {
    position: relative;
    z-index: 1;
}

.section-header-wrapper {
    text-align: center;
    margin-bottom: 40px;
    opacity: 0;
    animation: fadeInUp 1s ease-out 0.2s forwards;
}

.section-feature-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin: 0;
    position: relative;
    display: inline-block;
}

.section-feature-title::after {
    content: '';
    position: absolute;
    bottom: -16px;
    left: 50%;
    transform: translateX(-50%);
    width: 160px;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--primary-dark), transparent);
    border-radius: 2px;
}

.problem-solution-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    max-width: 1200px;
    margin: 0 auto;
    align-items: center;
}

.video-wrapper {
    position: relative;
    opacity: 0;
    animation: fadeInUp 1s ease-out 0.4s forwards;
}

.video-container {
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 
        0 20px 60px rgba(33, 35, 38, 0.2),
        0 0 0 1px rgba(153, 235, 255, 0.3);
    background: var(--white);
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.video-container:hover {
    transform: translateY(-5px);
    box-shadow: 
        0 25px 70px rgba(33, 35, 38, 0.25),
        0 0 0 1px rgba(153, 235, 255, 0.4);
}

.video-overlay-decoration {
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, var(--accent-light), var(--accent-blue), var(--primary-dark));
    border-radius: 16px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.video-container:hover .video-overlay-decoration {
    opacity: 0.1;
}

.demo-video {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 16px;
}


.solution-text-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: relative;
    opacity: 0;
    animation: fadeInUp 1s ease-out 0.6s forwards;
}

.solution-description {
    font-size: 1.15rem;
    color: var(--dark-bg);
    line-height: 1.7;
    margin: 0;
}

.solution-features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid rgba(153, 235, 255, 0.3);
}

.solution-feature-card {
    background: var(--white);
    border: 1px solid rgba(153, 235, 255, 0.4);
    border-radius: 12px;
    padding: 24px 20px;
    text-align: center;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    opacity: 0;
    transform: scale(0.8);
}

.solution-feature-card.animate-appear {
    animation: appearCard 0.6s ease-out forwards;
}

.solution-feature-card.animate-appear:nth-child(1) {
    animation-delay: 0.2s;
}

.solution-feature-card.animate-appear:nth-child(2) {
    animation-delay: 0.4s;
}

.solution-feature-card.animate-appear:nth-child(3) {
    animation-delay: 0.6s;
}

@keyframes appearCard {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.solution-feature-card:hover {
    transform: translateY(-4px) scale(1);
    box-shadow: 0 8px 24px rgba(33, 35, 38, 0.12);
    border-color: rgba(153, 235, 255, 0.6);
    background: var(--white);
}

.feature-card-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--primary-dark), #8a0019);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    box-shadow: 0 4px 12px rgba(117, 0, 20, 0.2);
    transition: transform 0.3s ease;
}

.solution-feature-card:hover .feature-card-icon {
    transform: scale(1.1) rotate(5deg);
}

.feature-card-icon svg {
    width: 24px;
    height: 24px;
}

.feature-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-dark);
    margin: 0;
    line-height: 1.3;
}

.section-bottom-decoration {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(153, 235, 255, 0.5) 20%, 
        rgba(153, 235, 255, 0.5) 80%, 
        transparent 100%);
    z-index: 0;
}

.problem-solution-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 20px;
}

.problem-solution-text {
    font-size: 1.1rem;
    color: var(--dark-bg);
    line-height: 1.8;
    margin: 0;
}

.problem-solution-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.problem-solution-list li {
    padding: 10px 0;
    padding-left: 40px;
    position: relative;
    font-size: 1rem;
    color: var(--dark-bg);
    line-height: 1.7;
    text-align: left;
}

.problem-solution-list li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--primary-dark);
    font-weight: bold;
    font-size: 2.6rem;
    line-height: 1;
    top: 0;
}

.solution-card .problem-solution-list li:before {
    color: var(--primary-dark);
}

/* Legacy styles for backward compatibility */
.problem-section {
    background: transparent;
}

.problem-section .section-content {
    background: transparent;
    box-shadow: none;
    border-radius: 0;
    padding: 0;
}

.solution-section {
    background: transparent;
}

.solution-section .section-content {
    background: transparent;
    box-shadow: none;
    border-radius: 0;
    padding: 0;
}

.features-section {
    background: transparent;
}

.users-section {
    background: transparent;
}

.users-section .section-content {
    background: transparent;
    box-shadow: none;
    border-radius: 0;
    padding: 0;
}

/* Ensure gradient extends through all homepage sections */
.homepage-wrapper .hero-banner,
.homepage-wrapper .problem-section,
.homepage-wrapper .solution-section,
.homepage-wrapper .problem-solution-section,
.homepage-wrapper .features-section,
.homepage-wrapper .users-section {
    background: transparent;
}

/* Longitudinal Tracking Section */
.longitudinal-header {
    text-align: center;
    margin-bottom: 50px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0;
    animation: fadeInUp 1s ease-out 0.3s forwards;
}

.longitudinal-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 16px;
    line-height: 1.3;
}

.longitudinal-subtitle {
    font-size: 1.2rem;
    color: var(--dark-bg);
    opacity: 0.8;
    line-height: 1.6;
    margin: 0;
}

.longitudinal-graphs-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
}

.graph-card {
    background: var(--white);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(33, 35, 38, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(153, 235, 255, 0.2);
    opacity: 0;
    animation: fadeInUp 1s ease-out forwards;
}

.graph-card:nth-child(1) {
    animation-delay: 0.5s;
}

.graph-card:nth-child(2) {
    animation-delay: 0.7s;
}

.graph-card:nth-child(3) {
    animation-delay: 0.9s;
}

.graph-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 48px rgba(33, 35, 38, 0.15);
    border-color: rgba(153, 235, 255, 0.4);
}

.graph-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

/* Features Compact Grid - All features visible in one viewport */
.features-compact-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 40px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.feature-compact-item {
    background: var(--white);
    padding: 25px 20px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(33, 35, 38, 0.08);
    display: flex;
    align-items: flex-start;
    gap: 15px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-top: 3px solid var(--primary-dark);
}

.feature-compact-item:nth-child(2),
.feature-compact-item:nth-child(4),
.feature-compact-item:nth-child(6) {
    border-top-color: var(--accent-blue);
}

.feature-compact-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(33, 35, 38, 0.12);
}

.feature-compact-number {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-dark);
    line-height: 1;
    flex-shrink: 0;
    opacity: 0.4;
    min-width: 35px;
}

.feature-compact-item:nth-child(2) .feature-compact-number,
.feature-compact-item:nth-child(4) .feature-compact-number,
.feature-compact-item:nth-child(6) .feature-compact-number {
    color: var(--accent-blue);
}

.feature-compact-content {
    flex: 1;
}

.feature-compact-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 8px;
    line-height: 1.3;
}

.feature-compact-description {
    font-size: 0.9rem;
    color: var(--dark-bg);
    line-height: 1.6;
    margin: 0;
}

/* Legacy Features Showcase - Alternating Layout (kept for backward compatibility) */
.features-showcase {
    max-width: 1000px;
    margin: 60px auto 0;
    position: relative;
}

.feature-row {
    margin-bottom: 40px;
    position: relative;
}

.feature-row-left {
    display: flex;
    justify-content: flex-start;
}

.feature-row-right {
    display: flex;
    justify-content: flex-end;
}

.feature-item {
    background: var(--white);
    padding: 35px 40px;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(33, 35, 38, 0.1);
    max-width: 500px;
    width: 100%;
    display: flex;
    align-items: flex-start;
    gap: 25px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-left: 4px solid var(--primary-dark);
}

.feature-row-right .feature-item {
    border-left: none;
    border-right: 4px solid var(--accent-blue);
}

.feature-item:hover {
    transform: translateX(5px);
    box-shadow: 0 12px 40px rgba(33, 35, 38, 0.15);
}

.feature-row-right .feature-item:hover {
    transform: translateX(-5px);
}

.feature-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-dark);
    line-height: 1;
    flex-shrink: 0;
    opacity: 0.3;
}

.feature-row-right .feature-number {
    color: var(--accent-blue);
}

.feature-content {
    flex: 1;
}

.feature-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 12px;
}

.feature-description {
    font-size: 1rem;
    color: var(--dark-bg);
    line-height: 1.7;
    margin: 0;
}

/* Legacy styles for backward compatibility */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.feature-card {
    background: var(--white);
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(33, 35, 38, 0.1);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(33, 35, 38, 0.15);
}

.feature-icon {
    font-size: 3.5rem;
    margin-bottom: 20px;
}

/* Benefits Section - Two Column Layout */
.benefits-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    max-width: 1400px;
    margin: 0 auto;
    align-items: center;
}

.benefits-image-container {
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(33, 35, 38, 0.15);
    opacity: 0;
    animation: fadeInUp 1s ease-out 0.3s forwards;
}

.benefits-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.benefits-content {
    display: flex;
    flex-direction: column;
    gap: 40px;
    opacity: 0;
    animation: fadeInUp 1s ease-out 0.5s forwards;
}

.benefits-main-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin: 0;
    line-height: 1.3;
}

.benefits-items {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* Slide in from right animation */
@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.benefit-item {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    padding: 0;
    background: transparent;
    border: none;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateX(100px);
}

.benefit-item.animate-in {
    animation: slideInFromRight 0.8s ease-out forwards;
}

.benefit-item.animate-in:nth-child(1) {
    animation-delay: 0s;
}

.benefit-item.animate-in:nth-child(2) {
    animation-delay: 1s;
}

.benefit-item.animate-in:nth-child(3) {
    animation-delay: 2s;
}

.benefit-item.animate-in:nth-child(4) {
    animation-delay: 3s;
}

.benefit-item:hover {
    transform: translateX(4px);
}

.benefit-icon {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border-radius: 0;
    padding: 0;
}

.benefit-icon-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.benefit-text {
    flex: 1;
    padding-top: 8px;
}

.benefit-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--primary-dark);
    margin: 0 0 12px 0;
    line-height: 1.3;
}

.benefit-description {
    font-size: 1.05rem;
    color: var(--dark-bg);
    line-height: 1.7;
    margin: 0;
}

/* Legacy Benefits List (kept for backward compatibility) */
.benefits-list {
    list-style: none;
    padding: 0;
    margin: 30px 0;
}

.benefits-list li {
    padding: 15px 0;
    padding-left: 30px;
    position: relative;
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--dark-bg);
    border-bottom: 1px solid var(--accent-light);
}

.benefits-list li:last-child {
    border-bottom: none;
}

.benefits-list li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--primary-dark);
    font-weight: bold;
    font-size: 1.3rem;
}

.benefits-list li strong {
    color: var(--primary-dark);
}

/* Homepage Footer */
.homepage-footer {
    background: #99ebff;
    padding: 80px 20px 40px;
    position: relative;
    overflow: hidden;
}

.homepage-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(117, 0, 20, 0.2) 20%, 
        rgba(117, 0, 20, 0.2) 80%, 
        transparent 100%);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.footer-favicon {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    flex-shrink: 0;
}

.footer-favicon-image {
    width: 200px;
    height: 200px;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(117, 0, 20, 0.2));
}

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

.footer-title {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin: 0 0 40px 0;
    line-height: 1.2;
    text-shadow: 0 2px 10px rgba(117, 0, 20, 0.1);
}

.footer-cta-button {
    display: inline-block;
    padding: 20px 60px;
    background: var(--primary-dark);
    color: var(--white);
    text-decoration: none;
    border-radius: 12px;
    font-size: 1.3rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 6px 24px rgba(117, 0, 20, 0.3);
    margin-bottom: 50px;
    position: relative;
    overflow: hidden;
}

.footer-cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.footer-cta-button:hover::before {
    left: 100%;
}

.footer-cta-button:hover {
    background: #8a0019;
    transform: translateY(-3px);
    box-shadow: 0 8px 32px rgba(117, 0, 20, 0.4);
}

.footer-copyright {
    font-size: 0.95rem;
    color: var(--dark-bg);
    opacity: 0.7;
    margin: 0;
    font-weight: 500;
}

/* Page Container (for About, Research, Contact) */
.page-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px;
}

.page-header {
    text-align: center;
    margin-bottom: 60px;
}

.page-header h1 {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 10px;
}

.page-subtitle {
    font-size: 1.2rem;
    color: var(--dark-bg);
    opacity: 0.8;
}

/* Founders Section */
.founders-section {
    background: transparent;
}

.founders-header-bar {
    width: 60%;
    max-width: 520px;
    height: 6px;
    margin: 0 auto 40px;
    background: linear-gradient(90deg, var(--white), var(--primary-dark), var(--white));
    border-radius: 999px;
}

@media (max-width: 768px) {
    .founders-header-bar {
        width: 70%;
    }
}

.founders-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 50px;
    margin-top: 40px;
}

.founder-card {
    background: transparent;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
}

.founder-left .founder-image {
    float: left;
    margin-right: 25px;
    margin-bottom: 15px;
}

.founder-right .founder-image {
    float: left;
    margin-right: 25px;
    margin-bottom: 15px;
}

.founder-image {
    width: 238px;
    height: auto;
    border-radius: 8px;
    object-fit: cover;
}

.founder-header {
    overflow: hidden;
    margin-bottom: 10px;
}

.founder-name {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 8px;
}

.founder-role {
    font-size: 1.8rem;
    color: var(--primary-dark);
    margin-bottom: 0;
    font-weight: 400;
}

.founder-bio {
    font-size: 1rem;
    color: var(--dark-bg);
    line-height: 1.7;
    margin: 0;
}

@media (max-width: 900px) {
    .founders-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .founder-left .founder-image,
    .founder-right .founder-image {
        float: none;
        margin: 0 auto 20px;
        display: block;
    }
}

/* Research Section */
.research-section {
    background: transparent;
}

.research-container {
    text-align: center;
    max-width: 1200px;
}

.research-main-title {
    font-size: calc(2.5rem + 2px);
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 30px;
    text-align: center;
}

.research-intro {
    font-size: calc(1.1rem + 2px);
    color: var(--dark-bg);
    line-height: 1.8;
    margin: 0 auto 40px;
    max-width: 800px;
    text-align: center;
}

.research-divider {
    width: 60%;
    max-width: 520px;
    height: 3px;
    margin: 0 auto 40px;
    background: linear-gradient(90deg, var(--white), var(--primary-dark), var(--white));
    border-radius: 999px;
}

.research-subtitle {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 40px;
    text-align: center;
}

/* Research List */
.research-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-top: 40px;
    text-align: left;
}

.research-item {
    background: var(--white);
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(33, 35, 38, 0.1);
}

.research-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--dark-bg);
    margin-bottom: 12px;
    line-height: 1.5;
}

.research-publication {
    font-size: 1rem;
    color: var(--dark-bg);
    margin-bottom: 8px;
    font-weight: 400;
}

.research-date {
    font-size: 1rem;
    color: var(--dark-bg);
    margin-bottom: 12px;
    font-weight: 400;
}

.research-authors {
    font-size: 1rem;
    color: var(--primary-dark);
    margin-bottom: 15px;
    font-weight: 400;
}

.research-link {
    font-size: 1rem;
    color: var(--primary-dark);
    text-decoration: none;
    font-weight: 400;
    display: inline-block;
    transition: color 0.3s ease;
}

.research-link:hover {
    color: #8a0019;
    text-decoration: underline;
}

@media (max-width: 768px) {
    .research-main-title {
        font-size: 2rem;
    }

    .research-divider {
        width: 70%;
    }

    .research-subtitle {
        font-size: 1.75rem;
    }
}

.methodology-list {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.methodology-list li {
    padding: 12px 0;
    padding-left: 30px;
    position: relative;
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--dark-bg);
}

.methodology-list li:before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--primary-dark);
    font-weight: bold;
    font-size: 1.2rem;
}

/* Contact Section */
.contact-section {
    background: transparent;
}

/* Contact Grid */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    margin-top: 40px;
    align-items: start;
}

.contact-info {
    background: transparent;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
}

.contact-visual {
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-logo {
    max-width: 100%;
    height: auto;
    width: 100%;
    max-width: 500px;
}

.contact-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 25px;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-phone {
    font-size: 1.1rem;
    color: var(--dark-bg);
    margin: 0;
    font-weight: 400;
}

.contact-email {
    font-size: 1.1rem;
    margin: 0;
}

.contact-email a {
    color: var(--accent-blue);
    text-decoration: underline;
    transition: color 0.3s ease;
}

.contact-email a:hover {
    color: var(--primary-dark);
}

.contact-address {
    margin-top: 0;
}

.address-label {
    font-size: 1.1rem;
    color: var(--dark-bg);
    margin-bottom: 8px;
    font-weight: 400;
}

.address-text {
    font-size: 1.1rem;
    color: var(--dark-bg);
    line-height: 1.6;
    margin: 0;
    font-weight: 400;
}

.social-media {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.social-icon {
    width: 50px;
    height: 50px;
    background: var(--primary-dark);
    color: var(--white);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-icon:hover {
    background: #8a0019;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(117, 0, 20, 0.3);
}

.social-icon svg {
    width: 24px;
    height: 24px;
}

/* Responsive Design for Business Pages */
@media (max-width: 968px) {
    .contact-title {
        font-size: 2rem;
    }

    .contact-info {
        padding: 0;
    }

    .contact-visual {
        display: none;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .solution-features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    .longitudinal-graphs-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
    
    .benefits-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .benefits-main-title {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 4px 10px rgba(33, 35, 38, 0.1);
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        gap: 20px;
    }
    
    .nav-menu-active {
        transform: translateX(0);
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .hero-caption {
        font-size: 2rem;
    }
    
    .hero-description {
        font-size: 1.1rem;
    }
    
    .hero-logo {
        height: 150px;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .content-section {
        padding: 60px 20px;
    }
    
    .section-content {
        padding: 30px 20px;
    }
    
    .page-header h1 {
        font-size: 2.5rem;
    }
    
    .problem-solution-grid {
        grid-template-columns: 1fr;
        gap: 50px;
    }
    
    .section-feature-title {
        font-size: 2rem;
    }
    
    .section-header-wrapper {
        margin-bottom: 30px;
    }
    
    .solution-description {
        font-size: 1rem;
    }
    
    .solution-features-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        margin-top: 20px;
        padding-top: 20px;
    }
    
    .solution-feature-card {
        padding: 20px 16px;
    }
    
    .feature-card-icon {
        width: 48px;
        height: 48px;
    }
    
    .feature-card-title {
        font-size: 1rem;
    }
    
    .problem-solution-section {
        padding: 40px 20px;
    }
    
    .problem-solution-grid {
        gap: 40px;
    }
    
    .problem-card,
    .solution-card {
        padding: 40px 30px;
    }
    
    .problem-solution-title {
        font-size: 1.75rem;
    }
    
    .benefits-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .benefits-main-title {
        font-size: 1.8rem;
    }
    
    .benefit-item {
        gap: 20px;
    }
    
    .benefit-icon {
        width: 100px;
        height: 100px;
    }
    
    .benefit-title {
        font-size: 1.25rem;
    }
    
    .benefit-description {
        font-size: 1rem;
    }
    
    .benefits-items {
        gap: 32px;
    }
    
    .footer-favicon {
        position: static;
        transform: none;
        display: flex;
        justify-content: center;
        margin-bottom: 30px;
    }
    
    .footer-favicon-image {
        width: 150px;
        height: 150px;
    }
    
    .footer-text-content {
        max-width: 800px;
        margin: 0 auto;
        text-align: center;
    }
    
    .footer-title {
        font-size: 2.5rem;
    }
    
    .footer-cta-button {
        padding: 18px 50px;
        font-size: 1.2rem;
    }
    
    .homepage-footer {
        padding: 60px 20px 30px;
    }
    
    .feature-row-left,
    .feature-row-right {
        justify-content: center;
    }
    
    .feature-item {
        max-width: 100%;
        padding: 30px 25px;
    }
    
    .feature-number {
        font-size: 2rem;
    }
    
    .feature-title {
        font-size: 1.3rem;
    }
    
    .features-compact-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .feature-compact-item {
        padding: 20px 15px;
    }
    
    .feature-compact-number {
        font-size: 1.5rem;
        min-width: 30px;
    }
    
    .feature-compact-title {
        font-size: 1.1rem;
    }
    
    .feature-compact-description {
        font-size: 0.85rem;
    }
    
    .longitudinal-title {
        font-size: 2rem;
    }
    
    .longitudinal-subtitle {
        font-size: 1.1rem;
    }
    
    .longitudinal-header {
        margin-bottom: 40px;
    }
    
    .longitudinal-graphs-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

@media (max-width: 480px) {
    .features-compact-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-favicon-image {
        width: 120px;
        height: 120px;
    }
    
    .footer-title {
        font-size: 2rem;
    }
    
    .footer-cta-button {
        padding: 16px 40px;
        font-size: 1.1rem;
    }
    
    .homepage-footer {
        padding: 50px 20px 25px;
    }
}