/* ==========================================================================
   1. VARIABLES & BASE SETTINGS
   ========================================================================== */
:root {
    /* Existing Color Palette */
    --primary: #2c3e50; 
    --secondary: #1abc9c; 
    --accent: #e74c3c; 
    --bg-light: #f9f9f9; 
    --text-main: #333; 

    /* New: Standardized Border Radii */
    --radius-sm: 0.25rem; /* ~4px for sharp, clickable elements like buttons */
    --radius-md: 0.5rem;  /* ~8px for structural containers like cards and images */
    --radius-pill: 2rem;  /* ~32px for rounded tags */

    /* New: Consistent Spatial Rhythm */
    --space-xs: 0.5rem;   /* ~8px */
    --space-sm: 1rem;     /* ~16px */
    --space-md: 1.5rem;   /* ~24px */
    --space-lg: 2rem;     /* ~32px */
    --space-xl: 4rem;     /* ~64px for section padding */
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; line-height: 1.6; color: var(--text-main); background-color: var(--bg-light); }
a { text-decoration: none; color: inherit; }
.container { width: 92%; max-width: 1400px; margin: auto; }

/* ==========================================================================
   2. NAVIGATION & FOOTER
   ========================================================================== */
header { background: var(--primary); color: #fff; padding: 1rem 0; position: sticky; top: 0; z-index: 100; }
header .container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.logo { font-size: 1.5rem; font-weight: bold; }
header nav ul { list-style: none; display: flex; gap: 1.5rem; flex-wrap: wrap; margin-top: 0.5rem; align-items: center; }
header nav ul li a { font-weight: 500; transition: color 0.3s ease; }
header nav ul li a:hover { color: var(--secondary); }

footer { background: var(--primary); color: #fff; text-align: center; padding: 3rem 0; }
footer h2 { margin-bottom: 1rem; font-size: 1.5rem; }
footer p { opacity: 0.8; }

/* Sticky Header Base */
header {
    background: var(--primary);
    color: #fff;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Hide hamburger toggle by default on desktop */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    padding: 5px;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #fff;
    border-radius: 2px;
    transition: 0.3s;
}

/* Mobile Media Query */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    header nav {
        /* Set up hidden state for smooth transition */
        display: block; /* Kept in DOM for animation */
        visibility: hidden;
        opacity: 0;
        transform: translateY(-10px);
        transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
        
        width: 100%;
        position: absolute;
        top: 100%;
        left: 0;
        background: var(--primary);
        padding: 1.5rem;
        box-shadow: 0 10px 15px rgba(0,0,0,0.2);
    }

    /* Active state smoothly slides and fades it into view */
    header nav.active {
        visibility: visible;
        opacity: 1;
        transform: translateY(0);
    }

    header nav ul {
        flex-direction: column;
        gap: 1.25rem; /* Slightly more breathing room between links */
        align-items: stretch;
        text-align: center;
    }

    header nav ul li a {
        display: block;
        padding: 0.5rem 0; /* Expands the clickable tap target for mobile */
    }

    header nav ul li a.contact-btn {
        display: block;
        width: 100%;
        text-align: center;
        box-sizing: border-box;
    }
}

/* ==========================================================================
   3. GLOBAL UI COMPONENTS (Buttons, Cards, & Layouts)
   ========================================================================== */
.btn-main { display: inline-block; background: var(--secondary); color: #fff; padding: 0.75rem 1.5rem; border-radius: var(--radius-sm); font-size: 1.1rem; font-weight: bold; transition: opacity 0.3s; }
.btn-main:hover { opacity: 0.9; }
.btn-outline { display: inline-block; padding: 0.5rem 1rem; border: 2px solid var(--secondary); color: var(--secondary); border-radius: var(--radius-sm); transition: background 0.3s, color 0.3s; font-weight: bold; }
.btn-outline:hover { background: var(--secondary); color: #fff; }
.btn-link { display: inline-block; margin-top: 1rem; padding: 0.5rem 1rem; background: var(--secondary); color: #fff; border-radius: var(--radius-sm); font-weight: bold; transition: background 0.3s, opacity 0.3s; text-align: center; font-size: 0.9rem; }
.btn-link:hover { opacity: 0.9; }
.contact-btn { background: var(--accent); padding: 0.5rem 1rem; border-radius: var(--radius-sm); color: #fff !important; font-weight: bold; }
.back-link { display: inline-block; margin-bottom: 2rem; color: var(--secondary); font-weight: bold; }
.back-link:hover { text-decoration: underline; }

/* Dashboard Metric Cards (Used in Case Studies) */
.dashboard-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1.5rem; margin: 2rem 0; }
.dash-card { background: #fff; padding: 1.5rem; border-radius: var(--radius-sm); text-align: center; box-shadow: 0 4px 10px rgba(0,0,0,0.05); border: 1px solid #eaeaea; border-top: 4px solid var(--secondary); }
.dash-card h4 { font-size: 2.2rem; color: var(--primary); margin-bottom: 0.5rem; }
.dash-card h4.green-text { color: #2ecc71; }
.dash-card p { font-size: 0.9rem; color: #555; margin: 0; line-height: 1.3; font-weight: bold; text-transform: uppercase; letter-spacing: 0.5px;}

/* Visual Image Cards & Hover Overlays */
.card-visual { flex: 1; min-width: 200px; max-width: 600px; position: relative; overflow: hidden; border-radius: var(--radius-sm); cursor: pointer; background: #fff; border: 1px solid #dcdde1; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08); transition: transform 0.3s ease, box-shadow 0.3s ease; margin: 0 auto; }
.card-visual:hover { transform: translateY(-3px); box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12); }
.card-visual img, .card-visual .hub-container { width: 100%; height: auto; display: block; border-radius: var(--radius-sm); transition: 0.3s; }
.card-visual:hover img { opacity: 0.9; }

.zoomable-image { cursor: pointer; transition: 0.3s; width: 100%; height: auto; border-radius: var(--radius-sm); box-shadow: 0 4px 15px rgba(0,0,0,0.1); }
.zoomable-image:hover { opacity: 0.85; }

/* Updated Overlay: Always visible, but transparent background until hover */
.zoom-overlay { 
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background: rgba(0, 0, 0, 0); 
    display: flex; 
    justify-content: flex-end; /* Aligns content to the right */
    align-items: flex-end; /* Aligns content to the bottom */
    padding: 15px; /* Distance from the bottom-right corner */
    transition: background 0.3s ease; 
    pointer-events: none; 
    border-radius: 7px; 
}
.card-visual:hover .zoom-overlay { 
    background: rgba(0, 0, 0, 0.4); /* Applies the dark highlight on hover */
}

/* Updated Icon: Always full size */
.zoom-icon { 
    color: #fff; 
    background: var(--secondary); 
    padding: 10px; 
    border-radius: 50%; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.3); 
    transform: scale(1); 
    transition: transform 0.3s ease; 
}
.card-visual:hover .zoom-icon { 
    transform: scale(1.1); /* Adds a slight pop effect when hovered */
}

/* ==========================================================================
   4. LIGHTBOX / MODAL SYSTEM (Scrollable Images with Fixed Top Controls)
   ========================================================================== */
.modal { display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%; overflow-y: auto; background-color: rgba(0,0,0,0.85); padding: 5rem 1.25rem 2.5rem 1.25rem; }
.modal-content-wrapper { position: relative; margin: auto; width: 90%; max-width: 1200px; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; }
.modal-content { display: block; width: 100%; height: auto; max-height: none; border-radius: 8px; box-shadow: 0 4px 25px rgba(0,0,0,0.5); object-fit: contain; margin-top: 20px; }
#modalCustomPreview { max-width: 500px; width: 90%; margin: 40px auto; background: #fff; padding: 1.5rem; border-radius: 8px; box-shadow: 0 5px 30px rgba(0,0,0,0.5); }
#modalCustomPreview .hub-container { max-width: 100%; box-shadow: none; border: none; padding: 0; }

/* Fixed Top Caption / Description Box */
#modalCaption { position: fixed; top: 15px; left: 50%; transform: translateX(-50%); width: 80%; max-width: 800px; text-align: center; color: #fff; background: rgba(0,0,0,0.85); padding: 10px 20px; border-radius: 6px; font-size: 0.95rem; font-style: italic; z-index: 1050; border: 1px solid rgba(255,255,255,0.2); box-shadow: 0 4px 15px rgba(0,0,0,0.4); }

/* Fixed UI Controls anchored to the screen viewport */
.close-modal { position: fixed; top: 1.25rem; right: 2rem; color: #f1f1f1; font-size: 2.2rem; font-weight: bold; transition: 0.3s; cursor: pointer; z-index: 1055; line-height: 1; }
.close-modal:hover, .close-modal:focus { color: var(--secondary); text-decoration: none; }

.modal-prev, .modal-next { cursor: pointer; position: fixed; top: 50%; transform: translateY(-50%); padding: 16px; color: white; font-weight: bold; font-size: 24px; transition: 0.3s ease; user-select: none; background-color: rgba(0,0,0,0.6); border-radius: 4px; z-index: 1050; display: none; }
.modal-prev { left: 20px; }
.modal-next { right: 20px; }
.modal-prev:hover, .modal-next:hover { background-color: var(--secondary); }

/* ==========================================================================
   Diagram Fixes (Hub & Spoke Alignment)
   ========================================================================== */
.hub-container { background: #fff; padding: 1rem; border-radius: 8px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); border: 1px solid #eaeaea; width: 100%; display: flex; flex-direction: column; align-items: center; }
.hub-title { font-size: 0.95rem; font-weight: bold; color: var(--primary); margin-bottom: 1rem; border-bottom: 2px solid #eaeaea; padding-bottom: 0.3rem; text-align: center; width: 100%; }
.node-main { background: var(--primary); color: #fff; padding: 0.5rem 0.75rem; border-radius: 6px; font-weight: bold; text-align: center; width: 90%; font-size: 0.85rem; z-index: 2; position: relative; }
.node-main span { font-size: 0.75rem; font-weight: normal; display: block; color: #ecf0f1; margin-top: 0.1rem; }
.connector-vertical { width: 2px; height: 15px; background: #bdc3c7; margin: 0 auto; }
.branch-container { display: flex; justify-content: space-between; width: 100%; position: relative; }
.branch-line { position: absolute; top: 0; left: 25%; right: 25%; height: 2px; background: #bdc3c7; }
.branch-col { display: flex; flex-direction: column; align-items: center; width: 48%; }
.connector-drop { width: 2px; height: 12px; background: #bdc3c7; margin: 0 auto; }
.node-mvp { background: var(--secondary); color: #fff; padding: 0.5rem; border-radius: 6px; font-weight: bold; text-align: center; width: 100%; font-size: 0.8rem; box-shadow: 0 2px 5px rgba(0,0,0,0.1); }
.node-mvp span { font-size: 0.7rem; font-weight: normal; display: block; margin-top: 0.1rem; }
.connector-dotted { width: 2px; height: 20px; border-left: 2px dashed #bdc3c7; margin: 0.5s auto 0 auto; margin-left: auto; margin-right: auto; }
.node-future { background: #f9f9f9; color: #7f8c8d; padding: 0.5rem; border-radius: 6px; font-weight: bold; text-align: center; width: 90%; font-size: 0.8rem; border: 2px dashed #bdc3c7; }

/* ==========================================================================
   5. PAGE: HOMEPAGE
   ========================================================================== */
.split-section { padding: 5rem 0; }
.split-content { display: flex; align-items: center; gap: 3rem; justify-content: space-between; flex-wrap: wrap; }
.text-block { flex: 1; min-width: 300px; }
.image-block { flex: 1; display: flex; justify-content: center; min-width: 300px; }
.profile-img-frame { background: #fff; padding: 6px; border-radius: 50%; border: 1px solid #dcdde1; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08); display: inline-block; }
.profile-img-frame img { border-radius: 50%; width: 350px; height: 350px; object-fit: cover; display: block; }
.hero { background: #ecf0f1; }
.hero h1 { font-size: 3.5rem; margin-bottom: 0.5rem; color: var(--primary); }
.hero h2 { font-size: 1.5rem; color: #555; margin-bottom: 1.5rem; font-weight: 400; font-style: italic; }
.hero p { font-size: 1.1rem; margin-bottom: 2rem; }
.results-bar { background: var(--primary); color: #fff; padding: 2rem 0; text-align: center; }
.results-bar .metrics { display: flex; justify-content: space-around; flex-wrap: wrap; gap: 1.5rem; }
.metric h3 { font-size: 2.2rem; color: var(--secondary); margin-bottom: 0.5rem; }
.metric p { font-size: 1rem; text-transform: uppercase; letter-spacing: 1px; }

.case-studies { padding: 4rem 0; text-align: center; }
.case-studies h2 { margin-bottom: 3rem; font-size: 2.5rem; color: var(--primary); }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 2rem; text-align: left; }
.card { background: #fff; padding: 2rem; border-radius: var(--radius-sm); box-shadow: 0 4px 10px rgba(0,0,0,0.05); border-top: 4px solid var(--secondary); border: 1px solid #eaeaea; }
.card h3 { color: var(--primary); margin-bottom: 0.5rem; font-size: 1.4rem; }
.card h4 { color: #7f8c8d; margin-bottom: 1rem; font-size: 1rem; }
.card p { margin-bottom: 1.5rem; font-size: 0.95rem; }

.testimonials { background: #ecf0f1; padding: 4rem 0; text-align: center; }
.testimonials h2 { margin-bottom: 3rem; font-size: 2.5rem; color: var(--primary); }
.testimonial-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; text-align: left; }
.testimonial-card { background: #fff; padding: 2rem; border-radius: 8px; box-shadow: 0 4px 6px rgba(0,0,0,0.05); position: relative; border-top: 4px solid var(--accent); }
.quote-mark { font-size: 4rem; color: var(--secondary); position: absolute; top: 10px; left: 15px; opacity: 0.2; line-height: 1; font-family: Georgia, serif; }
.testimonial-card p { position: relative; z-index: 1; font-size: 0.95rem; font-style: italic; margin-bottom: 1.5rem; }
.testimonial-card .author { font-weight: bold; font-style: normal; color: var(--primary); margin-bottom: 0; text-align: right; }
.about-section { background: #fff; }
.about-section h2 { font-size: 2.5rem; color: var(--primary); margin-bottom: 1.5rem; }
.about-section p { margin-bottom: 1rem; font-size: 1.05rem; }

/* ==========================================================================
   6. PAGE: PORTFOLIO MAIN
   ========================================================================== */
.portfolio-hero { background: #ecf0f1; padding: 4rem 0; text-align: center; border-bottom: 4px solid var(--secondary); }
.portfolio-hero h1 { font-size: 3rem; color: var(--primary); margin-bottom: 0.5rem; }
.portfolio-hero p { font-size: 1.2rem; color: #555; max-width: 600px; margin: 0 auto; font-style: italic; }
.portfolio-category { padding: 4rem 0; }
.portfolio-category:nth-child(even) { background: #fff; }
.category-title-wrapper { text-align: center; margin-bottom: 3rem; }
.category-title { font-size: 2.2rem; color: var(--primary); border-bottom: 2px solid var(--secondary); display: inline-block; padding-bottom: 0.5rem; }
.category-intro {
    max-width: 900px;
    margin: 1.5rem auto 0 auto;
    font-size: 1.15rem;
    line-height: 1.6;
    color: #444;
}

.portfolio-grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(550px, 1fr)); gap: 2.5rem; }
/* The Main Card Container */
.portfolio-card { 
    display: block !important; /* Forces the flexbox invisible fence to drop */
    background: #fff; 
    padding: 2rem; 
    border-radius: var(--radius-sm); 
    box-shadow: 0 4px 10px rgba(0,0,0,0.05); 
    border: 1px solid #eaeaea; 
    overflow: hidden !important; 
} 

/* The Floating Image */
.portfolio-card .card-visual { 
    float: right !important; /* Forces the image to act like a rock in the stream */
    width: 320px !important; 
    max-width: 45% !important; /* Prevents the image from squishing text on iPads */
    margin: 0 0 1.5rem 2rem !important; 
} 

/* The Text Container */
.card-content { 
    display: block !important; /* Ensures the text flows naturally */
}
.card-content h3 { font-size: 1.4rem; color: var(--primary); margin-bottom: 0.75rem; }
.meta-field { margin-bottom: 0.6rem; font-size: 0.95rem; }
.meta-field strong { color: var(--primary); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.5px; display: block; margin-bottom: 0.1rem; }

/* Hub & Spoke Diagram Styling */
.hub-container { background: #fff; padding: 1rem; border-radius: 8px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); border: 1px solid #eaeaea; width: 100%; display: flex; flex-direction: column; align-items: center; }
.hub-title { font-size: 0.95rem; font-weight: bold; color: var(--primary); margin-bottom: 1rem; border-bottom: 2px solid #eaeaea; padding-bottom: 0.3rem; text-align: center; width: 100%; }
.node-main { background: var(--primary); color: #fff; padding: 0.5rem 0.75rem; border-radius: 6px; font-weight: bold; text-align: center; width: 90%; font-size: 0.85rem; z-index: 2; position: relative; }
.node-main span { font-size: 0.75rem; font-weight: normal; display: block; color: #ecf0f1; margin-top: 0.1rem; }
.connector-vertical { width: 2px; height: 15px; background: #bdc3c7; }
.branch-container { display: flex; justify-content: space-between; width: 100%; position: relative; }
.branch-line { position: absolute; top: 0; left: 25%; right: 25%; height: 2px; background: #bdc3c7; }
.branch-col { display: flex; flex-direction: column; align-items: center; width: 48%; }
.connector-drop { width: 2px; height: 12px; background: #bdc3c7; }
.node-mvp { background: var(--secondary); color: #fff; padding: 0.5rem; border-radius: 6px; font-weight: bold; text-align: center; width: 100%; font-size: 0.8rem; box-shadow: 0 2px 5px rgba(0,0,0,0.1); }
.node-mvp span { font-size: 0.7rem; font-weight: normal; display: block; margin-top: 0.1rem; }
.connector-dotted { width: 2px; height: 20px; border-left: 2px dashed #bdc3c7; margin-top: 0.5rem; }
.node-future { background: #f9f9f9; color: #7f8c8d; padding: 0.5rem; border-radius: 6px; font-weight: bold; text-align: center; width: 90%; font-size: 0.8rem; border: 2px dashed #bdc3c7; }

/* Uniform mobile stacking and spacing fix for Portfolio */
@media (max-width: 768px) {
    .portfolio-grid-2 { gap: 1.5rem; grid-template-columns: 1fr; }
    .portfolio-card { flex-direction: column; align-items: stretch; padding: 1.5rem; }
    .portfolio-card .card-visual { 
        float: none !important; /* Removes the rock from the stream for tiny screens */
        width: 100% !important; 
        max-width: 100% !important; 
        margin: 0 auto 1.5rem auto !important; 
    }   
    .portfolio-card .card-visual img { max-height: 350px; object-fit: contain; background: #fff; }
    .card-content { width: 100%; }
}

/* PORTFOLIO ANCHOR NAVIGATION */
.portfolio-anchor-nav {
    display: flex;
    justify-content: center;
    gap: 1rem;
    row-gap: 1rem;
    flex-wrap: wrap;
    margin: 2rem auto 4rem auto;
    padding: 0 1rem;
}

.portfolio-anchor-nav div {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: .5rem;
}

.portfolio-anchor-link {
    background-color: var(--bg-light);
    color: var(--primary);
    border: 2px solid var(--secondary);
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.portfolio-anchor-link:hover {
    background-color: var(--secondary);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.portfolio-anchor-link button {
    background: transparent;
    border: none;
    color: inherit;
    font: inherit;
    font-weight: inherit;
    cursor: pointer;
    padding: 0;
    margin: 0;
    outline: none;
}

/* ==========================================================================
   7. PAGE: CASE STUDIES
   ========================================================================== */
.case-study { background: #fff; padding: 4rem 0; }
.article-container { max-width: 1000px; margin: auto; padding: 0 1rem; }
.case-study h1 { font-size: 2.8rem; color: var(--primary); margin-bottom: 0.5rem; line-height: 1.2; }
.subtitle { font-size: 1.3rem; color: #555; font-style: italic; margin-bottom: 1.5rem; }
.project-meta { background: var(--bg-light); padding: var(--space-md); border-radius: var(--radius-md); margin-bottom: var(--space-lg); display: flex; flex-wrap: wrap; gap: var(--space-md); border-left: 4px solid var(--secondary); }
.meta-item strong { display: block; color: var(--primary); font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.5px; }
.tags { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 2rem; }
.tag { background: #ecf0f1; padding: 0.25rem 0.75rem; border-radius: var(--radius-sm); font-size: 0.85rem; font-weight: bold; color: #555; }
.case-study h2 { font-size: 1.8rem; color: var(--primary); margin: var(--space-lg) 0 var(--space-sm) 0; border-bottom: 2px solid var(--secondary); padding-bottom: 0.5rem; }
.case-study h3 { font-size: 1.3rem; color: var(--primary); margin: var(--space-lg) 0 var(--space-sm) 0; }
.case-study p { font-size: 1.1rem; margin-bottom: 1.5rem; }
.case-study ul { margin-left: 2rem; margin-bottom: 1.5rem; font-size: 1.1rem; }
.case-study li { margin-bottom: 0.5rem; }
.side-by-side { display: flex; align-items: flex-start; gap: 3rem; margin: 3rem 0; flex-wrap: wrap; }
.text-content, .image-content, .css-chart-container { flex: 1; min-width: 300px; }

/* Case Study CTA Block */
.cta-block {
    text-align: center;
    margin-top: var(--space-xl);
    padding: 3rem;
    background: var(--bg-light);
    border-radius: var(--radius-md);
    border: 1px solid #eaeaea;
}

/* Primary Color Override for Buttons */
.btn-main.primary-bg {
    background: var(--primary);
}

/* Global Image Sizing for Portfolio Cards */
.portfolio-card .card-visual img {
    width: 100%;
    height: auto;
    display: block;
}

/* Custom Case Study Infographics */
.css-chart-container { background: #fff; padding: var(--space-lg) var(--space-sm); border-radius: var(--radius-md); box-shadow: 0 4px 15px rgba(0,0,0,0.05); border: 2px solid #ecf0f1; width: 100%; max-width: 500px; margin: 0 auto; }
.chart-title { text-align: center; color: var(--primary); margin-bottom: 2rem; font-size: 1.3rem; }
.chart-wrapper { display: flex; justify-content: space-around; align-items: flex-end; height: 220px; border-bottom: 3px solid var(--primary); padding-bottom: 10px; margin-top: 40px; }
.chart-bar-group { display: flex; flex-direction: column; align-items: center; width: 35%; height: 100%; justify-content: flex-end; }
.chart-bar { width: 100%; border-radius: 4px 4px 0 0; display: flex; justify-content: center; position: relative; box-shadow: inset 0 -4px 0 rgba(0,0,0,0.1); }
.sales-bar { background: var(--primary); height: 100%; }
.adoption-bar { background: var(--accent); height: 34%; }
.bar-label { position: absolute; top: -25px; font-weight: bold; color: var(--text-main); font-size: 1.1rem; }
.chart-label { margin-top: 15px; font-weight: bold; color: var(--primary); text-align: center; font-size: 0.95rem; }
.chart-caption { text-align: center; font-size: 0.9rem; color: #7f8c8d; font-style: italic; margin-top: 1.5rem; }

.scaling-callout { background: #e8f6f3; border-left: 4px solid var(--secondary); padding: var(--space-lg); border-radius: 0 var(--radius-md) var(--radius-md) 0; margin: var(--space-xl) 0; box-shadow: 0 2px 8px rgba(0,0,0,0.05); }
.scaling-callout h3 { color: var(--primary); margin-bottom: 1rem; font-size: 1.5rem; }
.scaling-callout p { margin-bottom: 1rem; font-size: 1.05rem; }
.scaling-callout ul { margin-left: 1.5rem; }
.scaling-callout li { margin-bottom: 0.5rem; font-size: 1.05rem; }

.vanity-dashboard { background: #fff; padding: var(--space-md); border-radius: var(--radius-md); box-shadow: 0 4px 15px rgba(0,0,0,0.05); border: 1px solid #eaeaea; width: 100%; max-width: 500px; margin: 0 auto; }
.vanity-header { font-size: 0.95rem; color: #7f8c8d; text-transform: uppercase; letter-spacing: 1px; font-weight: bold; margin-bottom: 1.5rem; text-align: center; }
.vanity-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
.v-card { padding: 1.5rem 1rem; border-radius: 6px; text-align: center; border: 1px solid #ecf0f1; }
.v-card-good { background: #f0fbf9; border-top: 4px solid #a3e4d7; }
.v-card-bad { background: #fdf2f0; border-top: 4px solid var(--accent); }
.v-value { font-size: 2rem; font-weight: bold; margin-bottom: 0.25rem; }
.val-good { color: var(--secondary); }
.val-bad { color: var(--accent); font-size: 2.5rem; line-height: 1; margin-top: -5px; }
.v-label { font-size: 0.8rem; color: #555; font-weight: bold; text-transform: uppercase; letter-spacing: 0.5px; line-height: 1.2; }
.v-warning { background: var(--accent); color: white; text-align: center; padding: 0.75rem; border-radius: 4px; font-size: 0.9rem; font-weight: bold; margin-top: 1.5rem; display: flex; align-items: center; justify-content: center; gap: 0.5rem; }

.bottleneck-container { background: #fff; padding: 1.5rem; border-radius: 8px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); border: 1px solid #eaeaea; width: 100%; max-width: 400px; margin: 0 auto; }
.bottleneck-title { text-align: center; font-weight: bold; color: var(--primary); margin-bottom: 1.5rem; font-size: 1.1rem; border-bottom: 2px solid #eaeaea; padding-bottom: 0.5rem; }
.b-step { background: #ecf0f1; border: 1px solid #bdc3c7; color: #555; padding: 0.8rem; border-radius: 6px; text-align: center; font-weight: bold; font-size: 0.95rem; }
.b-arrow { text-align: center; color: #bdc3c7; font-size: 1.5rem; margin: 0.3rem 0; }
.b-alert { background: var(--accent); color: #fff; padding: 1.2rem; border-radius: 6px; text-align: center; font-weight: bold; box-shadow: 0 4px 10px rgba(231,76,60,0.3); border: none; }
.b-alert-sub { display: block; font-size: 0.85rem; font-weight: normal; margin-top: 0.3rem; opacity: 0.9; } 

.data-audit-container { background: #fff; padding: 2rem 1.5rem; border-radius: 8px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); border: 1px solid #eaeaea; width: 100%; max-width: 450px; margin: 0 auto; }
.data-audit-title { text-align: center; font-weight: bold; color: var(--primary); margin-bottom: 1.5rem; font-size: 1.1rem; text-transform: uppercase; letter-spacing: 0.5px; }
.audit-stat-box { display: flex; align-items: center; justify-content: space-between; padding: 1rem; border-bottom: 1px solid #ecf0f1; }
.audit-stat-box:last-child { border-bottom: none; background: #f0fbf9; border-radius: 6px; margin-top: 0.5rem; border: 1px solid #a3e4d7; }
.audit-number { font-size: 2rem; font-weight: bold; color: var(--primary); }
.audit-number.highlight { color: var(--secondary); }
.audit-label { font-size: 0.9rem; color: #555; font-weight: 500; text-align: right; line-height: 1.2; }
.bar-container { width: 100%; background: #ecf0f1; height: 8px; border-radius: 4px; margin-top: 1rem; overflow: hidden; display: flex; }
.bar-fill { height: 100%; background: var(--secondary); width: 0.45%; }
.bar-caption { font-size: 0.75rem; color: #7f8c8d; text-align: right; margin-top: 0.5rem; font-style: italic; }

/* ==========================================================================
   Mobile Lightbox Fixes
   ========================================================================== */
@media (max-width: 768px) {
    .modal {
        padding-top: 60px; /* Leaves room for the X button */
    }
    
    #modalCaption {
        position: relative; /* Removes it from fixed positioning */
        top: auto;
        left: auto;
        transform: none; /* Resets the centering trick from desktop */
        width: 100%;
        order: -1; /* Flexbox trick to force it ABOVE the image in the HTML order */
        margin-bottom: 20px;
    }
    
    .modal-content {
        margin-top: 0; /* Removes the hardcoded space we used for desktop */
    }
    
    .close-modal {
        top: 1rem;       
        right: 1.25rem;       
        font-size: 2.2rem; 
    }
}

/* Shrink the preview container padding to maximize screen width */
    #modalCustomPreview {
        width: 95%;
        padding: 1rem 0.5rem;
    }

    /* Shrink the diagram container padding */
    .hub-container {
        padding: 0.5rem;
    }

    /* Scale down the diagram boxes and fonts to fit side-by-side */
    .node-main, .node-mvp, .node-future {
        font-size: 0.75rem;
        padding: 0.4rem;
        word-wrap: break-word;
    }

    .node-main span, .node-mvp span {
        font-size: 0.65rem;
    }

/* ==========================================================================
   Contact Form & Split Footer Styling
   ========================================================================== */
footer { 
    background: var(--primary); 
    color: #fff; 
    padding: 4rem 0; 
}

footer h2 { 
    margin-bottom: 3rem; 
    font-size: 2.2rem; 
    text-align: center; 
}

.footer-split {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 4rem;
    max-width: 1000px;
    margin: 0 auto;
}

.footer-text-block {
    flex: 1;
    text-align: left;
}

.footer-text-block p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.linkedin-btn {
    background: #0077b5;
    border: none;
}
.linkedin-btn:hover {
    background: #005e93;
}

.footer-form-block {
    flex: 1.2; /* Gives the form slightly more breathing room than the text */
    width: 100%;
}

.contact-form { 
    display: flex; 
    flex-direction: column; 
    gap: 1rem; 
}

.contact-form input, 
.contact-form textarea { 
    width: 100%; 
    padding: 0.9rem; 
    border-radius: 5px; 
    border: none; 
    font-family: inherit; 
    font-size: 1rem; 
    background: #fff;
    color: #333;
}

.contact-form textarea { 
    resize: vertical; 
}

.submit-btn { 
    align-self: flex-start; /* Aligns the button to the left side of the right column */
    border: none; 
    cursor: pointer; 
}

/* Mobile Stacking for the Split Footer */
@media (max-width: 768px) {
    .footer-split {
        flex-direction: column;
        gap: 2.5rem;
        text-align: center;
    }
    .footer-text-block {
        text-align: center;
    }
    .submit-btn {
        align-self: center; /* Centers the send button on mobile screens */
        width: 100%;
    }
    .vanity-grid {
        grid-template-columns: 1fr;
    }
    
    .chart-wrapper {
        height: 180px;
        margin-top: var(--space-lg);
    }
}

