.features-hero {
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.9), rgba(46, 204, 113, 0.9));
    padding: 100px 0;
    margin-bottom: 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.features-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../images/features/hero-bg.png') center/cover;
    opacity: 0.1;
    z-index: 0;
}

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

.hero-content h1 {
    font-size: 3.5em;
    margin-bottom: 20px;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.hero-content .subtitle {
    font-size: 1.5em;
    color: rgba(255,255,255,0.9);
    margin-bottom: 30px;
}

.features-section {
    padding: 40px 0;
    margin-bottom: 40px;
}

.features-section h2 {
    text-align: center;
    margin-top: 5%;
    margin-bottom: 20px;
    font-size: 2.2em;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.features-section h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #3498db, #2ecc71);
    border-radius: 3px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin: 30px auto;
    max-width: 1400px;
    padding: 0 20px;
}

/* Special layout for Floor 7 automation section */
.features-section:first-of-type .features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

/* Center the bottom two cards */
.features-section:first-of-type .features-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
}

.features-section:first-of-type .features-grid .feature-card {
    flex: 0 1 calc(33.333% - 20px);
}

.features-section:first-of-type .features-grid .feature-card:nth-child(4),
.features-section:first-of-type .features-grid .feature-card:nth-child(5) {
    flex: 0 1 calc(33.333% - 20px);
    margin-top: 30px;
}

/* Other sections keep original 3-column layout */
.features-section:not(:first-of-type) .features-grid {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
}

@media (max-width: 1200px) {
    .features-section:first-of-type .features-grid .feature-card {
        flex: 0 1 calc(50% - 15px);
    }

    .features-section:first-of-type .features-grid .feature-card:nth-child(3) {
        flex: 0 1 calc(100% - 30px);
    }

    .features-section:first-of-type .features-grid .feature-card:nth-child(4),
    .features-section:first-of-type .features-grid .feature-card:nth-child(5) {
        flex: 0 1 calc(50% - 15px);
    }
}

@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.5em;
    }

    .hero-content .subtitle {
        font-size: 1.2em;
    }

    .features-section h2 {
        font-size: 1.8em;
        padding: 0 15px;
    }

    .features-grid {
        grid-template-columns: 1fr;
        padding: 0 15px;
    }
    
    .features-section:first-of-type .features-grid .feature-card,
    .features-section:first-of-type .features-grid .feature-card:nth-child(3),
    .features-section:first-of-type .features-grid .feature-card:nth-child(4),
    .features-section:first-of-type .features-grid .feature-card:nth-child(5) {
        flex: 0 1 100%;
        margin-top: 30px;
    }

    .feature-card {
        margin-bottom: 20px;
    }

    .feature-content {
        padding: 20px;
    }

    .feature-image {
        height: 180px;
    }
}

.feature-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.05), rgba(52, 152, 219, 0.05));
    backdrop-filter: blur(10px);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.2);
    border-color: rgba(52, 152, 219, 0.2);
}

.feature-image {
    width: 100%;
    height: 200px;
    position: relative;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.feature-card:hover .feature-image img {
    transform: scale(1.05);
}

/* Special styling for Floor 7 automation cards */
.f7-automation .feature-image {
    width: 48px;
    height: 48px;
    position: absolute;
    top: 20px;
    left: 20px;
    overflow: hidden;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
}

.f7-automation .feature-svg {
    width: 40px;
    height: 40px;
    image-rendering: pixelated;
    transform-origin: center;
    transition: transform 0.3s ease;
    display: block;
    object-fit: contain;
    background: rgba(0, 0, 0, 0.2);
    box-sizing: content-box;
    border: 4px solid rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.feature-card:hover .feature-svg {
    transform: scale(1.1);
}

.f7-automation .feature-content {
    padding-left: 80px;
}

.feature-content {
    padding: 25px;
    position: relative;
}

.feature-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(52, 152, 219, 0.2), transparent);
}

@keyframes gradientFlow {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.feature-content h3 {
    color: #fff;
    margin-bottom: 15px;
    font-size: 1.4em;
    position: relative;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
    background: linear-gradient(90deg, #fff, #3498db, #fff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    background-size: 200% auto;
    animation: gradientFlow 3s ease infinite;
}

.feature-content p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 20px;
    line-height: 1.6;
    font-size: 1em;
}

.feature-content ul {
    list-style-type: none;
    padding: 0;
}

.feature-content li {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 10px;
    padding-left: 25px;
    position: relative;
    font-size: 1em;
}

.feature-content li:before {
    content: "→";
    background: linear-gradient(90deg, #3498db, #2ecc71);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    position: absolute;
    left: 0;
    font-weight: bold;
}

/* Remove the old color filters */
.feature-svg {
    width: 32px;
    height: 32px;
    opacity: 1;
    transition: all 0.3s ease;
    object-fit: contain;
}

.feature-card:hover .feature-svg {
    transform: scale(1.1);
}

/* Pre-order button container */
.pre-order-container {
    text-align: center;
    margin: 20px 0;
    padding: 0 20px;
}

/* Pre-order button styling */
.pre-order-button {
    display: inline-flex;
    align-items: center;
    padding: 15px 30px;
    font-size: 1.2em;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #3498db, #2ecc71);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.pre-order-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
    background: linear-gradient(135deg, #2ecc71, #3498db);
}

.pre-order-button svg {
    margin-left: 10px;
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.pre-order-button:hover svg {
    transform: translateX(5px);
}

/* Floating pre-order button */
.floating-pre-order {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 100;
    padding: 12px 25px;
    font-size: 1.1em;
}

@media (max-width: 768px) {
    .floating-pre-order {
        bottom: 20px;
        right: 20px;
        padding: 10px 20px;
        font-size: 1em;
    }
}