/* 
 * AIdeSolutions - Modern Dark Theme 
 * Designed for a premium AI consulting firm.
 */

:root {
    /* Color Palette - Deep Navy & glowing Blue */
    --bg-dark: #0B1120;
    /* Very dark blue/black background */
    --bg-card: #1E293B;
    /* Slightly lighter for cards */
    --primary: #3B82F6;
    /* Vibrant Blue for primary actions */
    --primary-glow: rgba(59, 130, 246, 0.5);
    --secondary: #64748B;
    /* Muted slate for secondary text */
    --text-main: #F8FAFC;
    /* Off-white for main text */
    --text-muted: #94A3B8;
    /* Lighter slate for less important text */
    --border: #334155;
    /* Subtle border color */

    /* Gradients */
    --gradient-hero: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    --gradient-accent: linear-gradient(90deg, #3B82F6, #8B5CF6);
    /* Blue to Purple */

    /* Typography */
    --font-heading-display: 'Newsreader', serif;
    /* Serif for H1/H2 — editorial gravitas */
    --font-heading: 'Outfit', sans-serif;
    /* Sans-serif for H3+ and UI */
    --font-body: 'Inter', sans-serif;

    /* Spacing */
    --container-width: 1200px;
    --header-height: 80px;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2 {
    font-family: var(--font-heading-display);
    color: var(--text-main);
    font-weight: 500;
    margin-bottom: 1rem;
    letter-spacing: -0.015em;
}

h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--text-main);
    font-weight: 700;
    margin-bottom: 1rem;
}

h2 {
    font-size: 2.25rem;
}

h3 {
    font-size: 1.5rem;
}

p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.25rem;
}

/* Prose utility — constrains narrative text to comfortable reading width */
.prose {
    max-width: 680px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

img {
    max-width: 100%;
    display: block;
}

/* Layout Utilities */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 50px 0;
}

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

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 14px 0 var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px 0 var(--primary-glow);
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
}

.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* Navbar */
.navbar {
    height: var(--header-height);
    background: rgba(11, 17, 32, 0.8);
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo img {
    height: 50px;
    /* Increased from 40px */
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.3));
    /* Glow for visibility */
    transition: transform 0.3s ease;
}

.logo img:hover {
    transform: scale(1.05);
}

.nav-links {
    display: flex;
    gap: 30px;
    list-style: none;
    align-items: center;
}

/* Nav CTA button — replaces plain "Contact Us" link */
.nav-cta-wrapper {
    margin-left: 10px;
    display: flex;
    align-items: center;
}

.btn-nav-cta {
    display: inline-block;
    padding: 8px 18px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    border: 1px solid var(--border);
    color: var(--text-muted);
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-body);
    white-space: nowrap;
}

.btn-nav-cta:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.nav-link {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 1.15rem;
    /* Increased font size */
}

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

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    color: var(--text-main);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero {
    padding-top: calc(var(--header-height) + 60px);
    padding-bottom: 60px;
    background: radial-gradient(circle at 50% 50%, rgba(59, 130, 246, 0.1) 0%, rgba(11, 17, 32, 0) 50%);
    text-align: center;
}

.hero h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto 40px;
}

.gradient-text {
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

/* Card Component */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 30px;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

/* Specific layout for Service Cards with side-by-side icons */
.service-card {
    display: flex;
    align-items: center;
    /* Center vertically */
    justify-content: space-between;
    /* Space between text and icon */
    gap: 20px;
    text-align: left;
    /* Ensure text aligns left */
}

.service-card .content {
    flex: 1;
    /* Text takes available space */
}

/* Redundant h3 and p rules removed as global sets them */

.service-card .icon-side {
    flex-shrink: 0;
    /* Don't shrink the image */
    width: 150px;
    /* Inreased size */
    height: 150px;
    object-fit: contain;
    opacity: 1.0;
    /* Adjusted opacity to make it clear */
    filter: drop-shadow(0 0 10px rgba(59, 130, 246, 0.4));
    /* Glow effect matching theme */
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* Footer */
footer {
    background: #020617;
    /* Even darker for footer */
    padding: 40px 0;
    border-top: 1px solid var(--border);
    margin-top: auto;
}

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

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: var(--header-height);
        left: 0;
        width: 100%;
        background: var(--bg-card);
        flex-direction: column;
        padding: 20px;
        text-align: center;
    }

    .nav-links.active {
        display: flex;
    }

    .menu-toggle {
        display: block;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    /* On mobile: hide the CTA wrapper (it's covered by the hamburger menu flow) */
    .nav-cta-wrapper {
        display: none;
    }
}

/* --- Founder Quote Section --- */
.founder-quote-section {
    padding: 50px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: transparent;
}

.founder-quote {
    max-width: 780px;
    margin: 0 auto;
    padding-left: 28px;
    border-left: 3px solid var(--primary);
    position: relative;
}

.founder-quote p {
    font-family: var(--font-heading-display);
    font-style: italic;
    font-size: 1.25rem;
    line-height: 1.75;
    color: var(--text-main);
    margin-bottom: 20px;
    opacity: 0.92;
}

.founder-quote cite {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-style: normal;
}

.cite-name {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-main);
}

