/* GLOBAL STYLES */
body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; margin: 0; padding: 0; background-color: #f4f6f9; color: #333; display: flex; flex-direction: column; min-height: 100vh; }

/* HEADER & NAVIGATION */
header { background-color: #ffffff; box-shadow: 0 2px 5px rgba(0,0,0,0.1); padding: 15px 40px; display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: 24px; font-weight: bold; color: #2563eb; text-decoration: none; display: flex; align-items: center; gap: 10px; }
nav a { text-decoration: none; color: #555; margin-left: 20px; font-weight: 500; transition: color 0.3s; }
nav a:hover { color: #2563eb; }
nav a.btn-cta { background: #2563eb; color: white; padding: 8px 18px; border-radius: 5px; }

/* FOOTER */
footer { background: #1e293b; color: white; padding: 40px; margin-top: auto; text-align: center; }
footer a { color: #94a3b8; text-decoration: none; margin: 0 10px; }
footer a:hover { color: white; }

/* MAIN CONTENT CONTAINER */
.container { max-width: 1000px; margin: 40px auto; padding: 20px; background: white; border-radius: 8px; box-shadow: 0 4px 6px rgba(0,0,0,0.05); }

/* FORMS */
input[type="text"], input[type="email"], input[type="password"], input[type="number"] { width: 100%; padding: 10px; margin: 8px 0; border: 1px solid #ddd; border-radius: 4px; box-sizing: border-box; }
.checkbox-group { display: flex; align-items: center; gap: 10px; margin: 15px 0; }
button.primary { background: #2563eb; color: white; border: none; padding: 12px 20px; border-radius: 5px; cursor: pointer; width: 100%; font-size: 16px; }
button.primary:hover { background: #1d4ed8; }
.error { color: red; font-size: 0.9em; display: none; margin-bottom: 10px; }

/* --- NEW GRID SYSTEM FOR OFFERS --- */

/* The Container: Holds all cards in a grid */
/* SAFE FLEXBOX LAYOUT (Replaces Grid) */
.offers-grid {
    display: flex;
    flex-wrap: wrap;       /* This tells items to go to the next line if they don't fit */
    gap: 20px;             /* Space between cards */
    justify-content: center; /* Centers cards in the middle */
    margin-top: 20px;
}

/* Update the Card to work with Flexbox */
.offer-card {
    background: white;
    padding: 30px 20px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    
    /* FLEX SETTINGS */
    flex: 1 1 280px;       /* Grow if needed, shrink if needed, start at 280px wide */
    max-width: 350px;      /* Don't get wider than this */
    
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: transform 0.2s;
}

.offer-card:hover {
    transform: translateY(-5px);
}

/* Brand Name Styling */
.offer-card h3 {
    margin: 0 0 5px 0;
    color: #1e293b;
    font-size: 1.5em;
}

/* Description Styling */
.offer-card p {
    color: #64748b;
    font-size: 0.95em;
    margin-bottom: 20px;
    min-height: 40px; /* Keeps cards aligned even if text is short */
}

/* The Action Area (Button/Code) - Stacked vertically inside the card */
.action-area {
    margin-top: auto; /* Pushes button to bottom of card */
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}