/* Home page specific styles */

/* Hero Section */
.home-hero {
    background: #000000;
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

/* Hero background video - positioned behind hero content */
.hero-background-video {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100vh !important;
    z-index: 0 !important; /* Behind content */
    object-fit: cover !important;
    object-position: center !important;
    pointer-events: none !important;
    display: block !important;
    visibility: visible !important;
    opacity: 0; /* Start hidden for fade-in - allow JS to override */
    animation: videoFadeIn 2s ease-in-out forwards;
    background: #000000 !important;
    /* Maintain quality - no blur */
    filter: none !important;
    -webkit-filter: none !important;
    /* No borders */
    border: none !important;
    outline: none !important;
    /* Maintain aspect ratio and quality */
    min-width: 100% !important;
    max-width: 100% !important;
}

/* When video is playing, ensure it's visible */
.hero-background-video.playing {
    opacity: 1 !important;
}

/* Fade-in animation for video */
@keyframes videoFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Dark overlay on video for text readability (40-50% black) */
.hero-video-overlay {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 1 !important; /* Above video, below text */
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.4) 0%,
        rgba(0, 0, 0, 0.45) 50%,
        rgba(0, 0, 0, 0.6) 85%,
        rgba(0, 0, 0, 0.8) 95%,
        rgba(0, 0, 0, 1) 100%
    ) !important;
    pointer-events: none !important;
}

.home-hero-content {
    position: relative;
    z-index: 2; /* Above video and overlay */
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
    padding: var(--spacing-24) var(--spacing-6);
}

/* Hero Logo - Above title */
.hero-inline-logo {
    width: 400px; /* Desktop logo size */
    height: auto;
    display: block;
    margin: 0 auto var(--spacing-4) auto; /* Center and add spacing below */
    opacity: 0.95;
    filter: drop-shadow(0 2px 10px rgba(255, 255, 255, 0.1));
}

.home-hero-title {
    display: block;
    text-align: center;
}

@media (max-width: 768px) {
    .hero-inline-logo {
        width: 200px;
        margin-bottom: var(--spacing-3);
    }
}

@media (max-width: 480px) {
    .hero-inline-logo {
        width: 180px;
        margin-bottom: var(--spacing-2);
    }
}

/* Ensure all hero content is above video */
.home-hero .container,
.home-hero-content,
.home-hero-title,
.home-hero-tagline,
.home-hero-description,
.hero-actions {
    position: relative;
    z-index: 2; /* Above video and overlay */
}

.home-hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 700;
    color: #ffffff;
    margin-bottom: var(--spacing-6);
    line-height: 1.2;
}

.home-hero-tagline {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    color: #ffffff;
    font-weight: 400;
    margin-bottom: var(--spacing-8);
    opacity: 0.9;
}

.home-hero-description {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: #ffffff;
    line-height: 1.8;
    margin-bottom: var(--spacing-12);
    opacity: 0.85;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Fixed Background Image - Above Why CosmosDataSec section */
.fixed-background-image {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image: url('../Photos/indexBG.jpeg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
    pointer-events: none;
    opacity: 1;
    display: block;
    /* Will be positioned by JavaScript based on section position */
}

/* Key Values Section */
.key-values {
    padding: var(--spacing-32) 0;
    background-image: url('../../Photos/indexBG.jpeg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    position: relative;
    z-index: 1;
    min-height: 400px; /* Ensure section has height */
}

/* Smooth top gradient fade-in from video to background image */
.key-values::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 1) 0%,
        rgba(0, 0, 0, 0.9) 8%,
        rgba(0, 0, 0, 0.7) 20%,
        rgba(0, 0, 0, 0.4) 40%,
        rgba(0, 0, 0, 0.3) 60%,
        rgba(0, 0, 0, 0.3) 100%
    );
    z-index: 0;
    pointer-events: none;
}

.key-values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-8);
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-6);
}

.key-value-card {
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(2px);
    padding: var(--spacing-8);
    border-radius: var(--radius-xl);
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all var(--transition-normal);
}

.key-value-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.key-value-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--spacing-6);
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.key-value-title {
    font-size: var(--font-size-xl);
    font-weight: 600;
    color: #ffffff;
    margin-bottom: var(--spacing-4);
}

.key-value-description {
    color: #ffffff;
    opacity: 0.85;
    line-height: 1.6;
    font-size: var(--font-size-base);
}

/* Product Preview Section */
.product-preview {
    padding: var(--spacing-32) 0;
    background-image: url('../../Photos/indexBG.jpeg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    position: relative;
    z-index: 1;
    min-height: 400px; /* Ensure section has height */
}

/* Dark overlay on Product Preview background for text readability */
.product-preview::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 0;
    pointer-events: none;
}

/* Ensure cards are above background image */
.key-values .container,
.key-values-grid,
.key-value-card,
.product-preview-content,
.preview-grid,
.preview-card {
    position: relative;
    z-index: 2;
}

.product-preview-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-6);
    position: relative;
    z-index: 2;
}

.product-preview-title {
    font-size: var(--font-size-4xl);
    font-weight: 600;
    color: #ffffff;
    text-align: center;
    margin-bottom: var(--spacing-12);
}

.preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-8);
}

.preview-card {
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(2px);
    border-radius: var(--radius-xl);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    transition: all var(--transition-normal);
    text-align: center;
    padding: var(--spacing-8);
}

.preview-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.preview-image {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--spacing-6);
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.preview-content {
    padding: 0;
}

.preview-title {
    font-size: var(--font-size-xl);
    font-weight: 600;
    color: #ffffff;
    margin-bottom: var(--spacing-4);
}

/* Why CosmosDataSec Section */
.why-cosmos {
    padding: var(--spacing-32) 0;
    background-image: url('../../Photos/indexBG.jpeg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    position: relative;
    z-index: 1;
    min-height: 400px; /* Ensure section has height */
}

/* Dark overlay on why-cosmos background for text readability */
.why-cosmos::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 0;
    pointer-events: none;
}

.why-cosmos-content {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 var(--spacing-6);
    position: relative;
    z-index: 2;
}

.why-cosmos-title {
    font-size: var(--font-size-4xl);
    font-weight: 600;
    color: #ffffff;
    text-align: center;
    margin-bottom: var(--spacing-12);
}

.why-cosmos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-6);
}

.why-item {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-4);
    padding: var(--spacing-6);
    background: #0a0a0a;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.why-item-icon {
    color: #ffffff;
    font-size: 1.5rem;
    margin-top: var(--spacing-1);
    flex-shrink: 0;
}

.why-item-text {
    color: #ffffff;
    font-size: var(--font-size-base);
    line-height: 1.6;
}

/* CTA Section - Add background image */
main .cta {
    background-image: url('../../Photos/indexBG.jpeg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    position: relative;
    z-index: 1;
    min-height: 300px; /* Ensure section has height */
}

/* Dark overlay on CTA background for text readability */
main .cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 0;
    pointer-events: none;
}

/* Ensure CTA content is above background image */
main .cta .container,
main .cta-content {
    position: relative;
    z-index: 2;
}


