/* Global styles */
body {
    font-size: large;
    font-family: "SF Mono", "Monaco", "Inconsolata", "Fira Mono", monospace !important;
    color: #23272f;
    background: #f8fafc;
    --term-color-background: #303030 !important;
}

.container {
    width: 70%;
    margin-left: auto;
    margin-right: auto;
}

/* Hero section */
.hero-section {
    background: linear-gradient(135deg, #1e3c63 0%, #163754 100%);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='rgba(255,255,255,.05)' fill-rule='evenodd'/%3E%3C/svg%3E");
    opacity: 0.5;
}

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

/* Navigation */
.nav-link {
    position: relative;
    color: #374151;
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    transition: background 0.15s, color 0.15s;
    text-decoration: none !important;
}

.nav-link:hover {
    background: #f3f4f6;
    color: #111827;
    text-decoration: none !important;
}

.nav-link:focus {
    background: #1e2a63;
    color: #ffffff;
    text-decoration: none;
    outline: none;
    box-shadow: 0 0 0 2px rgba(30, 42, 99, 0.4);
}

.nav-icon {
    display: inline-flex;
    align-items: center;
    color: #64748b;
    padding: 0.25rem;
    border-radius: 0.375rem;
    transition: background 0.15s, color 0.15s;
}

.nav-icon:hover {
    background: #f3f4f6;
    color: #1e293b;
}

.nav-icon:focus {
    background: #1e2a63;
    color: #ffffff;
    outline: none;
    box-shadow: 0 0 0 2px rgba(30, 42, 99, 0.4);
}

/* Mobile navigation menu */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #374151;
    width: 40px;
    height: 40px;
    padding: 0.5rem;
    cursor: pointer;
    z-index: 20;
}

.mobile-menu-toggle svg {
    width: 100%;
    height: 100%;
}

.nav-items {
    display: flex;
    align-items: center;
}

/* Header styling */
header.sticky {
    background-color: rgb(17 24 39 / var(--tw-bg-opacity, 1));
    color: #fff;
    backdrop-filter: blur(8px);
}

header.sticky nav a,
header.sticky nav .nav-link,
header.sticky nav .nav-icon {
    color: #e5e7eb;
}

header.sticky nav a:hover,
header.sticky nav .nav-link:hover,
header.sticky nav .nav-icon:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

header.sticky nav a:focus,
header.sticky nav .nav-link:focus,
header.sticky nav .nav-icon:focus {
    color: #fff;
    background: rgba(30, 42, 99, 0.8);
    outline: none;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.5);
}

/* Buttons */
.btn-primary {
    display: inline-block;
    background: #fff;
    color: #1e2a63;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px 0 rgba(30, 42, 99, 0.08);
    transition: all 0.15s;
    border: 1px solid transparent;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}

.btn-primary:hover, .btn-primary:focus {
    background: #f3f4f6;
    color: #162454;
    transform: translateY(-2px) scale(1.03);
}

.btn-secondary {
    display: inline-block;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s;
}

.btn-secondary:hover, .btn-secondary:focus {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    transform: translateY(-2px) scale(1.03);
}

.btn-white {
    display: inline-block;
    background: #fff;
    color: #1e2a63;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    border: 1px solid transparent;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s;
}

.btn-white:hover, .btn-white:focus {
    background: #f3f4f6;
    color: #162454;
    transform: translateY(-2px) scale(1.03);
}

.btn-white-outline {
    display: inline-block;
    background: transparent;
    color: #fff;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    border: 1px solid #fff;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s;
}

.btn-white-outline:hover, .btn-white-outline:focus {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    transform: translateY(-2px) scale(1.03);
}

/* Feature cards */
.feature-card {
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 2px 5px 0 rgba(30, 42, 99, 0.08);
    padding: 2.5rem 2rem 2rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    transition: box-shadow 0.2s;
}

.feature-card:hover {
    box-shadow: 0 3px 10px 0 rgba(30, 42, 99, 0.16);
}

.feature-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 0.75rem;
    margin-bottom: 1.5rem;
    font-size: 2rem;
}

.feature-card h3 {
    margin-bottom: 0.5rem;
}

.feature-card ul {
    flex-grow: 1;
    /* Make the list take available space */
    display: flex;
    flex-direction: column;
    width: 100%;
    margin-bottom: 1rem;
}

.feature-card a {
    margin-top: auto;
    /* Push links to the bottom of cards */
    align-self: flex-start;
}

.feature-item {
    background: #f8fafc;
    border-radius: 1rem;
    padding: 2rem 1.5rem;
    box-shadow: 0 1px 4px 0 rgba(30, 42, 99, 0.04);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.feature-icon-small {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 0.5rem;
    /* margin-bottom: 1.5rem; */
    font-size: 1.5rem;
    margin-left: auto;
}

/* Demo blocks */
.demo-block {
    overflow: hidden;
    border-radius: 1rem;
    box-shadow: 0 2px 16px 0 rgba(30, 42, 99, 0.08);
    background: #fff;
    transition: box-shadow 0.2s;
}

.demo-block:hover {
    box-shadow: 0 8px 32px 0 rgba(30, 42, 99, 0.16);
}

.demo-player, .demo-code {
    width: 100%;
    height: 100%;
}

pre code.hljs {
    height: 500px;
    overflow-y: auto;
    border-radius: 0;
    padding: 1.5rem;
    font-size: 1rem;
    background: #181e2a;
    color: #e5e7eb;
}

/* Demo Carousel */
.demo-carousel {
    position: relative;
    margin-bottom: 2rem;
    height: 500px;
    /* Adding fixed height to the carousel container */
}

.carousel-inner {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
    box-shadow: 0 2px 16px 0 rgba(30, 42, 99, 0.08);
    height: 100%;
    /* Make inner container fill carousel height */
}

.carousel-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Make all items fill carousel height */
    transform: translateX(100%);
    /* Start off-screen to the right */
    transition: transform 0.5s ease;
    display: none;
}

