/* ========================================
   Cifras Theme - Blue Tones
   Modern theme for chord/music website
   ======================================== */

:root {
    /* Blue Theme Colors - Primary Blues */
    --primary: #001f3f;
    --primary-hover: #001a33;
    --primary-light: #003366;
    --secondary: #1e40af;
    --accent: #60a5fa;
    --accent-light: #93c5fd;
    --accent-dark: #1e3a8a;
    
    /* Backgrounds - Clean & Modern */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --bg-elevated: #ffffff;
    --bg-html: #eaeaea;
    
    /* Text Colors */
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-tertiary: #94a3b8;
    
    /* Border Colors */
    --border-primary: #e2e8f0;
    --border-secondary: #cbd5e1;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* Interactive States */
    --hover-bg: #eff6ff;
    --active-bg: #dbeafe;
    
    /* Navbar - Blue Gradient */
    --navbar-bg: #001f3f;
    --navbar-border: rgba(0, 31, 63, 0.3);
    --navbar-text: #ffffff;
    
    /* Footer - Mesma cor do tema nossa missa */
    --footer-bg: #0f172a;
    --footer-text: #cbd5e1;
    
    /* Footer - Compatibilidade com tema nossa missa */
    --light: #f8f9fa;
    --border: #dee2e6;
    --dark: #2c3e50;
}

[data-theme="dark"] {
    /* Dark Theme - mesma paleta das páginas protegidas (admin-theme.css) */
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --primary-light: #60a5fa;
    --secondary: #1e40af;
    --accent: #93c5fd;
    --accent-light: #bfdbfe;
    --accent-dark: #1e3a8a;

    --bg-primary: #131920;
    --bg-secondary: #131920;
    --bg-tertiary: #334155;
    --bg-elevated: #1b232d;
    --bg-html: #131920;

    --text-primary: #d1d3d5;
    --text-secondary: #d1d3d5;
    --text-tertiary: #94a3b8;

    --border-primary: #263240;
    --border-secondary: #334155;

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.5);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.6), 0 2px 4px -1px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.7), 0 4px 6px -2px rgba(0, 0, 0, 0.6);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.8), 0 10px 10px -5px rgba(0, 0, 0, 0.7);

    --hover-bg: #334155;
    --active-bg: #334155;

    --navbar-bg: #1e40af;
    --navbar-border: rgba(30, 64, 175, 0.3);

    --footer-bg: #1b232d;
    --footer-text: #d1d3d5;

    --light: #1b232d;
    --border: #263240;
    --dark: #d1d3d5;
}

/* ========================================
   Base Styles
   ======================================== */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    background-color: var(--bg-html);
}

body {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    background-attachment: fixed;
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.7;
    transition: background-color 0.3s ease, color 0.3s ease;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

[data-theme="dark"] body {
    color: var(--text-primary);
    background: var(--bg-secondary);
    background-attachment: fixed;
}

[data-theme="dark"] html {
    background-color: var(--bg-primary);
}

/* ========================================
   Typography
   ======================================== */

h1, h2, h3, h4, h5, h6 {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--primary);
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
    letter-spacing: 0.3px;
}

[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4,
[data-theme="dark"] h5,
[data-theme="dark"] h6 {
    color: var(--text-primary);
}

h1 {
    font-size: 2rem;
    font-weight: 700;
}

h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-top: 20px;
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
}

h4 {
    font-size: 1.25rem;
    font-weight: 600;
}

h5 {
    font-size: 1.125rem;
    font-weight: 600;
}

h6 {
    font-size: 1rem;
    font-weight: 600;
}

p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    font-weight: 400;
}

