/* =========================================
   ACUTIS COMPUTING - MASTER STYLES
   Combined styles for public site, authentication, and client portal
   ========================================= */

/* ===================
   Base Reset & Variables
   =================== */

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

:root {
    --primary-color: #1a237e;
    --secondary-color: #3949ab;
    --accent-color: #c62828;
    --text-dark: #212121;
    --text-light: #757575;
    --bg-light: #fafafa;
    --white: #ffffff;
}

html {
    scroll-padding-top: 100px; 
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    overflow-x: hidden;
}

/* ===================
   Utility Classes
   =================== */

.card {
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    background: var(--white);
    transition: transform 0.3s, box-shadow 0.3s;
}

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

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

.bg-light {
    background: var(--bg-light);
}

/* Focus-visible accessibility */
a:focus-visible,
button:focus-visible,
.cta-button:focus-visible,
.portfolio-link:focus-visible,
.submit-button:focus-visible,
.back-link:focus-visible,
.logout-btn:focus-visible,
.print-btn:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 3px;
}

/* ===================
   Navigation
   =================== */

nav {
    background: var(--white);
    padding: 1.5rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

.back-link {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.back-link:hover {
    color: var(--secondary-color);
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--secondary-color);
}

/* Nav Right Section (for authenticated users) */
.nav-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.user-greeting {
    color: var(--text-dark);
    font-weight: 500;
}

.logout-btn {
    background: none;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

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

.print-btn {
    background: none;
    border: 2px solid var(--secondary-color);
    color: var(--secondary-color);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

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

/* ===================
   Container
   =================== */

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

/* ===================
   Hero Sections
   =================== */

/* General Hero */
.hero {
    background: linear-gradient(135deg, rgba(26, 35, 126, 0.92) 0%, rgba(57, 73, 171, 0.92) 100%);
    color: var(--white);
    padding: 180px 0 120px;
    margin-top: 70px;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(26, 35, 126, 0.85) 0%, rgba(57, 73, 171, 0.85) 100%);
    z-index: 1;
}

.hero .container {
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero p {
    font-size: 1.4rem;
    max-width: 700px;
    margin-bottom: 2rem;
    opacity: 0.95;
}

/* Case Study Hero */
.case-study-hero {
    background: linear-gradient(135deg, rgba(26, 35, 126, 0.95) 0%, rgba(57, 73, 171, 0.95) 100%);
    color: var(--white);
    padding: 140px 0 80px;
    margin-top: 70px;
}

.case-study-hero h1 {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

.case-study-hero p {
    font-size: 1.3rem;
    margin-bottom: 2.5rem;
    opacity: 0.95;
    line-height: 1.6;
}

/* Client Portal Hero */
.portal-hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 140px 0 80px;
    margin-top: 70px;
    text-align: center;
}

.portal-hero h1 {
    font-size: 2.8rem;
    margin-bottom: 0.5rem;
}

.portal-subtitle {
    font-size: 1.3rem;
    opacity: 0.9;
}

/* Service Hero - variant of case-study-hero */
.service-hero {
    background: linear-gradient(135deg, rgba(26, 35, 126, 0.95) 0%, rgba(57, 73, 171, 0.95) 100%);
    color: var(--white);
    padding: 140px 0 70px;
    margin-top: 70px;
}

.service-hero h1 {
    font-size: 2.6rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.25;
}

.service-hero .tagline {
    font-size: 1.2rem;
    opacity: 0.92;
    max-width: 700px;
}

/* Case Study Meta - Badges below hero */
.case-study-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 2rem;
}

.meta-item {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 1rem 1.5rem;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.meta-label {
    display: block;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.8;
    margin-bottom: 0.3rem;
    font-weight: 600;
}

.meta-value {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
}

/* ===================
   Buttons
   =================== */

.cta-button {
    display: inline-block;
    background: var(--accent-color);
    color: var(--white);
    padding: 1rem 2.5rem;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: transform 0.3s, box-shadow 0.3s;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(198, 40, 40, 0.3);
}

.submit-button {
    width: 100%;
    background: var(--primary-color);
    color: var(--white);
    padding: 1rem;
    border: none;
    border-radius: 4px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.submit-button:hover {
    background: var(--secondary-color);
}

.submit-button:disabled {
    background: #bbb;
    cursor: not-allowed;
}

/* ===================
   Forms
   =================== */

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

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

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
}

.form-group textarea {
    resize: vertical;
    min-height: 150px;
}

/* Contact Form */
.contact-form {
    max-width: 600px;
    margin: 3rem auto 0;
    background: var(--white);
    padding: 3rem;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

/* ===================
   Authentication Pages
   =================== */

.auth-section {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 20px 60px;
    background: var(--bg-light);
}

.auth-card {
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    padding: 3rem;
    width: 100%;
    max-width: 440px;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h1 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.auth-header p {
    color: var(--text-light);
    font-size: 1.1rem;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.auth-form .form-group {
    position: relative;
    margin-bottom: 0;
}

.auth-form input {
    padding: 0.875rem 1rem;
    border-radius: 6px;
}

.auth-form input:focus {
    box-shadow: 0 0 0 3px rgba(57, 73, 171, 0.1);
}

.auth-form input::placeholder {
    color: #aaa;
}

.auth-form .submit-button {
    margin-top: 0.5rem;
    padding: 1rem;
    font-size: 1.05rem;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 38px;
    background: none;
    border: none;
    color: var(--secondary-color);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 4px 8px;
}

.password-toggle:hover {
    color: var(--primary-color);
}

/* Form Messages */
.form-error {
    background: #ffebee;
    color: #c62828;
    padding: 0.875rem 1rem;
    border-radius: 6px;
    font-size: 0.95rem;
    border-left: 3px solid #c62828;
}

.form-success {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 0.875rem 1rem;
    border-radius: 6px;
    font-size: 0.95rem;
    border-left: 3px solid #2e7d32;
}

.form-info {
    background: #e3f2fd;
    color: #1565c0;
    padding: 0.875rem 1rem;
    border-radius: 6px;
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

/* Auth Links & Footer */
.auth-links {
    text-align: center;
    margin-top: 1rem;
}

.auth-links a {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
}

.auth-links a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.auth-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
}

.auth-footer p {
    color: var(--text-light);
    font-size: 0.95rem;
}

.auth-footer a {
    color: var(--secondary-color);
    font-weight: 600;
}

/* Password Requirements */
.password-requirements {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
}

.password-requirements p {
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-dark);
}

.password-requirements ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.password-requirements li {
    padding: 0.25rem 0;
    color: var(--text-light);
    position: relative;
    padding-left: 1.5rem;
}

.password-requirements li::before {
    content: '○';
    position: absolute;
    left: 0;
    color: #ccc;
}

.password-requirements li.met {
    color: #2e7d32;
}

.password-requirements li.met::before {
    content: '●';
    color: #2e7d32;
}

/* Auth Success State */
.auth-success {
    text-align: center;
    padding: 2rem 0;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: #e8f5e9;
    color: #2e7d32;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin: 0 auto 1.5rem;
}

.auth-success h2 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.auth-success p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

/* ===================
   Client Portal
   =================== */

/* Loading State */
.portal-loading {
    text-align: center;
    padding: 80px 20px;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e0e0e0;
    border-top-color: var(--secondary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

/* Portal Content */
.portal-content {
    padding: 60px 0;
}

.portal-section {
    margin-bottom: 60px;
}

.portal-section h2 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.section-description {
    color: var(--text-light);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

/* Analyses Grid */
.analyses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.analysis-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 1.75rem;
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}

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

.analysis-card.in-progress {
    border-left: 4px solid #ff9800;
}

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

.analysis-date {
    color: var(--text-light);
    font-size: 0.9rem;
}

.status-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.complete {
    background: #e8f5e9;
    color: #2e7d32;
}

.status-badge.in-progress {
    background: #fff3e0;
    color: #e65100;
}

.analysis-title {
    font-size: 1.25rem;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.analysis-description {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.6;
    flex-grow: 1;
    margin-bottom: 1.25rem;
}

.card-footer {
    border-top: 1px solid #eee;
    padding-top: 1rem;
    margin-top: auto;
}

.view-analysis-btn {
    color: var(--secondary-color);
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    transition: color 0.3s;
}

.view-analysis-btn:hover {
    color: var(--primary-color);
}

.coming-soon {
    color: var(--text-light);
    font-style: italic;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: #f8f9fa;
    border-radius: 12px;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.empty-state h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--text-light);
    max-width: 400px;
    margin: 0 auto 1.5rem;
}

/* Quick Actions */
.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.action-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 2rem;
    text-decoration: none;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.action-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.action-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.action-card p {
    color: var(--text-light);
    font-size: 0.95rem;
    margin: 0;
}

/* Client Badge */
.client-badge {
    margin-bottom: 1.5rem;
}

/* ===================
   Stats Section
   =================== */

.stats {
    background: var(--white);
    padding: 80px 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-top: 3rem;
}

.stat-item,
.stat-card {
    text-align: center;
    padding: 2rem;
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.stat-number {
    font-size: 4rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    display: block;
}

.stat-label {
    font-size: 1.1rem;
    color: var(--text-light);
    line-height: 1.4;
}

/* ===================
   Content Sections
   =================== */

section {
    padding: 100px 0;
}

section h2 {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

section h3 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    margin-top: 2rem;
    color: var(--primary-color);
}

section h4 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    margin-top: 2rem;
    color: var(--secondary-color);
}

section p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

section p.subtitle {
    font-size: 1.3rem;
    color: var(--text-light);
    max-width: 800px;
    margin-bottom: 3rem;
}

section ul {
    margin-left: 2rem;
    margin-bottom: 1.5rem;
}

section ul li {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

/* Quote */
.quote {
    background: #eee;
    padding: 1em;
    border-radius: 1em;
    max-width: 600px;
    display: block;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 0.5rem;
}

.quote figcaption {
    margin: 1em;
    text-align: right;
}

.quote blockquote {
    margin: 1em;
    text-align: center;
}

/* Key Findings Box */
.key-findings {
    background: linear-gradient(135deg, rgba(26, 35, 126, 0.08) 0%, rgba(57, 73, 171, 0.08) 100%);
    padding: 2rem;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
    margin: 2.5rem 0;
}

.key-findings h3 {
    color: var(--primary-color);
    font-size: 1.6rem;
    margin-top: 0;
    margin-bottom: 1rem;
}

.key-findings ul {
    margin-left: 1.5rem;
}

.key-findings ul li {
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 0.8rem;
}

/* Methodology Box */
.methodology {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    margin: 2rem 0;
}

.methodology h4 {
    color: var(--primary-color);
    margin-top: 1.5rem;
    font-size: 1.4rem;
}

.methodology h4:first-child {
    margin-top: 0;
}

.methodology ul {
    margin-left: 1.5rem;
}

.methodology ul li {
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 0.8rem;
}

/* Methodology Steps - for service pages */
.methodology-steps {
    display: grid;
    gap: 1.5rem;
}

.methodology-step {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.step-number {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
}

.step-content h3 {
    margin: 0 0 0.35rem 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
}

.step-content p {
    margin: 0;
    font-size: 1rem;
    color: var(--text-light);
    line-height: 1.65;
}

/* Technical Note */
.technical-note {
    background: #f8f9fa;
    border-left: 4px solid var(--secondary-color);
    padding: 2rem;
    margin: 3rem 0;
    border-radius: 4px;
}

.technical-note h3 {
    color: var(--secondary-color);
    font-size: 1.4rem;
    margin-top: 0;
    margin-bottom: 1rem;
}

.technical-note h4 {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.technical-note p,
.technical-note ul li {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-dark);
}

.technical-note ul {
    margin-left: 1.5rem;
}

/* ===================
   Services Section
   =================== */

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
    margin-top: 3rem;
}

.service-card {
    position: relative;
    padding: 2.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

/* White overlay to lighten background images for text readability */
.service-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background-color: rgba(255, 255, 255, 0.75);
    pointer-events: none;
}

/* Ensure content sits above the overlay */
.service-card > * {
    position: relative;
}

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

.service-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.service-card h3 {
    font-size: 1.6rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.service-card p {
    color: var(--text-dark);
    line-height: 1.7;
}

/* ===================
   Portfolio Section
   =================== */

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.portfolio-item {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: transform 0.3s;
    max-width: 350px;
}

.portfolio-item:hover {
    transform: translateY(-5px);
}

.portfolio-image {
    width: 100%;
    height: 250px;
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 3rem;
}

.portfolio-image img {
    width: 100%;
    height: 250px;
}

.portfolio-content {
    padding: 2rem;
}

.portfolio-content h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.portfolio-content p {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.portfolio-link {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

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

/* ===================
   Values Section
   =================== */

.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
    margin-top: 3rem;
}

.value-item {
    text-align: center;
    padding: 2rem;
}

.value-icon {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
}

.value-icon img {
    width: 80%;
}

.value-item h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.value-item p {
    color: var(--text-light);
}

/* ===================
   CTA Section
   =================== */

.cta-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    padding: 80px 0;
    text-align: center;
}

.cta-section h2 {
    color: var(--white);
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta-section p {
    font-size: 1.3rem;
    opacity: 0.95;
    margin-bottom: 2rem;
}

/* ===================
   Charts
   =================== */

.chart-title {
    text-align: center;
    font-size: 1.4rem;
    font-weight: 600;
    padding: 3rem 0 0;
    color: var(--primary-color);
}

.chart-container {
    margin: 2rem auto;
    background: var(--white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.chart {
    width: 100%;
    margin: 2rem 0;
}

/* Individual chart divs - make responsive */
#weeklyTimeSeriesChart,
#incomeScatterChart,
#full_dataset_parish_diocese,
#diocesevariablesignificance,
#feature_engineering_8,
#feature_engineering_47,
#diocesepredictionmodel,
#parishvariablesignificance,
#parishpredictionmodel {
    width: 100%;
    max-width: 100%;
    align-items: center;
}

.chart-portrait-message {
    display: none;
    background: #f8f9fa;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    margin: 20px 0;
}

/* ===================
   Footer
   =================== */

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

footer p {
    opacity: 0.9;
}

/* ===================
   Responsive Design
   =================== */

@media (max-width: 768px) {
    /* Navigation */
    .nav-links {
        display: none;
    }
    
    .nav-right {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .user-greeting {
        display: none;
    }

    /* Heroes */
    .hero h1,
    .case-study-hero h1,
    .portal-hero h1 {
        font-size: 2rem;
    }

    .hero p,
    .case-study-hero p {
        font-size: 1.2rem;
    }
    
    .service-hero h1 {
        font-size: 2rem;
    }

    .service-hero .tagline {
        font-size: 1.05rem;
    }
    
    .portal-hero {
        padding: 120px 0 60px;
    }

    /* Auth Pages */
    .auth-card {
        padding: 2rem 1.5rem;
    }
    
    .auth-header h1 {
        font-size: 1.75rem;
    }

    /* Sections */
    section {
        padding: 60px 0;
    }

    section h2 {
        font-size: 2rem;
    }

    section h3 {
        font-size: 1.6rem;
    }

    section h4 {
        font-size: 1.3rem;
    }

    /* Case Study Meta */
    .case-study-meta {
        flex-direction: column;
    }

    /* Methodology Steps */
    .methodology-step {
        flex-direction: column;
        gap: 0.75rem;
    }

    /* Grids */
    .services-grid,
    .portfolio-grid,
    .analyses-grid,
    .quick-actions-grid {
        grid-template-columns: 1fr;
    }

    /* Charts */
    .chart-container {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .auth-section {
        padding: 100px 15px 40px;
    }
    
    .auth-card {
        padding: 1.5rem 1.25rem;
    }
    
    .auth-header h1 {
        font-size: 1.5rem;
    }
}

/* Portrait orientation - hide complex charts */
@media screen and (max-width: 767px) and (orientation: portrait) {
    .chart-container,
    div[id$="Chart"],
    div[id*="significance"],
    div[id*="dataset"],
    div[id*="model"],
    div[id*="engineering"] {
        display: none !important;
    }
    
    .chart-portrait-message {
        display: block !important;
    }
}

/* ===================
   Accessibility & Performance
   =================== */

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    * {
        scroll-behavior: auto !important;
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }

    .service-card:hover,
    .portfolio-item:hover,
    .analysis-card:hover,
    .action-card:hover,
    .cta-button:hover {
        transform: none;
        box-shadow: none;
    }
}

/* Print styles */
@media print {
    nav {
        display: none;
    }

    .chart-container,
    .key-findings,
    .methodology {
        page-break-inside: avoid;
        break-inside: avoid;
        box-shadow: none;
    }
    
    .chart-title {
        page-break-after: avoid;
        break-after: avoid;
    }
    
    .chart-container {
        margin-top: 1.5rem;
    }
    
    .chart {
        page-break-inside: avoid;
        break-inside: avoid;
        min-height: 400px;
    }
    
    .contact-form {
        box-shadow: none;
    }
}