/* Hero Section */
.hero {
    position: relative;
    background-color: var(--color-background-dark);
    color: var(--color-text-primary);
    text-align: center;
    padding: 14rem 0 15rem; /* Increased bottom padding from 12rem to 15rem */
    overflow: hidden;
    margin-top: -82px; /* Keep the negative margin to position behind the header */
    padding-top: 18rem; /* Increased padding-top from 16rem to 18rem */
}

.hero-interactive-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

#hero-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 1rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    color: #fff;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: glow 3s infinite alternate;
}

@keyframes glow {
    0% {
        text-shadow: 0 0 5px rgba(0, 255, 178, 0.3),
                     0 0 10px rgba(0, 255, 178, 0.1);
    }
    100% {
        text-shadow: 0 0 10px rgba(0, 255, 178, 0.5),
                     0 0 20px rgba(0, 255, 178, 0.3),
                     0 0 30px rgba(0, 255, 178, 0.1);
    }
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: #e0e0e0;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2rem;
}

/* Features Section */
.features {
    padding: 5rem 2rem; /* Added horizontal padding (2rem) */
    background-color: var(--color-background);
    text-align: center;
}

.features h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--color-text-primary);
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--color-text-secondary);
    margin-bottom: 3rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.8;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
}

.feature-card {
    background-color: var(--color-background-light);
    padding: 2rem;
    border-radius: 10px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.feature-card i {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--color-primary);
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--color-text-primary);
    display: flex;
    flex-direction: column;
    height: 3.5rem; /* Ensures consistent height for 2 lines */
    justify-content: center;
}

/* Apply word-by-word display to all feature headings */
.feature-card h3 span {
    display: block;
    line-height: 1.3;
}

.feature-card h3::after {
    content: "";
    display: block;
    width: 50px;
    height: 2px;
    background-color: var(--color-primary);
    margin: 0.5rem 0 0;
}

/* Innovation First -> Display as two separate words */
.features-grid .feature-card:nth-child(1) h3 {
    white-space: pre-line;
    content: "Innovation\nFirst";
}

/* Mobile Excellence -> Display as two separate words */
.features-grid .feature-card:nth-child(2) h3 {
    white-space: pre-line;
    content: "Mobile\nExcellence";
}

/* Community Focused -> Display as two separate words */
.features-grid .feature-card:nth-child(3) h3 {
    white-space: pre-line;
    content: "Community\nFocused";
}

/* Future Ready -> Display as two separate words */
.features-grid .feature-card:nth-child(4) h3 {
    white-space: pre-line;
    content: "Future\nReady";
}

.feature-card p {
    color: var(--color-text-secondary);
    line-height: 1.6;
}

/* CTA Section */
.cta {
    padding: 8rem 0;
    /* Replace the missing image with a gradient background */
    background: linear-gradient(135deg, rgba(18, 18, 24, 0.95), rgba(30, 30, 40, 0.9));
    background-size: cover;
    background-position: center;
    color: var(--color-text-primary);
    text-align: center;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    min-height: 400px;
}

/* Add a subtle pattern overlay */
.cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(0, 255, 178, 0.15), transparent 70%),
        radial-gradient(circle at 80% 70%, rgba(123, 97, 255, 0.1), transparent 60%);
    z-index: 1;
}

/* Add some subtle animated particles */
.cta::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 85% 15%, rgba(0, 255, 178, 0.2) 0%, transparent 25px),
        radial-gradient(circle at 15% 85%, rgba(123, 97, 255, 0.2) 0%, transparent 25px),
        radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50px);
    opacity: 0.7;
    z-index: 1;
    animation: pulse 8s infinite alternate ease-in-out;
}

@keyframes pulse {
    0% {
        opacity: 0.5;
        transform: scale(1);
    }
    100% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

.cta-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
}

