/* =========================================
   DEMO PAGE - Dedicated Styles
   ========================================= */

.demo-page {
    min-height: 100vh;
    background: linear-gradient(180deg, #F0F9FF 0%, #FFFFFF 50%, #F0F9FF 100%);
}

/* Demo Hero Section */
.demo-hero {
    padding: calc(var(--mobile-header-height) + 1.5rem) 0 2.5rem;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.85) 0%, rgba(20, 184, 166, 0.85) 100%);
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    position: relative;
    overflow: hidden;
    min-height: 500px;
}

@media (min-width: 768px) {
    .demo-hero {
        background-position: center -280px;
        min-height: 550px;
        padding: calc(var(--mobile-header-height) + 3rem) 0 4rem;
    }
}

@media (min-width: 1024px) {
    .demo-hero {
        padding: calc(var(--header-height) + 4rem) 0 5rem;
        background-position: center -350px;
        min-height: 600px;
    }
}

.demo-hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.6) 0%, rgba(20, 184, 166, 0.6) 100%);
    pointer-events: none;
    z-index: 1;
}

.demo-hero::after {
    content: "";
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1), transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
}

.demo-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
    padding-top: clamp(3rem, 8vw, 10rem);
}

@media (max-width: 767px) {
    .demo-hero-content {
        padding-top: 8rem;
    }
}

.demo-hero-logo {
    max-width: clamp(250px, 35vw, 400px);
    height: auto;
    margin: 0 auto 2.5rem;
    filter: drop-shadow(0 15px 40px rgba(0, 0, 0, 0.25));
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-15px);
    }
}

.demo-hero-title {
    font-size: clamp(1.75rem, 5vw, 4rem);
    font-weight: 800;
    color: white;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    letter-spacing: -0.02em;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), 0 2px 10px rgba(0, 0, 0, 0.3);
}

.demo-hero-description {
    font-size: clamp(0.95rem, 2.5vw, 1.5rem);
    color: rgba(255, 255, 255, 0.98);
    line-height: 1.7;
    max-width: 800px;
    margin: 0 auto;
    font-weight: 500;
    text-shadow: 0 3px 15px rgba(0, 0, 0, 0.4), 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Videos Section */
.demo-videos-section {
    padding: clamp(4rem, 8vw, 6rem) 0;
    position: relative;
}

.demo-videos-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(2rem, 4vw, 3rem);
    max-width: 1200px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .demo-videos-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Demo Video Card */
.demo-video-card {
    background: white;
    border-radius: clamp(1.25rem, 2.5vw, 1.75rem);
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(15, 23, 42, 0.1);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    border: 2px solid transparent;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.demo-video-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 60px rgba(14, 165, 233, 0.25);
    border-color: var(--accent-light);
}

/* Video Thumbnail */
.demo-video-thumbnail {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 aspect ratio */
    overflow: hidden;
    background: linear-gradient(135deg, var(--bg-surface) 0%, var(--bg-surface-alt) 100%);
}

.demo-video-thumbnail-link {
    display: block;
    text-decoration: none;
    cursor: pointer;
}

.demo-video-thumbnail-link.demo-video-no-link {
    cursor: default;
    pointer-events: none;
}

.demo-video-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.demo-video-card:hover .demo-video-thumbnail img {
    transform: scale(1.1);
}

/* Video Overlay */
.demo-video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.9) 0%, rgba(20, 184, 166, 0.9) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.demo-video-card:hover .demo-video-overlay {
    opacity: 1;
}

.demo-video-overlay i {
    font-size: clamp(4rem, 8vw, 5rem);
    color: white;
    transform: scale(0.7);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    filter: drop-shadow(0 6px 20px rgba(0, 0, 0, 0.4));
}

.demo-video-card:hover .demo-video-overlay i {
    transform: scale(1);
}

/* Video Content */
.demo-video-content {
    padding: clamp(2rem, 4vw, 2.5rem);
    display: flex;
    flex-direction: column;
    flex: 1;
    position: relative;
}

.demo-video-number {
    position: absolute;
    top: -20px;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent-dark) 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 800;
    box-shadow: 0 8px 20px rgba(14, 165, 233, 0.4);
}

.demo-video-content h3 {
    font-size: clamp(1.35rem, 3vw, 1.6rem);
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 1rem;
    line-height: 1.3;
    margin-top: 0.5rem;
}

.demo-video-content p {
    font-size: clamp(1rem, 2.2vw, 1.1rem);
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 1.75rem;
    flex: 1;
}

/* Video Link */
.demo-video-link {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--primary);
    font-weight: 700;
    font-size: clamp(1rem, 2.2vw, 1.1rem);
    transition: all 0.3s ease;
    padding: 0.75rem 0;
    position: relative;
    align-self: flex-start;
}

.demo-video-link::after {
    content: '';
    position: absolute;
    bottom: 0.5rem;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent-dark) 100%);
    transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    border-radius: 2px;
}

.demo-video-link:hover::after {
    width: calc(100% - 2rem);
}

.demo-video-link i {
    font-size: 1.4rem;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.demo-video-card:hover .demo-video-link i {
    transform: translateX(8px);
}

/* CTA Section */
.demo-cta {
    padding: clamp(3rem, 6vw, 5rem) 0;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--accent-dark) 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.demo-cta::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.1), transparent 60%);
    pointer-events: none;
}

.demo-cta-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 2;
}

.demo-cta-content h2 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    margin-bottom: 1.25rem;
    line-height: 1.2;
}

.demo-cta-content p {
    font-size: clamp(1.1rem, 2.5vw, 1.35rem);
    opacity: 0.95;
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

.demo-cta-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.btn-cta {
    padding: clamp(0.875rem, 2vw, 1.125rem) clamp(1.5rem, 3vw, 2.25rem);
    border-radius: 0.875rem;
    font-weight: 700;
    font-size: clamp(1rem, 2.2vw, 1.15rem);
    transition: all 0.3s ease;
    min-width: 180px;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-cta--white {
    background: white;
    color: var(--primary-dark);
}

.btn-cta--white:hover {
    background: #F0F9FF;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.btn-cta--outline {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.6);
    color: white;
}

.btn-cta--outline:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: white;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .demo-hero {
        padding: calc(var(--mobile-header-height) + 2rem) 0 3rem;
    }

    .demo-hero-logo {
        max-width: clamp(180px, 50vw, 300px);
        margin-bottom: 2rem;
    }

    .demo-videos-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .demo-video-number {
        width: 40px;
        height: 40px;
        font-size: 1rem;
        top: -15px;
        right: 1.5rem;
    }

    .demo-cta-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-cta {
        width: 100%;
    }
}

/* Loading State */
.demo-video-thumbnail img[src=""],
.demo-video-thumbnail img:not([src]) {
    background: linear-gradient(135deg, var(--bg-surface) 0%, var(--bg-surface-alt) 100%);
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .demo-hero-logo {
        animation: none;
    }

    .demo-video-card:hover {
        transform: translateY(-5px);
    }

    .demo-video-card:hover .demo-video-thumbnail img {
        transform: scale(1.05);
    }

    .demo-video-overlay i {
        transform: scale(1);
    }
}

/* Print Styles */
@media print {
    .demo-hero,
    .demo-cta {
        background: white;
        color: black;
    }

    .demo-video-overlay {
        display: none;
    }

    .demo-video-card {
        page-break-inside: avoid;
    }
}
