/* Custom Styles — Tu Seguro Ideal */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5rem; }

/* Animations */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
@keyframes shimmer { 0% { background-position: -200% center; } 100% { background-position: 200% center; } }

.animate-fade-in { animation: fadeIn 0.8s ease-out both; }
.animate-fade-in-up { animation: fadeInUp 0.8s ease-out both; }
.animation-delay-200 { animation-delay: 200ms; }
.animation-delay-400 { animation-delay: 400ms; }
.animation-delay-600 { animation-delay: 600ms; }

.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.7s ease-out, transform 0.7s ease-out; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* Header */
#header.scrolled { background: rgba(26, 54, 93, 0.98); box-shadow: 0 4px 30px rgba(0,0,0,0.2); }

/* Filter Buttons */
.filter-btn { background: white; color: #4a5568; border: 2px solid #e2e8f0; }
.filter-btn:hover { border-color: #059669; color: #059669; background: #f0fdf4; }
.filter-btn.active { background: #059669; color: white; border-color: #059669; box-shadow: 0 4px 14px rgba(5,150,105,0.35); }

/* Table */
#comparison-table tbody tr { transition: all 0.2s ease; }
#comparison-table tbody tr:hover { background-color: #f0fdf4; }
#comparison-table tbody tr:not(:last-child) { border-bottom: 1px solid #e2e8f0; }
.table-ad-row td { padding: 0 !important; background: #f7fafc !important; }
.table-ad-row:hover { background: #f7fafc !important; }

.insurer-logo-wrap { width: 48px; height: 48px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.insurer-logo-img { width: 48px; height: 48px; object-fit: contain; border-radius: 10px; background: #fff; border: 1px solid #e2e8f0; padding: 4px; }
.insurer-logo { width: 48px; height: 48px; background: linear-gradient(135deg, #eef2f7, #d4dde9); border-radius: 12px; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.75rem; color: #1a365d; flex-shrink: 0; }

.stars { display: inline-flex; gap: 2px; }
.star { color: #e2e8f0; transition: color 0.2s; }
.star.filled { color: #f59e0b; }
.star.half { position: relative; color: #e2e8f0; }
.star.half::before { content: '\2605'; position: absolute; left: 0; top: 0; width: 50%; overflow: hidden; color: #f59e0b; }

/* CTA Buttons */
.cta-button { display: inline-flex; align-items: center; justify-content: center; padding: 0.5rem 1.25rem; background: #059669; color: white; font-size: 0.8125rem; font-weight: 600; border-radius: 0.75rem; border: none; cursor: pointer; white-space: nowrap; transition: all 0.3s ease; text-decoration: none; }
.cta-button:hover { background: #047857; transform: translateY(-1px); box-shadow: 0 6px 20px rgba(5,150,105,0.35); }

/* AdSense Placeholders */
.ad-placeholder { position: relative; overflow: hidden; }
.ad-placeholder::before { content: ''; position: absolute; top: 0; left: -200%; width: 200%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent); animation: shimmer 3s ease-in-out infinite; }

/* SEO Content */
.seo-content p { font-size: 1.0625rem; line-height: 1.8; }
.seo-content strong { color: #1a365d; font-weight: 600; }

/* Category Cards */
.category-card::before { content: ''; position: absolute; inset: 0; border-radius: 1rem; padding: 2px; background: linear-gradient(135deg, transparent, transparent); -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; transition: background 0.3s ease; }
.category-card:hover::before { background: linear-gradient(135deg, #059669, #34d399); }

/* Mobile Menu */
#mobile-menu { max-height: 0; overflow: hidden; transition: max-height 0.35s ease, opacity 0.25s ease; opacity: 0; }
#mobile-menu.open { max-height: 400px; opacity: 1; }

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #94a3b8; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #64748b; }

@media (max-width: 640px) {
    .insurer-logo-wrap, .insurer-logo-img, .insurer-logo { width: 40px; height: 40px; border-radius: 10px; font-size: 0.625rem; }
    #comparison-table th, #comparison-table td { padding-left: 0.75rem; padding-right: 0.75rem; font-size: 0.8125rem; }
    .seo-content p { font-size: 0.9375rem; }
}

::selection { background: #059669; color: white; }
