/* Estilos generales */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    scrollbar-width: thin;
    scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-bg);
}


:root {
    --primary-color: #7d68b2;
    --primary-dark: #6a4abb;
    --secondary-color: #2ecc71;
    --dark-bg: #1c1c1c;
    --section-bg: #252525;
    --text-color: #f5f5f5;
    --header-bg: #121212;
    --card-bg: #333;
    --terminal-bg: #0d0d0d;
    --sidebar-bg: #1a1a1a;
    --scrollbar-bg: #1c1c1c;
    --scrollbar-thumb: #333;
    --scrollbar-thumb-hover: #444;
}


html, body {
    text-align: justify;
    width: 100%;
    height: 100%;
    min-height: 100vh;
    overflow-x: hidden;
    background-color: var(--dark-bg);
    color: var(--text-color);
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
}


/* Scrollbar personalizado */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}


::-webkit-scrollbar-track {
    background: var(--scrollbar-bg);
}


::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 3px;
}


::-webkit-scrollbar-thumb:hover {
    background: var(--scrollbar-thumb-hover);
}


/* Sidebar */
.sidebar {
    width: 300px;
    height: 100vh;
    background-color: var(--sidebar-bg);
    position: fixed;
    left: 0;
    top: 0;
    padding: 20px;
    box-shadow: 2px 0 15px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    z-index: 100;
    overflow-y: auto;
    overflow-x: hidden;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}


.sidebar-header {
    text-align: center;
    margin-bottom: 20px;
}


.sidebar-profile {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
    margin-bottom: 10px;
    box-shadow: 0 0 15px rgba(125, 104, 178, 0.5);
}


.sidebar-subtitle {
    color: var(--primary-color);
    font-size: 0.8rem;
    margin-bottom: 10px;
    text-align: center;
}


/* Estilos para los iconos de HTB y VulnHub */
.platform-badges {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 15px;
}


.badge-item {
    display: flex;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.2);
    padding: 5px 10px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}


.badge-item a {
    display: flex;
    align-items: center;
    text-decoration: none;
}


.platform-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
    margin-right: 5px;
    filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.2));
}


.badge-count {
    font-size: 0.8rem;
    color: var(--text-color);
}


.sidebar-nav {
    display: flex;
    flex-direction: column;
    margin-bottom: 30px;
}


.sidebar-link {
    color: var(--text-color);
    text-decoration: none;
    padding: 10px 15px;
    margin: 5px 0;
    border-radius: 5px;
    transition: all 0.3s ease;
}


.sidebar-link:hover {
    background-color: var(--primary-color);
    transform: translateX(5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}


.sidebar-link i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}


/* YouTube Preview */
.youtube-preview {
    margin-top: 20px;
    padding: 15px;
    background-color: #222;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}


.youtube-preview h4 {
    margin-bottom: 10px;
    color: var(--primary-color);
}


.youtube-embed {
    margin-bottom: 10px;
    border-radius: 5px;
    overflow: hidden;
    height: 180px;
}


.youtube-link {
    display: block;
    text-align: center;
    color: var(--secondary-color);
    text-decoration: none;
    padding: 8px;
    transition: all 0.3s ease;
}


.youtube-link:hover {
    color: #fff;
    background-color: var(--secondary-color);
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}


/* Main Content */
.main-content {
    margin-left: 300px;
    width: calc(100% - 300px);
    overflow-x: hidden;
    overflow-y: auto;
}


/* Animaciones y efectos */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}


.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}


.highlight {
    color: var(--primary-color);
    font-weight: 600;
    text-shadow: 0 0 5px rgba(125, 104, 178, 0.3);
}


/* Secciones */
section {
    padding: 60px 30px;
    margin: 30px auto;
    max-width: 1000px;
    border-radius: 10px;
    background-color: var(--section-bg);
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.03);
}


h2 {
    font-size: 2rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
    margin-bottom: 30px;
    color: var(--text-color);
    font-family: 'Montserrat', sans-serif;
}


h2 i {
    color: var(--primary-color);
    margin-right: 10px;
    text-shadow: 0 0 5px rgba(125, 104, 178, 0.5);
}


/* Sección Sobre Mí */
.about-content {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    align-items: center;
}


