@import url('https://fonts.googleapis.com/css2?family=SF+Pro+Display:wght@100;200;300;400;500;600;700;800;900&family=SF+Pro+Text:wght@300;400;500;600;700&display=swap');

:root {
    /* Apple Design System Colors */
    --background-color: #FAFAFA;
    --background-secondary: #FFFFFF;
    --background-tertiary: #F2F2F7;
    --accent-color: #007AFF;
    --accent-hover: #0056CC;
    
    /* Text Colors */
    --text-primary: #000000;
    --text-secondary: #6D6D70;
    --text-tertiary: #8E8E93;
    --text-white: #FFFFFF;
    
    /* System Colors */
    --red: #FF3B30;
    --orange: #FF9500;
    --yellow: #FFCC02;
    --green: #34C759;
    --mint: #00C7BE;
    --teal: #30B0C7;
    --cyan: #32D2FF;
    --blue: #007AFF;
    --indigo: #5856D6;
    --purple: #AF52DE;
    --pink: #FF2D92;
    --brown: #A2845E;
    --gray: #8E8E93;

    /* geradas pelo code*/
    --coral: #F25C54;    /* Vermelho-laranja vibrante */
    --lime: #A4E83B;     /* Verde-amarelo energético */
    --sky: #24A6EB;      /* Azul céu claro */
    --lavender: #8B7BD8; /* Roxo suave */
    --rose: #E63E62;     /* Rosa profundo */

    /* Shadows */
    --shadow-light: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-heavy: 0 8px 25px rgba(0, 0, 0, 0.15);
    
    /* Border Radius */
    --radius-small: 6px;
    --radius-medium: 12px;
    --radius-large: 20px;
    --radius-xl: 28px;
    
    /* Typography */
    --font-display: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-text: 'SF Pro Text', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    
    /* Layout */
    --container-max-width: 1200px;
    --sidebar-width: 280px;
    --header-height: 60px;
    --breadcrumb-height: 48px;
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
    --transition-slow: 0.4s ease;
}

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

body {
    font-family: var(--font-text);
    background-color: var(--background-color);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.2;
    color: var(--text-primary);
}

h1 { font-size: 2.5rem; font-weight: 700; }
h2 { font-size: 2rem; font-weight: 600; }
h3 { font-size: 1.5rem; font-weight: 600; }
h4 { font-size: 1.25rem; font-weight: 500; }
h5 { font-size: 1.125rem; font-weight: 500; }
h6 { font-size: 1rem; font-weight: 500; }

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

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 8px 16px;
    border: none;
    border-radius: var(--radius-medium);
    font-family: var(--font-text);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
    min-height: 36px;
}

.btn-primary {
    background-color: var(--accent-color);
    color: var(--text-white);
    box-shadow: var(--shadow-light);
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-medium);
}

.btn-ghost {
    background-color: transparent;
    color: var(--accent-color);
    border: 1px solid var(--accent-color);
}

.btn-ghost:hover {
    background-color: var(--accent-color);
    color: var(--text-white);
}

.btn-full {
    width: 100%;
}

/* Header */
.top-header {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    height: var(--header-height);
    position: sticky;
    top: 0;
    z-index: 100;
}

.top-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.header-left,
.header-center,
.header-right {
    flex: 1;
    display: flex;
    align-items: center;
}

.header-center {
    justify-content: center;
}

.header-right {
    justify-content: flex-end;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    font-size: 1.5rem;
}

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

/* Search */
.search-container {
    position: relative;
    width: 100%;
    max-width: 480px;
}

.search-input {
    width: 100%;
    padding: 10px 16px 10px 44px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: var(--radius-medium);
    background-color: var(--background-tertiary);
    font-family: var(--font-text);
    font-size: 0.875rem;
    transition: all var(--transition-fast);
}

.search-input:focus {
    outline: none;
    border-color: var(--accent-color);
    background-color: var(--background-secondary);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.search-hint {
    position: absolute;
    right: -120px;
    top: 50%;
    transform: translateY(-50%);
    display: none;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--text-tertiary);
    background: var(--background-secondary);
    padding: 4px 8px;
    border-radius: var(--radius-small);
    border: 1px solid var(--border-light);
    white-space: nowrap;
}

.search-hint svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.search-hint.show {
    display: flex;
}

.search-button {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-button:hover {
    color: var(--accent-color);
}

/* Auth Buttons */
.auth-buttons {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.user-menu {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    padding: 8px 16px;
    background-color: var(--background-tertiary);
    border-radius: var(--radius-medium);
}

.user-name {
    font-weight: 500;
    color: var(--text-primary);
}

/* Breadcrumb Navigation */
.breadcrumb-nav {
    background-color: var(--background-secondary);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    height: var(--breadcrumb-height);
}

.breadcrumb-nav .container {
    display: flex;
    align-items: center;
    height: 100%;
}

.breadcrumb-items {
    display: flex;
    gap: 1rem;
}

.breadcrumb-item {
    padding: 6px 12px;
    border: none;
    border-radius: var(--radius-small);
    background-color: transparent;
    font-family: var(--font-text);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.breadcrumb-item.active,
.breadcrumb-item:hover {
    background-color: var(--background-tertiary);
    color: var(--text-primary);
}

/* Main Content */
.main-content {
    padding: 32px 0;
    min-height: calc(100vh - var(--header-height) - var(--breadcrumb-height));
}

/* Hero Cards Section - Full Width */
.hero-cards-section {
    margin-bottom: 40px;
}

.hero-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    width: 100%;
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    align-items: start;
}

.content-left {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.hero-card {
    position: relative;
    height: 260px;
    border-radius: var(--radius-large);
    overflow: hidden;
    cursor: pointer;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-light);
}

.hero-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-heavy);
}

