@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');

/* Global Styles */
/* Safe Area Margins - content must not exceed these boundaries */
:root {
    --slide-margin-top: 60px;
    --slide-margin-right: 80px;
    --slide-margin-bottom: 100px; /* Account for footer */
    --slide-margin-left: 80px;
    --safe-content-width: calc(1920px - var(--slide-margin-left) - var(--slide-margin-right));
    --safe-content-height: calc(1080px - var(--slide-margin-top) - var(--slide-margin-bottom));
}

.reveal {
    font-family: 'Helvetica', 'Arial', sans-serif;
    color: #5e50a0;
}

/* Base Header Styles (Restored for Title Slide compatibility) */
.reveal h1,
.reveal h3,
.reveal h4,
.reveal h5,
.reveal h6 {
    font-family: 'Helvetica', 'Arial', sans-serif;
    text-transform: none;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.5em;
    text-align: left;
}

/* Force Top Alignment for Content Slides */
.reveal .slides section:not(.title-slide) {
    top: 0 !important;
    padding-top: 60px !important;
    padding-left: 80px !important;
    padding-right: 80px !important;
    /* Space for header */
    text-align: left;
    height: 100% !important;
    display: flex !important;
    flex-direction: column;
    justify-content: flex-start;
    overflow: hidden !important; /* Prevent right-side overflow */
    box-sizing: border-box !important;
}

/* Big Header */
.reveal h2 {
    font-size: 3.5em;
    /* Massive header */
    margin-bottom: 0.5em;
    color: #5e50a0;
    /* Enforce brand color */
    width: 100%;
}

.reveal h3 {
    font-size: 1.8em;
    margin-bottom: 0.5em;
}

/* Larger Body Text */
.reveal p,
.reveal li {
    font-size: 42px;
    /* Increased from 32px */
    line-height: 1.4;
    color: #1f2937;
}

/* ... middle content ... */

/* Title Slide Styling */
.reveal .slides section.title-slide {
    text-align: left;
    padding-top: 5%;
    padding-left: 80px;
    padding-right: 80px;
    position: relative;
    box-sizing: border-box;
    height: 100%;
    min-height: 100%;
}

.title-slide h1 {
    font-size: 6em;
    margin-bottom: 0.1em;
    color: #5e50a0;
    margin-top: 5%;
}

/* Subtitle / Highlight text */
.title-main-text {
    font-size: 3em;
    line-height: 1.2;
    font-weight: 600;
    color: #5e50a0;
    max-width: 80%;
}

/* Highlighted Text (Pink Background) */
.text-highlight {
    background-color: #eebae3;
    color: white;
    padding: 0 15px;
    display: inline-block;
    font-weight: 700;
}

/* Layout Utilities */
.two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: flex-start;
    height: 80%;
    max-width: calc(100% - 20px); /* Respect safe margin */
}

/* Narrow text column variant - text takes ~40%, image takes ~60% */
.two-column.narrow-text {
    grid-template-columns: 2fr 3fr;
}

/* Partner Logos Positioning */
.partners-container {
    position: absolute;
    bottom: 80px;
    right: 50px;
    text-align: right;
    padding-bottom: 20px;
    z-index: 10;
}

.partner-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 30px;
    margin-top: 10px;
}

/* Allow images to be huge */
.two-column img,
.reveal .slides section img {
    max-height: 70vh;
    /* Allow taking up 70% of screen height */
    max-width: 100%;
    width: auto;
    object-fit: contain;
}

.partner-row img {
    height: 50px;
    max-width: 180px;
}

.partner-label {
    font-size: 20px;
    font-weight: 700;
    color: #1f2937;
    display: block;
    margin-bottom: 10px;
}

/* Footer & Logo */
.branding-footer {
    position: absolute;
    bottom: 40px;
    left: 50px;
    z-index: 20;
}

.branding-footer img {
    height: 50px;
    /* Match template logo size */
}

.copyright-footer {
    display: block;
    position: absolute;
    bottom: 20px;
    right: 50px;
    font-size: 14px;
    color: #9ca3af;
    /* Light grey */
    z-index: 20;
    font-family: 'Inter', sans-serif;
}

/* Reveal override for code blocks */
.reveal pre {
    box-shadow: none;
    width: 100%;
}

/* Icon Grid Layout */
.icon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
    margin-top: 40px;
    max-width: 100%;
    box-sizing: border-box;
}

.icon-item {
    text-align: left;
    padding: 20px;
    box-sizing: border-box;
}

.icon-item .icon {
    font-size: 2.5em;
    display: block;
    margin-bottom: 15px;
}

.icon-item h4 {
    font-size: 1.5em;
    color: #5e50a0;
    margin-bottom: 10px;
}

.icon-item p {
    font-size: 1em;
    color: #4b5563;
    line-height: 1.4;
}

/* Closing slide - when no title-main-text wrapper exists */
.title-slide:not(:has(.title-main-text)) {
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding-left: 5%;
}

