/* ==================================== */
/* 0. Import Google Fonts for a Modern Look */
/* ==================================== */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700&family=Poppins:wght@300;400;600;700&display=swap');

/* 🌈 Design System with :root */
:root {
    --color-primary: #1e3c72;
    --color-primary-light: #2a5298;
    --color-accent: #9d50bb;
    --color-accent-dark: #6e48aa;
    --color-bg: #f9f9f9;
    --color-text: #222;
    --color-white: #fff;
    --color-text-light: #555; /* Added for subtitle/description */
    --color-border: #eee;    /* Added for subtle borders */
    --color-success: #28a745; /* For check icons */

    --gradient-primary: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
    --gradient-accent: linear-gradient(135deg, var(--color-accent), var(--color-accent-dark));

    /* Spacing variables for consistency */
    --spacing-xs: 5px;
    --spacing-sm: 10px;
    --spacing-md: 20px;
    --spacing-lg: 40px; /* Increased for more space */
    --spacing-xl: 60px; /* Increased for section padding */
    --spacing-xxl: 80px;

    /* Other design tokens */
    --border-radius: 12px; /* Slightly larger for modern look */
    --box-shadow-sm: 0 4px 8px rgba(0, 0, 0, 0.08);
    --box-shadow-md: 0 8px 16px rgba(0, 0, 0, 0.1);
    --box-shadow-lg: 0 12px 24px rgba(0, 0, 0, 0.15);
}

/* 🛠️ Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Base font for the body */
body {
    font-family: 'Poppins', sans-serif; /* Poppins for general text */
    color: var(--color-text);
    line-height: 1.6; /* Improved readability */
    font-size: 16px; /* Base font size */
}


/* ==================================== */
/* 1. Pricing Section Layout */
/* ==================================== */
.pricing-section {
    padding: var(--spacing-xxl) var(--spacing-lg); /* Increased overall padding */
    text-align: center;
    background-color: var(--color-bg); /* Use your light background */
}

.pricing-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.8em; /* Adjusted: Smaller for better balance */
    color: var(--color-primary);
    margin-bottom: var(--spacing-md); /* Increased margin */
    position: relative;
    padding-bottom: 15px; /* More space for underline */
}

.pricing-title::after { /* Underline effect for title */
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 100px; /* Slightly wider underline */
    height: 5px;
    background: var(--gradient-accent);
    border-radius: 2px;
}

.pricing-subtitle {
    font-family: 'Poppins', sans-serif;
    font-size: 1.15em; /* Adjusted: Slightly smaller */
    color: var(--color-text-light);
    margin-bottom: var(--spacing-xl); /* Increased margin to separate from grid */
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6; /* Ensure good line spacing */
}

.plan-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); /* Slightly wider min-width */
    gap: var(--spacing-xl); /* Significantly increased space between cards */
    justify-content: center; /* Center cards in the grid */
    margin-top: var(--spacing-lg); /* Maintain separation */
    max-width: 1200px; /* Optional: limit overall grid width */
    margin-left: auto;
    margin-right: auto;
}

/* ==================================== */
/* 2. Individual Plan Card */
/* ==================================== */
.plan-card {
    background-color: var(--color-white);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow-md); /* Subtle initial shadow */
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--color-border); /* Subtle border */
    position: relative; /* For the ribbon effect */
    /* max-width: 350px; REMOVED: grid handles width better */
    margin: 0 auto; /* Center the card horizontally within its grid cell */
    padding: 0; /* Remove padding here, handled by internal sections */
    color: var(--color-text);
    font-family: 'Poppins', sans-serif;
    text-align: center; /* Center text in the card */
}

.plan-card:hover {
    transform: translateY(-10px); /* Lift effect on hover */
    box-shadow: var(--box-shadow-lg); /* More pronounced shadow on hover */
}

/* Header Section of the Card */
.plan-header {
    background: var(--gradient-primary); /* Primary gradient for header */
    color: var(--color-white);
    padding: var(--spacing-lg) var(--spacing-md); /* Consistent padding */
    text-align: center;
    position: relative;
    z-index: 1;
}

.plan-card:nth-child(2) .plan-header { /* Style for a potential "Popular" plan */
    background: var(--gradient-accent); /* Accent gradient for the middle/popular plan */
}

.plan-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.8em; /* Adjusted: Smaller for better hierarchy */
    margin-bottom: var(--spacing-xs);
    color: inherit; /* Inherit color from header (white) */
}