.hero-card-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
    pointer-events: none;
}

.hero-card-blue {
    background-image: 
        linear-gradient(135deg, rgba(0, 122, 255, 0.75) 0%, rgba(90, 200, 250, 0.75) 100%),
        url('https://images.unsplash.com/photo-1488590528505-98d2b5aba04b?w=1200&h=600&fit=crop&auto=format');
    background-size: cover, cover;
    background-position: center, center;
    background-repeat: no-repeat, no-repeat;
}

.hero-card-coral {
    background-image: 
        linear-gradient(135deg, rgba(255, 149, 0, 0.75) 0%, rgba(255, 59, 48, 0.75) 100%),
        url('https://images.unsplash.com/photo-1532094349884-543bc11b234d?w=1200&h=600&fit=crop&auto=format');
    background-size: cover, cover;
    background-position: center, center;
    background-repeat: no-repeat, no-repeat;
}

.hero-card-magenta {
    background-image: 
        linear-gradient(135deg, rgba(175, 82, 222, 0.75) 0%, rgba(255, 45, 146, 0.75) 100%),
        url('https://images.unsplash.com/photo-1554224155-6726b3ff858f?w=1200&h=600&fit=crop&auto=format');
    background-size: cover, cover;
    background-position: center, center;
    background-repeat: no-repeat, no-repeat;
}

.hero-card-content {
    position: relative;
    z-index: 2;
    padding: 24px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: var(--text-white);
}

.hero-card-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-white);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    vertical-align: top;
}

.hero-card-articles {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: flex-start;
}

.hero-card-articles li {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.2s ease;
    cursor: pointer;
    white-space: nowrap;
}

.hero-card-articles li:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.hero-card-articles li::before {
    display: none;
}

/* Categories Grid */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.category-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 24px;
    background-color: var(--background-secondary);
    border-radius: var(--radius-large);
    cursor: pointer;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-light);
}

.category-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.category-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-medium);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: var(--shadow-light);
    flex-shrink: 0;
}

.category-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.category-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1.125rem;
    margin: 0;
}

.category-subcategories {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.category-subcategories li {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 400;
    cursor: pointer;
    transition: color var(--transition-fast);
}

.category-subcategories li:hover {
    color: var(--accent-color);
}

/* Sidebar */
.sidebar {
    position: sticky;
    top: calc(var(--header-height) + var(--breadcrumb-height) + 32px);
}

.sidebar-section {
    background-color: var(--background-secondary);
    border-radius: var(--radius-large);
    padding: 24px;
    box-shadow: var(--shadow-light);
}

.sidebar-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--text-primary);
}

.curated-list {
    margin-bottom: 32px;
}

.curated-list:last-child {
    margin-bottom: 0;
}

.list-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.curated-items {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.curated-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 8px;
    border-radius: var(--radius-small);
    transition: all var(--transition-fast);
    cursor: pointer;
}

.curated-item:hover {
    background-color: var(--background-tertiary);
}

.item-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: var(--accent-color);
    color: var(--text-white);
    font-size: 0.75rem;
    font-weight: 600;
    flex-shrink: 0;
}

.item-title {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.4;
}

/* Feed Section */
.feed-section {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.feed-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.feed-filters {
    display: flex;
    gap: 12px;
}

.filter-select {
    padding: 8px 12px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: var(--radius-small);
    background-color: var(--background-secondary);
    font-family: var(--font-text);
    font-size: 0.875rem;
    color: var(--text-primary);
}

.filter-select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

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

.articles-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Utilities */
.hidden {
    display: none !important;
}

/* Responsive Design */
@media (max-width: 1024px) {
    :root {
        --sidebar-width: 240px;
    }
    
    .content-grid {
        gap: 32px;
    }
    
    .hero-cards {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .categories-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

@media (max-width: 768px) {
    .content-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .hero-cards-section {
        margin-bottom: 32px;
    }
    
    .top-header .container {
        flex-direction: column;
        gap: 12px;
        padding: 12px 20px;
    }
    
    .header-left,
    .header-center,
    .header-right {
        width: 100%;
        justify-content: center;
    }
    
    .header-left {
        order: 1;
    }
    
    .header-center {
        order: 3;
    }
    
    .header-right {
        order: 2;
    }
    
    .search-container {
        max-width: none;
    }
    
    .breadcrumb-nav {
        display: none;
    }
    
    .main-content {
        padding: 20px 0;
    }
    
    .hero-card {
        height: 200px;
    }
    
    .categories-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .category-item {
        padding: 20px;
        gap: 12px;
    }
    
    .category-icon {
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
    }
    
    .category-name {
        font-size: 1rem;
    }
    
    .category-subcategories li {
        font-size: 0.8125rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }
    
    .hero-cards {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .hero-card-content {
        padding: 20px;
    }
    
    .hero-card-title {
        font-size: 1.25rem;
    }
    
    .category-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 16px;
    }
    
    .category-content {
        align-items: center;
    }
    
    .category-subcategories {
        align-items: center;
    }
    
    .hero-card-articles li {
        font-size: 0.7rem;
        padding: 3px 6px;
    }
}