:root {
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --primary-light: #3b82f6;
    --secondary-color: #10b981;
    --background-color: #f8fafc;
    --card-background: #ffffff;
    --text-color: #1f2937;
    --text-light: #6b7280;
    --border-radius: 12px;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
    --brazil-green: #009c3b;
    --brazil-yellow: #ffdf00;
}

/* Reset e Estilos Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

/* Gradientes e Backgrounds */
.gradient-bg {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
}

.gradient-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
}

/* Header e Navegação */
.main-header {
    background-color: var(--card-background);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 50;
}

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

.nav-categories {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: var(--text-color);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
}

.nav-link:hover {
    background-color: var(--primary-light);
    color: white;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    padding: 4rem 0;
    text-align: center;
    color: white;
    position: relative;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.2);
    z-index: 1;
}

.hero-section > .container {
    position: relative;
    z-index: 2;
}

.hero-section h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

@media (min-width: 768px) {
    .hero-section h1 {
        font-size: 3.5rem;
    }
}

/* Top 3 Hosting Cards */
.top-hosting-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 1200px;
    margin: 3rem auto 0;
    padding: 0 1rem;
}

.top-hosting-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    border-radius: 1rem;
    padding: 2rem;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.top-hosting-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.15);
}

.featured-card {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-20px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    position: relative;
}

.featured-card::before {
    content: "Mais Recomendado";
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    color: var(--primary-color);
    padding: 0.25rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

.top-hosting-icon {
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.top-hosting-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.5rem;
}

.top-hosting-features {
    margin-top: 1.5rem;
}

.top-hosting-feature {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    color: white;
}

.top-hosting-cta {
    display: inline-block;
    width: 100%;
    padding: 0.75rem 1.5rem;
    background: var(--primary-color);
    color: white;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.top-hosting-cta:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

@media (max-width: 1024px) {
    .top-hosting-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .featured-card {
        grid-column: span 2;
        transform: translateY(0);
        margin: 2rem 0;
    }
}

@media (max-width: 768px) {
    .nav-categories {
        display: none;
    }
    
    .top-hosting-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .featured-card {
        grid-column: auto;
        margin: 1.5rem 0;
    }
    
    .category-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

/* Seção de Categorias */
.category-section {
    padding: 4rem 0;
    background: white;
}

.category-header {
    text-align: center;
    margin-bottom: 3rem;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.category-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

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

/* Badges e Indicadores */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-brasil {
    background: var(--brazil-green);
    color: white;
}

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

/* Footer */
.footer {
    background: #1f2937;
    color: white;
    padding: 4rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-column h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: white;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: #9ca3af;
    transition: color 0.3s ease;
}

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

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

/* Responsividade */
@media (max-width: 1024px) {
    .top-hosting-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .featured-card {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    .nav-categories {
        display: none;
    }
    
    .top-hosting-grid {
        grid-template-columns: 1fr;
    }
    
    .featured-card {
        grid-column: auto;
    }
    
    .category-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

/* Utilitários */
.text-primary {
    color: var(--primary-color);
}

.text-secondary {
    color: var(--secondary-color);
}

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

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

/* Estilos del Comparador */
.comparator-section {
    background-color: var(--background-color);
    padding: 2rem 0;
}

/* Filtros Sidebar */
.filter-sidebar {
    position: sticky;
    top: 1rem;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
}

/* Range Slider */
input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    background: #e5e7eb;
    border-radius: 5px;
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

/* Checkbox personalizado */
input[type="checkbox"] {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    border: 2px solid #d1d5db;
    appearance: none;
    -webkit-appearance: none;
    outline: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

input[type="checkbox"]:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='white'%3E%3Cpath fill-rule='evenodd' d='M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z' clip-rule='evenodd'/%3E%3C/svg%3E");
}

/* Vista de Tabela */
.table-view {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.table-header {
    background-color: #f9fafb;
    border-bottom: 2px solid #e5e7eb;
}

/* Vista de Cards */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.hosting-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

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

/* Vista de Comparação */
.comparison-view {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
}

.comparison-header {
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Botões e Controles */
.control-button {
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    transition: all 0.2s ease;
}

.control-button:hover {
    background-color: #f3f4f6;
}

.primary-button {
    background-color: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    transition: all 0.2s ease;
}

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

.primary-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Modal */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
}

.modal-content {
    background: white;
    border-radius: var(--border-radius);
    max-width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

/* Responsividade do Comparador */
@media (max-width: 768px) {
    .filter-sidebar {
        position: static;
        margin-bottom: 1.5rem;
    }

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

    .comparison-view {
        overflow-x: auto;
    }
}

/* Animações */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

/* Utilitários do Comparador */
.feature-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.feature-icon {
    width: 1.25rem;
    height: 1.25rem;
    margin-right: 0.5rem;
}

/* Seção de Comparações Populares */
.comparisons-section {
    background: white;
}

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

.comparison-card {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    transition: all 0.3s ease;
    display: block;
}

.comparison-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.comparison-card h3 {
    color: var(--text-color);
    font-size: 1.125rem;
}

.comparison-card p {
    margin-top: 0.5rem;
}

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

@keyframes highlight {
    0% { background-color: transparent; }
    50% { background-color: rgba(59, 130, 246, 0.1); }
    100% { background-color: transparent; }
}

.highlight {
    animation: highlight 1s ease-out;
}