[data-theme="dark"] p {
    color: var(--text-secondary);
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

[data-theme="dark"] a {
    color: var(--accent);
}

a:hover {
    color: var(--primary-hover);
    text-decoration: none;
}

[data-theme="dark"] a:hover {
    color: var(--accent-light);
}

/* ========================================
   Navbar - Blue Theme
   ======================================== */

/* Navbar - Padrão do tema nossa missa */
.navbar {
    background: #001f3f;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding: 1rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar-brand {
    font-weight: 600;
    font-size: 1.25rem;
    color: #ffffff !important;
    display: flex;
    align-items: center;
}

.navbar-brand img {
    margin-right: 10px;
}

.navbar-nav .nav-link {
    color: #ffffff !important;
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: color 0.2s;
}

.navbar-nav .nav-link:hover {
    color: rgba(255,255,255,0.8) !important;
}

.theme-toggle-btn {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    padding: 0;
    margin-right: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle-btn:hover {
    background: rgba(255,255,255,0.3);
    border-color: rgba(255,255,255,0.5);
}

.navbar-toggler {
    border-color: rgba(255,255,255,0.3);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255, 255, 255, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Navbar Collapse - Flex para alinhar botões à direita */
.navbar-collapse {
    display: flex;
    flex-grow: 1;
    align-items: center;
    justify-content: space-between;
}

/* Ajustes para mobile */
@media (max-width: 991.98px) {
    /* Ocultar menu por padrão no mobile (Bootstrap collapse behavior) */
    .navbar-collapse:not(.show) {
        display: none !important;
    }
    
    /* Quando expandido, mostrar como flex column */
    .navbar-collapse.show {
        display: flex !important;
        flex-direction: column;
        align-items: flex-start !important;
    }
    
    .navbar-collapse .navbar-nav {
        width: 100%;
        margin-bottom: 1rem;
    }
    .navbar-collapse .d-flex.align-items-center {
        width: 100%;
        justify-content: flex-end;
        margin-left: 0 !important;
    }
}

[data-theme="dark"] .navbar {
    background: #001f3f;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

/* ========================================
   Cards - Modern Design
   ======================================== */

.card {
    background-color: var(--bg-elevated);
    border: 2px solid var(--border-primary);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 31, 63, 0.08);
    transition: all 0.3s ease;
    overflow: hidden;
}

[data-theme="dark"] .card {
    background-color: var(--bg-elevated);
    border-color: var(--border-primary);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 31, 63, 0.15);
    border-color: var(--primary);
}

[data-theme="dark"] .card:hover {
    border-color: var(--accent);
}

.card-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-bottom: 2px solid var(--accent);
    padding: 1.25rem 1.5rem;
    color: #ffffff;
}

[data-theme="dark"] .card-header {
    background: linear-gradient(135deg, var(--primary-hover) 0%, var(--primary) 100%);
    border-bottom: 2px solid var(--accent);
    color: #ffffff;
}

.card-header h5 {
    color: #ffffff;
    font-weight: 600;
    font-size: 1.125rem;
    margin: 0;
    line-height: 1.4;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.card-body {
    padding: 1.5rem;
}

.card-title {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1.375rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.card-text {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.7;
    font-weight: 400;
}

[data-theme="dark"] .card-text {
    color: var(--text-secondary);
}

/* ========================================
   Buttons - Blue Theme
   ======================================== */

.btn {
    border-radius: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    font-size: 0.9375rem;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 0.025em;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(0, 31, 63, 0.3);
    border: none;
    font-weight: 600;
}

[data-theme="dark"] .btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: #ffffff !important;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-hover) 0%, var(--primary) 100%);
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 31, 63, 0.4);
}

[data-theme="dark"] .btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
    color: #ffffff !important;
}

/* Botões btn-light no tema dark */
[data-theme="dark"] .btn-light {
    background-color: var(--card-bg) !important;
    border-color: #334155 !important;
    color: #ffffff !important;
}

[data-theme="dark"] .btn-light:hover {
    background-color: #334155 !important;
    border-color: #475569 !important;
    color: #ffffff !important;
}

[data-theme="dark"] .btn-light:focus {
    background-color: var(--card-bg) !important;
    border-color: #334155 !important;
    color: #ffffff !important;
    box-shadow: 0 0 0 0.2rem rgba(90, 157, 232, 0.25);
}

[data-theme="dark"] .btn-light:active {
    background-color: #334155 !important;
    border-color: #475569 !important;
    color: #ffffff !important;
}

/* ========================================
   Footer - Blue Theme
   ======================================== */

.footer {
    background-color: var(--footer-bg);
    color: var(--footer-text);
    padding: 3rem 0 2rem;
    margin-top: 50px;
    border-top: 1px solid var(--border-primary);
}

[data-theme="dark"] .footer {
    background-color: var(--footer-bg);
    border-top: 1px solid rgba(148, 163, 184, 0.22);
    color: #e0e0e0;
}

.footer h3,
.footer h5 {
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--dark);
}

[data-theme="dark"] .footer h3,
[data-theme="dark"] .footer h5 {
    color: #e0e0e0;
}

.footer p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.6;
    margin-bottom: 0.75rem;
}

[data-theme="dark"] .footer p {
    color: #b0b0b0;
}

.footer a {
    color: #666;
    transition: color 0.2s;
    text-decoration: none;
}

.footer a:hover {
    color: #0065cb;
}

.footer a:visited {
    color: #666;
}

[data-theme="dark"] .footer a {
    color: #b0b0b0;
}

[data-theme="dark"] .footer a:hover {
    color: var(--primary);
}

.footer-logo {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.footer-logo img {
    margin-right: 10px;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.btn-login {
    background: rgba(74, 144, 226, 0.1);
    border: 1px solid rgba(74, 144, 226, 0.3);
    border-radius: 50px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--primary) !important;
    text-decoration: none;
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-login:hover {
    background: rgba(74, 144, 226, 0.2);
    border-color: rgba(74, 144, 226, 0.5);
    color: var(--primary) !important;
    text-decoration: none;
}

[data-theme="dark"] .btn-login {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.2);
    color: #ffffff !important;
}

[data-theme="dark"] .btn-login:hover {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.3);
    color: #ffffff !important;
}

/* ========================================
   Forms - Modern Design
   ======================================== */

.form-control {
    background-color: var(--bg-elevated);
    border: 1px solid var(--border-primary);
    border-radius: 0.5rem;
    color: var(--text-primary);
    padding: 0.625rem 1rem;
    transition: all 0.2s ease;
}

