* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif !important;
}

html, body {
    width: 100%;
    overflow-x: hidden;
    background-color: #0b1a4a;
}

/* =========================
   HERO SECTION
========================= */
.features-hero {
    padding: 120px 8% 80px;
    background: linear-gradient(90deg, #0b051f 0%, #3a0205 70%, #ba000b 100%);
    color: #fff;
    text-align: center;
}

.features-hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.features-hero p {
    max-width: 700px;
    margin: 0 auto;
    font-size: 1.05rem;
    line-height: 1.6;
    opacity: 0.9;
    
}

/* =========================
   FEATURES SECTION
========================= */
.features-section {
    padding: 90px 8%;
    background-color: #0b051f;
    color: #fff;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 30px;
}

/* =========================
   FEATURE CARD
========================= */
.feature-card {
    padding: 32px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.35);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    cursor: pointer;
}

.feature-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}

.feature-card h3 {
    font-size: 1.2rem;
    margin-bottom: 12px;
    font-weight: 600;
}

.feature-card p {
    font-size: 0.95rem;
    line-height: 1.6;
    opacity: 0.9;
}

/* =========================
   HERO SECTION
========================= */
.features-hero {
    padding: 120px 8% 80px;
    background: linear-gradient(90deg, #0b051f 0%, #3a0205 70%, #ba000b 100%);
    color: #fff;
    text-align: center;
}

.features-hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.features-hero p {
    max-width: 700px;
    margin: 0 auto;
    font-size: 1.05rem;
    line-height: 1.6;
    opacity: 0.9;
}

/* =========================
   FEATURES GRID
========================= */
.features-section {
    padding: 90px 8%;
    background-color: #0b051f;
    color: #fff;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 30px;
}

/* =========================
   FEATURE CARD
========================= */
.feature-card {
    padding: 32px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.06); /* normal state */
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.35);
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
    cursor: pointer;
}

.feature-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
    background: rgba(158, 61, 61, 0.3); /* darker background on hover */
}

.feature-card h3 {
    font-size: 1.2rem;
    margin-bottom: 12px;
    font-weight: 600;
}

.feature-card p {
    font-size: 0.95rem;
    line-height: 1.6;
    opacity: 0.9;
}

/* =========================
   FEATURE POP-UPS
========================= */
.feature-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(6px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999;
}

.feature-overlay.active {
    display: flex;
}

.feature-overlay .feature-modal {
    background: linear-gradient(145deg, #0f0826, #150a35);
    border-radius: 24px;
    padding: 40px;
    width: 90%;
    max-width: 900px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
    animation: popIn 0.25s ease;
    position: relative;

}

.feature-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.feature-header h3 {
    font-size: 1.8rem;
    margin: 0;
}

.feature-modal-text .p {
    text-align: justify;   /* aligns both left and right edges */
    text-justify: inter-word; /* improves spacing for justified text */
    color: #fff;
}


.close-btn {
    position: absolute;
    top: 10px;
    left: 15px;
    background: transparent;
    border: none;
    font-size: 2rem;
    color: #fff;
    cursor: pointer;
    line-height: 1;
    z-index: 10;
}

.feature-overlay .feature-modal-image {
    width: 420px;
    height: 300px;
}

.feature-overlay .feature-modal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 16px;
}

.features-section .features-icon img {
  display: block;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 40px;
  width: 35%;
}

.feature-modal-image img {
    width: 100%;        
    max-width: 400px;   
    height: auto;       
    max-height: 420px;  
    object-fit: cover;  
    border-radius: 18px;
}

.feature-body p {
    font-size: 1rem;
    line-height: 1.7;
    color: #fff;
    opacity: 0.9;
}

#featureTitle {
    margin-bottom: 30px;
}

.feature-modal-content { /*===POP-UP TEXT AND IMAGE==*/
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 40px;
    align-items: center;
}




@keyframes popIn {
    0% {
        transform: scale(0.95);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}


@media (max-width: 768px) {
    .feature-overlay .feature-modal {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 30px;
    }

    .features-hero h1 {
        font-size: 2.2rem;
    }

    .features-hero p {
        font-size: 1rem;
    }
}


/* =========================
   ANIMATIONS
========================= */
@keyframes popIn {
    0% {
        transform: scale(0.95);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* =========================
   RESPONSIVE FIXES
========================= */
@media (max-width: 768px) {
    .feature-modal-content {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 30px;
    }
}