.cite-title {
    font-size: 0.85rem;
    color: var(--text-muted);
    letter-spacing: 0.01em;
}

@media (max-width: 768px) {
    .founder-quote {
        padding-left: 18px;
    }

    .founder-quote p {
        font-size: 1.1rem;
    }
}

/* --- Featured Publication --- */
.featured-pub-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-left: 4px solid var(--primary);
    border-radius: 12px;
    padding: 40px 48px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    transition: box-shadow 0.3s ease;
}

.featured-pub-card:hover {
    box-shadow: 0 0 40px rgba(59, 130, 246, 0.12);
}

.featured-pub-label {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.featured-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 700;
    font-family: var(--font-heading);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    line-height: 1;
}

.featured-pub-title {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 500;
    line-height: 1.3;
    color: var(--text-main);
    margin: 0;
    letter-spacing: -0.01em;
}

.featured-pub-title a:hover {
    color: var(--primary);
}

.featured-pub-desc {
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.7;
    max-width: 820px;
    margin: 0;
}

@media (max-width: 768px) {
    .featured-pub-card {
        padding: 28px 24px;
    }

    .featured-pub-title {
        font-size: 1.35rem;
    }
}

/* --- Publication Article Layout --- */
.pub-article-body {
    max-width: 780px;
    margin: 0 auto;
    padding: 0 24px 60px;
}

.pub-section {
    margin-bottom: 40px;
}

.pub-section h2 {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 500;
    color: var(--text-main);
    margin-bottom: 20px;
    letter-spacing: -0.01em;
    border-bottom: 1px solid var(--border);
    padding-bottom: 12px;
}

.pub-section h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 32px 0 12px;
}

.pub-section p,
.pub-section li {
    font-family: var(--font-body);
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.pub-section ul,
.pub-section ol {
    padding-left: 24px;
    margin-bottom: 20px;
}

.pub-section li {
    margin-bottom: 8px;
}

.pub-section strong {
    color: var(--text-main);
    font-weight: 600;
}

.pub-section em {
    color: var(--text-main);
}

/* Callout / comparison box */
.pub-callout {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-left: 3px solid var(--primary);
    border-radius: 8px;
    padding: 24px 28px;
    margin: 28px 0;
}

.pub-callout-label {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary);
    margin-bottom: 16px !important;
}

.pub-callout p {
    font-size: 0.97rem !important;
    margin-bottom: 10px !important;
}

/* Comparison tables */
.pub-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
    font-family: var(--font-body);
}

.pub-table th {
    background: rgba(59, 130, 246, 0.08);
    color: var(--text-main);
    font-family: var(--font-heading);
    font-weight: 700;
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}

.pub-table td {
    padding: 10px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    vertical-align: top;
    line-height: 1.5;
}

.pub-table tr:last-child td {
    border-bottom: none;
}

/* Section divider */
.pub-divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 36px 0;
}

/* Download CTA */
.pub-download-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-top: 3px solid var(--primary);
    border-radius: 12px;
    padding: 32px 36px;
    margin-top: 40px;
}

.pub-download-cta h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text-main);
}

.pub-download-cta p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin: 0;
}

/* Disclosure footnote */
/* Figure / diagram images */
.pub-figure {
    margin: 32px 0;
    text-align: center;
}

.pub-figure img {
    max-width: 100%;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.pub-figure figcaption {
    margin-top: 10px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.4);
    font-style: italic;
    font-family: var(--font-body);
}

.pub-disclosure {
    margin-top: 36px;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.3);
    font-style: italic;
    text-align: center;
}

@media (max-width: 768px) {
    .pub-article-body {
        padding: 0 16px 60px;
    }

    .pub-section h2 {
        font-size: 1.4rem;
    }

    .pub-download-cta {
        flex-direction: column;
        align-items: flex-start;
        padding: 24px;
    }

    .pub-table {
        font-size: 0.85rem;
    }
}

/* --- Solutions Hero Pills --- */
.solutions-nav {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.solution-pill {
    display: inline-block;
    padding: 9px 20px;
    border-radius: 24px;
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 600;
    font-family: var(--font-heading);
    transition: all 0.3s ease;
    text-decoration: none;
}

.solution-pill:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(59, 130, 246, 0.08);
}

/* --- Solutions Page Specifics --- */
.split-layout {
    display: flex;
    align-items: center;
    gap: 50px;
    padding: 24px 0;
}

.split-layout.reverse {
    flex-direction: row-reverse;
}

.split-layout .content {
    flex: 1;
}