.carousel-item.active {
    position: relative;
    transform: translateX(0);
    /* Centered when active */
    display: block;
}

.carousel-item.previous {
    transform: translateX(-100%);
    /* Move to the left when becoming inactive */
    display: block;
}

/* Ensure the content inside carousel items has consistent height */
.carousel-item .md\:flex {
    height: 100%;
}

/* Ensure content panels have same height */
.carousel-item .md\:w-1\/3,
.carousel-item .md\:w-2\/3 {
    height: 100%;
}

.carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    background: #fff;
    color: #1e2a63;
    border-radius: 50%;
    box-shadow: 0 2px 8px 0 rgba(30, 42, 99, 0.16);
    cursor: pointer;
    transition: all 0.2s ease;
}

.carousel-control:hover {
    background: #1e2a63;
    color: #fff;
}

.carousel-control-prev {
    left: -1.5rem;
}

.carousel-control-next {
    right: -1.5rem;
}

.carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.carousel-indicator {
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 50%;
    background-color: #cbd5e1;
    cursor: pointer;
    transition: background-color 0.3s;
}

.carousel-indicator.active {
    background-color: #1e2a63;
}

.carousel-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.75rem 1rem;
    opacity: 0;
    transition: opacity 0.3s;
}

.carousel-item:hover .carousel-caption {
    opacity: 1;
}

/* Line numbers */
.hljs-ln-numbers {
    user-select: none;
    text-align: right;
    color: #9CA3AF;
    vertical-align: top;
    padding-right: 0.75rem !important;
    border-right: 1px solid #374151;
}

.hljs-ln-code {
    padding-left: 1rem !important;
}

/* Asciinema player */
.ap-player {
    width: 100%;
    border-radius: 0 !important;
}

.ap-play-button span {
    display: flex !important;
    justify-content: center;
}

/* Asciinema theming */
.asciinema-player-theme-krossbar {
    --term-color-foreground: #e5e7eb;
    --term-color-background: #1F2937;
    --term-color-0: #3b4252;
    --term-color-1: #ef4444;
    --term-color-2: #10b981;
    --term-color-3: #fbbf24;
    --term-color-4: #3b82f6;
    --term-color-5: #8b5cf6;
    --term-color-6: #06b6d4;
    --term-color-7: #f9fafb;
}

/* CTA section */
.cta-section {
    background: linear-gradient(135deg, #1e3c63 0%, #163754 100%);
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='rgba(255,255,255,.05)' fill-rule='evenodd'/%3E%3C/svg%3E");
    opacity: 0.5;
    z-index: 0;
}

.cta-section>.container {
    position: relative;
    z-index: 1;
}

/* Title styling */
.title-mono {
    font-family: "SF Mono", "Monaco", "Inconsolata", "Fira Mono", monospace !important;
}

/* Responsive adjustments */
@media (min-width: 1536px) {
    html {
        transform: scale(0.8);
        transform-origin: 0 0;
        width: 125%;
        /* Compensate for the scale to avoid horizontal scrollbar */
        height: 125%;
        /* Compensate for the scale to avoid vertical scrollbar */
        overflow-x: hidden;
    }

    .container {
        width: 70% !important;
    }

    #features {
        min-height: 400px;
    }
}

@media (max-width: 768px) {
    .container {
        width: 90%;
    }

    /* Mobile menu styles */
    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .nav-items {
        display: none;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 1rem 0;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
        z-index: 30;
    }

    .nav-items.show {
        display: flex;
    }

    .nav-items a {
        width: 100%;
        font-size: larger;
    }

    .nav-icon svg {
        width: 60px;
        height: 60px;
        margin: auto;
    }

    .nav-icon img {
        width: 60px;
        height: 60px;
        margin: auto;
    }

    header.sticky .nav-items {
        background: rgb(17 24 39 / 0.95);
        backdrop-filter: blur(8px);
    }

    /* Carousel adjustments for mobile */
    .carousel-item .md\:flex {
        flex-direction: column;
        height: auto;
    }

    .carousel-item .md\:w-1\/3,
    .carousel-item .md\:w-2\/3 {
        width: 100%;
    }

    .demo-carousel {
        height: auto;
        min-height: 600px;
    }

    .carousel-control {
        width: 2.5rem;
        height: 2.5rem;
    }

    .carousel-control-prev {
        left: -0.75rem;
    }

    .carousel-control-next {
        right: -0.75rem;
    }

    /* Fix content overflowing on small screens */
    .demo-player,
    .demo-code,
    pre code.hljs {
        height: 300px;
    }
}