.about-text {
    flex: 1;
    min-width: 300px;
}


/* Estilos para texto expandible */
.texto-expandible {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-out;
}


.texto-expandible.expandido {
    max-height: 1000px;
    transition: max-height 0.7s ease-in;
}


.btn-ver-mas {
    display: inline-block;
    margin-top: 15px;
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(125, 104, 178, 0.3);
}


.btn-ver-mas:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(125, 104, 178, 0.4);
}


.btn-ver-mas i {
    margin-left: 8px;
    transition: transform 0.3s ease;
}


.terminal {
    flex: 1;
    min-width: 300px;
    background-color: var(--terminal-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.05);
}


.terminal-header {
    background-color: #333;
    padding: 8px 15px;
    display: flex;
    align-items: center;
}


.terminal-button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 8px;
    background-color: #ff5f56;
    box-shadow: 0 0 3px rgba(255, 95, 86, 0.5);
}


.terminal-button:nth-child(2) {
    background-color: #ffbd2e;
    box-shadow: 0 0 3px rgba(255, 189, 46, 0.5);
}


.terminal-button:nth-child(3) {
    background-color: #27c93f;
    box-shadow: 0 0 3px rgba(39, 201, 63, 0.5);
}


.terminal-content {
    padding: 15px;
    font-family: monospace;
    color: #ddd;
}


.prompt {
    color: var(--secondary-color);
    margin-right: 8px;
    text-shadow: 0 0 5px rgba(46, 204, 113, 0.5);
}


/* Proyectos */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}


.project-card {
    background-color: var(--card-bg);
    padding: 25px;
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.03);
}


.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}


.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}


.project-card h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
}


.project-tags {
    margin: 15px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}


.tag {
    background-color: rgba(125, 104, 178, 0.2);
    color: var(--primary-color);
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    border: 1px solid rgba(125, 104, 178, 0.2);
}


.project-link {
    display: inline-block;
    margin-top: 15px;
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 500;
    transition: transform 0.3s ease;
}


.project-link:hover {
    transform: translateX(5px);
    text-shadow: 0 0 5px rgba(46, 204, 113, 0.5);
}


/* Contacto */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
}


.form-group {
    margin-bottom: 20px;
}


.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}


.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #444;
    border-radius: 5px;
    background-color: #2a2a2a;
    color: var(--text-color);
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}


.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(125, 104, 178, 0.3);
}


.form-group textarea {
    min-height: 150px;
    resize: vertical;
}


.submit-btn {
    display: inline-block;
    padding: 12px 25px;
    background: linear-gradient(45deg, var(--primary-color), var(--primary-dark));
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}


.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(125, 104, 178, 0.4);
}


/* Footer */
footer {
    text-align: center;
    padding: 30px 20px;
    background-color: var(--header-bg);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}


.social-icons {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
}


.social-link {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 45px;
    height: 45px;
    margin: 0 10px;
    background-color: #333;
    border-radius: 50%;
    color: var(--text-color);
    text-decoration: none;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
}


.social-link:hover {
    background-color: var(--primary-color);
    transform: translateY(-5px);
    color: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}


/* Responsive */
@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        width: 100%;
    }
    
    .menu-toggle {
        display: block;
        position: fixed;
        top: 20px;
        left: 20px;
        z-index: 101;
        background-color: var(--primary-color);
        color: white;
        border: none;
        border-radius: 50%;
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
        cursor: pointer;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    }
}

/* ============================
   ESTILOS PARA PÁGINA DE WRITEUPS
   ============================ */

/* Controles de WriteUps */
.writeups-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
    align-items: center;
    justify-content: space-between;
}

.search-box {
    position: relative;
    flex: 1;
    min-width: 250px;
}

.search-box i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-color);
}

.search-box input {
    width: 100%;
    padding: 12px 15px 12px 45px;
    background-color: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-color);
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(125, 104, 178, 0.2);
}

.filter-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 20px;
    background-color: var(--card-bg);
    color: var(--text-color);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    background-color: rgba(125, 104, 178, 0.2);
    border-color: var(--primary-color);
}

.filter-btn.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* Grid de WriteUps */
.writeups-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

