/* Custom styles for Keyves Splash Page */

/* Send button hover effect */
.SendButton21 {
    transition: transform 0.2s ease-in-out;
}

.SendButton21:hover {
    transform: scale(1.13); /* Scales up by ~4px from 30px to 34px */
}

/* Gold caret for chat input */
#chatInput, #chatInputMobile {
    caret-color: #ffffff; /* Gold caret color */
    position: relative;
    text-shadow: 0 0 6px rgba(255, 197, 81, 0.4);
}

/* Popup message styling */
.keyves-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.keyves-popup.active {
    opacity: 1;
    visibility: visible;
}

.keyves-popup-content {
    background-color: #000000;
    border-radius: 16px;
    padding: 20px 30px;
    max-width: 90%;
    width: 320px;
    text-align: center;
    position: relative;
    border: 1px solid white;
    box-shadow: 0px 0px 10px 1px rgba(251, 207, 100, 0.5);
}

.keyves-popup-content p {
    color: white;
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    margin-bottom: 20px;
    text-shadow: 0px 0px 6px rgba(255, 197, 81, 0.4);
}

.keyves-popup-close {
    background: linear-gradient(90deg, #FFC551 10%, #D9D4C6 50%, #FFC551 90%);
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    cursor: pointer;
    color: #000000;
    transition: transform 0.2s ease;
}

.keyves-popup-close:hover {
    transform: scale(1.05);
    box-shadow: 0px 0px 8px rgba(255, 197, 81, 0.8);
}

/* Additional styling beyond Tailwind CSS */
body {
    background-color: #000000;
    overflow-x: hidden;
}

/* Initial loading state - hide everything to prevent flash of content */
body.loading .component-placeholder,
body.loading .Divider,
body.loading #section1-container,
body.loading #section2-component,
body.loading #section3-component,
body.loading #section4-container {
    opacity: 0 !important;
    visibility: hidden !important;
    transition: none !important; /* Prevent any transitions during loading */
}

/* Desktop: Apply fullscreen styling immediately during load */
@media (min-width: 768px) {
    /* Remove default body centering during load to prevent conflicts */
    body.loading {
        display: block !important;
        align-items: initial !important;
        justify-content: initial !important;
    }
    
    body.loading main {
        max-width: none !important;
        display: block !important;
    }
    
    body.loading .chat-interface-wrapper {
        display: block !important;
        grid-template-columns: none !important;
    }
    
    body.loading #section1-container {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        z-index: 14;
        background-color: #000000;
        opacity: 0 !important;
        visibility: hidden !important;
    }
    
    body.loading #section2-component,
    body.loading #section3-component,
    body.loading #section4-container {
        display: none !important;
    }
    
    /* Hide dividers immediately on desktop */
    body.loading .Divider {
        display: none !important;
    }
}

/* Full-screen section styling for desktop */
.fullscreen-section {
    height: 100vh !important;
    width: 100vw !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    z-index: 1;
    transition: opacity 600ms ease-in-out;
    background-color: #000000;
}

/* Ensure proper stacking order */
#section1-container.fullscreen-section { z-index: 14; }
#section2-component.fullscreen-section { z-index: 13; }
#section3-component.fullscreen-section { z-index: 12; }
#section4-container.fullscreen-section { z-index: 11; }

/* Ensure section content is visible within fullscreen sections */
.fullscreen-section > * {
    position: relative !important;
}

/* Three column layout for centering */
.chat-interface-wrapper {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    width: 100vw;
    max-width: 100%;
    overflow: hidden;
    place-items: center;
    padding: 0;
    margin: 0 auto;
    position: relative;
    justify-content: center;
}

/* Standardized dimensions for all sections */
.Section1ChatInterface,
.Section2DataSources,
.Section3Services,
.Section4Integrations,
.Section4IntegrationsDesktop {
    position: relative;
    width: 1200px; /* Standardized width for all sections */
    transform-origin: center center;
    margin: 0 auto;
}

/* Specific heights for each section (maintaining aspect ratios) */
.Section1ChatInterface {
    height: 566px;
}

.Section2DataSources {
    height: 757px;
}

.Section3Services {
    height: 619px;
}

.Section4Integrations,
.Section4IntegrationsDesktop {
    height: 721px;
}

/* Container styles for all sections */
.section1-container,
.section2-container,
.section3-container,
.section4-container {
    position: relative;
    margin: 0 auto;
    height: 100%;
}

/* Corner-only border styling */
.CornerBorders {
    z-index: 1;
    position: relative;
    border-radius: 16px;
    /* Remove the full outline */
    outline: none;
    /* No border */
    border: none;
}
/* Corner elements */
.corner {
    position: absolute;
    width: 30px;
    height: 30px;
    border: 2px solid white;
    z-index: 2;
    background-color: transparent;
}

