/* Compare App Store - Main Stylesheet */

:root {
    --primary: #3498db;
    --primary-dark: #2980b9;
    --secondary: #2c3e50;
    --success: #27ae60;
    --warning: #f39c12;
    --danger: #e74c3c;
    --free: #27ae60;
    --freemium: #f39c12;
    --paid: #e74c3c;
    --light: #f8f9fa;
    --dark: #343a40;
    --gray: #6c757d;
    --border: #dee2e6;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --radius: 8px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f5f5f5;
}

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

/* Header */
.main-header {
    background: white;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

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

.logo span {
    color: var(--primary);
}

.main-nav a {
    margin-left: 2rem;
    color: var(--gray);
    text-decoration: none;
    font-weight: 500;
}

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

/* Hero */
.hero {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

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

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

.search-box {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    gap: 0.5rem;
}

.search-box input {
    flex: 1;
    padding: 1rem 1.5rem;
    border: none;
    border-radius: var(--radius);
    font-size: 1.1rem;
}

.search-box button {
    padding: 1rem 2rem;
    background: var(--success);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 1.1rem;
    cursor: pointer;
    font-weight: 600;
}

.search-box button:hover {
    background: #219a52;
}

/* Sections */
.section {
    padding: 3rem 0;
}

.bg-light {
    background: var(--light);
}

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

.section-header h2 {
    font-size: 2rem;
    color: var(--secondary);
    margin-bottom: 0.5rem;
}

.section-header p {
    color: var(--gray);
    font-size: 1.1rem;
}

/* Grid */
.grid {
    display: grid;
    gap: 1.5rem;
}

.grid-categories {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

.grid-apps {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.grid-comparisons {
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
}

.grid-alternatives {
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
}

/* Cards */
.category-card,
.app-card,
.comparison-card,
.alternative-card {
    background: white;
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
}

.category-card:hover,
.app-card:hover,
.comparison-card:hover,
.alternative-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.category-card {
    text-align: center;
}

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

.category-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.category-card h3 a {
    color: var(--secondary);
    text-decoration: none;
}

.category-card p {
    color: var(--gray);
    font-size: 0.9rem;
}

/* App Cards */
.app-header-small {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.app-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--radius);
    object-fit: cover;
}

.app-icon-large {
    width: 100px;
    height: 100px;
    border-radius: var(--radius);
}

.app-title-small h4 {
    font-size: 1.1rem;
}

.app-title-small h4 a {
    color: var(--secondary);
    text-decoration: none;
}

.app-title-small p {
    color: var(--gray);
    font-size: 0.85rem;
}

.app-meta {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

/* Comparison Cards */
.comparison-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
}

.comparison-card h3 a {
    color: var(--secondary);
    text-decoration: none;
}

.comparison-card h3 a:hover {
    color: var(--primary);
}

.app-vs-app {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 1rem 0;
    padding: 1rem;
    background: var(--light);
    border-radius: var(--radius);
}

.vs-divider {
    font-weight: bold;
    color: var(--primary);
    font-size: 0.9rem;
}

.mini-app {
    text-align: center;
}

.mini-app img {
    width: 40px;
    height: 40px;
    border-radius: 6px;
}

.mini-app span {
    display: block;
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

.views {
    font-size: 0.85rem;
    color: var(--gray);
}

/* Alternative Cards */
.alternative-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.rank {
    width: 36px;
    height: 36px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.alternative-card h3 {
    flex: 1;
}

.alternative-card h3 a {
    color: var(--secondary);
    text-decoration: none;
}

.reason {
    color: #555;
    margin-bottom: 1rem;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-free {
    background: rgba(39, 174, 96, 0.1);
    color: var(--free);
}

.badge-freemium {
    background: rgba(243, 156, 18, 0.1);
    color: var(--freemium);
}

.badge-paid {
    background: rgba(231, 76, 60, 0.1);
    color: var(--paid);
}

.rating {
    color: var(--warning);
    font-weight: 600;
}

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

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

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

.btn-secondary {
    background: var(--light);
    color: var(--secondary);
    border: 1px solid var(--border);
}

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

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* CTA Section */
.cta-section {
    background: var(--secondary);
    color: white;
    text-align: center;
    padding: 4rem 0;
}

.cta-section h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.cta-section p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 1.5rem;
}

/* Footer */
.main-footer {
    background: var(--secondary);
    color: white;
    padding: 2rem 0;
    text-align: center;
}

.main-footer p {
    opacity: 0.8;
}

/* Text utilities */
.text-center {
    text-align: center;
}

/* Breadcrumb */
.breadcrumb {
    margin-bottom: 1rem;
    color: rgba(255,255,255,0.8);
}

.breadcrumb a {
    color: white;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* Not Found */
.not-found {
    padding: 4rem 0;
}

.not-found h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.not-found .suggestions {
    margin: 2rem 0;
}

.not-found .suggestions ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.not-found .suggestions a {
    color: var(--primary);
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 1.75rem;
    }
    
    .search-box {
        flex-direction: column;
    }
    
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .main-nav a {
        margin: 0 0.75rem;
    }
    
    .section {
        padding: 2rem 0;
    }
    
    .grid-categories,
    .grid-apps,
    .grid-comparisons,
    .grid-alternatives {
        grid-template-columns: 1fr;
    }
}