/* Tarjetas de WriteUp */
.writeup-card {
    background-color: var(--card-bg);
    border-radius: 10px;
    padding: 20px 20px 25px 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.writeup-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.writeup-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    border-color: rgba(125, 104, 178, 0.3);
}

.writeup-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.platform-badge {
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.platform-badge.htb {
    background-color: rgba(155, 255, 67, 0.15);
    color: #9bff43;
    border: 1px solid rgba(155, 255, 67, 0.3);
}

.platform-badge.vulnhub {
    background-color: rgba(255, 87, 51, 0.15);
    color: #ff5733;
    border: 1px solid rgba(255, 87, 51, 0.3);
}

.platform-badge.thm {
    background-color: rgba(0, 189, 157, 0.15);
    color: #00bd9d;
    border: 1px solid rgba(0, 189, 157, 0.3);
}

.difficulty-badge {
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
}

.difficulty-badge.easy {
    background-color: rgba(46, 204, 113, 0.15);
    color: var(--secondary-color);
    border: 1px solid rgba(46, 204, 113, 0.3);
}

.difficulty-badge.medium {
    background-color: rgba(241, 196, 15, 0.15);
    color: #f1c40f;
    border: 1px solid rgba(241, 196, 15, 0.3);
}

.difficulty-badge.hard {
    background-color: rgba(231, 76, 60, 0.15);
    color: #e74c3c;
    border: 1px solid rgba(231, 76, 60, 0.3);
}

.difficulty-badge.insane {
    background-color: rgba(155, 89, 182, 0.15);
    color: #9b59b6;
    border: 1px solid rgba(155, 89, 182, 0.3);
}

.writeup-card h3 {
    color: var(--text-color);
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.writeup-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 15px 0 25px 0;
    padding-bottom: 15px;
    min-height: fit-content;
}

.writeup-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.writeup-date {
    font-size: 0.85rem;
    color: var(--text-color);
    opacity: 0.7;
}

.read-btn {
    padding: 6px 16px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.read-btn:hover {
    background-color: var(--primary-dark);
    transform: translateX(3px);
    box-shadow: 0 4px 12px rgba(125, 104, 178, 0.4);
}

/* Visor de WriteUp */
.writeup-viewer {
    width: 100%;
}

.writeup-viewer.hidden {
    display: none;
}

.writeups-grid.hidden {
    display: none;
}

.viewer-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--primary-color);
}

.back-btn {
    padding: 10px 20px;
    background-color: var(--card-bg);
    color: var(--text-color);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.back-btn:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateX(-3px);
}

.viewer-header h3 {
    flex: 1;
    color: var(--text-color);
    font-size: 1.8rem;
    margin: 0;
}

/* Contenido del WriteUp */
.writeup-content {
    background-color: var(--card-bg);
    padding: 30px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    line-height: 1.8;
}

.writeup-content h1,
.writeup-content h2,
.writeup-content h3,
.writeup-content h4,
.writeup-content h5,
.writeup-content h6 {
    color: var(--primary-color);
    margin-top: 30px;
    margin-bottom: 15px;
}

.writeup-content h1 {
    font-size: 2rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
}

.writeup-content h2 {
    font-size: 1.6rem;
}

.writeup-content h3 {
    font-size: 1.3rem;
}

.writeup-content p {
    margin-bottom: 15px;
    color: var(--text-color);
}

.writeup-content ul,
.writeup-content ol {
    margin: 15px 0;
    padding-left: 30px;
}

.writeup-content li {
    margin-bottom: 8px;
    color: var(--text-color);
}

.writeup-content a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

.writeup-content a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.writeup-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.writeup-content blockquote {
    margin: 20px 0;
    padding: 15px 20px;
    border-left: 4px solid var(--primary-color);
    background-color: rgba(125, 104, 178, 0.1);
    border-radius: 0 8px 8px 0;
}

.writeup-content code {
    background-color: rgba(0, 0, 0, 0.3);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: var(--secondary-color);
}

