/* 
 * Data Surfer Homepage Styles
 * Custom CSS for the redesigned homepage focusing on Data Surfer
 */

/* Hero Section with Thumbnail - SureScale original style */
.hero-with-thumbnail {
    min-height: 100vh;
    padding-top: 10rem;
    padding-bottom: 5rem;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background-color: #272833;
    background-image: radial-gradient(circle, #3b3b4a 1.5px, transparent 1px);
    background-size: 24px 24px;
    background-position: center;
    background-repeat: repeat;
    position: relative;
    overflow: visible !important;
}

/* IMPORTANT: Fix container alignment throughout the page */
main.homepage .container,
.hero-with-thumbnail .container,
.section-data-surfer-features .container,
.section-capabilities .container,
.section-success-story .container,
.section-take-word .container,
.section-cost.section-why-surescale .container,
.box-section .container {
    max-width: 1400px;
    margin: 0 auto;
    padding-left: 30px;
    padding-right: 30px;
    box-sizing: border-box;
    width: 100%;
}

/* Ensure all grid containers are properly contained */
.grid-container.grid {
    width: 100%;
    box-sizing: border-box;
    overflow: visible;
}

.hero-with-thumbnail .container {
    display: flex;
    align-items: center;
    gap: 2rem;
    position: relative;
    z-index: 2;
    overflow: visible !important;
}

/* Layout positions - REVISED */
.hero-with-thumbnail .hero-left {
    flex: 0 0 50%;
    text-align: left;
    padding-right: 20px;
    box-sizing: border-box;
}

.hero-with-thumbnail .hero-right {
    flex: 0 0 50%;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: visible !important;
    box-sizing: border-box;
    padding: 60px;
}

/* Make the background vector more prominent */
.hero-background-image {
    position: absolute;
    width: 170%;
    height: auto;
    top: -35%;
    left: -35%;
    transform: rotate(90deg);
    opacity: 0.85;
    pointer-events: none;
    z-index: 0;
    object-fit: contain;
    filter: contrast(1.1) brightness(1.1);
}

/* Video container with clean squiggle effects */
.video-container {
    position: relative;
    width: 85%;
    max-width: 600px;
    height: auto;
    border-radius: 20px; 
    overflow: visible !important; /* Force vectors to be visible outside */
    aspect-ratio: 16/9;
    cursor: pointer;
    z-index: 1;
    transition: transform 0.3s ease;
    margin: 0 auto;
}

/* Decorative vectors for the video - updated positions */
.top-left-vector {
    position: absolute;
    top: 26px;
    left: -10px;
    width: 120px;
    z-index: 0;
    opacity: 0.8;
    transform: rotate(141deg);
    pointer-events: none;
}

.bottom-right-vector {
    position: absolute;
    bottom: -15px;
    right: 0px;
    width: 150px;
    height: auto;
    z-index: 5;
    opacity: 0.8;
    transform: rotate(15deg);
    pointer-events: none;
}

/* Video thumbnail */
.video-thumbnail {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
    border-radius: 20px;
    object-fit: cover;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.video-container:hover .video-thumbnail {
    transform: translateY(-5px);
}

.video-container:hover {
    transform: scale(1.01);
}

/* Fix content boxes so they don't overflow */
.section-resonate .content-box {
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

/* Responsive adjustments */
@media (max-width: 991px) {
    .hero-with-thumbnail .container {
        flex-direction: column;
    }
    
    .hero-with-thumbnail .hero-left {
        flex: 0 0 100%;
        width: 100%;
        padding-right: 0;
        text-align: center;
        margin-bottom: 2rem;
    }
    
    .hero-with-thumbnail .hero-right {
        flex: 0 0 100%;
        width: 100%;
        padding: 0;
        margin: 20px 0;
        overflow: visible !important;
        position: relative;
    }
    
    .video-container {
        width: 85%;
        max-width: 600px;
    }
    
    /* Adjust vector decorations for tablet */
    .top-left-vector {
        top: -20px;
        left: 20px;
        width: 80px;
    }
    
    .bottom-right-vector {
        bottom: -30px;
        right: 20px;
        width: 100px;
    }
}

/* For larger screens - consolidated */
@media (min-width: 1400px) {
    .hero-background-image {
        width: 170%;
        top: -35%;
        left: -35%;
        transform: rotate(90deg);
    }
    
    .hero-with-thumbnail .hero-right {
        justify-content: center;
        padding: 60px;
    }
    
    .video-container {
        max-width: 700px;
        width: 85%;
    }
    
    .video-thumbnail {
        width: 100%;
    }
}

/* Clean up the pseudo-element since we're using a real element now */
.hero-with-thumbnail .hero-right:before {
    display: none;
}

/* Hero text styles */
.hero-title {
    color: var(--color-white);
    letter-spacing: 2px;
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 1rem;
}

.hero-sub-title {
    font-size: 28px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8) !important;
    margin-bottom: 1rem;
    display: block;
}

.hero-description {
    font-size: 22px;
    color: #FDFDFD;
    margin: 15px 0 30px;
    font-weight: 500;
    line-height: 1.6;
}

/* New styles for updated hero section */
.smaller-text {
    font-size: 20px;
    opacity: 0.9;
}

.description-container.shaded-bg {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    backdrop-filter: blur(5px);
    margin: 30px 0;
    padding: 20px;
}

.description-container.shaded-bg .hero-description {
    margin: 0;
}

/* Button styling */
.hero-left .button {
    display: inline-block;
    margin-right: 22px;
    margin-bottom: 10px;
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.video-container:hover .play-button {
    transform: translate(-50%, -50%) scale(1.1);
}

.play-icon {
    width: 80px;
    height: 80px;
    filter: drop-shadow(0px 4px 8px rgba(0, 0, 0, 0.2));
}

@media (max-width: 768px) {
    .play-icon {
        width: 60px;
        height: 60px;
    }
    
    section#hero-section {
        padding-top: 8rem !important;
        padding-bottom: 3rem !important;
        min-height: 100vh;
    }
    
    .hero-title {
        font-size: 2rem;
        margin-top: 1rem;
    }
    
    .hero-description {
        font-size: 18px;
        margin: 15px 0 25px;
    }
    
    .smaller-text {
        font-size: 18px;
    }

    .feature-text {
        padding-right: 0;
        margin-bottom: 2rem;
    }
    
    .feature-visuals {
        flex-direction: column;
    }
    
    .hero-with-thumbnail .hero-right {
        padding: 0;
        margin: 15px 0;
        overflow: visible !important;
    }
    
    /* Fix container padding on mobile */
    main.homepage .container,
    .section-data-surfer-features .container,
    .section-capabilities .container,
    .section-success-story .container,
    .section-take-word .container,
    .section-cost.section-why-surescale .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    /* Fix grid layout on mobile */
    .grid-cols-2 {
        grid-template-columns: 1fr !important;
    }

    .video-container {
        width: 85%;
        max-width: 600px;
    }
    
    .video-thumbnail {
        width: 100%;
    }
    
    /* Further adjust vectors for mobile */
    .top-left-vector {
        top: -15px;
        left: 15px;
        width: 60px;
    }
    
    .bottom-right-vector {
        bottom: -20px;
        right: 15px;
        width: 70px;
    }
}

@media (max-width: 480px) {
    .section-data-surfer-features h2 {
        font-size: 2rem;
    }
    
    .hero-left .button.primary-btn {
        margin-bottom: 1rem;
        display: block;
        width: 80%;
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-with-thumbnail .hero-left {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }
    
    .hero-title {
        font-size: 1.8rem;
        margin-top: 0.5rem;
        line-height: 1.3;
    }
    
    .hero-description {
        font-size: 18px;
        margin: 15px 0 30px;
    }
    
    .hero-sub-title {
        font-size: 22px;
    }
    
    .smaller-text {
        font-size: 16px;
    }

    
    .video-container {
        width: 85%;
        max-width: 550px;
    }
    
    .video-thumbnail {
        width: 100%;
    }
    
    /* Ensure small screens have usable padding */
    main.homepage .container,
    .section-data-surfer-features .container,
    .section-capabilities .container,
    .section-success-story .container,
    .section-take-word .container,
    .section-cost.section-why-surescale .container {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    /* Even smaller screens */
    .top-left-vector {
        top: -10px;
        left: 10px;
        width: 50px;
    }
    
    .bottom-right-vector {
        bottom: -15px;
        right: 10px;
        width: 60px;
    }
    
    .hero-with-thumbnail .hero-right {
        padding: 0;
        margin: 10px 0;
    }
}

/* Fix for any additional layout issues */
.section-data-surfer-features .container {
    position: relative;
    z-index: 2;
}

section.section-take-word {
    padding: 5rem 0;
    position: relative;
    background-color: #ffffff;
    background-image: radial-gradient(circle, #ece8fc 1.5px, transparent 1px);
    background-size: 24px 24px;
    background-position: center;
    background-repeat: repeat;
}

/* Ensure no white gap at the bottom of the page */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    background-color: #272833;
}

body.home {
    background-color: #272833;
}

main.full-height {
    min-height: 100vh;
}

/* Clean up the old background vector references */
.hero-background-vector,
.hero-background-image {
    display: none !important;
}

.hero-with-thumbnail .hero-right:before {
    display: none !important;
}

main.homepage {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Ensure all sections fit properly */
.homepage > section:last-child {
    flex: 1;
    margin-bottom: 0;
}

.section-resonate .content-box .box {
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.section-resonate .content-box .box-title {
    margin-top: 0;
    margin-bottom: 0;
}

/* Video Modal - Fix to ensure it's properly fixed when scrolling */
.video-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.modal-content {
    position: relative;
    width: 90%;
    max-width: 1000px;
    background-color: #000;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 16/9; /* Ensure horizontal video format */
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.5);
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    color: white;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10000;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
    transition: transform 0.2s ease;
}

#modalVideo {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain; /* Ensure video fits properly */
    background-color: #000;
}

/* Fix for any parent containers that might be causing overflow issues */
.hero-with-thumbnail {
    overflow: visible !important;
}

.container.hero {
    overflow: visible !important;
}

.hero-with-thumbnail .hero-right {
    overflow: visible !important;
}

/* Also ensure the video modal works correctly on mobile */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
    }
    
    .close-modal {
        top: 10px;
        right: 10px;
        font-size: 24px;
    }
}

.hero-description {
    font-size: 18px;
    margin: 15px 0 25px;
}

.smaller-text {
    font-size: 18px;
}


.feature-text {
    padding-right: 0;
    margin-bottom: 2rem;
}

.feature-visuals {
    flex-direction: column;
}

.hero-with-thumbnail .hero-right {
    padding: 0;
    margin: 15px 0;
    overflow: visible !important;
}

main.homepage .container,
.section-data-surfer-features .container,
.section-capabilities .container,
.section-success-story .container,
.section-take-word .container,
.section-cost.section-why-surescale .container {
    padding-left: 15px;
    padding-right: 15px;
}

.grid-cols-2 {
    grid-template-columns: 1fr !important;
}

.video-container {
    width: 85%;
    max-width: 550px;
}

.video-thumbnail {
    width: 100%;
}

.top-left-vector {
    top: -20px;
    left: 20px;
    width: 80px;
}

.bottom-right-vector {
    bottom: -30px;
    right: 20px;
    width: 100px;
}

.hero-description {
    font-size: 18px;
    margin: 15px 0 30px;
}

.hero-sub-title {
    font-size: 22px;
}

.smaller-text {
    font-size: 16px;
}


.video-container {
    width: 85%;
    max-width: 550px;
}

.video-thumbnail {
    width: 100%;
}

.top-left-vector {
    top: -20px;
    left: 20px;
    width: 80px;
}

.bottom-right-vector {
    bottom: -30px;
    right: 20px;
    width: 100px;
} 