/* Global CSS - Shared foundation styles across all Aigon product sites */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif;
    background: #ffffff;
    overflow-x: hidden;
}

/* Layout Structure */
.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Section Layout Patterns */
.hero {
    background: var(--page-hero-gradient);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    color: white;
    padding: 80px 40px;
    position: relative;
    overflow: hidden;
}

/* Dynamic Hero Background System */
.hero::before,
.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: opacity 1.5s ease-in-out;
    z-index: -2;
}

.hero::before {
    opacity: 1;
    z-index: -1;
}

.hero::after {
    opacity: 0;
    z-index: -2;
}

.hero.transitioning::after {
    opacity: 1;
}

.hero.transitioning::before {
    opacity: 0;
}

.hero > * {
    position: relative;
    z-index: 1;
}

.hero .container {
    text-align: right;
    max-width: 1200px;
    margin: 0 auto;
}

/* Dynamic background pseudo-elements also need proper sizing */
.hero::before,
.hero::after {
    background-size: cover;
    background-position: center center;
}

/* Medium screen optimizations */
@media (min-width: 768px) and (max-width: 1399px) {
    .hero .container {
        max-width: 1200px;
        margin: 0 auto;
        text-align: right;
        padding: 0 40px;
    }

    .hero::before,
    .hero::after {
        background-size: cover;
        background-position: center center;
    }
}

/* Ultra-wide screen optimizations */
@media (min-width: 1400px) {
    .hero .container {
        max-width: 1200px;
        margin: 0 auto;
        text-align: right;
    }

    .hero::before,
    .hero::after {
        background-size: 1400px auto;
        background-position: left center;
    }
}

@media (min-width: 1800px) {
    .hero::before,
    .hero::after {
        background-size: 1600px auto;
        background-position: left center;
    }
}

