/* BlueCave Landing Page Styles */

/* Bootstrap Color Override */
:root {
    --bc-color: rgba(49, 114, 224, 1);
    --bs-primary: var(--bc-color);
    --bs-primary-rgb: 49, 114, 224;
}

/* Reusable Header Component */
.app-header {
    background-color: var(--bc-color);
    height: 58px;
    padding: 4px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
}

.app-header .header-content {
    display: flex;
    align-items: center;
}

.app-header .header-link {
    display: flex;
    align-items: center;
    gap: 5px;
    text-decoration: none;
    color: white;
    transition: opacity 0.3s ease;
}

.app-header .header-link:hover {
    opacity: 0.8;
    text-decoration: none;
    color: white;
}

.app-header .logo {
    width: 40px;
    height: 40px;
    transition: all 0.3s ease;
}

.app-header .logo:hover {
    transform: scale(1.05);
}

.app-header .header-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: white;
    margin: 0;
}

/* Global Styles */
body {
    font-family: 'Open Sans', sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Hero Section */
.hero-section {
    min-height: calc(100vh - 88px); /* Much shorter: 58px header + 100px peek for clear visibility */
    background-color: var(--bc-color);
    color: white;
    padding: 2rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* Use dynamic viewport on mobile to avoid URL-bar resize jumps */
@media (max-width: 991.98px) {
    .hero-section {
        min-height: calc(100dvh - 88px); /* Match desktop height for consistency */
    }
}

.hero-logo {
    max-width: 80px;
    height: auto;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.hero-logo:hover {
    transform: scale(1.05);
}

.hero-logo-large {
    max-width: 96px; /* 20% larger than original 80px */
    height: auto;
    transition: all 0.3s ease;
    cursor: pointer;
}

.hero-logo-large:hover {
    transform: scale(1.05);
}

/* Light Blue Background for Email Section */
.bg-light-blue {
    background-color: var(--bc-color); /* Blue Cave blue at 40% opacity */
}

/* Language Icons */
.language-icon {
    filter: brightness(0) invert(1); /* Makes icons white */
    transition: all 0.3s ease;
    opacity: 0.8;
}

.language-icon:hover {
    opacity: 1;
    transform: scale(1.1);
}

@keyframes jsPulse {
    0% {
        opacity: 0.4;
        transform: translate(-50%, -50%) scale(0.8);
        box-shadow: 0 0 4px rgba(67, 113, 217, 0.6);
    }
    50% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.3);
        box-shadow: 0 0 12px rgba(67, 113, 217, 0.8);
    }
    100% {
        opacity: 0.4;
        transform: translate(-50%, -50%) scale(0.8);
        box-shadow: 0 0 4px rgba(67, 113, 217, 0.6);
    }
}

@keyframes lightPulse {
    0% {
        opacity: 0.4;
        transform: translate(-50%, -50%) scale(0.8);
        box-shadow: 0 0 4px rgba(67, 113, 217, 0.6);
    }
    50% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.3);
        box-shadow: 0 0 12px rgba(67, 113, 217, 0.8);
    }
    100% {
        opacity: 0.4;
        transform: translate(-50%, -50%) scale(0.8);
        box-shadow: 0 0 4px rgba(67, 113, 217, 0.6);
    }
}

.hero-headline {
    font-size: 3.5rem;
/*     font-weight: 700; */
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.hero-subheadline {
    font-size: 1.25rem;
    font-weight: 300;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* Email Form */
.email-form-container {
    max-width: 500px;
    margin: 0 auto;
}

.email-form .form-control {
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-style: italic;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    background-color: white;
    color: #999;
    height: 48px;
}

.email-form .form-control:focus {
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.25);
    border-color: transparent;
}

.email-form .form-control::placeholder {
    color: #bbb;
    opacity: 1;
}

.email-form .btn {
    border-radius: 8px;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
    background-color: white;
    color: var(--bc-color);
    border: none;
    height: 48px;
}

.email-form .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Footer */
.footer-section {
    background-color: var(--bc-color);
    color: white;
    padding: 2rem 0;
    margin-top: auto;
}

.footer-link {
    color: white;
    text-decoration: none;
    font-weight: 400;
    transition: opacity 0.3s ease;
}

.footer-link:hover {
    color: white;
    opacity: 0.8;
}

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

    .hero-subheadline {
        font-size: 1.1rem;
    }

    .hero-logo {
        max-width: 70px;
    }

    .email-form .row {
        margin: 0;
    }

    .email-form .col-12 {
        margin-bottom: 1rem;
    }

    .email-form .col-12:last-child {
        margin-bottom: 0;
    }
}