.split-layout .media {
    flex: 1;
    position: relative;
}

.video-thumbnail {
    position: relative;
    cursor: pointer;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
}

.video-thumbnail:hover {
    transform: scale(1.02);
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(59, 130, 246, 0.9);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    color: white;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.5);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    position: relative;
    width: 90%;
    max-width: 1000px;
    aspect-ratio: 16/9;
    background: black;
}

.close-modal {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 30px;
    cursor: pointer;
}

/* --- Publications Page Specifics --- */
.filters {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-btn {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.pub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.pub-card {
    border-radius: 12px;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    border-top-width: 4px;
    border-top-style: solid;
    padding-top: 10px;
}

/* Publication tiles — subtle green tint */
.pub-card[data-category="publication"] {
    background: color-mix(in srgb, #10b981 8%, var(--bg-card));
    border-top-color: #10b981;
}

/* White paper tiles — subtle blue tint */
.pub-card[data-category="whitepaper"] {
    background: color-mix(in srgb, #3B82F6 8%, var(--bg-card));
    border-top-color: var(--primary);
}

.pub-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.pub-tag {
    font-size: 0.8rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    font-weight: 700;
}

.read-more {
    margin-top: auto;
    color: var(--primary);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

@media (max-width: 768px) {
    .split-layout {
        flex-direction: column !important;
        text-align: center;
    }
}

/* --- Accelerator Cards (Solutions Page) --- */
.accelerator-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
    margin-top: 40px;
}

/* Last card spans full width when 5 cards in a 2-col grid */
.accelerator-grid .accelerator-card:last-child {
    grid-column: 1 / -1;
    max-width: 580px;
    margin: 0 auto;
    width: 100%;
}

.accelerator-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 20px;
    padding: 28px;
}

.accelerator-card-top {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.accelerator-icon {
    width: 80px;
    height: 80px;
    object-fit: contain;
    flex-shrink: 0;
    filter: drop-shadow(0 0 10px rgba(59, 130, 246, 0.4));
}

.accelerator-card-text h3 {
    margin-bottom: 8px;
}

.accelerator-card-text p {
    font-size: 1rem;
    margin-bottom: 0;
}

.accelerator-btn {
    align-self: flex-start;
    font-size: 0.95rem;
    padding: 10px 22px;
}

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

    .accelerator-grid .accelerator-card:last-child {
        grid-column: auto;
        max-width: 100%;
        margin: 0;
    }
}

/* --- Product Pages --- */
.product-hero {
    padding-top: calc(var(--header-height) + 60px);
    padding-bottom: 60px;
    background: radial-gradient(circle at 30% 50%, rgba(59, 130, 246, 0.08) 0%, rgba(11, 17, 32, 0) 60%);
}

.product-hero .breadcrumb {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 18px;
    font-family: var(--font-heading);
}

.product-hero .breadcrumb a {
    color: var(--primary);
}

.product-hero .breadcrumb a:hover {
    text-decoration: underline;
}

.product-hero h1 {
    font-size: 2.8rem;
    margin-bottom: 12px;
}

.product-hero .product-tagline {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 640px;
    margin-bottom: 0;
}

.product-body {
    max-width: 860px;
    margin: 0 auto;
    padding: 60px 24px 80px;
}

.product-section {
    margin-bottom: 56px;
}

.product-section h2 {
    font-size: 1.75rem;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.product-section h3 {
    font-size: 1.1rem;
    margin: 28px 0 10px;
}

.product-section p,
.product-section li {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-muted);
    margin-bottom: 14px;
}

.product-section ul {
    padding-left: 22px;
    margin-bottom: 18px;
}

.product-section strong {
    color: var(--text-main);
}

.product-placeholder {
    background: var(--bg-card);
    border: 1px dashed var(--border);
    border-radius: 10px;
    padding: 40px;
    text-align: center;
    color: var(--text-muted);
    font-style: italic;
    font-size: 1rem;
    margin: 20px 0;
}

.product-video-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-top: 3px solid var(--primary);
    border-radius: 12px;
    padding: 36px 40px;
    margin-top: 40px;
}

.product-video-section h2 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 20px;
    border: none;
    padding: 0;
}

.video-embed-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 8px;
    overflow: hidden;
    background: #000;
}

.video-embed-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-coming-soon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 16/9;
    background: rgba(11, 17, 32, 0.8);
    border: 1px dashed var(--border);
    border-radius: 8px;
    color: var(--text-muted);
    font-style: italic;
    font-size: 1rem;
}

.product-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 24px;
    transition: gap 0.2s ease;
}

.product-back-link:hover {
    gap: 10px;
}

@media (max-width: 768px) {
    .product-hero h1 {
        font-size: 2rem;
    }

    .product-body {
        padding: 40px 16px 60px;
    }

    .product-video-section {
        padding: 24px 20px;
    }
}