.cta h2 {
    font-size: 3rem;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.cta p {
    font-size: 1.2rem;
    margin-bottom: 3rem;
    color: var(--color-text-secondary);
    line-height: 1.6;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta .btn {
    display: inline-block;
    width: auto;
    min-width: 200px; /* Base minimum width */
    max-width: 280px; /* Reasonable max-width for most screens */
    margin: 0 auto; /* Center the button */
    padding: 12px 35px; /* Good amount of horizontal padding */
    line-height: 1.5;
    display: flex;
    justify-content: center;
    align-items: center;
}

@media (max-width: 576px) {
    .cta .btn {
        min-width: 180px; /* Slightly smaller on mobile */
        max-width: 85%; /* Percentage-based width for small screens */
        padding: 12px 25px; /* Reduced padding on small screens */
    }
}

/* Product Showcase Section */
.product-showcase {
    padding: 4rem 0;
    background: var(--color-surface);
    margin: 4rem -2rem;
}

.showcase-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    padding: 0 2rem;
}

.showcase-text h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.feature-list {
    list-style: none;
    padding: 0;
    margin: 2rem 0;
}

.feature-list li {
    margin: 1rem 0;
    display: flex;
    align-items: center;
    color: var(--color-text-secondary);
}

.feature-list li i {
    color: var(--color-primary);
    margin-right: 1rem;
}

.showcase-image {
    position: relative;
}

.showcase-image img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.1);
}

.showcase-image::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: 10px;
    bottom: 10px;
    border: 2px solid var(--color-primary);
    border-radius: 8px;
    z-index: -1;
}

/* Responsive Design */
@media (max-width: 768px) {
    .showcase-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .showcase-text {
        order: 2;
    }

    .showcase-image {
        order: 1;
    }
}

/* Company Vision Section */
.company-vision {
    padding: 8rem 0;
    background-color: var(--color-background-dark);
    position: relative;
    overflow: hidden;
    min-height: 400px;
    display: flex;
    align-items: center;
}

.company-vision::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: radial-gradient(circle at 70% 30%, rgba(0, 255, 178, 0.1), transparent 60%);
    z-index: 1;
}

.vision-content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 2;
    width: 100%;
}

.vision-text {
    flex: 1;
    min-width: 300px;
    padding-right: 0;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.vision-text h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--color-text-primary);
    position: relative;
    display: inline-block;
}

.vision-text h2::after {
    content: none; /* Removes the underline */
}

.vision-text p {
    color: var(--color-text-secondary);
    line-height: 1.8;
    font-size: 1.1rem;
}

.vision-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
    margin-top: 2rem;
    width: 100%;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: rgba(0, 0, 0, 0.2);
    padding: 1.5rem;
    border-radius: 10px;
    border: 1px solid rgba(0, 255, 178, 0.1);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.stat-item:hover {
    transform: translateY(-5px);
    border-color: var(--color-primary);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--color-primary);
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-label {
    font-size: 1rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Responsive adjustments */
@media (max-width: 1400px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        padding: 0 var(--content-padding);
    }
}