.writeup-content pre {
    background-color: #0d0d0d !important;
    border-radius: 8px;
    padding: 20px;
    overflow-x: auto;
    margin: 20px 0;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.writeup-content pre code {
    background-color: transparent;
    padding: 0;
    color: inherit;
    font-size: 0.9rem;
    line-height: 1.5;
}

.writeup-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.writeup-content table th,
.writeup-content table td {
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: left;
}

.writeup-content table th {
    background-color: rgba(125, 104, 178, 0.2);
    color: var(--primary-color);
    font-weight: 600;
}

.writeup-content table tr:hover {
    background-color: rgba(255, 255, 255, 0.02);
}

.writeup-content hr {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin: 30px 0;
}

/* Estados de carga y error */
.loading {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-color);
}

.loading i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    display: block;
}

.loading p {
    font-size: 1.1rem;
    color: var(--text-color);
    opacity: 0.8;
}

.no-writeups {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-color);
    grid-column: 1 / -1;
}

.no-writeups i {
    font-size: 4rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    display: block;
    opacity: 0.5;
}

.no-writeups p {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.no-writeups .hint {
    font-size: 0.9rem;
    opacity: 0.6;
}

.error-message {
    text-align: center;
    padding: 60px 20px;
    background-color: rgba(231, 76, 60, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(231, 76, 60, 0.3);
}

.error-message i {
    font-size: 3rem;
    color: #e74c3c;
    margin-bottom: 20px;
    display: block;
}

.error-message p {
    font-size: 1.1rem;
    color: var(--text-color);
    margin-bottom: 10px;
}

.error-detail {
    font-size: 0.9rem;
    opacity: 0.7;
    font-family: monospace;
}

/* Responsive para WriteUps */
@media (max-width: 768px) {
    .writeups-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .search-box {
        width: 100%;
    }

    .filter-buttons {
        justify-content: center;
    }

    .writeups-grid {
        grid-template-columns: 1fr;
    }

    .viewer-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .viewer-header h3 {
        font-size: 1.4rem;
    }

    .writeup-content {
        padding: 20px;
    }

    .writeup-content h1 {
        font-size: 1.6rem;
    }

    .writeup-content h2 {
        font-size: 1.3rem;
    }
}

/* Mejoras para tarjetas de WriteUps más compactas */
.writeup-card {
    min-height: 320px;
    max-height: 380px;
    display: flex;
    flex-direction: column;
}

.writeup-card h3 {
    min-height: 2.6em;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-box-orient: vertical;
}

.writeup-tags {
    min-height: 30px;
    max-height: 60px;
    overflow: hidden;
}

.writeup-footer {
    margin-top: auto;
}

.writeup-card img {
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .writeup-card {
        min-height: auto;
        max-height: none;
    }
}

/* Filtros dinámicos de WriteUps */
.filters-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 6px;
}

.filter-group .filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.platform-badge.hackthebox {
    background-color: rgba(155, 255, 67, 0.15);
    color: #9bff43;
    border: 1px solid rgba(155, 255, 67, 0.3);
}

.platform-badge.vulnhub {
    background-color: rgba(255, 87, 51, 0.15);
    color: #ff5733;
    border: 1px solid rgba(255, 87, 51, 0.3);
}

.platform-badge.tryhackme {
    background-color: rgba(0, 189, 157, 0.15);
    color: #00bd9d;
    border: 1px solid rgba(0, 189, 157, 0.3);
}
.platform-badge.dockerlabs {
    background-color: rgba(33, 150, 243, 0.15);
    color: #2196f3;
    border: 1px solid rgba(33, 150, 243, 0.3);
}


.platform-badge.otros {
    background-color: rgba(156, 163, 175, 0.15);
    color: #9ca3af;
    border: 1px solid rgba(156, 163, 175, 0.3);
}

@media (max-width: 768px) {
    .filters-container {
        gap: 12px;
    }
    
    .filter-group label {
        font-size: 0.85rem;
    }
}

/* Filtros deslizables con botones de navegación */
.filter-scroll-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-buttons-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 4px 0;
}

.filter-buttons-scroll::-webkit-scrollbar {
    display: none;
}

