/**
 * CSS para página pública de Agências Conveniadas
 * IFSP Campus Guarulhos
 */

/* Container principal */
.agencias-conveniadas {
    background: #f5f7f9;
    padding: 0;
    margin: 0;
}

/* Cabeçalho */
.agencias-header {
    background: linear-gradient(135deg, #006633 0%, #004d26 100%);
    color: white;
    padding: 2rem;
    text-align: center;
    margin: 0 0 2rem 0;
}

.agencias-header h1 {
    margin: 0 0 0.5rem 0;
    font-size: 2rem;
    font-weight: 700;
    color: white;
}

.agencias-header p {
    margin: 0;
    font-size: 1.125rem;
    opacity: 0.95;
}

/* Container de conteúdo */
.agencias-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 40px 20px;
}

/* Introdução */
.agencias-intro {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
    border-left: 4px solid #006633;
}

.agencias-intro p {
    margin: 0;
    line-height: 1.7;
    color: #333;
}

/* Wrapper da tabela */
.agencias-table-wrapper {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
}

/* Tabela */
.agencias-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

.agencias-table thead {
    background: #006633;
    color: white;
}

.agencias-table thead th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.9375rem;
    border-bottom: 2px solid #004d26;
}

.agencias-table tbody tr {
    border-bottom: 1px solid #e9ecef;
    transition: background-color 0.2s ease;
}

.agencias-table tbody tr:hover {
    background-color: #f8f9fa;
}

.agencias-table tbody tr:last-child {
    border-bottom: none;
}

.agencias-table tbody td {
    padding: 1rem;
    vertical-align: middle;
}

/* Coluna Logo */
.agencias-logo-col {
    width: 120px;
}

.agencias-logo-link {
    display: block;
    text-decoration: none;
}

.agencias-logo {
    width: 100px;
    height: 60px;
    object-fit: contain;
    border-radius: 4px;
    border: 1px solid #e9ecef;
    padding: 5px;
    background: white;
    transition: all 0.3s ease;
}

.agencias-logo:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-color: #006633;
}

.agencias-logo-placeholder {
    width: 100px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #006633 0%, #004d26 100%);
    color: white;
    font-weight: bold;
    font-size: 1.5rem;
    border-radius: 4px;
    border: 1px solid #004d26;
}

/* Coluna Nome */
.agencias-nome-col {
    min-width: 200px;
}

.agencias-nome {
    font-weight: 600;
    color: #006633;
    font-size: 1rem;
    margin: 0 0 0.25rem 0;
}

.agencias-sigla {
    display: inline-block;
    background: #e9f5ef;
    color: #006633;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Coluna Email */
.agencias-email-col {
    min-width: 180px;
}

.agencias-email {
    display: inline-flex;
    align-items: center;
    color: #006633;
    text-decoration: none;
    font-size: 0.9375rem;
    transition: color 0.2s ease;
}

.agencias-email:hover {
    color: #004d26;
    text-decoration: underline;
}

.agencias-email::before {
    content: "✉";
    margin-right: 0.5rem;
    font-size: 1.125rem;
}

/* Coluna Telefone */
.agencias-telefone-col {
    min-width: 140px;
}

.agencias-telefone {
    display: inline-flex;
    align-items: center;
    color: #333;
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.agencias-telefone:hover {
    color: #006633;
}

.agencias-telefone::before {
    content: "📞";
    margin-right: 0.5rem;
}

/* Loading */
.agencias-loading {
    text-align: center;
    padding: 3rem;
}

.agencias-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #006633;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Mensagem vazia */
.agencias-empty {
    text-align: center;
    padding: 3rem;
    color: #6c757d;
}

.agencias-empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Contador */
.agencias-contador {
    text-align: right;
    padding: 1rem;
    color: #6c757d;
    font-size: 0.875rem;
    border-top: 1px solid #e9ecef;
}

/* Rodapé */
.agencias-footer {
    background: #343a40;
    color: white;
    padding: 1.5rem;
    text-align: center;
    margin-top: 3rem;
}

.agencias-footer p {
    margin: 0.5rem 0;
    font-size: 0.9375rem;
}

.agencias-footer a {
    color: white;
    text-decoration: underline;
}

.agencias-footer a:hover {
    color: #e9ecef;
}

/* Responsividade */
@media (max-width: 768px) {
    .agencias-header h1 {
        font-size: 1.5rem;
    }
    
    .agencias-header p {
        font-size: 1rem;
    }
    
    .agencias-table {
        font-size: 0.875rem;
    }
    
    .agencias-table thead th,
    .agencias-table tbody td {
        padding: 0.75rem 0.5rem;
    }
    
    .agencias-logo-col {
        width: 80px;
    }
    
    .agencias-logo,
    .agencias-logo-placeholder {
        width: 70px;
        height: 45px;
        font-size: 1.125rem;
    }
    
    .agencias-nome {
        font-size: 0.9375rem;
    }
    
    .agencias-sigla {
        font-size: 0.6875rem;
    }
}

@media (max-width: 576px) {
    /* Em mobile, cada agência vira um card */
    .agencias-table thead {
        display: none;
    }
    
    .agencias-table tbody,
    .agencias-table tbody tr,
    .agencias-table tbody td {
        display: block;
        width: 100%;
    }
    
    .agencias-table tbody tr {
        margin-bottom: 1rem;
        border: 1px solid #e9ecef;
        border-radius: 8px;
        padding: 1rem;
    }
    
    .agencias-table tbody td {
        padding: 0.5rem 0;
        border: none;
    }
    
    .agencias-logo-col,
    .agencias-nome-col,
    .agencias-email-col,
    .agencias-telefone-col {
        width: 100%;
        min-width: 0;
    }
    
    .agencias-logo-col {
        text-align: center;
        margin-bottom: 1rem;
    }
    
    .agencias-logo,
    .agencias-logo-placeholder {
        width: 120px;
        height: 70px;
        margin: 0 auto;
    }
    
    .agencias-nome-col {
        text-align: center;
        margin-bottom: 1rem;
    }
    
    .agencias-email-col,
    .agencias-telefone-col {
        text-align: center;
    }
}