@font-face {
    font-family: 'Roobert';
    src: url('fonts/Roobert Regular.woff') format('woff');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Roobert';
    src: url('fonts/Roobert Bold.woff') format('woff');
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: 'Roobert';
    src: url('fonts/Roobert Regular Italic.woff') format('woff');
    font-weight: 400;
    font-style: italic;
}

:root {
    --font-serif: 'Roobert', sans-serif;
    --font-sans: 'Roobert', sans-serif;
    --color-text: #333333;
    --color-primary: #00529B;
    --color-border: #c89c513b;
    --color-background:#FFFCEE;
    --color-footer-bg: #2c3e50;
    --color-footer-legal-bg: #000000;
    --color-footer-text: #bdc3c7;
    --color-footer-title: #ffffff;
    --color-footer-border: #465a6f;
}

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

body {
    font-family: var(--font-sans);
    color: var(--color-text);
    background-color: var(--color-background);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.hero {
    text-align: center;
    padding: 50px 0;
}
.hero h1 { 
    font-family: var(--font-serif); 
    font-size: 2.8rem; 
    margin-bottom: 10px; 
}
.hero p {
    font-size: 1.1rem;
    color: #333;
    max-width: 700px;
    margin: 0 auto;
}

.disclaimer {
    background-color: #f9f9f9;
    padding: 15px 0;
    font-size: 0.9rem;
    color: #252525;
    text-align: center;
    border-bottom: 1px solid var(--color-border);
    border-radius: 6px;
    max-width: 1160px;
    margin: 0 auto;
}

/* --- Selector de Candidatos --- */
.selector-container {
    background-color: #fff;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 40px;
    border: 1px solid var(--color-border);
}
.selector-container h2 {
    text-align: center;
    font-family: var(--font-serif);
    margin-bottom: 10px;
    font-size: 1.5rem;
    line-height: 1.5;
}

.max-candidates-note {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 10px;
    font-style: italic;
    padding: 0px 20px 0px 20px;
    position: relative;
}

.search-container {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    max-width: 800px;
    margin: 10px auto;
    padding: 14px 14px 14px 28px;
    border-radius: 32px;
    border: 2px solid #edeff2;
    background-color: #fff;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    transition: var(--transition-fast);
}

.search-container:focus-within {
    border-color: var(--primary-purple);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

.search-container textarea {
    font-family: var(--font-serif);
    flex-grow: 1;
    border: none;
    background-color: transparent;
    box-shadow: none;
    padding: 0;
    margin: 0;
    font-size: 16px;
    line-height: 1.5;
    resize: none;
    overflow-y: hidden;
    min-height: 24px;
    color: #1e1e1e;
}

.search-container textarea:focus {
    outline: none;
}

.search-container textarea::placeholder {
    color: #4b5563;
}

.close-button {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #1e1e1e;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: bolder;
    visibility: hidden;
}
.close-button.visible {
    visibility: visible;
}

.close-button:hover {
    transform: scale(1.05);
    background-color: #000;
}

.reset-btn {
    background: none;
    border: 1px solid #666;
    color: #666;
    padding: 5px 10px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.8rem;
}

#note-text {
    margin: 0 auto;
}

.candidate-selector {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 20px;
    justify-content: center;
}

.candidate-profile {
    text-align: center;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.3s ease, transform 0.3s ease;
    padding: 10px 10px 20px 10px;
    border: 2px solid var(--color-border);
    border-radius: 8px;
    background: white;
    backface-visibility: hidden;
}
.candidate-profile:not([data-disabled="true"]):hover {
    opacity: 1;
    transform: scale(1.02);
}

.candidate-profile:not([data-disabled="true"]):active {
    transform: scale(0.98);
    opacity: 0.8;
}
.candidate-profile[data-selected="true"] {
    opacity: 1;
    border-color: var(--color-primary);
    box-shadow: 0 4px 15px rgba(0, 82, 155, 0.1);
}

@supports (-webkit-overflow-scrolling: touch) {
    .candidate-profile[data-selected="true"] {
        box-shadow: none;
    }
}
.candidate-profile[data-disabled="true"] {
    opacity: 0.3;
    cursor: not-allowed;
    transform: translateY(0); /* Prevenir hover effect */
}

.candidate-profile img {
    width: 100%;
    height: 70%;
    border-radius: 5%;
    object-fit: cover;
    margin-bottom: 10px;
}

.candidate-profile span {
    font-weight: 600;
    font-size: 0.9rem;
    display: block;
    line-height: 1.5;
}

/* --- Navegación de Temas --- */
.topic-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--color-border);
}
.topic-btn {
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 600;
    background: none;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    color: #333;
    position: relative;
    -webkit-transition: color 0.3s ease;
    transition: color 0.3s ease;
}
.topic-btn::after { 
    content: ''; 
    position: absolute; 
    bottom: 0; 
    left: 50%; 
    transform: translateX(-50%); 
    width: 0; 
    height: 3px; 
    background-color: var(--color-primary); 
    -webkit-transition: width 0.3s ease;
    transition: width 0.3s ease;
}
.topic-btn:hover { color: var(--color-text); }
.topic-btn.active { color: var(--color-primary); }
.topic-btn.active::after { width: 100%; }