.scroll-btn {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    background-color: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: var(--text-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.scroll-btn:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.scroll-btn:active {
    transform: scale(0.95);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 6px;
}

.filter-btn {
    white-space: nowrap;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .scroll-btn {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }
    
    .filter-group label {
        font-size: 0.85rem;
    }
}

/* Filtros desplegables en una fila */
.filters-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-dropdown {
    position: relative;
}

.dropdown-toggle {
    padding: 10px 16px;
    background-color: var(--card-bg);
    color: var(--text-color);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.dropdown-toggle:hover {
    background-color: rgba(125, 104, 178, 0.2);
    border-color: var(--primary-color);
}

.dropdown-toggle .fa-chevron-down {
    font-size: 0.75rem;
    transition: transform 0.3s ease;
}

.filter-dropdown.active .dropdown-toggle .fa-chevron-down {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    background-color: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    min-width: 180px;
    max-height: 300px;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    z-index: 1000;
    display: none;
    animation: dropdownFadeIn 0.2s ease;
}

.dropdown-menu.show {
    display: block;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-item {
    width: 100%;
    padding: 10px 16px;
    background: none;
    border: none;
    color: var(--text-color);
    text-align: left;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background-color: rgba(125, 104, 178, 0.15);
}

.dropdown-item.active {
    background-color: var(--primary-color);
    color: white;
    font-weight: 600;
}

.dropdown-menu::-webkit-scrollbar {
    width: 6px;
}

.dropdown-menu::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
}

@media (max-width: 768px) {
    .filters-row {
        flex-direction: row;
        gap: 8px;
    }
    
    .dropdown-toggle {
        padding: 8px 12px;
        font-size: 0.85rem;
    }
    
    .dropdown-menu {
        min-width: 150px;
    }
}


/* ============================
   BANNER DE NUEVA SECCIÓN
   ============================ */

.new-section-banner {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2147483647;
    animation: slideDown 0.5s ease forwards;
    max-width: 90%;
    width: 600px;
}

.banner-content {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    padding: 20px 25px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    gap: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.banner-icon {
    font-size: 2rem;
    color: #ffd700;
    animation: pulse 2s ease-in-out infinite;
    flex-shrink: 0;
}

.banner-text {
    flex: 1;
    color: white;
}

.banner-text h4 {
    margin: 0 0 5px 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
}

.banner-text p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.95;
    color: white;
}

.banner-text strong {
    color: #ffd700;
    font-weight: 600;
}

.banner-button {
    padding: 10px 20px;
    background-color: white;
    color: var(--primary-dark);
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.banner-button:hover {
    background-color: #ffd700;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.banner-button i {
    transition: transform 0.3s ease;
}

.banner-button:hover i {
    transform: translateX(3px);
}

.banner-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.banner-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translate(-50%, -50px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

@keyframes slideOut {
    from {
        opacity: 1;
        transform: translate(-50%, 0);
    }
    to {
        opacity: 0;
        transform: translate(-50%, -50px);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* Responsive para el banner */
@media (max-width: 768px) {
    .new-section-banner {
        top: 10px;
        width: calc(100% - 20px);
        max-width: none;
    }

    .banner-content {
        flex-direction: column;
        text-align: center;
        padding: 15px 20px;
    }

    .banner-text h4 {
        font-size: 1rem;
    }

    .banner-text p {
        font-size: 0.85rem;
    }

    .banner-button {
        width: 100%;
        justify-content: center;
    }
}

/* ============================
   AVISO DE DESARROLLO EN WRITEUPS
   ============================ */

.dev-notice {
    background: linear-gradient(135deg, rgba(125, 104, 178, 0.15) 0%, rgba(106, 74, 187, 0.15) 100%);
    border: 2px solid var(--primary-color);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 40px;
    display: flex;
    gap: 25px;
    align-items: center;
    box-shadow: 0 8px 25px rgba(125, 104, 178, 0.2);
    position: relative;
    overflow: hidden;
}

.dev-notice::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color), var(--primary-color));
    background-size: 200% 100%;
    animation: gradientMove 3s ease infinite;
}

@keyframes gradientMove {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.dev-notice-icon {
    font-size: 4rem;
    color: var(--primary-color);
    flex-shrink: 0;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.dev-notice-content {
    flex: 1;
}

.dev-notice-content h3 {
    color: var(--primary-color);
    margin: 0 0 15px 0;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dev-notice-content h3 i {
    font-size: 1.3rem;
}

.dev-notice-content p {
    color: var(--text-color);
    margin: 0 0 20px 0;
    line-height: 1.6;
    font-size: 1rem;
}

.dev-notice-features {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: rgba(46, 204, 113, 0.1);
    padding: 8px 15px;
    border-radius: 20px;
    border: 1px solid rgba(46, 204, 113, 0.3);
}

.feature-item i {
    color: var(--secondary-color);
    font-size: 1rem;
}

.feature-item span {
    font-size: 0.9rem;
    color: var(--text-color);
    font-weight: 500;
}

/* Responsive para aviso de desarrollo */
@media (max-width: 768px) {
    .dev-notice {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }

    .dev-notice-icon {
        font-size: 3rem;
    }

    .dev-notice-content h3 {
        font-size: 1.3rem;
        justify-content: center;
    }

    .dev-notice-features {
        justify-content: center;
    }

    .feature-item {
        font-size: 0.85rem;
    }
}


/* ============================================
   ESTILOS PARA BUSCADOR Y CHECKBOXES
   ============================================ */

.dropdown-search {
    padding: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.02);
}

.dropdown-search input {
    width: 100%;
    padding: 10px 14px;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    color: #fff;
    font-size: 14px;
    transition: all 0.3s ease;
}

.dropdown-search input::placeholder {
    color: rgba(255, 255, 255, 0.4);
    font-style: italic;
}

.dropdown-search input:focus {
    outline: none;
    border-color: var(--primary-color, #00ff88);
    background-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.2);
}

.dropdown-item input[type="checkbox"] {
    margin-right: 10px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-color, #00ff88);
    vertical-align: middle;
}

.dropdown-item:hover {
    background-color: rgba(255, 255, 255, 0.08);
}

.writeup-tags span {
    display: inline-block;
    margin-bottom: 8px;
}

.writeup-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.writeup-content {
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.writeup-card * {
    overflow: visible;
}



/* ====================================
   MODAL PARA PREVISUALIZACIÓN MEDIUM
   ==================================== */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    justify-content: center;
    align-items: center;
    z-index: 2147483647;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(28, 28, 28, 0.95);
    z-index: 1;
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    background-color: #1a1a1a;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.9);
    max-width: 90vw;
    max-height: 90vh;
    width: 900px;
    overflow-y: auto;
    z-index: 2;
    animation: slideUp 0.3s ease;
}

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

.close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 32px;
    font-weight: bold;
    color: #fff;
    cursor: pointer;
    user-select: none;
    z-index: 10;
    transition: all 0.3s ease;
    line-height: 1;
}

.close:hover {
    color: #7d68b2;
    transform: rotate(90deg);
}

/* Loading state */
.modal-loading {
    text-align: center;
    padding: 60px 20px;
    color: #ccc;
}

.modal-loading i {
    font-size: 48px;
    color: #7d68b2;
    margin-bottom: 20px;
}

.modal-loading p {
    font-size: 1.1rem;
    margin-top: 10px;
}

/* Article content */
.modal-article {
    color: #f5f5f5;
}

.modal-article-title {
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 20px 0;
    padding-right: 40px;
    line-height: 1.3;
    border: none;
}

.modal-article-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #333;
    color: #999;
    font-size: 0.9rem;
}

.modal-article-meta span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-article-meta i {
    color: #7d68b2;
}

.modal-article-content {
    line-height: 1.8;
    font-size: 1.05rem;
    color: #e0e0e0;
    margin-bottom: 30px;
}

/* Estilos para el contenido de Medium */
.medium-article-p {
    margin-bottom: 20px;
    line-height: 1.8;
}

.medium-article-heading {
    color: #fff;
    margin: 30px 0 15px 0;
    font-weight: 600;
}

.medium-article-img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
    display: block;
}

.medium-article-code {
    background-color: #0d0d0d;
    border: 1px solid #333;
    border-radius: 6px;
    padding: 15px;
    overflow-x: auto;
    margin: 20px 0;
    color: #f8f8f2;
    font-family: 'Courier New', monospace;
}

.modal-article-content a {
    color: #7d68b2;
    text-decoration: none;
    border-bottom: 1px solid #7d68b2;
    transition: all 0.3s ease;
}

.modal-article-content a:hover {
    color: #9f8cc9;
    border-bottom-color: #9f8cc9;
}

.modal-article-content ul,
.modal-article-content ol {
    margin: 20px 0;
    padding-left: 30px;
}

.modal-article-content li {
    margin-bottom: 10px;
}

.modal-article-content blockquote {
    border-left: 4px solid #7d68b2;
    padding-left: 20px;
    margin: 20px 0;
    font-style: italic;
    color: #ccc;
}

/* Read more button */
.modal-read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #7d68b2, #6a4abb);
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-top: 20px;
}

.modal-read-more:hover {
    background: linear-gradient(135deg, #6a4abb, #7d68b2);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(125, 104, 178, 0.4);
}

/* Error state */
.modal-error {
    text-align: center;
    padding: 60px 20px;
    color: #ccc;
}

.modal-error i {
    font-size: 48px;
    color: #e74c3c;
    margin-bottom: 20px;
}

.modal-error p {
    font-size: 1.1rem;
    margin-bottom: 30px;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #7d68b2, #6a4abb);
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #6a4abb, #7d68b2);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(125, 104, 178, 0.4);
}

/* Scrollbar personalizado para modal */
.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: #0d0d0d;
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: #444;
}


/* ====================================
   BADGE NUEVO PARA WRITEUPS
   ==================================== */



.new-badge i {
    font-size: 0.7rem;
    animation: sparkle 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(46, 204, 113, 0.3);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 4px 12px rgba(46, 204, 113, 0.5);
    }
}

@keyframes sparkle {
    0%, 100% {
        opacity: 1;
        transform: rotate(0deg);
    }
    50% {
        opacity: 0.7;
        transform: rotate(180deg);
    }
}

/* Ajustar el header de writeup para el badge */
.writeup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}