@media (max-width: 576px) {
    .hero-headline {
        font-size: 2rem;
    }

    .hero-subheadline {
        font-size: 1rem;
    }

    .hero-section {
        padding: 1rem 0;
    }
}

/* Privacy Policy Page Styles */
.privacy-header {
    background-color: var(--bc-color);
    height: 58px;
    padding: 4px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
}

.privacy-header .header-content {
    display: flex;
    align-items: center;
}

.privacy-header .logo {
    width: 40px;
    height: 40px;
    transition: all 0.3s ease;
}

.privacy-header .header-link {
    display: flex;
    align-items: center;
    gap: 5px;
    text-decoration: none;
    color: white;
    transition: opacity 0.3s ease;
}

.privacy-header .header-link:hover {
    opacity: 0.8;
    text-decoration: none;
    color: white;
}

.privacy-header .header-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: white;
    margin: 0;
}

.privacy-header .logo:hover {
    transform: scale(1.05);
}

.privacy-content {
    background-color: white;
    color: #333;
    line-height: 1.7;
    font-size: 16px;
}

.privacy-content h1 {
    font-size: 2.5rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 2rem;
    border-bottom: 3px solid var(--bc-color);
    padding-bottom: 1rem;
}

.privacy-content h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--bc-color);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.privacy-content h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #555;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.privacy-content p {
    margin-bottom: 1.2rem;
    text-align: justify;
}

.privacy-content ul, .privacy-content ol {
    margin-bottom: 1.2rem;
    padding-left: 2rem;
}

.privacy-content li {
    margin-bottom: 0.5rem;
}

.privacy-content .highlight {
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-left: 4px solid var(--bc-color);
    margin: 1.5rem 0;
    border-radius: 0 4px 4px 0;
}

.privacy-content .contact-info {
    background-color: #e3f2fd;
    padding: 1.5rem;
    border-radius: 8px;
    margin: 2rem 0;
    border: 1px solid #bbdefb;
}

.last-updated {
    font-style: italic;
    color: #666;
    font-size: 0.9rem;
    margin-top: 3rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

/* Privacy Policy Responsive Design */
@media (max-width: 768px) {
    .privacy-content h1 {
        font-size: 2rem;
    }

    .privacy-content h2 {
        font-size: 1.3rem;
    }

    .privacy-content h3 {
        font-size: 1.1rem;
    }

    .privacy-content {
        font-size: 15px;
    }
}

@media (max-width: 576px) {
    .privacy-content h1 {
        font-size: 1.8rem;
    }

    .privacy-content h2 {
        font-size: 1.2rem;
    }

    .privacy-content {
        font-size: 14px;
    }

    .privacy-content ul, .privacy-content ol {
        padding-left: 1.5rem;
    }
}

/* Functionality Cards */
.functionality-card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    overflow: hidden;
}

.functionality-card:hover,
.functionality-card.active {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.functionality-card .text-primary {
    color: var(--bc-color) !important;
}

.functionality-card span {
    color: #333;
    font-weight: 500;
}

/* Functionality Details Styling */
#functionality-details-desktop {
    background-color: white;
    border-radius: 8px;
    padding: 2rem;
    margin-top: 2rem;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Keep consistent height on desktop to avoid footer jumping when switching cards */
@media (min-width: 992px) {
    #functionality-details-desktop {
        min-height: 320px;
    }
}

