/* ========================================
   RCC Guatemala - Buscador de Acreditados
   Estilos Modernos y Minimalistas
======================================== */

:root {
    /* Color Palette */
    --primary: #8B5A2B;
    --primary-light: #D4A574;
    --primary-dark: #5C3A1E;
    --secondary: #1E3A5F;
    --secondary-light: #2E5A8F;
    --accent: #C9A961;
    --gold: #D4AF37;
    
    /* Neutrals */
    --white: #FFFFFF;
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --gray-900: #111827;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    --gradient-gold: linear-gradient(135deg, var(--gold) 0%, var(--accent) 100%);
    --gradient-header: linear-gradient(135deg, #1E3A5F 0%, #0F1F33 100%);
    
    /* Shadows */
    --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 0 rgba(0, 0, 0, 0.06);
    --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);
    
    /* Border Radius */
    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    
    /* Transitions */
    --transition: all 0.3s ease;
    --transition-fast: all 0.15s ease;
}

/* ========== Reset & Base ========== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--gray-50);
    color: var(--gray-800);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ========== Container ========== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* ========== Header ========== */
.header {
    background: var(--gradient-header);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-lg);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--white);
}

.logo i {
    font-size: 2rem;
    color: var(--gold);
    filter: drop-shadow(0 2px 4px rgba(212, 175, 55, 0.3));
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.logo-subtitle {
    font-size: 0.7rem;
    color: var(--gray-300);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

/* ========== Main Content ========== */
.main-content {
    flex: 1;
    padding: 2rem 0;
}

/* ========== Hero Section ========== */
.hero-section {
    text-align: center;
    margin-bottom: 2rem;
}

.hero-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.25rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.hero-subtitle {
    color: var(--gray-500);
    font-size: 1rem;
}

/* ========== Tab Navigation ========== */
.tab-navigation {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.tab-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    color: var(--gray-600);
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.tab-btn:hover {
    border-color: var(--primary-light);
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.tab-btn.active {
    background: var(--gradient-primary);
    border-color: var(--primary);
    color: var(--white);
    box-shadow: var(--shadow-md);
}

.tab-btn i {
    font-size: 1.1rem;
}

/* ========== Search Section ========== */
.search-section {
    display: none;
    animation: fadeIn 0.3s ease;
}

.search-section.active {
    display: block;
}

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

/* ========== Search Card ========== */
.search-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    margin-bottom: 2rem;
    border: 1px solid var(--gray-100);
}

.search-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--gray-100);
}

.search-title i {
    color: var(--primary);
}

.search-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.filter-group label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-control, .form-select {
    padding: 0.75rem 1rem;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 0.95rem;
    transition: var(--transition-fast);
    background: var(--white);
}

.form-control:focus, .form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(139, 90, 43, 0.1);
}

.form-control::placeholder {
    color: var(--gray-400);
}

.search-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.btn-search {
    background: var(--gradient-primary);
    color: var(--white);
    box-shadow: var(--shadow);
}

.btn-search:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-clear {
    background: var(--gray-100);
    color: var(--gray-600);
}

.btn-clear:hover {
    background: var(--gray-200);
}

/* ========== Results Section ========== */
.results-section {
    margin-top: 1.5rem;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.results-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gray-800);
}

.results-count {
    font-size: 0.85rem;
    color: var(--gray-500);
    background: var(--gray-100);
    padding: 0.375rem 0.875rem;
    border-radius: var(--radius);
}

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

/* ========== Result Card ========== */
.result-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid var(--gray-100);
    box-shadow: var(--shadow-sm);
}

.result-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.result-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.result-card-name {
    font-weight: 600;
    color: var(--gray-900);
    font-size: 1rem;
    line-height: 1.4;
}

.result-card-badge {
    background: var(--gradient-gold);
    color: var(--gray-900);
    padding: 0.25rem 0.625rem;
    border-radius: var(--radius-sm);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.result-card-badge.tipo-ministerio {
    background: var(--gradient-primary);
    color: var(--white);
}

.result-card-badge.tipo-solista {
    background: linear-gradient(135deg, #6366F1 0%, #4F46E5 100%);
    color: var(--white);
}

.result-card-details {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.result-card-detail {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.85rem;
    color: var(--gray-600);
}

.result-card-detail i {
    color: var(--primary);
    font-size: 0.9rem;
}

.result-card-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    margin-top: 1rem;
    padding-top: 0.875rem;
    border-top: 1px solid var(--gray-100);
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 500;
}

/* ========== No Results ========== */
.no-results {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--gray-500);
}

.no-results i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--gray-300);
}

