/* ===================================
   BLOG PHP - Modern & Professional Design
   Clean, Elegant & Sophisticated
   =================================== */

/* ===================================
   1. CSS VARIABLES
   =================================== */

:root {
    /* Paleta Moderna e Profissional */
    --primary: #e11d48;           /* Vermelho vivo e vibrante */
    --primary-dark: #be123c;
    --primary-light: #fb7185;
    --secondary: #64748B;
    --accent: #f43f5e;            /* Rose vibrante */
    --success: #10B981;
    --danger: #EF4444;
    --warning: #F59E0B;
    
    /* Backgrounds Sofisticados */
    --bg-body: #F8FAFC;
    --bg-surface: #FFFFFF;
    --bg-hover: #F1F5F9;
    --bg-accent: #F9FAFB;
    
    /* Texto com Hierarquia */
    --text-primary: #0F172A;
    --text-secondary: #475569;
    --text-muted: #94A3B8;
    
    /* Borders Sutis */
    --border: #E2E8F0;
    --border-light: #F1F5F9;
    
    /* Sombras Elegantes */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    
    /* Gradientes Premium */
    --gradient-primary: linear-gradient(135deg, #e11d48 0%, #be123c 100%);
    --gradient-accent: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
    --gradient-success: linear-gradient(135deg, #10B981 0%, #059669 100%);
    
    /* Transições Suaves */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===================================
   2. BASE & TYPOGRAPHY
   =================================== */

* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-body);
}

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

h1 { font-size: clamp(2rem, 5vw, 2.5rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2rem); }
h3 { font-size: clamp(1.5rem, 3vw, 1.75rem); }

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

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

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

/* ===================================
   3. NAVBAR - Modern & Clean
   =================================== */

.navbar {
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    padding: 1rem 0;
    transition: var(--transition);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition-fast);
}

.navbar-brand i {
    font-size: 1.75rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.navbar-brand:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
}

/* Logo no Navbar */
.navbar-logo {
    height: 40px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
    transition: var(--transition-fast);
}

@media (hover: hover) {
    .navbar-logo:hover {
        transform: scale(1.05);
    }
}

/* Responsividade da Logo */
@media (max-width: 576px) {
    .navbar-logo {
        height: 32px;
        max-width: 150px;
    }
}

.nav-link {
    color: var(--text-secondary) !important;
    font-weight: 600;
    font-size: 0.9375rem;
    padding: 0.5rem 1rem !important;
    border-radius: 0.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    transition: var(--transition-fast);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: var(--transition-fast);
    transform: translateX(-50%);
}

@media (hover: hover) {
    .nav-link:hover {
        color: var(--primary) !important;
        background: var(--bg-hover);
        transform: translateY(-2px);
    }
    
    .nav-link:hover::after {
        width: 60%;
    }
}

.nav-link.active {
    color: var(--primary) !important;
    background: var(--bg-accent);
    font-weight: 700;
}

.nav-link.active::after {
    width: 60%;
}

/* ===================================
   4. BUTTONS - Modern & Interactive
   =================================== */

.btn {
    font-size: 0.9375rem;
    font-weight: 600;
    padding: 0.625rem 1.5rem;
    border-radius: 0.5rem;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

@media (hover: hover) {
    .btn-primary:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 20px rgba(79, 70, 229, 0.4);
    }
}

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

@media (hover: hover) {
    .btn-outline-primary:hover {
        background: var(--primary);
        color: white;
        transform: translateY(-3px);
        box-shadow: 0 8px 20px rgba(79, 70, 229, 0.3);
    }
}

.btn-lg {
    font-size: 1.125rem;
    padding: 0.875rem 2rem;
}

.btn-sm {
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
}

/* ===================================
   5. CARDS - Elegant & Interactive
   =================================== */

.card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 1rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
    overflow: hidden;
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (hover: hover) {
    .card:hover {
        transform: translateY(-8px);
        box-shadow: var(--shadow-xl);
        border-color: var(--primary-light);
    }
}

.card-body {
    padding: 2rem;
}