.title-slide:not(:has(.title-main-text)) h1 {
    margin-top: 0;
    font-size: 5em;
}

.title-slide:not(:has(.title-main-text)) h3 {
    font-size: 2em;
    margin-top: 20px;
    color: #5e50a0;
}

.title-slide:not(:has(.title-main-text)) p {
    margin-top: 30px;
}

.title-slide a {
    font-size: 1.5em;
    color: #5e50a0;
    text-decoration: none;
}

.title-slide a:hover {
    text-decoration: underline;
}

/* Image Grid for multiple images */
.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
    width: 100%;
}

.image-grid img {
    max-height: 300px;
    width: 100%;
    object-fit: contain;
}

/* Constrain images in two-column right side */
.two-column > div:last-child img {
    max-height: 650px;
    max-width: 100%;
    object-fit: contain;
    margin-bottom: 10px;
}

/* Single featured image */
.featured-image {
    text-align: center;
    margin: 0;
}

.featured-image img {
    max-height: 700px;
    max-width: 100%;
    object-fit: contain;
}

/* Image row - horizontal layout */
.image-row {
    display: flex;
    gap: 20px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin: 20px 0;
}

.image-row img {
    max-height: 250px;
    max-width: 30%;
    object-fit: contain;
}

/* Audit Row - horizontal layout with labels */
.audit-row {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 80px;
    margin-top: 60px;
    width: 100%;
}

.audit-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.audit-item img {
    max-height: 450px;
    max-width: 400px;
    object-fit: contain;
}

.audit-item span {
    margin-top: 20px;
    font-size: 1.5em;
    font-weight: 600;
    color: #5e50a0;
}

/* Client Logos Grid - for "Trusted by" slides */
.client-logos {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 60px 80px;
    align-items: center;
    justify-items: center;
    margin-top: 60px;
    width: 100%;
    max-width: 1400px;
}

.client-logos img {
    max-height: 120px;
    max-width: 280px;
    width: auto;
    object-fit: contain;
    filter: grayscale(0%);
    transition: filter 0.3s ease;
}

/* Client Logos Multi-Row Layout - centered rows with varying counts */
.client-logos-rows {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 50px;
    margin-top: 100px;
    margin-left: -10px;
    width: 100%;
}

.client-logos-rows .logo-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 80px;
    width: 100%;
}

.reveal .slides section .client-logos-rows img {
    max-height: 110px !important;
    max-width: 280px !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain;
    transform: scale(1.0);
}

/* Feature Icons Row - horizontal icons with labels */
.feature-icons-row {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 80px;
    margin-top: 200px;
    width: 100%;
    margin-left: -40px;
    box-sizing: border-box;
}

.feature-icon-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 220px;
}

.reveal .slides section .feature-icon-item img {
    max-height: 220px !important;
    max-width: 220px !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain;
    margin-bottom: 30px;
}

.feature-icon-item .icon-label {
    font-size: 28px;
    font-weight: 600;
    color: #1f2937;
    line-height: 1.3;
}

/* Audit Grid - 6 icons in 2 rows of 3 */
.audit-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px 60px;
    margin-top: 60px;
    width: 100%;
    max-width: 1400px;
    justify-items: center;
    align-items: center;
}

.reveal .slides section .audit-grid img {
    max-height: 200px !important;
    max-width: 200px !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain;
}

/* Contact links styling */
.contact-links {
    margin-top: 40px;
}

.contact-links a {
    font-size: 1.5em;
    color: #5e50a0;
    text-decoration: none;
}

.contact-links a:hover {
    text-decoration: underline;
}

/* Content Sections - multiple sections with headers */
.content-sections {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.content-section {
    padding-left: 0;
}

.content-section .section-header {
    font-size: 36px;
    color: #1f2937;
    margin-bottom: 10px;
    line-height: 1.3;
}

.content-section .section-header strong {
    font-weight: 700;
    color: #1f2937;
}

.content-section .section-body {
    font-size: 32px;
    color: #4b5563;
    line-height: 1.4;
    margin-top: 0;
}

/* Compact variant - smaller text for narrow columns */
.content-sections.compact .section-header {
    font-size: 28px;
}

.content-sections.compact .section-body {
    font-size: 24px;
}

/* Image Stack - overlapping images effect */
.image-stack {
    position: relative;
    width: calc(100% - 20px); /* Ensure margin from edge */
    height: 700px;
    margin-top: 20px;
}

.image-stack img {
    position: absolute;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.image-stack .stack-back {
    top: 0;
    left: 80px; /* Position from left instead of right to avoid margin overflow */
    z-index: 1;
    max-height: 300px;
    width: auto;
    max-width: 80%;
}

.image-stack .stack-front {
    bottom: 40px;
    left: 0;
    z-index: 2;
    max-height: 400px;
    width: auto;
    max-width: 90%;
}