/* Common Section Backgrounds - Use CSS Custom Properties */
.solution-section {
    background: var(--page-solution-bg, linear-gradient(to bottom, #ffffff, #f8f9fa));
}

.problems-section {
    background: var(--page-problems-bg, #f8f9fa);
}

.outputs-section {
    background: var(--page-outputs-bg, #ffffff);
}

.visual-story-section {
    background: var(--page-visual-story-bg, #f8f9fa);
}

.cta-section {
    background: var(--page-cta-gradient, linear-gradient(135deg, #4a90e2 0%, #357abd 50%, #2c5aa0 100%));
}

/* Common Component Styles */
.product-badge-expanded {
    background: linear-gradient(135deg, var(--page-primary) 0%, var(--page-primary-dark) 50%, var(--page-primary-darker) 100%);
    box-shadow: 0 20px 60px var(--page-primary-shadow, rgba(74, 144, 226, 0.3));
}

.output-card {
    background: var(--page-output-card-bg, linear-gradient(135deg, #e8f2ff, #ffffff));
}

/* Button Styles */
.hero .cta-button {
    background: var(--page-accent);
    box-shadow: 0 12px 35px var(--page-accent-shadow, rgba(255, 107, 107, 0.4));
}

.hero .cta-button:hover {
    box-shadow: 0 16px 45px var(--page-accent-shadow-hover, rgba(255, 107, 107, 0.5));
    background: var(--page-accent-hover);
}

.cta-button {
    background: var(--page-accent);
    box-shadow: 0 15px 40px var(--page-accent-shadow-light, rgba(255, 107, 107, 0.3));
}

.cta-button:hover {
    box-shadow: 0 20px 50px var(--page-accent-shadow, rgba(255, 107, 107, 0.4));
    background: var(--page-accent-hover);
}

.cta-button-large {
    background: var(--page-accent);
    box-shadow: 0 15px 40px var(--page-accent-shadow-light, rgba(255, 107, 107, 0.3));
}

.cta-button-large:hover {
    box-shadow: 0 20px 50px var(--page-accent-shadow, rgba(255, 107, 107, 0.4));
    background: var(--page-accent-hover);
}

/* Gold CTA Variation */
.cta-gold {
    background: var(--page-gold) !important;
    box-shadow: 0 15px 40px var(--page-gold-shadow, rgba(243, 156, 18, 0.3)) !important;
}

.cta-gold:hover {
    background: var(--page-gold-hover) !important;
    box-shadow: 0 20px 50px var(--page-gold-shadow-hover, rgba(230, 126, 34, 0.4)) !important;
}

.product-header .cta-button {
    background: var(--page-gold);
    box-shadow: 0 10px 30px var(--page-gold-shadow-light, rgba(243, 156, 18, 0.3));
}

.product-header .cta-button:hover {
    box-shadow: 0 15px 40px var(--page-gold-shadow, rgba(230, 126, 34, 0.4));
    background: var(--page-gold-hover);
}


/* Page Section Backgrounds */
.solution-section {
    padding: 100px 20px;
}

.problems-section {
    padding: 80px 20px;
}

.outputs-section {
    padding: 80px 20px 100px;
    background: #ffffff;
}

.output-card {
    background: linear-gradient(135deg, var(--page-light-bg), #ffffff);
}

.visual-story-section {
    padding: 100px 20px;
}

/* Product Badge */
.product-badge-expanded {
    background: linear-gradient(135deg, var(--page-primary) 0%, var(--page-primary-dark) 50%, var(--page-primary-darker) 100%);
    box-shadow: 0 20px 60px var(--page-primary-shadow);
}

/* CTA Section */
.cta-section {
    padding: 80px 20px;
    text-align: center;
    color: white;
    background: var(--page-cta-gradient);
}

/* Button Colors */
.hero .cta-button {
    background: var(--page-accent);
    box-shadow: 0 12px 35px var(--page-accent-shadow);
}

.hero .cta-button:hover {
    box-shadow: 0 16px 45px var(--page-accent-hover-shadow);
    background: var(--page-accent-hover);
}

.cta-button {
    background: var(--page-accent);
    box-shadow: 0 15px 40px var(--page-accent-shadow-light);
}

.cta-button:hover {
    box-shadow: 0 20px 50px var(--page-accent-hover-shadow-light);
    background: var(--page-accent-hover);
}

.cta-button-large {
    background: var(--page-accent);
    box-shadow: 0 15px 40px var(--page-accent-shadow-light);
}

.cta-button-large:hover {
    box-shadow: 0 20px 50px var(--page-accent-hover-shadow-light);
    background: var(--page-accent-hover);
}

/* Gold CTA Variation */
.cta-gold {
    background: var(--page-gold) !important;
    box-shadow: 0 15px 40px var(--page-gold-shadow) !important;
}

.cta-gold:hover {
    background: var(--page-gold-hover) !important;
    box-shadow: 0 20px 50px var(--page-gold-hover-shadow) !important;
}

.product-header .cta-button {
    background: var(--page-gold);
    box-shadow: 0 10px 30px var(--page-gold-shadow);
}

.product-header .cta-button:hover {
    box-shadow: 0 15px 40px var(--page-gold-hover-shadow);
    background: var(--page-gold-hover);
}

.hero-title-group {
    display: inline-block;
    text-align: center;
    margin-bottom: 20px;
}

.hero-avatar {
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
    display: block;
}

.problems-section {
    padding: 80px 20px;
}

.solution-section {
    padding: 100px 20px;
}

.outputs-section {
    padding: 80px 20px 100px;
}

.visual-story-section {
    padding: 100px 20px;
}

.cta-section {
    padding: 80px 20px;
    text-align: center;
    color: white;
}

/* Typography System */
.hero h1 {
    font-size: 3.85em;
    font-weight: 800;
    margin-bottom: 20px;
    letter-spacing: -1px;
}

.hero .tagline {
    font-size: 1.6em;
    font-weight: 700;
    opacity: 1;
    max-width: 500px;
    margin: 0 0 30px auto;
}

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

.section-header h2 {
    font-size: 2.5em;
    color: #2c3e50;
    margin-bottom: 15px;
}

.section-header p {
    font-size: 1.2em;
    color: #6c757d;
    font-weight: 700;
}

.cta-section h2 {
    font-size: 2.5em;
    margin-bottom: 20px;
}

/* Component Structure - Problems Section */
.problems-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    margin-bottom: 60px;
    justify-content: center;
}

.problem-card {
    background: white;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    flex: 1 1 45%;
    max-width: 500px;
    min-width: 350px;
    text-align: center;
}

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

.problem-icon {
    width: 80px;
    height: 80px;
    background: #fff3e0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5em;
    margin: 0 auto 25px;
}

.problem-card h3 {
    font-size: 1.6em;
    color: #2c3e50;
    margin-bottom: 15px;
    text-align: center;
}

.problem-card p {
    font-size: 1.1em;
    color: #6c757d;
    line-height: 1.6;
    text-align: left;
}

/* Component Structure - Solution Section */
.solution-section .container {
    text-align: center;
    max-width: 1200px;
    margin: 0 auto;
}

.product-badge-expanded {
    color: white;
    padding: 50px;
    border-radius: 24px;
    max-width: 1000px;
    margin: 0 auto;
}

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

.product-avatar {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    display: block;
}

.product-header h2 {
    font-size: 3.5em;
    margin-bottom: 10px;
    font-weight: 800;
}

.product-header .tagline {
    font-size: 1.43em;
    font-weight: 700;
    opacity: 1;
    margin-bottom: 20px;
}

.product-header .solution-desc {
    font-size: 1.15em;
    line-height: 1.7;
    opacity: 0.95;
    max-width: 700px;
    margin: 0 auto 30px;
}

.features-integrated {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.feature-compact {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    padding: 25px;
    border-radius: 16px;
    flex: 1 1 30%;
    min-width: 200px;
    transition: all 0.3s ease;
}

.feature-compact:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.feature-icon-small {
    font-size: 2em;
    margin-bottom: 15px;
}

.feature-compact h4 {
    font-size: 2.0em;
    margin-bottom: 10px;
    font-weight: 600;
}

.feature-compact p {
    font-size: 0.95em;
    line-height: 1.5;
    opacity: 0.95;
}

/* Component Structure - Outputs Section */
.outputs-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto;
}

.output-card {
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    border: 2px solid #90caf9;
    transition: all 0.3s ease;
}

.output-card:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 25px rgba(33, 150, 243, 0.2);
}

.output-card .icon {
    font-size: 2.5em;
    margin-bottom: 15px;
}

.output-card h4 {
    font-size: 1.3em;
    color: #1976d2;
    font-weight: 600;
}

/* Component Structure - Visual Story Section */
.story-grid {
    margin-top: 60px;
}

.story-item {
    display: flex;
    align-items: center;
    gap: 60px;
    margin-bottom: 80px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.story-item.reverse {
    flex-direction: row-reverse;
}

.story-image {
    flex: 0 0 400px;
    min-width: 300px;
}

.story-image img {
    width: 100%;
    height: auto;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

.story-content {
    flex: 1;
    padding: 0 20px;
}

.story-content h3 {
    font-size: 2em;
    color: #2c3e50;
    margin-bottom: 20px;
    font-weight: 700;
}

.story-content p {
    font-size: 1.15em;
    color: #6c757d;
    line-height: 1.8;
}

/* Button Structure (colors defined in site-specific CSS) */
.cta-button {
    display: inline-block;
    color: white;
    padding: 22px 50px;
    border-radius: 50px;
    font-size: 1.4em;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cta-button:hover {
    transform: translateY(-4px);
}

.cta-button-large {
    display: inline-block;
    color: white;
    padding: 28px 60px;
    border-radius: 50px;
    font-size: 1.8em;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
}

.cta-button-large:hover {
    transform: translateY(-4px);
    color: white;
}

.hero .cta-button {
    padding: 20px 48px;
    font-size: 1.3em;
    margin-left: auto;
}

.hero .cta-button:hover {
    transform: translateY(-4px);
}

.product-header .cta-button {
    padding: 18px 42px;
    font-size: 1.2em;
    margin-bottom: 30px;
}

.product-header .cta-button:hover {
    transform: translateY(-3px);
}

/* Responsive Design */
@media (max-width: 900px) {
    .outputs-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .story-item,
    .story-item.reverse {
        flex-direction: column;
        gap: 30px;
    }

    .story-image {
        flex: none;
        width: 100%;
        max-width: 500px;
    }

    .story-content {
        padding: 0;
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5em;
    }

    .outputs-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

/* Footer */
.footer {
    background: #2c3e50;
    color: #bdc3c7;
    padding: 30px 20px;
    text-align: center;
    margin-top: 60px;
}

/* Cookie Consent Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #2c3e50;
    color: #fff;
    padding: 16px 20px;
    z-index: 9999;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
    display: none;
}

.cookie-banner.show {
    display: block;
}

.cookie-banner-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.cookie-banner-text {
    flex: 1;
    min-width: 280px;
    font-size: 0.95em;
    line-height: 1.5;
}

.cookie-banner-text a {
    color: #5dade2;
    text-decoration: underline;
}

.cookie-banner-buttons {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.cookie-btn {
    padding: 10px 24px;
    border-radius: 6px;
    font-size: 0.95em;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.cookie-btn-accept {
    background: #27ae60;
    color: white;
}

.cookie-btn-accept:hover {
    background: #219a52;
}

.cookie-btn-reject {
    background: transparent;
    color: #bdc3c7;
    border: 1px solid #bdc3c7;
}

.cookie-btn-reject:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-color: white;
}

@media (max-width: 600px) {
    .cookie-banner-content {
        flex-direction: column;
        text-align: center;
    }

    .cookie-banner-buttons {
        width: 100%;
        justify-content: center;
    }
}

.footer p {
    font-size: 0.9em;
    margin: 0;
}

/* JavaScript for Dynamic Hero Backgrounds - Embedded in CSS */