/* Estilos para a página de Credenciados */

/* Hero Section */
.credenciados-hero {
    background: linear-gradient(180deg, #f9fcff 0%, #f5fbff 100%);
    padding: 100px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.credenciados-hero::before,
.credenciados-hero::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    z-index: 0;
    background: linear-gradient(135deg, rgba(0, 112, 224, 0.08) 0%, rgba(0, 162, 255, 0.03) 100%);
}

.credenciados-hero::before {
    top: -150px;
    right: -100px;
    width: 450px;
    height: 450px;
    opacity: 0.6;
}

.credenciados-hero::after {
    bottom: -80px;
    left: -150px;
    width: 350px;
    height: 350px;
    opacity: 0.4;
}

.credenciados-hero .container {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.credenciados-hero .hero-tag {
    display: block;
    background: #0070e0;
    color: #fff;
    padding: 10px 25px;
    border-radius: 30px;
    font-weight: 600;
    text-transform: uppercase;
    margin: 0 auto 25px;
    font-size: 1em;
    letter-spacing: 1px;
    box-shadow: 0 5px 15px rgba(0, 112, 224, 0.2);
    transition: all 0.3s ease;
    width: fit-content;
}

.credenciados-hero .hero-tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 112, 224, 0.3);
    background: linear-gradient(135deg, #0070e0, #39aeff);
}

.credenciados-hero h1 {
    font-size: 3.2em;
    color: #0a2540;
    font-weight: 600;
    margin-bottom: 30px;
    position: relative;
    display: inline-block;
    padding-bottom: 15px;
}

.credenciados-hero h1 .highlight {
    color: #0070e0;
    font-weight: 700;
}

.credenciados-hero h1::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, #0070e0, #00a2ff);
    border-radius: 3px;
}

.credenciados-hero p {
    font-size: 1.2em;
    color: #505a68;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Search Section */
.credenciados-search {
    padding: 80px 0;
    background: linear-gradient(180deg, #fff 0%, #f8fbff 100%);
    position: relative;
}

.search-container {
    background: #fff;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 112, 224, 0.08);
    margin-bottom: 40px;
    border: 1px solid rgba(0, 112, 224, 0.05);
    transition: all 0.3s ease;
}

.search-container h2 {
    font-size: 2.2em;
    color: #0a2540;
    margin-bottom: 30px;
    font-weight: 600;
    position: relative;
    display: inline-block;
}

.search-container h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 70px;
    height: 3px;
    background: linear-gradient(90deg, #0070e0, #00a2ff);
    border-radius: 2px;
}

/* Estilos para a seção de upload de Excel */
.excel-upload-container {
    background: #fff;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 112, 224, 0.08);
    margin-bottom: 30px;
    border: 1px solid rgba(0, 112, 224, 0.05);
    transition: all 0.3s ease;
}

.excel-upload-container h3 {
    font-size: 1.6em;
    color: #0a2540;
    margin-bottom: 15px;
    font-weight: 600;
    position: relative;
    display: inline-block;
    padding-bottom: 10px;
}

.excel-upload-container h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, #0070e0, #00a2ff);
    border-radius: 2px;
}

.excel-upload-container p {
    color: #505a68;
    margin-bottom: 20px;
}

.upload-controls {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
}

input[type="file"]#excel-upload {
    padding: 10px;
    border: 2px dashed rgba(0, 112, 224, 0.3);
    border-radius: 8px;
    background: rgba(0, 112, 224, 0.05);
    width: 100%;
    max-width: 400px;
    transition: all 0.3s ease;
    color: #505a68;
    cursor: pointer;
}

input[type="file"]#excel-upload:hover {
    border-color: #0070e0;
    background: rgba(0, 112, 224, 0.08);
}

input[type="file"]#excel-upload:focus {
    outline: none;
    border-color: #0070e0;
    box-shadow: 0 0 0 3px rgba(0, 112, 224, 0.1);
}

input[type="file"]#excel-upload::file-selector-button {
    background: linear-gradient(135deg, #0070e0, #00a2ff);
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    margin-right: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

input[type="file"]#excel-upload::file-selector-button:hover {
    background: linear-gradient(135deg, #0061c7, #0070e0);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 112, 224, 0.2);
}

.upload-status {
    margin-top: 5px;
    font-size: 0.95em;
}

.upload-status .loading {
    color: #f59f00;
    display: flex;
    align-items: center;
    gap: 8px;
}

.upload-status .loading::before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #f59f00;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spinner 0.8s linear infinite;
}

.upload-status .error {
    color: #e74c3c;
    display: flex;
    align-items: center;
    gap: 8px;
}

.upload-status .error::before {
    content: '\f057';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    font-size: 16px;
}

.upload-status .success {
    color: #2ecc71;
    display: flex;
    align-items: center;
    gap: 8px;
}

.upload-status .success::before {
    content: '\f058';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    font-size: 16px;
}

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

.search-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
    align-items: end;
}

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

.filter-group label {
    font-size: 1em;
    color: #505a68;
    margin-bottom: 8px;
    font-weight: 500;
}