.plan-price {
    font-family: 'Poppins', sans-serif;
    font-size: 2.5em; /* Adjusted: Slightly smaller */
    font-weight: 700;
    line-height: 1.2; /* Adjusted for better spacing below price */
    display: block; /* Make it block for better spacing */
    margin-bottom: var(--spacing-sm); /* Added margin below price */
}

.plan-price span {
    display: inline-block;
}

.plan-interval {
    font-size: 0.6em; /* Smaller for interval text */
    opacity: 0.8;
    margin-left: 5px;
}

/* Body Section of the Card */
.plan-body {
    padding: var(--spacing-md); /* Consistent padding */
    flex-grow: 1; /* Allows body to take available space */
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Space out description and features */
}

.plan-description {
    font-size: 0.95em; /* Adjusted: Slightly smaller for body text */
    color: var(--color-text-light);
    margin-bottom: var(--spacing-md);
    line-height: 1.6; /* Improved readability */
}

.plan-features {
    list-style: none; /* Remove default list style */
    padding: 0;
    margin-top: var(--spacing-md); /* Added top margin to separate from description */
    margin-bottom: var(--spacing-md); /* Consistent bottom margin */
    text-align: left;
}

.plan-features li {
    font-size: 0.9em; /* Adjusted: Slightly smaller for feature list */
    color: var(--color-text);
    margin-bottom: var(--spacing-sm); /* Increased space between list items */
    display: flex;
    align-items: flex-start; /* Align icon and text to top */
    gap: var(--spacing-sm); /* Increased gap between icon and text */
}

.plan-features li i { /* For Font Awesome check icons */
    color: var(--color-success); /* Green checkmark */
    font-size: 1.2em; /* Slightly larger icon */
    flex-shrink: 0; /* Prevent icon from shrinking */
    padding-top: 2px; /* Small adjustment for visual alignment */
}

/* Footer Section of the Card */
.plan-footer {
    padding: var(--spacing-md); /* Consistent padding */
    text-align: center;
}

.plan-subscribe-btn {
    background: var(--gradient-accent); /* Accent gradient for the button */
    color: var(--color-white);
    width: 100%; /* Make button full width of card footer */
    padding: 14px 0; /* Slightly reduced padding to balance with font size */
    font-size: 1em; /* Adjusted: Slightly smaller for button text */
    font-weight: 600;
    border-radius: 50px; /* Pill-shaped button */
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
    border: none; /* Ensure no default button border */
    cursor: pointer; /* Indicate it's clickable */
}

.plan-subscribe-btn:hover {
    background: var(--color-accent-dark); /* Darker accent on hover */
    transform: translateY(-3px);
    box-shadow: var(--box-shadow-sm); /* Subtle shadow on hover */
}

/* ==================================== */
/* 3. Responsive Adjustments */
/* ==================================== */
@media (max-width: 992px) { /* Added a new breakpoint for tablets */
    .pricing-title {
        font-size: 2.5em;
    }
    .pricing-subtitle {
        font-size: 1.1em;
    }
    .plan-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Allow narrower cards on tablets */
        gap: var(--spacing-lg); /* Reduce gap slightly */
    }
    .plan-title {
        font-size: 1.6em;
    }
    .plan-price {
        font-size: 2.2em;
    }
}

@media (max-width: 768px) {
    .pricing-section {
        padding: var(--spacing-xl) var(--spacing-md); /* Adjust padding for smaller screens */
    }
    .pricing-title {
        font-size: 2.2em; /* Further reduced */
    }
    .pricing-subtitle {
        font-size: 1em; /* Further reduced */
    }
    .plan-grid {
        grid-template-columns: 1fr; /* Stack cards on mobile */
        max-width: 380px; /* Limit width of stacked cards */
        margin-left: auto;
        margin-right: auto;
    }
    .plan-card {
        margin-bottom: var(--spacing-lg); /* Add space between stacked cards */
    }
}

@media (max-width: 480px) {
    .pricing-title {
        font-size: 1.8em; /* Even smaller for very small screens */
        padding-bottom: 10px;
    }
    .pricing-title::after {
        width: 80px;
    }
    .pricing-subtitle {
        font-size: 0.9em;
    }
    .plan-price {
        font-size: 2em; /* Adjusted price size */
    }
    .plan-title {
        font-size: 1.5em;
    }
    .plan-subscribe-btn {
        padding: 10px 0;
        font-size: 0.9em;
    }
    .plan-features li {
        font-size: 0.85em;
        margin-bottom: var(--spacing-sm);
    }
}