@media (max-width: 992px) {
    .hero h1 {
        font-size: 3.5rem;
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .vision-content {
        flex-direction: column;
    }
    
    .vision-text {
        padding-right: 0;
        margin-bottom: 3rem;
    }
    
    .vision-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .hero {
        min-height: 100vh;
        padding: 180px 0 120px; /* Reduced from 200px to 180px (20px less) */
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
    
    .hero-content {
        margin-top: 0;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding-top: 0; /* Reduced from 2vh to 0 to move content up further */
    }
    
    .hero-image {
        max-width: 65%;
        margin-top: 0;
        margin-bottom: 3.5rem;
    }
    
    .hero h1 {
        font-size: 3rem;
    }
    
    .hero-subtitle {
        font-size: 1.25rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
        max-width: 250px;
        margin: 1rem auto 0;
    }
    
    .features h2, .vision-text h2, .cta h2 {
        font-size: 2rem;
    }
    
    .vision-stats {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .vision-stats {
        display: grid;
        grid-template-areas:
            "products"
            "founded support";
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
    }
    
    .vision-stats .stat-item:nth-child(1) {
        grid-area: founded;
    }
    
    .vision-stats .stat-item:nth-child(2) {
        grid-area: products;
    }
    
    .vision-stats .stat-item:nth-child(3) {
        grid-area: support;
    }
}

@media (max-width: 576px) {
    .hero {
        min-height: 100vh;
        padding: 160px 0 100px;
        justify-content: center;
    }
    
    .hero-content {
        padding-top: 3vh;
    }
    
    .hero-image {
        max-width: 78%;
        margin-top: 0;
        margin-bottom: 4rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .vision-stats {
        gap: 1.5rem;
    }
    
    .cta h2 {
        font-size: 1.75rem;
    }
    
    .cta p {
        font-size: 1.1rem;
    }
    
    .vision-content {
        padding: 1.5rem;
        justify-content: center;
        text-align: center;
    }
    
    .vision-text {
        min-width: auto;
        width: 100%;
        padding: 0;
        margin: 0 auto;
        max-width: 100%;
    }
    
    .vision-stats {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        padding: 0;
        margin-left: auto;
        margin-right: auto;
    }
    
    .stat-item {
        width: 100%;
        max-width: 280px;
    }
    
    .company-vision {
        padding: 4rem 0;
        width: 100%;
        box-sizing: border-box;
        display: flex;
        justify-content: center;
        align-items: center;
    }
}

@media (min-width: 2560px) {
    .features-grid {
        max-width: 1800px;
        gap: 3rem;
    }
}

/* Ultrawide optimization */
@media (min-width: 1800px) {
    .hero, .company-vision, .cta {
        width: 100vw;
        margin-left: calc(-50vw + 50%);
        margin-right: calc(-50vw + 50%);
    }
    
    .hero-content, .vision-content, .cta-content {
        max-width: 80%;
        padding: 0 2.5vw;
    }
    
    .features-grid {
        max-width: 80%;
        gap: 3rem;
    }
}

/* Between 550px and 768px - the sweet spot for our 2-column layout */
@media (min-width: 550px) and (max-width: 768px) {
    .vision-stats {
        grid-template-columns: 1fr 1fr;
        grid-template-areas:
            "products products"
            "founded support";
    }
    
    .vision-stats .stat-item:nth-child(2) {
        grid-column: span 2;
    }
}

@media (max-width: 550px) {
    .vision-stats {
        grid-template-columns: 1fr;
        grid-template-areas:
            "products"
            "founded"
            "support";
    }
}

/* Hero image styling - reduced size */
.hero-image {
    max-width: 60%; /* Reduced from 100% to 60% */
    height: auto;
    display: block;
    margin: 0 auto 2rem;
    object-fit: contain;
}

/* Responsive styling for the hero image */
@media (max-width: 1400px) {
    .hero-image {
        max-width: 50%; /* Reduced from 90% to 50% */
    }
}

/* New media query for screens between 1800px and 2559px */
@media (min-width: 1800px) and (max-width: 2559px) {
    .hero-image {
        max-width: 45%; /* Reduced size for large screens but not ultrawide */
    }
}

@media (min-width: 2560px) {
    .hero-image {
        max-width: 40%; /* Reduced from 70% to 40% */
    }
}

/* Cool dynamic visual element */
.cyber-visual {
    position: absolute;
    bottom: 5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 200px;
    opacity: 0;
    transition: opacity 0.8s ease 0.6s;
    z-index: -1;
}

.mobile-menu.open .cyber-visual {
    opacity: 1;
}

/* Pulsing circle */
.cyber-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(0, 230, 118, 0.05);
    box-shadow: 0 0 30px rgba(0, 230, 118, 0.2);
    animation: pulseCircle 4s infinite ease-in-out;
}

.cyber-circle::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 1px solid rgba(0, 230, 118, 0.3);
    animation: pulseCircle 4s infinite ease-in-out 0.5s;
}

.cyber-circle::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 184, 212, 0.05);
    box-shadow: 0 0 20px rgba(0, 184, 212, 0.2);
    animation: pulseCircle 4s infinite ease-in-out 1s;
}

/* Rotating hexagon */
.cyber-hexagon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 120px;
    animation: rotateHexagon 20s infinite linear;
}

.cyber-hexagon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(60deg, transparent 0%, transparent 49.5%, rgba(0, 230, 118, 0.2) 50%, transparent 50.5%, transparent 100%),
        linear-gradient(120deg, transparent 0%, transparent 49.5%, rgba(0, 230, 118, 0.2) 50%, transparent 50.5%, transparent 100%),
        linear-gradient(180deg, transparent 0%, transparent 49.5%, rgba(0, 230, 118, 0.2) 50%, transparent 50.5%, transparent 100%),
        linear-gradient(240deg, transparent 0%, transparent 49.5%, rgba(0, 230, 118, 0.2) 50%, transparent 50.5%, transparent 100%),
        linear-gradient(300deg, transparent 0%, transparent 49.5%, rgba(0, 230, 118, 0.2) 50%, transparent 50.5%, transparent 100%),
        linear-gradient(360deg, transparent 0%, transparent 49.5%, rgba(0, 230, 118, 0.2) 50%, transparent 50.5%, transparent 100%);
}