.card-title {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    line-height: 1.3;
    transition: var(--transition-fast);
}

.card-title a {
    color: inherit;
    background: linear-gradient(to right, var(--primary) 0%, var(--primary) 100%);
    background-size: 0 2px;
    background-repeat: no-repeat;
    background-position: left bottom;
    transition: background-size 0.3s;
}

.card-title a:hover {
    background-size: 100% 2px;
}

.card-text {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 1rem;
}

/* ===================================
   6. FORMS - Clean & Modern
   =================================== */

.form-label {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.form-control, .form-select {
    font-size: 1rem;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border);
    border-radius: 0.5rem;
    background: var(--bg-surface);
    color: var(--text-primary);
    transition: var(--transition-fast);
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
    outline: none;
}

.form-text {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 0.375rem;
}

/* ===================================
   7. ALERTS - Beautiful Messages
   =================================== */

.alert {
    padding: 1rem 1.25rem;
    border-radius: 0.75rem;
    border: none;
    font-size: 0.9375rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    animation: slideInDown 0.5s ease-out;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert i {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.alert-success {
    background: linear-gradient(135deg, #ECFDF5 0%, #D1FAE5 100%);
    color: #065F46;
    border-left: 4px solid #10B981;
}

.alert-danger {
    background: linear-gradient(135deg, #FEF2F2 0%, #FEE2E2 100%);
    color: #991B1B;
    border-left: 4px solid #EF4444;
}

.alert-info {
    background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 100%);
    color: #1E40AF;
    border-left: 4px solid #3B82F6;
}

.alert-warning {
    background: linear-gradient(135deg, #FFFBEB 0%, #FEF3C7 100%);
    color: #92400E;
    border-left: 4px solid #F59E0B;
}

/* ===================================
   8. HERO SECTION - Premium
   =================================== */

.hero {
    background: var(--gradient-primary);
    color: white;
    padding: clamp(3rem, 8vw, 5rem) 2rem;
    border-radius: 1.5rem;
    text-align: center;
    margin-bottom: 3rem;
    box-shadow: 0 20px 40px rgba(79, 70, 229, 0.3);
    position: relative;
    overflow: hidden;
    animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-30px, -30px); }
}

.hero h1 {
    color: white;
    margin-bottom: 1rem;
    font-size: clamp(2rem, 6vw, 3rem);
    font-weight: 800;
    position: relative;
}

.hero p {
    color: rgba(255, 255, 255, 0.95);
    font-size: clamp(1rem, 2vw, 1.25rem);
    max-width: 700px;
    margin: 0 auto 1.5rem;
    position: relative;
}

/* ===================================
   9. SIDEBAR - Modern & Sticky
   =================================== */

.sidebar {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    position: sticky;
    top: 20px;
    animation: fadeInRight 0.6s ease-out;
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.sidebar-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-title i {
    font-size: 1.25rem;
    color: var(--primary);
}

.list-group-item {
    background: transparent;
    border: none;
    padding: 0.75rem 1rem;
    margin-bottom: 0.25rem;
    border-radius: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9375rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.625rem;
    transition: var(--transition-fast);
    position: relative;
}

.list-group-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 60%;
    background: var(--gradient-primary);
    border-radius: 0 0.25rem 0.25rem 0;
    transition: var(--transition-fast);
}

@media (hover: hover) {
    .list-group-item:hover {
        background: var(--bg-hover);
        color: var(--primary);
        transform: translateX(8px);
        padding-left: 1.5rem;
    }
    
    .list-group-item:hover::before {
        width: 4px;
    }
}

.list-group-item.active {
    background: var(--gradient-primary);
    color: white;
    font-weight: 600;
    box-shadow: var(--shadow-md);
}

.list-group-item.active::before {
    width: 0;
}

/* ===================================
   10. META INFO - Professional
   =================================== */

.meta-info {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
    padding: 1rem 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.meta-info > span {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    transition: var(--transition-fast);
}

.meta-info > span:hover {
    color: var(--primary);
}

.meta-info i {
    font-size: 1rem;
    color: var(--primary);
}

/* ===================================
   11. PAGINATION - Modern
   =================================== */

.pagination {
    gap: 0.5rem;
}

.page-link {
    padding: 0.625rem 1rem;
    font-size: 0.9375rem;
    font-weight: 600;
    border: 2px solid var(--border);
    border-radius: 0.5rem;
    background: var(--bg-surface);
    color: var(--text-secondary);
    transition: var(--transition-fast);
}

@media (hover: hover) {
    .page-link:hover {
        background: var(--primary);
        color: white;
        border-color: var(--primary);
        transform: translateY(-2px);
        box-shadow: var(--shadow-md);
    }
}

.page-item.active .page-link {
    background: var(--gradient-primary);
    border-color: var(--primary);
    color: white;
    box-shadow: var(--shadow-md);
}

/* ===================================
   12. FOOTER - Clean
   =================================== */

footer {
    background: var(--bg-surface);
    border-top: 1px solid var(--border);
    padding: 3rem 0;
    margin-top: 4rem;
    font-size: 0.9375rem;
    color: var(--text-muted);
}

/* ===================================
   13. EMPTY STATES - Elegant
   =================================== */

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, var(--bg-surface) 0%, var(--bg-accent) 100%);
    border: 2px dashed var(--border);
    border-radius: 1rem;
    animation: fadeIn 0.6s ease-out;
}

.empty-state i {
    font-size: 5rem;
    opacity: 0.2;
    margin-bottom: 1.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.empty-state h3, .empty-state h5 {
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.empty-state p {
    color: var(--text-secondary);
    font-size: 1.0625rem;
}

/* ===================================
   14. BREADCRUMB - Clean
   =================================== */

.breadcrumb {
    background: transparent;
    padding: 0;
    margin-bottom: 1.5rem;
    font-size: 0.9375rem;
}

.breadcrumb-item {
    color: var(--text-muted);
}

.breadcrumb-item a {
    color: var(--text-secondary);
    font-weight: 500;
    transition: var(--transition-fast);
}

.breadcrumb-item a:hover {
    color: var(--primary);
}

.breadcrumb-item.active {
    color: var(--text-primary);
    font-weight: 600;
}

/* ===================================
   15. BADGES - Modern
   =================================== */

.badge {
    font-size: 0.8125rem;
    font-weight: 600;
    padding: 0.375rem 0.75rem;
    border-radius: 0.5rem;
}

.bg-primary {
    background: var(--gradient-primary) !important;
}

/* ===================================
   16. COMMENTS SECTION
   =================================== */

.comments-list .card {
    background: var(--bg-accent);
    border-color: var(--border-light);
}

.post-content {
    font-size: 1.0625rem;
    line-height: 1.8;
    color: var(--text-primary);
}

/* ===================================
   17. RESPONSIVENESS
   =================================== */

@media (max-width: 767px) {
    .hero {
        padding: 2.5rem 1.5rem;
        border-radius: 1rem;
    }
    
    .sidebar {
        position: static;
        margin-bottom: 2rem;
    }
    
    .card-body {
        padding: 1.5rem;
    }
    
    .meta-info {
        gap: 0.75rem;
    }
    
    /* Adicionar padding nos containers mobile */
    .container {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }
}

@media (min-width: 992px) {
    .container {
        max-width: 1140px;
    }
}

/* ===================================
   18. ACCESSIBILITY
   =================================== */

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

*:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}

.skip-to-main {
    position: absolute;
    top: -100px;
    left: 0;
    background: var(--primary);
    color: white;
    padding: 0.75rem 1.5rem;
    z-index: 100;
    font-weight: 600;
    transition: var(--transition-fast);
}

.skip-to-main:focus {
    top: 0;
}

/* ===================================
   19. UTILITIES
   =================================== */

.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Scrollbar Premium */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--bg-hover);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 6px;
    border: 2px solid var(--bg-hover);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Selection */
::selection {
    background: var(--primary-light);
    color: white;
}

/* ===================================
   20. LOADING ANIMATIONS
   =================================== */

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
