/* Enhanced styles for Papal Succession website */

:root {
    --primary-color: #800020; /* Vatican burgundy */
    --secondary-color: #ffd700; /* Gold */
    --accent-color: #1a5276; /* Deep blue */
    --text-color: #333;
    --light-bg: #f8f8f8;
    --card-bg: #fff;
    --border-color: #ddd;
    --header-font: 'Cinzel', serif;
    --body-font: 'Lato', sans-serif;
    --shadow-sm: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-md: 0 6px 12px rgba(0,0,0,0.15);
    --shadow-lg: 0 10px 20px rgba(0,0,0,0.2);
    --transition-fast: 0.3s ease;
    --transition-med: 0.5s ease;
}

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700&family=Lato:wght@300;400;700&display=swap');

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

body {
    font-family: var(--body-font);
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--light-bg);
}

/* Header styles */
.header {
    background-image: url('images/vatican.jpeg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: white;
    padding: 0;
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.header::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.7));
    z-index: 1;
}

.header-content {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    padding: 2rem;
}

.header h1 {
    font-family: var(--header-font);
    font-size: 5rem;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    animation: fadeInDown 1.2s ease-out;
}

.header h2 {
    font-size: 2.2rem;
    font-weight: 300;
    margin-top: 0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    animation: fadeInUp 1.2s ease-out;
}

.language-selector {
    position: absolute;
    top: 1.5rem;
    right: 2rem;
    z-index: 10;
    display: flex;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 0.5rem 1rem;
    border-radius: 30px;
    backdrop-filter: blur(5px);
}

.language-label {
    margin-right: 0.8rem;
    color: white;
    font-weight: 500;
}

#language-select {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 20px;
    background-color: white;
    color: var(--primary-color);
    font-family: var(--body-font);
    cursor: pointer;
    font-weight: 500;
    transition: all var(--transition-fast);
}

#language-select:hover {
    background-color: var(--secondary-color);
    color: var(--text-color);
}

.nav {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 10;
    background-color: rgba(139, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-md);
}

.nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    padding: 1.2rem 0;
}

.nav ul li {
    margin: 0 1rem;
}

.nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1rem;
    padding: 0.5rem 1rem;
    border-radius: 30px;
    transition: all var(--transition-fast);
    position: relative;
}

.nav ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 50%;
    background-color: var(--secondary-color);
    transition: all var(--transition-fast);
    transform: translateX(-50%);
}

.nav ul li a:hover::after {
    width: 80%;
}

.nav ul li a.active {
    background-color: var(--secondary-color);
    color: var(--primary-color);
}

/* Main content */
main {
    position: relative;
    z-index: 1;
}

.section {
    padding: 5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

.section:nth-child(odd) {
    background-color: white;
}

.section h3 {
    font-family: var(--header-font);
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 2.5rem;
    text-align: center;
    position: relative;
    padding-bottom: 1rem;
}

.section h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
}

/* Intro section */
.intro {
    text-align: center;
    position: relative;
    overflow: hidden;
}

.intro p {
    font-size: 1.2rem;
    line-height: 1.8;
    max-width: 800px;
    margin: 0 auto 1.5rem;
}

/* Conclave section */
.conclave-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2.5rem;
    margin-top: 3rem;
}

.step {
    background-color: var(--card-bg);
    padding: 2.5rem 1.5rem;
    border-radius: 15px;
    box-shadow: var(--shadow-md);
    text-align: center;
    transition: transform var(--transition-med), box-shadow var(--transition-med);
    position: relative;
    overflow: hidden;
}

.step:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.step::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
}

.step-number {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 1.5rem;
    font-weight: bold;
    font-size: 1.3rem;
    box-shadow: var(--shadow-sm);
}

.step h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.4rem;
    font-family: var(--header-font);
}

/* Candidates section */
.candidates {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2.5rem;
    margin-top: 3rem;
}

.candidate-card {
    background-color: var(--card-bg);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-med), box-shadow var(--transition-med);
    position: relative;
}

.candidate-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: var(--shadow-lg);
}

.candidate-image {
    height: 250px;
    overflow: hidden;
    position: relative;
}

.candidate-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
}

.candidate-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-med);
}

.candidate-card:hover .candidate-image img {
    transform: scale(1.1);
}

.candidate-info {
    padding: 2rem;
}

.candidate-name {
    font-size: 1.8rem;
    margin: 0 0 0.5rem;
    color: var(--primary-color);
    font-family: var(--header-font);
}

.candidate-title {
    font-size: 1.1rem;
    color: #666;
    margin: 0 0 1.5rem;
    font-style: italic;
}

.candidate-details {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    background-color: var(--light-bg);
    padding: 1rem;
    border-radius: 10px;
}

.candidate-detail {
    text-align: center;
}

.detail-label {
    font-size: 0.9rem;
    color: #777;
    margin-bottom: 0.3rem;
}

.detail-value {
    font-weight: bold;
    color: var(--text-color);
    font-size: 1.1rem;
}

