/* Goals Section Image Size Reduction - Universal Fix */

/* Force hide image on ALL devices - most aggressive approach */
.goals-image {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    opacity: 0 !important;
    visibility: hidden !important;
    position: absolute !important;
    pointer-events: none !important;
    max-height: 0 !important;
    max-width: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
}

/* Reset image styles for desktop only */
@media (min-width: 992px) {
    .goals-image {
        display: block !important;
        width: auto !important;
        height: auto !important;
        overflow: visible !important;
        opacity: 1 !important;
        visibility: visible !important;
        position: relative !important;
        pointer-events: auto !important;
        flex: 1 !important;
    }
    
    .goals-image img {
        max-width: 70% !important;
        height: auto !important;
        display: block !important;
        margin: 0 auto !important;
        border-radius: 10px !important;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1) !important;
    }
}

/* Universal mobile layout improvements */
.goals {
    padding: 40px 0 !important;
    overflow: hidden !important; /* Prevent any overflow issues */
}

.goals h2 {
    font-size: 1.6rem !important;
    line-height: 1.3 !important;
    margin-bottom: 25px !important;
    padding: 0 15px !important;
    text-align: center !important;
}

/* Force column layout on all mobile devices */
.goals-content {
    flex-direction: column !important;
    width: 100% !important;
}

/* Equal width cards container */
.goals-cards {
    width: 100% !important;
    max-width: 500px !important;
    margin: 0 auto !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 15px !important;
}

/* Equal height and width for card rows */
.goals-row {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    gap: 15px !important;
    margin: 0 auto 15px auto !important;
}

/* Fixed height and equal width cards */
.goal-card {
    width: 100% !important; /* Full width */
    min-height: 200px !important; /* Fixed minimum height */
    display: flex !important;
    flex-direction: column !important;
    padding: 20px !important;
    text-align: center !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
    background-color: #fff !important;
    border-radius: 10px !important;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05) !important;
    box-sizing: border-box !important;
}

.goal-card:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1) !important;
}

/* Centered icon */
.goal-icon {
    margin: 0 auto 15px auto !important;
    width: 45px !important;
    height: 45px !important;
    font-size: 1.2rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Equal text styling */
.goal-card h3 {
    margin: 0 0 10px 0 !important;
    font-size: 1.2rem !important;
    height: auto !important;
    flex-shrink: 0 !important;
}

.goal-card p {
    font-size: 0.9rem !important;
    line-height: 1.5 !important;
    color: #666 !important;
    flex-grow: 1 !important;
    margin: 0 !important;
}

/* Specific fix for 480×1040 and similar tall/narrow devices */
@media (min-width: 320px) and (max-width: 767px) and (min-height: 800px),
       (width: 480px) and (height: 1040px),
       (max-width: 480px) {
    .goals-image {
        display: none !important;
        width: 0 !important;
        height: 0 !important;
        position: absolute !important;
        visibility: hidden !important;
    }
    
    .goals-content {
        flex-direction: column !important;
    }
    
    .goal-card {
        min-height: 180px !important;
        height: auto !important;
        width: 100% !important;
        margin-bottom: 15px !important;
        box-sizing: border-box !important;
    }
    
    .goals-row {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        margin-bottom: 0 !important;
    }
    
    .goal-card h3 {
        height: auto !important;
        min-height: 40px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .goal-card p {
        height: auto !important;
        min-height: 60px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
}

/* Tablet layout improvements with equal card sizes */
@media (min-width: 576px) and (max-width: 991px) {
    .goals {
        padding: 50px 0 !important;
    }
    
    .goals h2 {
        font-size: 1.8rem !important;
        margin-bottom: 30px !important;
    }
    
    .goals-row {
        flex-direction: row !important;
        flex-wrap: wrap !important;
    }
    
    .goal-card {
        flex: 1 1 calc(50% - 15px) !important; /* Equal width with gap consideration */
        min-height: 220px !important;
        padding: 25px !important;
    }
    
    .goal-icon {
        width: 50px !important;
        height: 50px !important;
        font-size: 1.4rem !important;
    }
    
    .goal-card h3 {
        font-size: 1.3rem !important;
    }
    
    .goal-card p {
        font-size: 0.95rem !important;
    }
}

/* Desktop layout */
@media (min-width: 992px) {
    .goals {
        padding: 80px 0 !important;
    }
    
    .goals h2 {
        font-size: 2rem !important;
        margin-bottom: 40px !important;
    }
    
    .goals-content {
        flex-direction: row !important;
        gap: 40px !important;
        align-items: center !important;
    }
    
    .goals-cards {
        flex: 1 !important;
        max-width: none !important;
    }
    
    .goals-row {
        flex-direction: row !important;
        gap: 20px !important;
        margin-bottom: 20px !important;
    }
    
    .goal-card {
        flex: 1 !important;
        min-height: 200px !important;
        text-align: left !important;
        padding: 25px !important;
    }
    
    .goal-icon {
        margin: 0 0 15px 0 !important;
    }
}