/* Responsive */
@media (max-width: 768px) {
    .modal-content {
        padding: 20px;
        width: 95vw;
        max-height: 95vh;
    }

    .modal-article-title {
        font-size: 1.5rem;
        padding-right: 35px;
    }

    .modal-article-content {
        font-size: 1rem;
    }

    .close {
        font-size: 28px;
        top: 10px;
        right: 15px;
    }

    .modal-article-meta {
        flex-direction: column;
        gap: 10px;
    }

    .new-badge {
        font-size: 0.7rem;
        padding: 3px 10px;
    }
}


/* ====================================
   NUEVOS ESTILOS - BADGE NUEVO Y COMPARTIR
   ==================================== */

.new-badge {
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    color: white;
    border: 1px solid rgba(46, 204, 113, 0.4);
    box-shadow: 0 2px 8px rgba(46, 204, 113, 0.3);
    animation: pulse 2s ease-in-out infinite;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.new-badge i {
    font-size: 0.7rem;
    animation: sparkle 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(46, 204, 113, 0.3);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 4px 12px rgba(46, 204, 113, 0.5);
    }
}

@keyframes sparkle {
    0%, 100% {
        opacity: 1;
        transform: rotate(0deg);
    }
    50% {
        opacity: 0.7;
        transform: rotate(180deg);
    }
}