.candidate-stance {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    border-radius: 30px;
    display: inline-block;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.progressive {
    background-color: #e6f7ff;
    color: #0066cc;
    border: 1px solid #99ccff;
}

.moderate {
    background-color: #f0f0f0;
    color: #666666;
    border: 1px solid #cccccc;
}

.conservative {
    background-color: #fff0f0;
    color: #cc0000;
    border: 1px solid #ffcccc;
}

.view-profile {
    display: inline-block;
    text-align: center;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    text-decoration: none;
    padding: 0.8rem 1.5rem;
    border-radius: 30px;
    transition: all var(--transition-fast);
    font-weight: 500;
    box-shadow: var(--shadow-sm);
}

.view-profile:hover {
    background: linear-gradient(135deg, var(--accent-color), var(--primary-color));
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

/* Prediction section */
.prediction {
    background-color: white;
    position: relative;
    overflow: hidden;
}

.prediction::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('images/vatican.jpeg');
    background-size: cover;
    background-position: center;
    opacity: 0.05;
    z-index: 0;
}

.prediction-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
}

.prediction-chart {
    margin: 3rem 0;
}

.prediction-bar {
    height: 50px;
    margin-bottom: 1.2rem;
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
    color: white;
    display: flex;
    align-items: center;
    padding-left: 1.5rem;
    border-radius: 10px;
    position: relative;
    font-weight: 500;
    font-size: 1.1rem;
    box-shadow: var(--shadow-sm);
    animation: growWidth 1.5s ease-out forwards;
    transform-origin: left;
}

@keyframes growWidth {
    from { width: 0; }
    to { width: var(--bar-width); }
}

.prediction-bar:nth-child(1) {
    --bar-width: 40%;
    animation-delay: 0.1s;
}

.prediction-bar:nth-child(2) {
    --bar-width: 25%;
    animation-delay: 0.3s;
}

.prediction-bar:nth-child(3) {
    --bar-width: 15%;
    animation-delay: 0.5s;
}

.prediction-bar:nth-child(4) {
    --bar-width: 10%;
    animation-delay: 0.7s;
}

.prediction-bar:nth-child(5) {
    --bar-width: 5%;
    animation-delay: 0.9s;
}

.prediction-bar:nth-child(6) {
    --bar-width: 5%;
    animation-delay: 1.1s;
}

.prediction-bar span {
    position: absolute;
    right: 1.5rem;
    font-weight: 700;
}

.prediction p {
    font-size: 1.2rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.prediction p strong {
    color: var(--primary-color);
}

/* Factors section */
.factors {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
    margin-top: 3rem;
}

.factor {
    background-color: var(--card-bg);
    border-radius: 15px;
    box-shadow: var(--shadow-md);
    padding: 2.5rem;
    transition: transform var(--transition-med), box-shadow var(--transition-med);
    position: relative;
    overflow: hidden;
}

.factor:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.factor::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: linear-gradient(to bottom, var(--primary-color), var(--accent-color));
}

.factor h4 {
    color: var(--primary-color);
    margin-bottom: 1.2rem;
    font-size: 1.5rem;
    font-family: var(--header-font);
}

.factor p {
    font-size: 1.1rem;
    line-height: 1.7;
}

/* Footer */
.footer {
    background-color: #222;
    color: white;
    text-align: center;
    padding: 3rem 2rem;
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color), var(--accent-color));
}

.footer p {
    margin: 0.8rem 0;
}

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

.footer a:hover {
    color: white;
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Responsive styles */
@media (max-width: 1200px) {
    .header h1 {
        font-size: 4rem;
    }
    
    .header h2 {
        font-size: 1.8rem;
    }
}

@media (max-width: 992px) {
    .header {
        height: 80vh;
    }
    
    .header h1 {
        font-size: 3.5rem;
    }
    
    .header h2 {
        font-size: 1.6rem;
    }
    
    .section {
        padding: 4rem 2rem;
    }
    
    .section h3 {
        font-size: 2.2rem;
    }
    
    .candidates {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    .header {
        height: 70vh;
    }
    
    .header h1 {
        font-size: 2.8rem;
    }
    
    .header h2 {
        font-size: 1.4rem;
    }
    
    .language-selector {
        top: 1rem;
        right: 1rem;
    }
    
    .nav ul {
        flex-wrap: wrap;
        padding: 0.8rem 0;
    }
    
    .nav ul li {
        margin: 0.3rem 0.5rem;
    }
    
    .section {
        padding: 3rem 1.5rem;
    }
    
    .section h3 {
        font-size: 2rem;
    }
    
    .step {
        padding: 2rem 1rem;
    }
    
    .candidates {
        grid-template-columns: 1fr;
    }
    
    .factor {
        padding: 2rem;
    }
}

@media (max-width: 576px) {
    .header {
        height: 60vh;
    }
    
    .header h1 {
        font-size: 2.2rem;
    }
    
    .header h2 {
        font-size: 1.2rem;
    }
    
    .section h3 {
        font-size: 1.8rem;
    }
    
    .candidate-details {
        flex-direction: column;
        gap: 1rem;
    }
    
    .candidate-detail {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .detail-label {
        margin-bottom: 0;
    }
}