.corner-top-left {
    top: -1px;
    left: -1px;
    border-right: none;
    border-bottom: none;
    border-top-left-radius: 16px;
}

.corner-top-right {
    top: -1px;
    right: -1px;
    border-left: none;
    border-bottom: none;
    border-top-right-radius: 16px;
}

.corner-bottom-left {
    bottom: -1px;
    left: -1px;
    border-right: none;
    border-top: none;
    border-bottom-left-radius: 16px;
}

.corner-bottom-right {
    bottom: -1px;
    right: -1px;
    border-left: none;
    border-top: none;
    border-bottom-right-radius: 16px;
}

/* Service card corners and sides */
.ServiceCard {
    z-index: 1;
    position: relative;
    border-radius: 16px;
    /* Remove the full outline */
    outline: none;
    /* No border */
    border: none;
}

/* Gold corner elements */
.gold-corner {
    position: absolute;
    width: 30px;
    height: 30px;
    border: 2px solid #FFC551; /* amber-300 */
    z-index: 2;
    background-color: transparent;
    box-shadow: 0px 0px 8px 1px rgba(255,197,81,1);
}

.gold-corner-top-left {
    top: -1px;
    left: -1px;
    border-right: none;
    border-bottom: none;
    border-top-left-radius: 16px;
}

.gold-corner-top-right {
    top: -1px;
    right: -1px;
    border-left: none;
    border-bottom: none;
    border-top-right-radius: 16px;
}

.gold-corner-bottom-left {
    bottom: -1px;
    left: -1px;
    border-right: none;
    border-top: none;
    border-bottom-left-radius: 16px;
}

.gold-corner-bottom-right {
    bottom: -1px;
    right: -1px;
    border-left: none;
    border-top: none;
    border-bottom-right-radius: 16px;
}

/* Side border elements */
.gold-side {
    position: absolute;
    z-index: 2;
    background-color: transparent;
}

.gold-side-left {
    left: -1px;
    top: 29px;
    height: calc(100% - 58px);
    width: 2px;
    border-left: 3px solid #FFC551;
    box-shadow: 0px 0px 8px 1px rgba(255,197,81,1);
}

.gold-side-right {
    right: -1px;
    top: 29px;
    height: calc(100% - 58px);
    width: 2px;
    border-right: 3px solid #FFC551;
    box-shadow: 0px 0px 8px 1px rgba(255,197,81,1);
}



.HorizontalBackgound {
    z-index: 0;
}

.VerticalBackground {
    z-index: 0;
}

/* Responsive adjustments - Using consistent scaling across all sections */
@media (max-width: 1280px) {
    .Section1ChatInterface,
    .Section2DataSources,
    .Section3Services,
    .Section4Integrations,
    .Section4IntegrationsDesktop {
        transform: scale(0.95);
    }
}

@media (max-width: 1200px) {
    .Section1ChatInterface,
    .Section2DataSources,
    .Section3Services,
    .Section4Integrations,
    .Section4IntegrationsDesktop {
        transform: scale(0.9);
    }
}

@media (max-width: 1080px) {
    .Section1ChatInterface,
    .Section2DataSources,
    .Section3Services,
    .Section4Integrations,
    .Section4IntegrationsDesktop {
        transform: scale(0.85);
    }
}

@media (max-width: 980px) {
    .Section1ChatInterface,
    .Section2DataSources,
    .Section3Services,
    .Section4Integrations,
    .Section4IntegrationsDesktop {
        transform: scale(0.75);
    }
}

@media (max-width: 850px) {
    .Section1ChatInterface,
    .Section2DataSources,
    .Section3Services,
    .Section4Integrations,
    .Section4IntegrationsDesktop {
        transform: scale(0.65);
    }
}

@media (max-width: 768px) {
    /* Add 130px spacing above and below dividers on mobile */
    .Divider {
        margin-top: 130px !important;
        margin-bottom: 130px !important;
    }
    
    /* Ensure the first divider has top spacing */
    #section1-container + .chat-interface-wrapper .Divider {
        margin-top: 130px !important;
    }
    
    .Section1ChatInterface,
    .Section2DataSources,
    .Section3Services,
    .Section4Integrations,
    .Section4IntegrationsDesktop {
        transform: scale(0.55);
    }
}

@media (max-width: 680px) {
    .Section1ChatInterface,
    .Section2DataSources,
    .Section3Services,
    .Section4Integrations,
    .Section4IntegrationsDesktop {
        transform: scale(0.45);
    }
}