.share-btn {
    padding: 8px 14px;
    background-color: rgba(125, 104, 178, 0.2);
    color: var(--primary-color);
    border: 1px solid rgba(125, 104, 178, 0.3);
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.share-btn:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(125, 104, 178, 0.4);
    border-color: var(--primary-color);
}

.share-notification {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    color: white;
    padding: 15px 25px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(46, 204, 113, 0.4);
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    z-index: 2147483647;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.share-notification.show {
    opacity: 1;
    transform: translateY(0);
}

.share-notification i {
    font-size: 1.2rem;
}

.writeup-card-header > div {
    display: inline-flex;
    gap: 8px;
    align-items: center;
}

@media (max-width: 768px) {
    .share-notification {
        bottom: 20px;
        right: 20px;
        left: 20px;
        font-size: 0.9rem;
    }
}


/* Widget de Discord - ajuste de z-index */
#widgetbot-crate, [id*="widgetbot"] {
    z-index: 2147483646 !important;
}


/* Proyecto destacado */
.featured-project {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin: 40px 0;
    align-items: start;
    padding: 40px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: visible;
}

.featured-content h3 {
    font-size: 2.5em;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.featured-content p {
    font-size: 1.2em;
    margin-bottom: 30px;
    line-height: 1.6;
}

.project-features {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 30px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    font-weight: 600;
}

/* WRAPPER VIDEO - ZINDEX ALTO */
.video-zoom-wrapper {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    background: #000;
    height: 100%;
    cursor: pointer;
    z-index: 1;
    transition: all 0.3s ease;
}

/* VIDEO PRINCIPAL - FILL (SIN ZOOM) */
.main-video {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    transition: none !important;
}

/* HOVER - SIN ZOOM */
.video-zoom-wrapper:hover {
    z-index: 1000 !important;
    /* transform: scale(1.1) !important; COMENTADO */
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.7) !important;
}

