* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.packages-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: clamp(30px, 5vw, 50px) clamp(10px, 2vw, 20px);
    background: transparent;
    margin-top: -30px;
    max-width: 1920px; /* Caps width for ultra-wide screens */
    margin-left: auto;
    margin-right: auto;
}

.packages-header {
    font-size: clamp(2em, 4vw, 3.5em); /* Slightly smaller min for narrow screens */
    color: #fff;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    text-shadow: 0 0 8px rgba(75, 0, 130, 0.5);
    margin-bottom: clamp(20px, 3vw, 40px);
    position: relative;
    text-align: center; /* Ensures centering on all sizes */
}

.packages-header::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 40%;
    height: 3px;
    background: #4b0082;
    border-radius: 2px;
    transition: width 0.3s ease;
}

.packages-header:hover::after {
    width: 60%;
}

.flex-container {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    gap: clamp(10px, 2vw, 20px); /* Dynamic gap */
    width: 100%;
}

.panel {
    background: rgba(255, 255, 255, 0.7);
    border: 2px solid #e6e6e6;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: clamp(15px, 2vw, 20px); /* Dynamic padding */
    position: relative;
    color: #333;
    box-shadow: 0 15px 25px rgba(0, 0, 0, 0.05);
    transition: all 0.35s ease;
    flex: 1; /* Panels shrink/grow equally */
    min-width: clamp(200px, 20%, 300px); /* Minimum width for readability */
    overflow: visible;
    overflow-wrap: break-word; /* Prevents text overflow */
}

.panel:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.03);
    box-shadow: 0 20px 30px rgba(75, 0, 130, 0.1);
}

.panel.middle {
    background: rgba(75, 0, 130, 0.7);
    border: 2px solid #fff;
    color: #fff;
}

.panel.middle:hover {
    background: rgba(75, 0, 130, 1);
    transform: scale(1.03);
    box-shadow: 0 20px 30px rgba(75, 0, 130, 0.1);
}

.panel.middle::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 0;
}

.panel.middle:hover::before {
    opacity: 1;
}

.panel h3.h2 {
    margin: 0 !important;
    font-weight: 700;
    font-size: clamp(16px, 2vw, 20px); /* Dynamic title size */
    padding: clamp(6px, 1vw, 8px);
    line-height: 1.5; /* Adjusted for readability */
    letter-spacing: 1px;
    color: #4b0082;
    text-align: center;
    font-family: 'Poppins', sans-serif;
    position: relative;
    z-index: 1;
}

.panel.middle h3.h2 {
    color: #fff;
}

.panel ul.list-unstyled {
    list-style: none;
    padding-left: 0;
    margin: 0 0 clamp(10px, 2vw, 15px);
    position: relative;
    z-index: 1;
}

.panel li.price {
    margin-top: clamp(10px, 2vw, 15px);
    text-align: center;
}

.panel span.h3 {
    font-size: clamp(25px, 4vw, 55px); /* Adjusted for smaller screens */
    font-style: normal;
    font-weight: 600;
    line-height: 1;
    letter-spacing: -1px; /* Slightly reduced */
    color: #4b0082;
    font-family: 'Poppins', sans-serif;
    word-wrap: break-word;
}

.panel.middle span.h3 {
    color: #fff;
}

.panel p.website {
    font-style: normal;
    font-weight: 500;
    font-size: clamp(24px, 1.5vw, 16px); /* Dynamic subtitle */
    line-height: 1.25;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #666;
    margin-top: clamp(20px, 3vw, 30px);
    margin-bottom: clamp(15px, 2vw, 20px) !important;
    font-family: 'Poppins', sans-serif;
    position: relative;
    z-index: 1;
}

.panel.middle p.website {
    color: #d8d8d8;
}

.panel ul.features {
    display: table;
    margin: 0 auto;
    text-align: left;
    list-style: none;
    padding-left: 0;
    position: relative;
    z-index: 1;
}

.panel ul.features li {
    display: flex;
    align-items: center;
    gap: clamp(6px, 1vw, 8px);
    color: #555;
    font-family: 'Poppins', sans-serif;
    font-size: clamp(20px, 1.2vw, 13px); /* Dynamic feature text */
}

.panel.middle ul.features li {
    color: #fff;
}

.panel .checkmark {
    display: inline-block;
    transform: rotate(45deg);
    height: clamp(10px, 1.5vw, 14px);
    width: clamp(6px, 1vw, 8px);
    margin-left: clamp(10px, 1.5vw, 15px);
    border-bottom: 2px solid #4b0082;
    border-right: 2px solid #4b0082;
    margin-right: clamp(10px, 1.5vw, 15px);
    transition: transform 0.3s ease;
}

.panel.middle .checkmark {
    border-bottom: 2px solid #fff;
    border-right: 2px solid #fff;
}

.panel:hover .checkmark {
    transform: rotate(45deg) scale(1.2);
}

.panel a.get-started-btn {
    margin: clamp(15px, 2vw, 20px) auto clamp(8px, 1vw, 10px);
    background: #4b0082;
    color: #fff;
    line-height: 1;
    padding: clamp(0.8rem, 1.5vw, 1rem) clamp(2rem, 3vw, 4rem);
    display: block;
    cursor: pointer;
    box-shadow: none;
    transition: all 0.35s ease;
    font-size: clamp(1rem, 1.5vw, 1.2rem);
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    border: none;
    text-align: center;
    text-decoration: none;
    border-radius: 8px;
    position: relative;
    z-index: 1;
}

.panel.middle a.get-started-btn {
    background: #fff;
    color: #4b0082;
}

.panel a.get-started-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(75, 0, 130, 0.3);
}

/* Tablet/Mobile+ Range: 2x2 grid (481px - 1024px) */
@media (max-width: 1024px) and (min-width: 481px) {
    .flex-container {
        flex-wrap: wrap;
        justify-content: center;
    }

    .panel {
        flex: 0 0 calc(50% - 10px); /* Two panels per row */
        min-width: 0;
        max-width: calc(50% - 10px);
    }
}

/* Mobile: Single column (≤480px) */
@media (max-width: 480px) {
    .flex-container {
        flex-direction: column;
        align-items: center;
    }

    .panel {
        flex: none;
        width: 90%;
        max-width: 400px;
        min-height: 400px;
    }
    
    

    .panel span.h3 {
        font-size: clamp(30px, 10vw, 55px); /* Larger min for mobile */
    }
}