#functionality-text h4 {
    color: #333;
    font-weight: 600;
    margin-bottom: 1rem;
}

#functionality-text p {
    color: #333;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 0;
}

/* Coverage Circle Styling */
.coverage-circle-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 120px;
}

.coverage-circle {
    max-width: 100%;
    height: auto;
}

.coverage-bg {
    stroke: #e9ecef;
}

.coverage-progress {
    stroke: var(--bc-color);
    stroke-linecap: round;
}

.coverage-text {
    fill: #333;
    font-family: inherit;
}

/* Mobile Functionality Details */
.functionality-details-mobile {
    background-color: white;
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 1.0rem;
    /* Reserve space to reduce scroll jumps when content renders */
    min-height: 280px;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.functionality-details-mobile h4 {
    color: #333;
    font-weight: 600;
    margin-bottom: 1rem;
}

.functionality-details-mobile p {
    color: #333;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* Hide mobile details on desktop */
@media (min-width: 992px) {
    .functionality-details-mobile {
        display: none !important;
    }
}

/* Static Analysis Bar Chart */
.static-analysis-chart {
    padding: 1rem;
}

.chart-container {
    display: flex;
    flex-direction: row;
    gap: 2rem;
    justify-content: center;
    align-items: end;
    height: 150px;
}

.chart-bar-container {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.chart-bar-label {
    font-size: 0.875rem;
    color: #666;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.chart-bar-wrapper {
    position: relative;
    background-color: #f8f9fa;
    border-radius: 4px;
    width: 40px;
    height: 120px;
    overflow: hidden;
    display: flex;
    align-items: end;
}

.chart-bar {
    width: 100%;
    height: 0px;
    border-radius: 4px;
    transition: height 2s ease-in-out;
    background-color: transparent;
    min-height: 0px;
    display: block;
}

/* Reduce reflow/animation jank on mobile by disabling height transitions */
@media (max-width: 991.98px) {
    .chart-bar {
        transition: none;
    }
}

/* Disable hover lift on touch devices to avoid layout shifts */
@media (hover: none) {
    .functionality-card:hover {
        transform: none;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.08);
    }
}

/* Disable scroll anchoring on mobile to prevent browser interference */
@media (max-width: 991.98px) {
    html {
        scroll-behavior: auto;
        overscroll-behavior: none;
    }

    body {
        -webkit-overflow-scrolling: touch;
        scroll-behavior: auto;
    }
}

/* Force hardware acceleration and prevent layout thrashing on mobile */
@media (max-width: 991.98px) {
    .functionality-details-mobile {
        will-change: auto;
        transform: translateZ(0);
        backface-visibility: hidden;
    }

    .functionality-card {
        will-change: auto;
        transform: translateZ(0);
    }
}

/* Ensure mobile details container doesn't cause layout shifts */
@media (max-width: 991.98px) {
    .functionality-details-mobile {
        position: relative;
        z-index: 1;
        contain: layout style paint;
    }
}

/* Final mobile scroll stability fixes */
@media (max-width: 991.98px) {
    /* Prevent any scroll anchoring issues */
    .functionality-details-mobile,
    #functionality-details-desktop {
        scroll-margin-top: 0;
        scroll-snap-margin-top: 0;
    }

    /* Ensure smooth scrolling */
    html {
        scroll-padding-top: 0;
    }

    /* Prevent any potential layout shifts from dynamic content */
    .container {
        contain: layout;
    }
}

.chart-bar-critical {
    background-color: #dc3545 !important;
    border: 1px solid #dc3545;
}

.chart-bar-touchups {
    background-color: var(--bc-color) !important;
    border: 1px solid var(--bc-color);
}

.chart-bar-number {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: 600;
    font-size: 0.875rem;
    z-index: 10;
}

.chart-bar-number-critical {
    color: #ff6b6b !important;
}

.chart-bar-number-touchups {
    color: #7ba3ff !important;
}