.video-zoom-wrapper:hover .main-video {
    /* transform: scale(1.25) !important; COMENTADO */
    object-fit: cover !important;
}

/* BOTONES DE VIDEO - GRUPO (IGUALES) */
.video-sound-btn,
.video-fullscreen-btn {
    position: absolute;
    bottom: 20px;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1001 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    font-size: 1rem;
}

.video-sound-btn {
    right: 20px;
}

.video-fullscreen-btn {
    right: 75px; /* 20px + 45px (ancho botón) + 10px espacio */
}

.video-sound-btn:hover,
.video-fullscreen-btn:hover {
    background: var(--primary-color);
    transform: scale(1.1);
}

.video-fullscreen-btn.fullscreen i {
    color: white;
}

.video-sound-btn.small {
    width: 35px;
    height: 35px;
    bottom: 15px;
    right: 15px;
}

/* LABELS DECORADOS */
.label-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 25px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.label-badge.discord {
    background: linear-gradient(135deg, #5865F2, #4752C4);
    color: white;
    border: 1px solid rgba(88, 101, 242, 0.4);
}

.label-badge.security {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: white;
    border: 1px solid rgba(46, 204, 113, 0.4);
}

/* DEMOS */
.project-demos {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 60px;
}

.demo-item {
    text-align: center;
    max-width: 420px;
    margin: 0 auto;
}

.demo-item h4 {
    margin-bottom: 20px;
    color: var(--primary-color);
    font-size: 1.5em;
    text-align: center;
}

.demo-video {
    position: relative;
    margin-bottom: 18px;
    border-radius: 18px;
    overflow: hidden;
    background: #000;
    max-height: 360px;
    width: 100%;
    max-width: 380px;
}

.demo-video video {
    width: 100%;
    height: 100% !important;
    object-fit: cover !important;
    display: block;
}

/* RESPONSIVE - VERSIÓN FINAL CORREGIDA */
@media (max-width: 768px) {
    .featured-project {
        grid-template-columns: 1fr !important;
        gap: 30px;
        padding: 30px 20px;
    }
    
    .video-zoom-wrapper {
        height: 250px !important;
        max-height: 40vh;
    }
    
    .main-video {
        height: 250px !important;
    }
    
    /* BOTONES VIDEO PRINCIPAL - MÓVILES PERFECTOS */
    .video-sound-btn,
    .video-fullscreen-btn {
        width: 40px !important;
        height: 40px !important;
        bottom: 12px !important;
        font-size: 0.9rem !important;
    }
    
    .video-sound-btn {
        right: 12px !important;
    }
    
    .video-fullscreen-btn {
        right: 58px !important; /* 12px + 40px (ancho botón) + 6px espacio */
    }
    
    .video-sound-btn:hover,
    .video-fullscreen-btn:hover {
        width: 42px !important;
        height: 42px !important;
        transform: scale(1.05);
    }
    
    .project-demos {
        grid-template-columns: 1fr;
        gap: 35px;
    }
    
    .demo-item {
        max-width: 360px;
    }
    
    /* VIDEOS DEMO - SIN BORDES NEGROS */
    .demo-video {
        max-height: 260px;
        max-width: 340px;
        height: 260px !important;
        width: 100% !important;
    }
    
    .demo-video video {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }
    
    /* VIDEO 2FA CENTRADO */
    #youradvent-2fa-video {
        object-position: center center !important;
    }
    
    /* ELIMINAR .video-sound-btn.small en móviles */
    .video-sound-btn.small {
        display: none !important;
    }
}