[data-theme="dark"] .form-control {
    background-color: var(--bg-elevated);
    border-color: var(--border-primary);
    color: var(--text-primary);
}

.form-control:focus {
    background-color: var(--bg-elevated);
    border-color: var(--primary);
    color: var(--text-primary);
    box-shadow: 0 0 0 3px rgba(0, 31, 63, 0.1);
    outline: none;
}

[data-theme="dark"] .form-control:focus {
    background-color: var(--bg-elevated);
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.2);
}

/* ========================================
   Utility Classes
   ======================================== */

.text-muted {
    color: var(--text-tertiary) !important;
}

[data-theme="dark"] .text-muted {
    color: var(--text-tertiary) !important;
}

.bg-primary {
    background-color: var(--primary) !important;
    color: #ffffff !important;
}

.bg-secondary {
    background-color: var(--bg-secondary) !important;
}

/* ========================================
   Container Width - 1400px
   ======================================== */

.container {
    max-width: 1400px !important;
}

@media (min-width: 1400px) {
    .container {
        max-width: 1400px !important;
    }
}

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 768px) {
    h1 {
        font-size: 1.75rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.25rem;
    }
    
    body {
        font-size: 15px;
    }
    
    .navbar {
        padding: 0.75rem 0;
    }
    
    .navbar-brand {
        font-size: 1.375rem;
    }
    
    .navbar-nav a {
        font-size: 0.875rem;
    }
    
    .card {
        margin-bottom: 1.5rem;
    }
    
    .card-title {
        font-size: 1.25rem;
    }
    
    .btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.875rem;
    }
    
    .container {
        max-width: 100% !important;
    }
}

/* ========================================
   Scrollbar Styling
   ======================================== */

::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-secondary);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* ========================================
   Selection
   ======================================== */

::selection {
    background-color: var(--primary);
    color: white;
}

::-moz-selection {
    background-color: var(--primary);
    color: white;
}

/* ========================================
   Pagination - Modern (Bootstrap 4 + custom view)
   ======================================== */

nav[aria-label="Paginação"] {
    width: 100%;
}

nav[aria-label="Paginação"] .text-muted,
nav[aria-label="Paginação"] small {
    color: var(--text-tertiary) !important;
    font-size: 0.8125rem;
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0;
    margin: 0;
    list-style: none;
}

.pagination .page-item {
    margin: 0;
}

.pagination .page-item .page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.35rem;
    height: 2.35rem;
    padding: 0.35rem 0.65rem;
    margin-left: 0 !important;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1;
    color: var(--text-primary);
    background-color: var(--bg-elevated);
    border: 1px solid var(--border-primary);
    border-radius: 0.5rem;
    box-shadow: var(--shadow-sm);
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.pagination .page-item .page-link:hover {
    z-index: 1;
    color: var(--secondary);
    background-color: var(--hover-bg);
    border-color: var(--secondary);
    transform: translateY(-1px);
}

.pagination .page-item.active .page-link {
    z-index: 2;
    color: #ffffff;
    background-color: var(--secondary);
    border-color: var(--secondary);
    font-weight: 600;
    box-shadow: var(--shadow-md);
    cursor: default;
}

.pagination .page-item.disabled .page-link {
    color: var(--text-tertiary);
    background-color: var(--bg-tertiary);
    border-color: var(--border-primary);
    opacity: 0.7;
    box-shadow: none;
    cursor: not-allowed;
}

[data-theme="dark"] nav[aria-label="Paginação"] .text-muted,
[data-theme="dark"] nav[aria-label="Paginação"] small {
    color: #94a3b8 !important;
}

[data-theme="dark"] .pagination .page-item .page-link {
    color: #e2e8f0;
    background-color: var(--bg-tertiary);
    border-color: #475569;
    box-shadow: none;
}

[data-theme="dark"] .pagination .page-item .page-link:hover {
    color: #f8fafc;
    background-color: #334155;
    border-color: #60a5fa;
}

[data-theme="dark"] .pagination .page-item.active .page-link {
    color: #ffffff;
    background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
    border-color: #60a5fa;
    box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.35), 0 4px 14px rgba(37, 99, 235, 0.3);
}

[data-theme="dark"] .pagination .page-item.disabled .page-link {
    color: #64748b;
    background-color: var(--bg-primary);
    border-color: #334155;
    opacity: 0.85;
}

[data-theme="dark"] .home-list-pagination {
    border-color: #334155 !important;
}

@media (max-width: 576px) {
    .pagination .page-item .page-link {
        min-width: 2.1rem;
        height: 2.1rem;
        padding: 0.25rem 0.5rem;
        font-size: 0.8125rem;
    }
}

/* ========================================
   Music Notes - Notas Musicais
   ======================================== */

/* Estilo simples e direto para notas musicais */
span.music-note {
    color: #dc3545 !important;
    font-weight: 600 !important;
}

[data-theme="dark"] span.music-note {
    color: #ff8c00 !important;
    font-weight: 600 !important;
}

