/* Variáveis de Design Moderno */
:root {
    --primary: #0c2036;
    --primary-light: #1a3a5a;
    --accent: #d4a72c;
    --accent-hover: #b88e1e;
    --text-main: #2d3436;
    --text-muted: #636e72;
    --bg-light: #f8f9fa;
    --white: #ffffff;
    --shadow-sm: 0 4px 6px rgba(0,0,0,0.05);
    --shadow-md: 0 10px 25px rgba(0,0,0,0.1);
    --radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Layout Geral */
.clerigo-page { background-color: #fff; overflow-x: hidden; }
.section-padding { padding: 60px 0; }

/* Hero Section */
.clerigo-hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    padding: 80px 0 60px;
    color: var(--white);
    position: relative;
    border-bottom: 5px solid var(--accent);
}

.clerigo-religious-order {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.clerigo-badge {
    background: var(--accent);
    color: var(--primary);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: inline-block;
    margin-bottom: 20px;
}

.clerigo-full-name {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    line-height: 1.2;
    margin-bottom: 10px;
}

.clerigo-tagline {
    font-size: 1.1rem;
    opacity: 0.85;
    margin-bottom: 30px;
}

/* Grid System */
.clerigo-grid {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 50px;
    align-items: start;
}

/* Sidebar Profile Card */
.profile-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    padding: 25px;
    position: sticky;
    top: 100px;
    text-align: center;
}

.profile-img-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9; /* Força a proporção landscape */
    margin-bottom: 20px;
    border-radius: var(--radius);
    overflow: hidden;
    background-color: #e9ecef;
}
.profile-img {
    width: 100%;
    height: 100%; /* Ocupa todo o espaço da proporção definida no pai */
    object-fit: cover; /* Garante que a imagem preencha sem distorcer */
    display: block;
    transition: var(--transition);
}

.profile-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: #dee2e6;
}

.status-indicator {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

.status-indicator.ativo { color: #27ae60; border: 1px solid #27ae60; }
.status-indicator.falecido { color: #636e72; background: #dfe6e9; }

.profile-quick-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin: 20px 0;
    padding: 15px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    text-align: left; /* Melhora leitura de nomes longos de ordens */
}

.info-row.full-width {
    grid-column: span 2;
}

.info-row { display: flex; flex-direction: column; }
.info-label { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; }
.info-value { font-weight: 700; color: var(--primary); }

.profile-socials {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.social-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.1rem;
    transition: var(--transition);
}

.social-icon.ins { background: #E1306C; }
.social-icon.fac { background: #1877F2; }
.social-icon.you { background: #FF0000; }
.social-icon.mail { background: var(--primary); }

.social-icon:hover { transform: translateY(-3px); filter: brightness(1.1); }

/* Main Content Area */
.block-title {
    font-family: 'Playfair Display', serif;
    color: var(--primary);
    font-size: 1.8rem;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.block-title::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #eee;
}

.bio-text {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-main);
  margin-bottom: 40px;
  max-width: 780px;
}

.bio-text p {
  margin: 0 0 1.25rem;
}

.bio-text p:last-child {
  margin-bottom: 0;
}

/* Sacramental Data Cards */
.sacramental-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 50px;
}

.sacramental-card {
    background: var(--bg-light);
    padding: 20px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    gap: 15px;
}

.sacramental-card i {
    font-size: 1.5rem;
    color: var(--accent);
}

.sacramental-card strong { display: block; font-size: 0.8rem; color: var(--text-muted); }
.sacramental-card span { font-weight: 700; color: var(--primary); }

/* Church Cards Section */
.church-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.church-mini-card {
    border: 1px solid #eee;
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
    display: block;
    text-decoration: none;
    color: inherit;
}

.church-mini-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-5px);
    transition: 0.2s ease;
}

.church-mini-img img {
    width: 100%;
    height: 160px;
    object-fit: cover;
}

.church-mini-body { padding: 15px; }
.church-bairro { font-size: 0.7rem; color: var(--accent); font-weight: 700; text-transform: uppercase; }
.church-title { font-size: 1.1rem; margin: 5px 0 15px; color: var(--primary); }

.btn-link {
    color: var(--primary);
    font-weight: 700;
    font-size: 0.85rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-link:hover { color: var(--accent); }

/* Share Buttons */
.share-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.share-link {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    transition: var(--transition);
    background: rgba(255,255,255,0.05);
}

.share-link:hover { background: var(--accent); color: var(--primary); border-color: var(--accent); }

/* Responsividade */
@media (max-width: 992px) {
    .clerigo-grid { grid-template-columns: 1fr; }
    .clerigo-sidebar { max-width: 500px; margin: -100px auto 40px; z-index: 10; }
    .clerigo-hero { padding: 60px 0 120px; text-align: center; }
    .share-group { justify-content: center; }
    .clerigo-religious-order { justify-content: center; }
}

@media (max-width: 600px) {
    .clerigo-hero { padding: 40px 0 100px; }
    .sacramental-grid { grid-template-columns: 1fr; }
}