/**
 * =====================================================
 * SISTEMA DE GESTIÓN DE CANCIONES - ESTILOS PRINCIPALES
 * =====================================================
 */

/* Variables CSS */
:root {
    --primary-color: #4361ee;
    --primary-dark: #3a56d4;
    --secondary-color: #3f37c9;
    --accent-color: #4895ef;
    --success-color: #4cc9f0;
    --warning-color: #f72585;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --gray-color: #6c757d;
    --border-radius: 12px;
    --box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --box-shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Poppins', sans-serif;
    background-color: #f5f7fa;
    color: var(--dark-color);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1;
}

/* Navbar */
.navbar {
    backdrop-filter: blur(10px);
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%) !important;
    box-shadow: 0 2px 15px rgba(67, 97, 238, 0.3);
}

.navbar-brand {
    font-weight: 600;
    font-size: 1.3rem;
}

.nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    border-radius: 8px;
    transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
    background-color: rgba(255, 255, 255, 0.15);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 4rem 0;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Cards */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    background: white;
    overflow: hidden;
}

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

.card-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border: none;
    padding: 1.2rem 1.5rem;
    font-weight: 600;
}

.card-body {
    padding: 1.5rem;
}

/* Canciones Cards */
.cancion-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.cancion-card .card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.cancion-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 1rem;
    line-height: 1.4;
}

.cancion-actions {
    margin-top: auto;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.cancion-actions .btn {
    flex: 1;
    min-width: 100px;
}

/* Botones */
.btn {
    border-radius: 8px;
    font-weight: 500;
    padding: 0.6rem 1.2rem;
    transition: var(--transition);
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    box-shadow: 0 4px 15px rgba(67, 97, 238, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--secondary-color) 100%);
    box-shadow: 0 6px 20px rgba(67, 97, 238, 0.4);
    transform: translateY(-2px);
}

.btn-success {
    background: linear-gradient(135deg, #0d9488 0%, #059669 100%);
    box-shadow: 0 4px 15px rgba(13, 148, 136, 0.3);
}

.btn-danger {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.3);
}

.btn-info {
    background: linear-gradient(135deg, #0891b2 0%, #0e7490 100%);
    box-shadow: 0 4px 15px rgba(8, 145, 178, 0.3);
    color: white;
}

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

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: white;
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.875rem;
}

/* Buscador */
.search-container {
    position: relative;
    max-width: 500px;
    margin: 0 auto 2rem;
}

.search-input {
    width: 100%;
    padding: 1rem 1.5rem 1rem 3rem;
    border: 2px solid #e9ecef;
    border-radius: 50px;
    font-size: 1rem;
    transition: var(--transition);
    background: white;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(67, 97, 238, 0.1);
}

.search-icon {
    position: absolute;
    left: 1.2rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-color);
    font-size: 1.1rem;
}

/* Modales */
.modal-content {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow-hover);
}

.modal-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    border: none;
}

.modal-header .btn-close {
    filter: invert(1);
}

.modal-body {
    padding: 1.5rem;
}

/* Video Container */
.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    background: #000;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Audio Player */
.audio-player {
    width: 100%;
    border-radius: 8px;
    margin-top: 1rem;
}

/* Letra de canción */
.letra-content {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    white-space: pre-wrap;
    font-family: 'Georgia', serif;
    line-height: 2;
    font-size: 1.05rem;
    color: #333;
    max-height: 500px;
    overflow-y: auto;
}

/* Tablas */
.table {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

.table thead th {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    font-weight: 600;
    border: none;
    padding: 1rem;
}

.table tbody td {
    padding: 1rem;
    vertical-align: middle;
}

.table tbody tr:hover {
    background-color: rgba(67, 97, 238, 0.05);
}

/* Cultos */
.culto-card {
    border-left: 4px solid var(--primary-color);
}

.culto-fecha {
    font-size: 0.9rem;
    color: var(--gray-color);
    margin-bottom: 0.5rem;
}

.culto-tipo {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.culto-tipo.manana {
    background: rgba(67, 97, 238, 0.1);
    color: var(--primary-color);
}

.culto-tipo.noche {
    background: rgba(72, 149, 239, 0.1);
    color: var(--accent-color);
}

.culto-canciones {
    list-style: none;
    padding: 0;
    margin: 0;
}

.culto-canciones li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
}

.culto-canciones li:last-child {
    border-bottom: none;
}

.culto-canciones li::before {
    content: '\F4B5';
    font-family: 'bootstrap-icons';
    margin-right: 0.5rem;
    color: var(--primary-color);
}

/* Formularios */
.form-control,
.form-select {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    transition: var(--transition);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(67, 97, 238, 0.1);
}

.form-label {
    font-weight: 500;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

/* Alertas */
.alert {
    border: none;
    border-radius: 8px;
    padding: 1rem 1.5rem;
}

.alert-success {
    background: rgba(13, 148, 136, 0.1);
    color: #047857;
}

.alert-danger {
    background: rgba(220, 38, 38, 0.1);
    color: #b91c1c;
}

.alert-info {
    background: rgba(8, 145, 178, 0.1);
    color: #0e7490;
}

/* Paginación */
.pagination {
    gap: 0.3rem;
}

.page-link {
    border: none;
    border-radius: 8px;
    padding: 0.6rem 1rem;
    color: var(--primary-color);
    font-weight: 500;
}

.page-link:hover {
    background: rgba(67, 97, 238, 0.1);
    color: var(--primary-color);
}

.page-item.active .page-link {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

/* Footer */
.footer {
    margin-top: auto;
}

.footer a {
    transition: var(--transition);
}

.footer a:hover {
    color: var(--accent-color) !important;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
}

.empty-state-icon {
    font-size: 4rem;
    color: #dee2e6;
    margin-bottom: 1rem;
}

.empty-state-title {
    font-size: 1.3rem;
    color: var(--gray-color);
    margin-bottom: 0.5rem;
}

.empty-state-text {
    color: #adb5bd;
}

/* Animaciones */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 1.8rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .cancion-actions {
        flex-direction: column;
    }
    
    .cancion-actions .btn {
        width: 100%;
    }
    
    .search-container {
        padding: 0 1rem;
    }
}

/* Scrollbar personalizada */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}
