/* ===================================
   TopOnlineBanks.com - Optimized CSS
   Performance-first, mobile-first design
   =================================== */

/* CSS Variables for consistency and easy theming */
:root {
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --secondary-color: #10b981;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --bg-light: #f9fafb;
    --bg-white: #ffffff;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1);
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header & Navigation */
.header {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
    letter-spacing: -0.5px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-menu a {
    font-weight: 500;
    color: var(--text-primary);
    transition: var(--transition);
}

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

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

.hero h1 {
    color: white;
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: rgba(255,255,255,0.95);
    max-width: 700px;
    margin: 0 auto 2rem;
}

/* Disclosure */
.disclosure {
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: var(--border-radius);
    padding: 1rem 1.5rem;
    margin: 2rem auto;
    max-width: 800px;
}

.disclosure p {
    color: white;
    font-size: 0.875rem;
    margin: 0;
}

.disclosure a {
    color: white;
    text-decoration: underline;
}

/* Search Container */
.search-container {
    max-width: 600px;
    margin: 2rem auto 0;
    display: flex;
    gap: 0.5rem;
}

.search-container input {
    flex: 1;
    padding: 0.875rem 1.25rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    outline: none;
}

.search-container button {
    padding: 0.875rem 2rem;
    background: var(--text-primary);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.search-container button:hover {
    background: #000;
    transform: translateY(-2px);
}

/* Sections */
section {
    padding: 4rem 0;
}

section:nth-child(even) {
    background-color: var(--bg-light);
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-top: -1rem;
    margin-bottom: 2rem;
}

/* Top Picks */
.top-picks h2 {
    text-align: center;
    margin-bottom: 0.5rem;
}

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

.bank-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    transition: var(--transition);
    position: relative;
}

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

.bank-card.featured::before {
    content: "⭐ Top Pick";
    position: absolute;
    top: -12px;
    right: 1rem;
    background: var(--secondary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

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

.bank-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.bank-rating {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-weight: 600;
    color: #f59e0b;
}

.bank-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 1.5rem 0;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: var(--border-radius);
}

.stat-item {
    text-align: center;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--secondary-color);
}

.bank-highlights {
    margin: 1rem 0;
}

.bank-highlights ul {
    list-style: none;
    padding: 0;
}

.bank-highlights li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    font-size: 0.9rem;
}

.bank-highlights li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--secondary-color);
    font-weight: 700;
}

/* Buttons */
.btn-primary,
.btn-secondary {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

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

/* Category Grid */
.categories h2 {
    text-align: center;
    margin-bottom: 3rem;
}

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

.category-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
    transition: var(--transition);
}

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

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

.category-card h3 {
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.category-card p {
    margin-bottom: 1.5rem;
}

/* Tools Section */
.tools-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.tools-section h2 {
    text-align: center;
    color: white;
    margin-bottom: 3rem;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.tool-card {
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
    transition: var(--transition);
}

.tool-card:hover {
    background: rgba(255,255,255,0.25);
    transform: translateY(-5px);
}

.tool-card h3 {
    color: white;
    margin-bottom: 0.75rem;
}

.tool-card p {
    color: rgba(255,255,255,0.9);
    margin-bottom: 1.5rem;
}

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

.tool-card .btn-primary:hover {
    background: var(--bg-light);
}

/* Education Section */
.education h2 {
    text-align: center;
    margin-bottom: 3rem;
}

.guides-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.guide-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    transition: var(--transition);
}

.guide-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.guide-card h3 {
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    font-size: 1.125rem;
}

.guide-card a {
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* FAQ Section */
.faq {
    max-width: 900px;
    margin: 0 auto;
    padding: 4rem 1.5rem;
}

.faq h2 {
    text-align: center;
    margin-bottom: 3rem;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.faq-item {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.faq-item summary {
    padding: 1.25rem;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-primary);
    list-style: none;
    user-select: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: "+";
    font-size: 1.5rem;
    font-weight: 300;
    transition: transform 0.3s;
}

.faq-item[open] summary::after {
    transform: rotate(45deg);
}

.faq-answer {
    padding: 0 1.25rem 1.25rem;
    border-top: 1px solid var(--border-color);
}

.faq-answer p {
    margin-top: 1rem;
}

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

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

.footer h4 {
    color: white;
    margin-bottom: 1rem;
    font-size: 1.125rem;
}

.footer p,
.footer a {
    color: rgba(255,255,255,0.8);
    font-size: 0.9rem;
}

.footer a:hover {
    color: white;
}

.footer ul {
    list-style: none;
}

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

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

.footer-bottom p {
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.affiliate-disclosure {
    font-size: 0.75rem;
    opacity: 0.7;
}

.disclaimer {
    font-size: 0.75rem;
    margin-top: 1rem;
    opacity: 0.8;
}

/* Comparison Table */
.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    background: var(--bg-white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

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

.comparison-table th {
    background: var(--bg-light);
    font-weight: 700;
    color: var(--text-primary);
}

.comparison-table tr:hover {
    background: var(--bg-light);
}

/* Responsive Design */
@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }

    .hero h1 { font-size: 2rem; }
    .hero-subtitle { font-size: 1rem; }

    .nav-menu {
        gap: 1rem;
        font-size: 0.875rem;
    }

    .picks-grid,
    .category-grid,
    .tools-grid,
    .guides-grid {
        grid-template-columns: 1fr;
    }

    .search-container {
        flex-direction: column;
    }

    .search-container button {
        width: 100%;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }
}

/* Performance Optimizations */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Print Styles */
@media print {
    .header, .footer, .tools-section {
        display: none;
    }
}