@media (max-width: 580px) {
    .Section1ChatInterface,
    .Section2DataSources,
    .Section3Services,
    .Section4Integrations,
    .Section4IntegrationsDesktop {
        transform: scale(0.4);
    }
}

@media (max-width: 580px) {
    .Section1ChatInterface {
        transform: scale(0.55);
    }
}

/* Mobile-specific styles for Section 1 */
.Section1ChatInterfaceMobile {
    position: relative;
    transform-origin: center center;
    margin: 0 auto;
}

/* Adjust the offset for smaller screens */
@media (max-width: 480px) {
    .Section1ChatInterfaceMobile {
        /* Removed transform to ensure content remains centered */
        transform: none;
    }
    .Image11 {
        /* Ensure image1 remains centered on smaller screens */
        left: 50%;
        transform: translateX(-50%);
    }
    .AskKeyves2, .TextBackground, .WhatCanIHelpYouWith {
        /* Ensure these elements remain centered on smaller screens */
        left: 50%;
        transform: translateX(-50%);
    }
}

/* Mobile-specific styles for Section 2 */
.Section2DataSourcesMobile {
    position: relative;
    transform-origin: center center;
    margin: 0 auto;
}

/* Mobile-specific styles for Section 3 */
.Section3ServicesMobile {
    position: relative;
    transform-origin: center center;
    margin: 0 auto;
}

/* Mobile-specific styles for Section 4 */
.Section4IntegrationsMobile {
    position: relative;
    transform-origin: center center;
    margin: 0 auto;
}

/* Desktop styles for Section 4 */
.Section4IntegrationsDesktop {
    position: relative;
    transform-origin: center center;
}

/* Mobile wrapper for centering */
.mobile-interface-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 0 20px;
    min-height: 100vh;
    overflow-x: hidden; /* Allow content to be cut off horizontally */
}

/* Ensure mobile images scale properly */
.Section1ChatInterfaceMobile img {
    object-fit: contain;
}

.Section2DataSourcesMobile img {
    object-fit: contain;
}

.Section3ServicesMobile img {
    object-fit: contain;
}

.Section4IntegrationsMobile img {
    object-fit: contain;
}

/* Mobile text styling adjustments */
@media (max-width: 768px) {
    /* Override desktop scaling for mobile components */
    .Section1ChatInterface {
        display: none;
    }
    
    .Section1ChatInterfaceMobile {
        display: block;
    }
    
    .Section2DataSources {
        display: none;
    }
    
    .Section2DataSourcesMobile {
        display: block;
    }
    
    .Section3Services {
        display: none;
    }
    
    .Section3ServicesMobile {
        display: block;
    }
    
    .Section4Integrations {
        display: none;
    }
    
    .Section4IntegrationsDesktop {
        display: none;
    }
    
    .Section4IntegrationsMobile {
        display: block;
    }
    
    /* Ensure proper z-indexing on mobile */
    .Section1ChatInterfaceMobile .TextBackground {
        z-index: 1;
    }
    
    .Section1ChatInterfaceMobile img {
        max-width: 100%;
        height: auto;
    }
    
    .Section1ChatInterfaceMobile .SendButtonMobile {
        cursor: pointer;
    }
    
    .chat-interface-wrapper {
        overflow-x: hidden; /* Ensure character can be cut off */
    }
}

/* Desktop mode - hide mobile version */
@media (min-width: 769px) {
    .Section1ChatInterfaceMobile {
        display: none;
    }
    
    .Section1ChatInterface {
        display: block;
    }
    
    .Section2DataSourcesMobile {
        display: none;
    }
    
    .Section2DataSources {
        display: block;
    }
    
    .Section3ServicesMobile {
        display: none;
    }
    
    .Section3Services {
        display: block;
    }
    
    .Section4IntegrationsMobile {
        display: none;
    }
    
    .Section4IntegrationsDesktop {
        display: block;
    }
}

/* Corner Glow Effects */
.corner-glow-tl {
    position: absolute;
    top: -2px;
    left: -2px;
    width: 16px;
    height: 16px;
    border-top-left-radius: 16px;
    background: radial-gradient(circle at top left, rgba(255, 197, 81, 0.6) 0%, rgba(255, 197, 81, 0) 80%);
    pointer-events: none;
    z-index: 1;
    filter: blur(0.5px);
}

.corner-glow-tr {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 16px;
    height: 16px;
    border-top-right-radius: 16px;
    background: radial-gradient(circle at top right, rgba(255, 197, 81, 0.6) 0%, rgba(255, 197, 81, 0) 80%);
    pointer-events: none;
    z-index: 1;
    filter: blur(0.5px);
}