/* Scanning line */
.cyber-scan {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.cyber-scan::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 300%;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(0, 230, 118, 0) 20%, 
        rgba(0, 230, 118, 0.5) 50%, 
        rgba(0, 230, 118, 0) 80%, 
        transparent 100%);
    animation: scanLine 3s infinite ease-in-out;
    box-shadow: 0 0 8px rgba(0, 230, 118, 0.5);
}

/* Data points */
.data-points {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.data-point {
    position: absolute;
    width: 3px;
    height: 3px;
    background: rgba(0, 230, 118, 0.7);
    border-radius: 50%;
    box-shadow: 0 0 5px rgba(0, 230, 118, 0.7);
}

.data-point:nth-child(1) {
    top: 20%;
    left: 30%;
    animation: blinkPoint 2s infinite alternate ease-in-out;
}

.data-point:nth-child(2) {
    top: 70%;
    left: 60%;
    animation: blinkPoint 3s infinite alternate-reverse ease-in-out;
}

.data-point:nth-child(3) {
    top: 40%;
    left: 80%;
    animation: blinkPoint 2.5s infinite alternate ease-in-out 0.5s;
}

.data-point:nth-child(4) {
    top: 80%;
    left: 20%;
    animation: blinkPoint 4s infinite alternate-reverse ease-in-out 1s;
}

.data-point:nth-child(5) {
    top: 30%;
    left: 50%;
    animation: blinkPoint 3.5s infinite alternate ease-in-out 1.5s;
}

/* Animations */
@keyframes pulseCircle {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.5;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0.8;
    }
}

@keyframes rotateHexagon {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

@keyframes scanLine {
    0% {
        top: -10%;
        opacity: 0;
    }
    20% {
        opacity: 1;
    }
    80% {
        opacity: 1;
    }
    100% {
        top: 110%;
        opacity: 0;
    }
}

@keyframes blinkPoint {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.5);
    }
}

/* Responsive adjustments */
@media (max-height: 700px) {
    .cyber-visual {
        bottom: 4rem;
        transform: translateX(-50%) scale(0.8);
    }
}

@media (max-height: 500px) {
    .cyber-visual {
        bottom: 3rem;
        transform: translateX(-50%) scale(0.6);
    }
}

@media (max-width: 400px) {
    .vision-stats {
        gap: 1rem; /* Even smaller gap for very small screens */
    }
    
    .stat-item {
        padding: 0.75rem; /* Further reduced padding */
    }
    
    .stat-number {
        font-size: 1.75rem; /* Further reduced font size */
    }
    
    .stat-label {
        font-size: 0.85rem; /* Smaller label text */
    }
}

@media (max-width: 768px) {
    .features {
        padding: 4rem 2.5rem; /* Increased horizontal padding on smaller screens */
    }
    
    .features-grid {
        gap: 1.5rem;
    }
}

@media (max-width: 576px) {
    .features {
        padding: 3rem 2rem; /* Maintained horizontal padding on very small screens */
    }
    
    .section-subtitle {
        padding: 0 1rem; /* Added padding to the subtitle for better spacing */
    }
}

/* New media query for the gap between 576px and 428px */
@media (min-width: 429px) and (max-width: 576px) {
    .hero-image {
        max-width: 79%; /* Set a value between the larger and smaller breakpoints */
    }
}

/* Add a new media query specifically for iPhone 14 and similar sized devices */
@media (max-width: 428px) {
    .hero-content {
        padding-top: 1vh;
    }
    
    .hero-image {
        max-width: 80%; /* This now creates a smoother transition from the 79% above */
        margin-bottom: 3rem;
    }
    
    .hero-buttons {
        margin-top: 0.5rem;
    }
}

/* Even more specific for iPhone 14 Pro Max and similar */
@media (min-width: 390px) and (max-width: 428px) {
    .hero-image {
        max-width: 82%; /* Reduced from 88% to make logo smaller */
    }
} 