/* --- Área de Comparación Dinámica --- */
.comparison-content-area {
    min-height: 400px;
    margin-bottom: 20px;
}

.comparison-placeholder {
    text-align: center;
    padding: 50px 20px;
    color: #666;
    font-size: 1.1rem;
    font-style: italic;
}
.comparison-grid {
    display: grid;
    gap: 30px;
    opacity: 0;
    -webkit-animation: fadeIn 0.5s forwards;
    animation: fadeIn 0.5s forwards;
}
@-webkit-keyframes fadeIn { to { opacity: 1; } }
@keyframes fadeIn { to { opacity: 1; } }

.proposal-card {
    display: flex; 
    flex-direction: column; 
    background-color: #fff; 
    border: 1px solid var(--color-border); 
    border-radius: 8px;
}

.card-header { 
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}
.card-header h3 { font-family: var(--font-serif); font-size: 1.5rem; }
.card-header h3 a { text-decoration: none; color: #333333; }
.card-header h4 { font-size: 0.8rem; font-weight: 400; color: #777; }
.card-header img {
    display: block !important;
    width: 50px;
    height: 50px;
    border-radius: 15px;
    object-fit: cover;
}

.card-body { padding: 0 20px 20px; flex-grow: 1; }
.card-body ul { list-style: none; padding-left: 0; }
.card-body ul li { 
    padding-left: 25px; 
    position: relative; 
    margin-bottom: 12px; 
}
.card-body ul li::before { 
    content: '✓'; 
    position: absolute; 
    left: 0; 
    color: var(--color-primary); 
    font-weight: bold; 
}

.card-footer { 
    padding: 20px; 
    border-top: 1px solid var(--color-border); 
}
.source { 
    font-size: 0.9rem; 
    color: #777; 
    font-style: italic; 
}

/* --- Estilos del Footer --- */
.site-footer {
    color: var(--color-footer-text);
    font-size: 0.9rem;
    margin-top: 50px; /* Separación del contenido principal */
}

/* Sección de Créditos */
.footer-credits {
    background-color: var(--color-footer-bg);
    padding: 50px 0;
}

.footer-credits h2 {
    text-align: center;
    color: var(--color-footer-title);
    font-family: var(--font-sans);
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 40px;
}

.credits-columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.credit-column {
    padding: 0 20px;
    position: relative;
}

.credit-column:not(:first-child)::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 1px;
    background-color: var(--color-footer-border);
    opacity: 0.5;
}

.credit-column h3 {
    color: var(--color-footer-title);
    font-weight: 600;
    margin-bottom: 15px;
}

.credit-column ul {
    list-style: none;
    padding: 0;
}

.credit-column ul li {
    margin-bottom: 8px;
    padding-left: 15px;
    position: relative;
}

.credit-column ul li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--color-footer-title);
}

/* Sección de Redes Sociales */
.footer-social {
    background-color: var(--color-footer-bg);
    padding: 30px 20px 30px 20px;
    border-top: 1px solid var(--color-footer-border);
    text-align: center;
}

.footer-social p {
    margin-bottom: 20px;
    font-weight: 600;
}

.social-icons a {
    display: inline-block;
    margin: 0 15px;
    text-decoration: none;
    -webkit-transition: -webkit-transform 0.3s ease;
    transition: transform 0.3s ease;
}

.social-icons a:hover {
    transform: scale(1.2);
}

.social-icon-svg {
    width: 32px;
    height: 32px;
    vertical-align: middle;
    filter: brightness(0) invert(1);
}

/* Sección Legal */
.footer-legal {
    background-color: var(--color-footer-legal-bg);
    padding: 20px 0;
    font-size: 0.8rem;
}

.legal-content {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}



.legal-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 15px;
}

.legal-links a {
    color: var(--color-footer-text);
    text-decoration: none;
    padding: 0 10px;
    border-right: 1px solid var(--color-footer-text);
}

.legal-links a:last-child {
    border-right: none;
}

.legal-links a:hover {
    text-decoration: underline;
}

.copyright p {
    margin: 0;
}

