/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: #2c3e50;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, rgba(44, 62, 80, 0.95), rgba(52, 152, 219, 0.95)),
                url('/static/images/hero-bg.jpg') center/cover;
    color: white;
    padding: 120px 20px;
    text-align: center;
    position: relative;
}

.hero-content {
    max-width: 900px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 3.8em;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.hero .subtitle {
    font-size: 1.6em;
    margin-bottom: 40px;
    opacity: 0.9;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* Hero Stats */
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 80px;
    margin-top: 80px;
    background: rgba(255, 255, 255, 0.1);
    padding: 30px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.8em;
    font-weight: 700;
    margin-bottom: 10px;
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    background: rgba(52, 152, 219, 0.2);
    padding: 10px 20px;
    border-radius: 10px;
    display: inline-block;
}

.stat-label {
    font-size: 1.2em;
    opacity: 0.9;
    color: #ffffff;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

/* Features Section */
.features, .professional-features {
    padding: 100px 20px;
    background: #f8f9fa;
}

.section-title {
    text-align: center;
    font-size: 2.8em;
    margin-bottom: 20px;
    color: #2c3e50;
    position: relative;
    padding-bottom: 20px;
}

.section-title:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: #3498db;
    border-radius: 2px;
}

.section-subtitle {
    text-align: center;
    font-size: 1.3em;
    color: #7f8c8d;
    margin-bottom: 60px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-card {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.feature-card:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: #3498db;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.feature-card:hover:before {
    transform: scaleX(1);
}

.feature-icon {
    font-size: 2.5em;
    color: #3498db;
    margin-bottom: 25px;
}

.feature-card h3 {
    font-size: 1.6em;
    margin-bottom: 20px;
    color: #2c3e50;
}

.feature-list {
    list-style: none;
    margin-top: 20px;
}

.feature-list li {
    margin-bottom: 12px;
    padding-left: 30px;
    position: relative;
    color: #34495e;
}

.feature-list li:before {
    content: "✓";
    color: #3498db;
    position: absolute;
    left: 0;
    font-weight: bold;
}

/* Benefits Section */
.benefits {
    padding: 100px 20px;
    background: white;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.benefit-item {
    display: flex;
    align-items: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.benefit-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.benefit-item i {
    font-size: 1.8em;
    color: #3498db;
    margin-right: 20px;
}

.benefit-item p {
    font-size: 1.1em;
    color: #2c3e50;
    margin: 0;
}

/* Market Insights Section */
.market-insights {
    padding: 100px 20px;
    background: #f8f9fa;
}

.insights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.insight-card {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.insight-card:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: #3498db;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.insight-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.insight-card:hover:before {
    transform: scaleX(1);
}

.insight-icon {
    font-size: 2.2em;
    color: #3498db;
    margin-bottom: 20px;
    text-align: center;
}

.insight-card h3 {
    font-size: 1.4em;
    margin-bottom: 20px;
    color: #2c3e50;
    text-align: center;
}

.insight-list {
    list-style: none;
    margin-top: 20px;
}

.insight-list li {
    margin-bottom: 12px;
    padding-left: 25px;
    position: relative;
    color: #34495e;
    font-size: 1.1em;
}

.insight-list li:before {
    content: "•";
    color: #3498db;
    position: absolute;
    left: 0;
    font-weight: bold;
}

@media (max-width: 768px) {
    .insights-grid {
        grid-template-columns: 1fr;
        padding: 0 20px;
    }

    .insight-card {
        padding: 25px;
    }
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, #3498db, #2c3e50);
    color: white;
    padding: 100px 20px;
    text-align: center;
}

.cta-content {
    max-width: 800px;
    margin: 0 auto;
}

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

.cta-content p {
    font-size: 1.3em;
    margin-bottom: 40px;
    opacity: 0.9;
}

.cta-button {
    display: inline-block;
    background: #e74c3c;
    color: white;
    padding: 18px 45px;
    border-radius: 30px;
    text-decoration: none;
    font-size: 1.3em;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cta-button:hover {
    background: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    color: white;
}

/* Problems & Solutions Section */
.problems-solutions {
    padding: 100px 20px;
    background: white;
    position: relative;
    overflow: hidden;
}

.problems-container {
    max-width: 1200px;
    margin: 0 auto;
}

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

.problems-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
    margin-bottom: 80px;
}

.problems-video {
    position: sticky;
    top: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 450px; /* Limit width for portrait videos */
}

.demo-video {
    position: relative;
    padding-bottom: 133.33%; /* 3:4 aspect ratio for portrait */
    height: 0;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
    background: #f8f9fa;
}

/* Override for YouTube facades - let them handle their own aspect ratio */
.demo-video:has([data-youtube-facade]) {
    padding-bottom: 0;
    height: auto;
    position: static;
}

/* Ensure portrait videos maintain their aspect ratio */
.demo-video .youtube-facade.portrait {
    padding-bottom: 177.78%; /* 9:16 aspect ratio */
    max-width: 400px;
    margin: 0 auto;
}

.video-embed {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    border-radius: 15px;
    overflow: hidden;
}

.video-embed iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 15px;
}

.video-caption {
    text-align: center;
    margin-top: 20px;
    padding: 20px;
}

.video-caption h3 {
    font-size: 1.3em;
    color: #2c3e50;
    margin-bottom: 10px;
}

.video-caption p {
    color: #7f8c8d;
    font-size: 1.1em;
}

.problems-side {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.problems-section-header {
    text-align: left;
    margin: 0 0 40px 0;
}

.problems-section-header h3 {
    font-size: 2.2em;
    color: #2c3e50;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 20px;
}

.problems-section-header h3:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: #3498db;
    border-radius: 2px;
}

.problems-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
    flex-grow: 1;
}

.problem-item {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    position: relative;
    transition: all 0.3s ease;
    border-left: 4px solid #3498db;
}

.problem-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.problem-number {
    position: absolute;
    top: -8px;
    left: 16px;
    background: #3498db;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1em;
    box-shadow: 0 3px 12px rgba(52, 152, 219, 0.3);
}

.problem-content h3 {
    font-size: 1.2em;
    color: #2c3e50;
    margin-bottom: 12px;
    margin-top: 8px;
}

.problem-description {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.problem-text {
    color: #e74c3c;
    font-size: 0.95em;
    line-height: 1.5;
    font-style: italic;
    margin: 0;
}

.solution-text {
    color: #27ae60;
    font-size: 0.95em;
    line-height: 1.5;
    margin: 0;
    padding: 12px;
    background: rgba(39, 174, 96, 0.1);
    border-radius: 8px;
    border-left: 4px solid #27ae60;
}

.solution-text strong {
    color: #2c3e50;
}

.problems-results {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    padding: 40px 0;
    border-top: 2px solid #ecf0f1;
}

.result-item {
    text-align: center;
    padding: 20px;
    transition: all 0.3s ease;
}

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

.result-icon {
    font-size: 2.5em;
    color: #3498db;
    margin-bottom: 15px;
}

.result-item h4 {
    font-size: 1.3em;
    color: #2c3e50;
    margin-bottom: 10px;
}

.result-item p {
    color: #7f8c8d;
    font-size: 1.1em;
}

/* Problems CTA Section */
.problems-cta {
    background: linear-gradient(135deg, #3498db, #2980b9);
    border-radius: 20px;
    padding: 60px 40px;
    text-align: center;
    margin-top: 60px;
    position: relative;
    overflow: hidden;
}

.problems-cta::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.problems-cta-content {
    position: relative;
    z-index: 2;
}

.problems-cta h3 {
    font-size: 2.5em;
    color: white;
    margin-bottom: 15px;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.problems-cta p {
    font-size: 1.3em;
    color: rgba(255,255,255,0.9);
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.problems-cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.problems-cta .cta-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 18px 35px;
    border-radius: 50px;
    text-decoration: none;
    font-size: 1.2em;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.problems-cta .cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.problems-cta .cta-button:hover::before {
    left: 100%;
}

.problems-cta .cta-button.primary {
    background: #e74c3c;
    color: white;
    box-shadow: 0 5px 20px rgba(231, 76, 60, 0.3);
}

.problems-cta .cta-button.primary:hover {
    background: #c0392b;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(231, 76, 60, 0.4);
    color: white;
}

.problems-cta .cta-button.secondary {
    background: rgba(255,255,255,0.2);
    color: white;
    border: 2px solid rgba(255,255,255,0.5);
    backdrop-filter: blur(10px);
}

.problems-cta .cta-button.secondary:hover {
    background: rgba(255,255,255,0.3);
    border-color: rgba(255,255,255,0.8);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255,255,255,0.2);
    color: white;
}

.problems-cta-features {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    margin-top: 30px;
}

.problems-cta .cta-feature {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255,255,255,0.9);
    font-size: 1.1em;
    font-weight: 500;
}

.problems-cta .cta-feature i {
    color: #2ecc71;
    font-size: 1.2em;
}

/* Large screens optimization */
@media (min-width: 1200px) {
    .problems-content {
        grid-template-columns: 1fr 1fr;
        gap: 80px;
    }

    .demo-video {
        padding-bottom: 125%; /* Slightly less portrait for large screens */
    }

    /* Ensure portrait videos maintain their aspect ratio on large screens */
    .demo-video .youtube-facade.portrait {
        padding-bottom: 177.78%; /* 9:16 aspect ratio */
        max-width: 450px;
        margin: 0 auto;
    }
}

/* Medium screens optimization */
@media (max-width: 1024px) and (min-width: 769px) {
    .problems-content {
        gap: 40px;
    }

    .demo-video {
        padding-bottom: 140%; /* More portrait for medium screens */
    }

    /* Ensure portrait videos maintain their aspect ratio on medium screens */
    .demo-video .youtube-facade.portrait {
        padding-bottom: 177.78%; /* 9:16 aspect ratio */
        max-width: 400px;
        margin: 0 auto;
    }

    .problems-section-header h3 {
        font-size: 1.9em;
    }
}

/* Responsive Design for Problems Section */
@media (max-width: 768px) {
    .problems-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .problems-video {
        position: static;
        order: -1;
        max-width: 300px; /* Smaller on mobile */
        margin: 0 auto;
    }

    .demo-video {
        padding-bottom: 56.25%; /* Back to landscape for mobile */
    }

    /* Keep portrait for YouTube facades on mobile */
    .demo-video:has([data-youtube-facade]) .youtube-facade.portrait,
    .demo-video .youtube-facade.portrait {
        padding-bottom: 177.78%; /* 9:16 aspect ratio */
        max-width: 280px;
        margin: 0 auto;
    }

    .problems-section-header {
        text-align: center;
        margin: 20px 0 30px 0;
    }

    .problems-section-header h3 {
        font-size: 1.8em;
    }

    .problems-section-header h3:after {
        left: 50%;
        transform: translateX(-50%);
    }

    .problems-list {
        gap: 15px;
    }

    .problems-results {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .problem-item {
        padding: 16px;
    }

    .problem-number {
        width: 28px;
        height: 28px;
        font-size: 1em;
        top: -6px;
        left: 12px;
    }

    .problem-content h3 {
        font-size: 1.1em;
        margin-bottom: 10px;
        margin-top: 6px;
    }

    .problem-text,
    .solution-text {
        font-size: 0.9em;
        line-height: 1.4;
    }

    .solution-text {
        padding: 10px;
    }

    /* Problems CTA Responsive */
    .problems-cta {
        padding: 40px 20px;
        margin-top: 40px;
    }

    .problems-cta h3 {
        font-size: 2em;
    }

    .problems-cta p {
        font-size: 1.1em;
    }

    .problems-cta-buttons {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }

    .problems-cta .cta-button {
        width: 100%;
        max-width: 300px;
        padding: 15px 30px;
        font-size: 1.1em;
    }

    .problems-cta-features {
        flex-direction: column;
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .problems-results {
        grid-template-columns: 1fr;
    }

    .result-icon {
        font-size: 2em;
    }

    .result-item h4 {
        font-size: 1.1em;
    }

    .result-item p {
        font-size: 1em;
    }

    /* Ensure portrait videos work on very small screens */
    .demo-video .youtube-facade.portrait {
        padding-bottom: 177.78%; /* 9:16 aspect ratio */
        max-width: 250px;
        margin: 0 auto;
    }

    /* Problems CTA Extra Small Screens */
    .problems-cta {
        padding: 30px 15px;
        border-radius: 15px;
    }

    .problems-cta h3 {
        font-size: 1.8em;
    }

    .problems-cta p {
        font-size: 1em;
        margin-bottom: 30px;
    }

    .problems-cta .cta-button {
        font-size: 1em;
        padding: 14px 25px;
    }

    .problems-cta-features {
        gap: 12px;
    }

    .problems-cta .cta-feature {
        font-size: 1em;
    }
}

/* Animations */
.animate-fade-in {
    animation: fadeIn 1s ease-out;
}

.animate-fade-in-delay {
    animation: fadeIn 1s ease-out 0.3s backwards;
}

.animate-fade-in-delay-2 {
    animation: fadeIn 1s ease-out 0.6s backwards;
}

.animate-fade-in-delay-3 {
    animation: fadeIn 1s ease-out 0.9s backwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

    .hero .subtitle {
        font-size: 1.2em;
    }

    .hero-stats {
        flex-direction: column;
        gap: 30px;
        padding: 20px;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .section-title {
        font-size: 2.2em;
    }

    .benefits-grid {
        grid-template-columns: 1fr;
    }

    .cta-content h2 {
        font-size: 2em;
    }

    .cta-button {
        padding: 15px 35px;
        font-size: 1.1em;
    }
}