.corner-glow-bl {
    position: absolute;
    bottom: -2px;
    left: -2px;
    width: 16px;
    height: 16px;
    border-bottom-left-radius: 16px;
    background: radial-gradient(circle at bottom left, rgba(255, 197, 81, 0.6) 0%, rgba(255, 197, 81, 0) 80%);
    pointer-events: none;
    z-index: 1;
    filter: blur(0.5px);
}

.corner-glow-br {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 16px;
    height: 16px;
    border-bottom-right-radius: 16px;
    background: radial-gradient(circle at bottom right, rgba(255, 197, 81, 0.6) 0%, rgba(255, 197, 81, 0) 80%);
    pointer-events: none;
    z-index: 1;
    filter: blur(0.5px);
}

/* Side Glow Effects */
.side-glow-left {
    position: absolute;
    top: 14px; /* Increased to prevent overlap with corner */
    left: -4px;
    width: 16px;
    height: calc(100% - 28px); /* Adjusted to prevent overlap with corners */
    background: linear-gradient(to right, rgba(255, 197, 81, 0.6) 0%, rgba(255, 197, 81, 0) 80%);
    pointer-events: none;
    z-index: 1;
    filter: blur(0.5px);
}

.side-glow-right {
    position: absolute;
    top: 14px; /* Increased to prevent overlap with corner */
    right: -4px;
    width: 16px;
    height: calc(100% - 28px); /* Adjusted to prevent overlap with corners */
    background: linear-gradient(to left, rgba(255, 197, 81, 0.6) 0%, rgba(255, 197, 81, 0) 80%);
    pointer-events: none;
    z-index: 1;
    filter: blur(0.5px);
}

/* Adjust gradient text for mobile */
/* Text shadow removed from Section2DataSourcesMobile .text-glow span */

.Section2DataSourcesMobile .KeyvesAbsorbsItAll {
    width: 310px; /* Ensure proper width for the title */
}

/* Gold Gradient Border */
.GoldGradientBorder {
    position: relative;
    border-radius: 16px;
    box-shadow: 0px 0px 6px 0px rgba(255,197,81,1.00);
}

/* Create the gradient border effect using a pseudo-element */
.GoldGradientBorder::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    border-radius: 16px;
    padding: 1px; /* Border width */
    background: linear-gradient(0deg, #FFC551 10%, #D9D4C6 50%, #FFC551 90%);
    -webkit-mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none; /* Makes sure the pseudo-element doesn't interfere with clicks */
    z-index: 1; /* Ensure it's above the base element but below the black bar */
}

/* Hide dividers on desktop */
@media (min-width: 768px) {
    .desktop-hidden {
        display: none !important;
    }
}

/* Section navigation dots */
.section-nav {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    display: none; /* Hidden by default, shown in desktop mode */
}

.section-nav-dots {
    display: flex;
    flex-direction: column;
    gap: 16px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.section-nav-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(217, 212, 198, 0.5); /* Light gray dot */
    cursor: pointer;
    transition: all 0.3s ease;
}

.section-nav-dot.active {
    background: linear-gradient(0deg, #FFC551 10%, #D9D4C6 50%, #FFC551 90%); /* Gold gradient */
    width: 14px;
    height: 14px;
    box-shadow: 0 0 8px rgba(255, 197, 81, 0.6);
}

/* Show navigation dots only on desktop */
@media (min-width: 768px) {
    .section-nav {
        display: block;
    }
}

/* Scroll indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    animation: float 2s ease-in-out infinite;
    display: none; /* Hidden by default, shown only on desktop */
    cursor: pointer; /* Show pointer cursor to indicate it's clickable */
    padding: 15px; /* Add padding for larger click area */
}

.scroll-indicator svg {
    width: 4px;
    height: 51px;
}

/* Floating animation */
@keyframes float {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(10px);
    }
}

/* Show scroll indicator only on desktop and only on first section */
@media (min-width: 768px) {
    .scroll-indicator {
        display: block;
    }
}

/* Mobile scroll indicator container */
.mobile-scroll-indicator-container {
    position: relative;
    width: 100%;
    height: 0;
    margin-top: -70px; /* Position it to overlap with the top of the divider's margin */
    z-index: 1000; /* Very high z-index to ensure it appears above everything */
    display: block;
    opacity: 0; /* Start with opacity 0 for fade-in effect */
    transition: opacity 1s ease; /* Smooth transition for fade-in */
}

.mobile-scroll-indicator-fixed {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    animation: float 2s ease-in-out infinite;
    cursor: pointer;
    padding: 15px;
    z-index: 1000; /* Very high z-index */
}

.mobile-scroll-indicator-fixed svg {
    width: 4px;
    height: 51px;
}

/* Hide mobile scroll indicator on desktop */
@media (min-width: 768px) {
    .mobile-scroll-indicator-container {
        display: none;
    }
}