/* --- Top Header --- */
.top-header-wrapper {
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 50;
}
.top-header {
    padding-left: 1rem;
    padding-right: 1rem;
    align-items: center;
    max-width: 80rem;
    display: flex;
    margin-left: auto;
    margin-right: auto;
    height: 60px;
    position: sticky;
    top: 0;
    z-index: 50;
    background-color: var(--color-background);
}
.empty-container {
    display: none;
    flex: 1 1 0%;
}
.logo-container {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    margin-left: auto;
    margin-right: auto;
    gap: 0.8rem;
    text-decoration: none;
}
.text-presidencial {
    color: rgb(31 41 55);
    font-weight: 600;
    font-size: .75rem;
    line-height: 1rem;
}
.text-container {
    border: 0 solid #e5e7eb;
    border-color: #cccccc60;
    padding-left: .5rem;
    border-left-width: 1px;
    margin-left: .5rem;
}
.site-container {
    display: none;
    justify-content: flex-end;
    flex: 1 1 0%;
}
.site-container a {
    display: flex;
    font-weight: 600;
    gap: .5rem;
    align-items: center;
    color: rgb(55 65 81);
}

.back-btn, .rpp-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    color: var(--color-primary);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 5px;
    -webkit-transition: background-color 0.3s ease;
    transition: background-color 0.3s ease;
    text-decoration: none;
}

.back-btn:hover, .rpp-btn:hover {
    background-color: rgba(0, 82, 155, 0.1);
}

.icon {
    width: 25px;
    height: 25px;
}

.logo img {
    height: 50px;
    max-width: 250px;
}

.separator {
    border: none;
    border-top: 1px solid var(--color-border);
    margin: 0;
}

.candidate-selector {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    gap: 15px;
    padding-top: 10px;
    padding-bottom: 10px;
    margin-left: -20px;
    margin-right: -20px;
    padding-left: 40px;
    padding-right: 40px;
    width: calc(100% + 40px);
    justify-content: flex-start;
}
.candidate-selector {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
}
.candidate-profile {
    flex-shrink: 0;
    width: 125px;
}

.candidate-profile {
    height: 200px;
}
#no-results-message {
    display: none;
    text-align: center;
    padding: 0px 20px 0px 20px;
}
#no-results-message.show {
    display: block;
}

@media (min-width: 768px) {
    .top-header {
        height: 90px;
    }
    .empty-container {
        display: block;
    }
    .site-container {
        display: flex;
    }
    .max-candidates-note {
        max-width: 800px;
        margin-left: auto;
        margin-right: auto;
    }
    .reset-btn {
        position: absolute;
        right: 20px;
    }
}
/* --- Media Queries --- */
@media (min-width: 769px) and (max-width: 992px) {
    .logo img {
        max-width: 225px;
    }
    .hero h1 {
        font-size: 2.5rem;
    }
    .disclaimer {
        margin-top: 20px;
    }
    .max-candidates-note {
        justify-content: center;
    }
}
@media (max-width: 992px) {
    .comparison-grid {
        grid-template-columns: 1fr 1fr !important;
    }
    .credits-columns {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .credit-column:not(:first-child)::before {
        display: none;
    }
    .credit-column ul li {
        text-align: left;
    }
    .legal-content {
        justify-content: center;
    }
}
@media (max-width: 768px) {
    .hero {
        padding: 24px 0;
    }

    .hero h1 {
        font-size: 1.7rem;
        line-height: 1.2;
    }

    .hero p {
        font-size: 1.1rem;
        line-height: 1.4;
    }

    .selector-container h2 {
        font-size: 1.3rem;
        line-height: 1.3;
        padding: 0px 20px 0px 20px;
    }
    
    .comparison-grid {
        grid-template-columns: 1fr !important;
        gap: 16px;
    }
    .disclaimer {
        margin-top: 30px;
    }
    .btn-text {
        display: none;
    }
    .logo img {
        max-width: 200px;
    }
    .selector-container {
        padding: 16px 0;
        margin-bottom: 16px;
    }
    .reset-btn {
        display: block;
    }
    .max-candidates-note {
        justify-content: space-between;
    }
    #note-text {
        margin: 0;
    }
    .topic-nav {
        display: flex;
        overflow-x: auto;
        flex-wrap: nowrap;
        justify-content: flex-start;
        gap: 10px;
        padding-left: 20px;
        padding-right: 20px;
        margin-left: -20px;
        margin-right: -20px;
        width: calc(100% + 40px);
    }
    .topic-btn {
        flex-shrink: 0;
        white-space: nowrap;
    }
    .social-icons a {
        margin: 0 8px;
    }
    .social-icon-svg {
        width: 28px;
        height: 28px;
    }
    .search-container {
        padding: 8px 8px 8px 16px;
        border-radius: 24px;
        margin: 10px 20px;
        width: auto;
    }
    .image-container {
        width: 117px;
    }
    .rpplogo-img {
        width: 40px;
    }
}

/* Centrar lista de candidatos en escritorio */
@media (min-width: 769px) {
    /*.candidate-selector {
        max-width: 850px;
        margin: 0 auto;
    }*/
}

