:root {
    --md-primary-fg-color: #aa0000;
    --md-accent-fg-color: #8a8a8a;
    --md-primary-bg-color: #ffffff;
}

.md-typeset h1 {
    font-weight: bold;
    color: var(--md-typeset-a-color);
}

.md-typeset h2 {
    font-weight: bold;
}

/* .md-header {
    background-color: #ffffff;
} */

/* Estilos para TFGs */

/* Grid de tarjetas de TFG */
.tfg-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin: 2rem 0;
}

/* Tarjeta individual de TFG */
.tfg-card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.tfg-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
    border-color: var(--md-primary-fg-color);
}

.tfg-card h3 {
    margin-top: 0;
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
    line-height: 1.3;
}

.tfg-card h3 a {
    color: var(--md-primary-fg-color);
    text-decoration: none;
}

.tfg-card h3 a:hover {
    text-decoration: underline;
}

.tfg-student {
    color: #2c3e50;
    font-size: 0.9rem;
    margin: 0.4rem 0 0.2rem 0;
}

.tfg-meta {
    color: #7f8c8d;
    font-size: 0.8rem;
    margin: 0.2rem 0;
    line-height: 1.3;
}

.tfg-tutor {
    color: #666;
    font-size: 0.85rem;
    margin: 0.2rem 0 0.6rem 0;
    font-style: italic;
}

.tfg-description {
    color: #444;
    line-height: 1.6;
    margin: 1rem 0;
    flex-grow: 1;
}

/* Tags de tecnologías */
.tfg-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 0.75rem 0;
}

.tag {
    background-color: var(--md-primary-fg-color);
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    transition: background-color 0.2s;
}

.tag:hover {
    background-color: #880000;
    color: white;
}

/* Enlaces de recursos */
.tfg-links {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    flex-wrap: wrap;
}

.btn-pdf,
.btn-github {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-pdf {
    background-color: #dc3545;
    color: white !important;
    position: relative;
    padding-left: 2.5rem;
}

.btn-pdf::before {
    content: "";
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1.2rem;
    height: 1.2rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 384 512' fill='white'%3E%3Cpath d='M320 464c8.8 0 16-7.2 16-16V160H256c-17.7 0-32-14.3-32-32V48H64c-8.8 0-16 7.2-16 16V448c0 8.8 7.2 16 16 16H320zM0 64C0 28.7 28.7 0 64 0H229.5c17 0 33.3 6.7 45.3 18.7l90.5 90.5c12 12 18.7 28.3 18.7 45.3V448c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V64z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

.btn-pdf:hover {
    background-color: #c82333;
    transform: scale(1.05);
    color: white !important;
}

.btn-github {
    background-color: #24292e;
    color: white !important;
    position: relative;
    padding-left: 2.5rem;
}

.btn-github::before {
    content: "";
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1.2rem;
    height: 1.2rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 496 512' fill='white'%3E%3Cpath d='M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

.btn-github:hover {
    background-color: #1b1f23;
    transform: scale(1.05);
    color: white !important;
}

/* Estilos para enlaces dentro de páginas de TFG individuales */
.tfg-resources {
    display: flex;
    gap: 0.5rem;
    margin: 1rem 0;
}

.btn-pdf.btn-small,
.btn-github.btn-small {
    padding: 0.25rem 0.5rem !important;
    padding-left: 1.75rem !important;
    font-size: 0.75rem !important;
}

.btn-pdf.btn-small::before,
.btn-github.btn-small::before {
    width: 0.85rem !important;
    height: 0.85rem !important;
    left: 0.4rem !important;
}

.md-typeset a.btn-pdf,
.md-typeset a.btn-github {
    display: inline-block;
    padding: 0.5rem 1rem;
    padding-left: 2.5rem;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
    position: relative;
}

.md-typeset a.btn-pdf {
    background-color: #dc3545;
    color: white !important;
}

.md-typeset a.btn-pdf::before {
    content: "";
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1.2rem;
    height: 1.2rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 384 512' fill='white'%3E%3Cpath d='M320 464c8.8 0 16-7.2 16-16V160H256c-17.7 0-32-14.3-32-32V48H64c-8.8 0-16 7.2-16 16V448c0 8.8 7.2 16 16 16H320zM0 64C0 28.7 28.7 0 64 0H229.5c17 0 33.3 6.7 45.3 18.7l90.5 90.5c12 12 18.7 28.3 18.7 45.3V448c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V64z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

.md-typeset a.btn-pdf:hover {
    background-color: #c82333;
    transform: scale(1.05);
    color: white !important;
}

.md-typeset a.btn-github {
    background-color: #24292e;
    color: white !important;
}

.md-typeset a.btn-github::before {
    content: "";
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1.2rem;
    height: 1.2rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 496 512' fill='white'%3E%3Cpath d='M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

.md-typeset a.btn-github:hover {
    background-color: #1b1f23;
    transform: scale(1.05);
    color: white !important;
}

/* Responsive */
@media (max-width: 768px) {
    .tfg-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .tfg-card {
        padding: 1.25rem;
    }
}

/* Modo oscuro (si está habilitado en MkDocs) */
[data-md-color-scheme="slate"] .tfg-card {
    background: #2d2d2d;
    border-color: #404040;
}

[data-md-color-scheme="slate"] .tfg-description {
    color: #d0d0d0;
}

[data-md-color-scheme="slate"] .tfg-student {
    color: #e0e0e0;
}

[data-md-color-scheme="slate"] .tfg-meta {
    color: #999;
}

[data-md-color-scheme="slate"] .tfg-tutor {
    color: #999;
}

[data-md-color-scheme="slate"] .tag {
    background-color: #404040;
    color: #e0e0e0;
}

/* .tfg-tags{
    display: none;
} */
