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

:root {
    --primary: #1e40af;
    --primary-dark: #1e3a8a;
    --secondary: #10b981;
    --accent: #f59e0b;
    --text: #1f2937;
    --text-light: #6b7280;
    --bg: #ffffff;
    --bg-gray: #f9fafb;
    --border: #e5e7eb;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --success: #10b981;
    --warning: #f59e0b;
}

/* Professional Navy Blue Alternative 
:root {
    --primary: #0f172a;
    --primary-dark: #020617;
    --secondary: #10b981;
    --accent: #f59e0b;
}
*/

/* Premium Blue & Gold Alternative
:root {
    --primary: #1e3a8a;
    --primary-dark: #1e293b;
    --secondary: #f59e0b;
    --accent: #fbbf24;
}
*/

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: var(--text);
    line-height: 1.6;
    background: var(--bg);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navbar */
.navbar {
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--primary);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 2rem;
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
}

.stat-label {
    font-size: 0.875rem;
    opacity: 0.8;
}

/* Categories */
.categories {
    padding: 4rem 0;
    background: var(--bg-gray);
}

.categories h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.category-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    text-decoration: none;
    color: var(--text);
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: var(--shadow);
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.category-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.category-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.category-card p {
    color: var(--text-light);
    font-size: 0.875rem;
}

/* Featured Offers */
.featured-offers {
    padding: 4rem 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.section-header h2 {
    font-size: 2rem;
}

.view-all {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.offers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.offer-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.offer-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.offer-logo-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    min-height: 40px;
}

.offer-logo {
    height: 40px;
    width: auto;
    max-width: 120px;
    object-fit: contain;
}

.offer-logo-placeholder {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-weight: 900;
    font-size: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    letter-spacing: 0.5px;
}

/* Company-specific colors for placeholders */
.logo-chase { background: linear-gradient(135deg, #117ACA, #1a8fd9); }
.logo-amex { background: linear-gradient(135deg, #006FCF, #1a8fd9); }
.logo-discover { background: linear-gradient(135deg, #FF6000, #ff8533); }
.logo-capitalone { background: linear-gradient(135deg, #c8102e, #d93e5c); }
.logo-citi { background: linear-gradient(135deg, #056DAE, #1a8fd9); }
.logo-fidelity { background: linear-gradient(135deg, #00653e, #008755); }
.logo-schwab { background: linear-gradient(135deg, #00a0dc, #33b3e5); }
.logo-robinhood { background: linear-gradient(135deg, #00c805, #33d633); }
.logo-petal { background: linear-gradient(135deg, #4c9aff, #6eb3ff); }
.logo-chime { background: linear-gradient(135deg, #00cc85, #33d9a0); }
.logo-sofi { background: linear-gradient(135deg, #3a1654, #5c3178); }

/* View Mode Toggle */
.view-toggle {
    display: flex;
    gap: 0.5rem;
    background: var(--bg-gray);
    padding: 0.25rem;
    border-radius: 8px;
    align-items: center;
}

.view-toggle-btn {
    padding: 0.5rem 1rem;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    color: var(--text-light);
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.view-toggle-btn:hover {
    background: white;
    color: var(--text);
}

.view-toggle-btn.active {
    background: white;
    color: var(--primary);
    box-shadow: var(--shadow);
}

/* List View Styles */
.offers-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.offer-list-item {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    display: grid;
    grid-template-columns: 60px 1fr auto;
    gap: 1.5rem;
    align-items: center;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.offer-list-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.offer-list-logo {
    display: flex;
    align-items: center;
    justify-content: center;
}

.offer-list-logo .offer-logo {
    height: 50px;
    max-width: 60px;
}

.offer-list-logo .offer-logo-placeholder {
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
}

.offer-list-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.offer-list-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
}

.offer-list-details {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.offer-list-action {
    display: flex;
    align-items: center;
}

@media (max-width: 768px) {
    .offer-list-item {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .offer-list-action {
        justify-content: flex-end;
    }
}

.offer-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1rem;
}

.offer-company {
    font-weight: 600;
    color: var(--text);
    font-size: 1.1rem;
}

.offer-badge {
    background: var(--secondary);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.offer-badge.hot {
    background: #ef4444;
}

.offer-title {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.offer-bonus {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1rem;
}

.offer-requirements {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.offer-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.offer-category {
    font-size: 0.75rem;
    color: var(--text-light);
    background: var(--bg-gray);
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
}

.annual-fee-badge {
    display: inline-block;
    background: #fef3c7;
    color: #92400e;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.annual-fee-badge.no-fee {
    background: #d1fae5;
    color: #065f46;
}

.offer-link {
    background: var(--primary);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
    transition: background 0.3s;
}

.offer-link:hover {
    background: var(--primary-dark);
}

/* Newsletter */
.newsletter {
    background: var(--primary);
    color: white;
    padding: 4rem 0;
}

/* Personalization Section */
.personalization {
    padding: 3rem 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.personalization-card {
    background: white;
    border-radius: 16px;
    padding: 2.5rem;
    max-width: 800px;
    margin: 0 auto;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.personalization-card h2 {
    color: var(--primary);
    margin-bottom: 0.5rem;
    text-align: center;
}

.personalization-card > p {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 2rem;
}

.personalization-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.form-group select {
    padding: 0.75rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s;
}

.form-group select:focus {
    outline: none;
    border-color: var(--primary);
}

.personalization-form .btn {
    margin-top: auto;
}

@media (max-width: 768px) {
    .personalization-form {
        grid-template-columns: 1fr;
    }
}

/* Newsletter */
.newsletter {
    background: var(--primary);
    color: white;
    padding: 4rem 0;
}

.newsletter-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.newsletter h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.newsletter p {
    opacity: 0.9;
    margin-bottom: 2rem;
}

.newsletter-form {
    display: flex;
    gap: 1rem;
    max-width: 500px;
    margin: 0 auto;
}

.newsletter-form input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
}

.newsletter-form button {
    padding: 0.75rem 2rem;
    background: white;
    color: var(--primary);
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.newsletter-form button:hover {
    background: var(--bg-gray);
}

/* Footer */
.footer {
    background: var(--text);
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1rem;
    text-align: center;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
}

.disclosure {
    margin-top: 0.5rem;
}

/* Filters */
.filters {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.filters h3 {
    margin-bottom: 1rem;
}

.filter-group {
    margin-bottom: 1.5rem;
}

.filter-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text);
}

.filter-group select,
.filter-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 1rem;
}

.filter-buttons {
    display: flex;
    gap: 1rem;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: var(--bg-gray);
    color: var(--text);
}

.btn-secondary:hover {
    background: var(--border);
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 1.75rem;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-links {
        gap: 1rem;
        font-size: 0.875rem;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
    
    .offers-grid {
        grid-template-columns: 1fr;
    }
}

/* Comparison Tool */
.comparison-container {
    padding: 2rem 0;
}

.comparison-header {
    text-align: center;
    margin-bottom: 2rem;
}

.comparison-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.comparison-card {
    background: white;
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    position: relative;
}

.comparison-card.selected {
    border-color: var(--primary);
}

.remove-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 0.875rem;
}

.comparison-table {
    width: 100%;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.comparison-table table {
    width: 100%;
    border-collapse: collapse;
}

.comparison-table th,
.comparison-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.comparison-table th {
    background: var(--bg-gray);
    font-weight: 600;
}

.comparison-table tr:last-child td {
    border-bottom: none;
}