.no-results p {
    font-size: 1rem;
}

/* ========== Modal ========== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
    animation: fadeIn 0.2s ease;
}

.modal-overlay.active {
    display: flex;
}

.modal-container {
    background: var(--white);
    border-radius: var(--radius-xl);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: slideUp 0.3s ease;
    box-shadow: var(--shadow-xl);
}

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

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: var(--gray-100);
    color: var(--gray-600);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
    z-index: 10;
}

.modal-close:hover {
    background: var(--gray-200);
    color: var(--gray-800);
}

.modal-header {
    background: var(--gradient-header);
    padding: 2rem 1.5rem;
    text-align: center;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.modal-icon {
    width: 64px;
    height: 64px;
    background: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    box-shadow: var(--shadow-lg);
}

.modal-icon i {
    font-size: 1.75rem;
    color: var(--primary);
}

.modal-title {
    color: var(--white);
    font-family: 'Playfair Display', serif;
    font-size: 1.35rem;
    font-weight: 600;
    margin-bottom: 0.375rem;
}

.modal-subtitle {
    color: var(--gray-300);
    font-size: 0.85rem;
}

.modal-body {
    padding: 1.5rem;
}

.modal-info-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.modal-info-item {
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
    padding: 0.875rem;
    background: var(--gray-50);
    border-radius: var(--radius);
    border: 1px solid var(--gray-100);
}

.modal-info-icon {
    width: 40px;
    height: 40px;
    background: var(--white);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
}

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

.modal-info-content {
    flex: 1;
}

.modal-info-label {
    font-size: 0.7rem;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.125rem;
}

.modal-info-value {
    font-weight: 500;
    color: var(--gray-800);
    font-size: 0.95rem;
}

.modal-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
}

.modal-badge.ministerio {
    background: rgba(139, 90, 43, 0.1);
    color: var(--primary);
}

.modal-badge.solista {
    background: rgba(99, 102, 241, 0.1);
    color: #4F46E5;
}

/* ========== Footer ========== */
.footer {
    background: var(--gray-900);
    color: var(--gray-400);
    text-align: center;
    padding: 1.5rem;
    margin-top: auto;
}

.footer p {
    font-size: 0.85rem;
}

.footer-subtitle {
    font-size: 0.75rem;
    margin-top: 0.25rem;
    color: var(--gray-500);
}

.footer a {
    color: var(--gold);
    text-decoration: none;
    transition: var(--transition-fast);
}

.footer a:hover {
    color: var(--primary-light);
    text-decoration: underline;
}

/* ========== Loading State ========== */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: var(--gray-500);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ========== Responsive Design ========== */
@media (max-width: 768px) {
    .header {
        padding: 0.875rem 0;
    }
    
    .logo i {
        font-size: 1.75rem;
    }
    
    .logo-title {
        font-size: 1.25rem;
    }
    
    .logo-subtitle {
        font-size: 0.6rem;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
    }
    
    .tab-navigation {
        gap: 0.5rem;
    }
    
    .tab-btn {
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
    }
    
    .tab-btn span {
        display: none;
    }
    
    .tab-btn i {
        font-size: 1.25rem;
    }
    
    .search-card {
        padding: 1.25rem;
    }
    
    .search-filters {
        grid-template-columns: 1fr;
    }
    
    .search-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
    }
    
    .results-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .modal-container {
        margin: 0.5rem;
        max-height: calc(100vh - 1rem);
    }
    
    .modal-header {
        padding: 1.5rem 1rem;
    }
    
    .modal-title {
        font-size: 1.2rem;
    }
    
    .modal-body {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 1rem 0;
    }
    
    .hero-section {
        margin-bottom: 1.5rem;
    }
    
    .hero-title {
        font-size: 1.5rem;
    }
    
    .result-card {
        padding: 1rem;
    }
    
    .result-card-details {
        flex-direction: column;
        gap: 0.5rem;
    }
}

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

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