.search-select,
.search-input {
    padding: 12px 15px;
    border-radius: 8px;
    border: 1px solid rgba(0, 112, 224, 0.2);
    font-size: 1em;
    color: #0a2540;
    background-color: #fff;
    transition: all 0.3s ease;
}

.search-select:focus,
.search-input:focus {
    outline: none;
    border-color: #0070e0;
    box-shadow: 0 0 0 3px rgba(0, 112, 224, 0.1);
}

.search-select:disabled {
    background-color: #f0f0f0;
    cursor: not-allowed;
}

#buscar-btn {
    padding: 12px 25px;
    border-radius: 8px;
    background: linear-gradient(135deg, #0070e0, #00a2ff);
    color: white;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 15px rgba(0, 112, 224, 0.2);
}

#buscar-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 112, 224, 0.3);
    background: linear-gradient(135deg, #0061c7, #0070e0);
}

#buscar-btn i {
    margin-right: 8px;
}

.search-results-info {
    font-size: 1.1em;
    color: #505a68;
    margin-bottom: 20px;
}

/* Loader */
.loader {
    text-align: center;
    padding: 40px;
    display: none;
}

.loader-spinner {
    border: 4px solid rgba(0, 112, 224, 0.1);
    border-left: 4px solid #0070e0;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loader p {
    color: #0a2540;
    font-size: 1.1em;
}

/* Search Results */
.search-results {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.credenciado-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 25px rgba(0, 112, 224, 0.08);
    padding: 25px;
    transition: all 0.4s ease;
    border: 1px solid rgba(0, 112, 224, 0.05);
    position: relative;
    overflow: hidden;
}

.credenciado-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, rgba(0, 112, 224, 0.03) 0%, rgba(0, 112, 224, 0) 70%);
    border-radius: 50%;
    z-index: 0;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.credenciado-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 112, 224, 0.15);
    border-color: rgba(0, 112, 224, 0.1);
}

.credenciado-card:hover::before {
    opacity: 1;
}

.credenciado-nome {
    font-size: 1.3em;
    color: #0a2540;
    margin-bottom: 10px;
    font-weight: 600;
    position: relative;
    z-index: 1;
}

.credenciado-programa {
    display: inline-block;
    background: rgba(0, 112, 224, 0.08);
    color: #0070e0;
    padding: 6px 15px;
    border-radius: 30px;
    font-size: 0.9em;
    margin-bottom: 20px;
    font-weight: 500;
    position: relative;
    z-index: 1;
}

.credenciado-endereco {
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.credenciado-endereco p {
    color: #505a68;
    font-size: 0.95em;
    margin-bottom: 5px;
    line-height: 1.5;
}

.credenciado-endereco i {
    color: #0070e0;
    margin-right: 8px;
}

.credenciado-contato {
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
    z-index: 1;
}

.credenciado-contato a {
    display: flex;
    align-items: center;
    color: #505a68;
    text-decoration: none;
    font-size: 0.95em;
    transition: all 0.3s ease;
}

.credenciado-contato a i {
    color: #0070e0;
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

.credenciado-contato a:hover {
    color: #0070e0;
    transform: translateX(5px);
}

.no-results {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 25px rgba(0, 112, 224, 0.05);
    margin: 40px auto;
    max-width: 600px;
}

.no-results i {
    font-size: 3em;
    color: #ccc;
    margin-bottom: 20px;
}

.no-results h3 {
    font-size: 1.6em;
    color: #0a2540;
    margin-bottom: 15px;
}

.no-results p {
    color: #505a68;
    font-size: 1.1em;
}

/* CTA Section */
.cred-cta {
    background: linear-gradient(135deg, #0070e0 0%, #00a2ff 100%);
    color: #fff;
    padding: 80px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    margin-top: 80px;
}

.cred-cta::before,
.cred-cta::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.05);
    z-index: 1;
}

.cred-cta::before {
    width: 300px;
    height: 300px;
    top: -100px;
    right: -80px;
}

.cred-cta::after {
    width: 250px;
    height: 250px;
    bottom: -70px;
    left: -70px;
}

.cred-cta .container {
    position: relative;
    z-index: 2;
    padding: 0 20px;
}

.cred-cta h2 {
    font-size: 2.4em;
    margin-bottom: 25px;
    font-weight: 600;
    text-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.cred-cta p {
    font-size: 1.2em;
    margin-bottom: 35px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0.9;
}

.cred-cta .btn-primary {
    background: #fff;
    color: #0070e0;
    padding: 15px 35px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1em;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
    z-index: 1;
    border: 2px solid transparent;
    letter-spacing: 0.5px;
}

.cred-cta .btn-primary:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    background-color: rgba(255,255,255,0.95);
}

/* Responsividade */
@media (max-width: 992px) {
    .search-filters {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .credenciados-hero h1 { 
        font-size: 2.5em; 
    }
    .credenciados-hero p { 
        font-size: 1.1em; 
    }
    .search-container {
        padding: 25px;
    }
    .search-filters {
        grid-template-columns: 1fr;
    }
    .search-container h2 { 
        font-size: 1.8em; 
    }
    .search-results {
        grid-template-columns: 1fr;
    }
    .cred-cta h2 { 
        font-size: 2em; 
    }
    .cred-cta p { 
        font-size: 1.1em; 
    }
}
