/* 🎨 Estilos Generales */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: linear-gradient(135deg, #0A1931 0%, #1a2f4a 100%);
    color: #FFFFFF;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    text-align: center;
    line-height: 1.6;
    min-height: 100vh;
}

/* 🟦 Navbar Mejorado */
.navbar {
    background: linear-gradient(135deg, #0057B7 0%, #004494 100%);
    padding: 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.logo {
    color: #FFFFFF;
    font-size: 24px;
    font-weight: bold;
    letter-spacing: 1px;
}

.nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 30px;
}

.nav-menu li a {
    color: #FFFFFF;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    padding: 8px 16px;
    border-radius: 5px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-menu li a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: #FFD700;
    transition: width 0.3s ease;
}

.nav-menu li a:hover::before {
    width: 80%;
}

.nav-menu li a:hover {
    color: #FFD700;
    background: rgba(255, 255, 255, 0.1);
}

/* Botón hamburguesa */
.nav-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 25px;
    justify-content: space-between;
}

.nav-toggle span {
    width: 100%;
    height: 3px;
    background: #FFFFFF;
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* Responsive Navbar */
@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 60px;
        flex-direction: column;
        background: linear-gradient(135deg, #0057B7 0%, #004494 100%);
        width: 100%;
        text-align: center;
        transition: left 0.3s ease;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.2);
        gap: 0;
        padding: 20px 0;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-menu li {
        padding: 15px 0;
    }
    
    .nav-menu li a {
        display: block;
        width: 100%;
    }
}

/* 🌟 Hero Section Mejorado */
.hero {
    padding: 80px 20px;
    font-size: 24px;
    background: linear-gradient(135deg, #0057B7 0%, #008CFF 50%, #00A8FF 100%);
    color: white;
    border-radius: 15px;
    margin: 30px 20px;
    box-shadow: 0 10px 40px rgba(0, 87, 183, 0.3);
    animation: fadeInDown 0.8s ease-out;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

.hero h1 {
    font-size: 48px;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.hero p {
    font-size: 20px;
    position: relative;
    z-index: 1;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 50px 15px;
    }
    
    .hero h1 {
        font-size: 32px;
    }
    
    .hero p {
        font-size: 16px;
    }
}

/* 📌 Secciones Mejoradas */
.about, .skills, .projects, .experience, .highlights, .contact-form {
    text-align: center;
    padding: 60px 20px;
    background: #FFFFFF;
    color: #0A1931;
    border-radius: 15px;
    margin: 30px auto;
    max-width: 1200px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
    animation: fadeIn 1s ease-out;
}

.about h2, .skills h2, .projects h2, .experience h2, .highlights h2, .contact-form h2 {
    font-size: 36px;
    margin-bottom: 30px;
    color: #0057B7;
    position: relative;
    display: inline-block;
}

.about h2::after, .skills h2::after, .projects h2::after, .experience h2::after, .highlights h2::after, .contact-form h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(to right, #0057B7, #FFD700);
    border-radius: 2px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .about, .skills, .projects, .experience, .highlights, .contact-form {
        padding: 40px 15px;
        margin: 20px 10px;
    }
}

/* 🔹 Tarjetas Mejoradas */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    padding: 20px;
}

.card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 87, 183, 0.1), transparent);
    transition: left 0.5s;
}

.card:hover::before {
    left: 100%;
}

.card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 35px rgba(0, 87, 183, 0.3);
    border-color: #0057B7;
}

.card h3 {
    color: #0057B7;
    margin-bottom: 15px;
    font-size: 22px;
}

.card p {
    color: #555;
    line-height: 1.6;
}

.card strong {
    color: #0057B7;
    font-weight: 600;
}

.card p + p {
    margin-top: 10px;
}

/* Estilos específicos para tarjetas de IA */
.highlights .card p {
    text-align: left;
    font-size: 14px;
    margin: 8px 0;
}

.highlights .card p:first-of-type {
    margin-top: 15px;
}

@media (max-width: 768px) {
    .grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 10px;
    }
}

/* 🔘 Botones Mejorados */
.btn, button {
    background: linear-gradient(135deg, #0057B7 0%, #0073E6 100%);
    color: white;
    font-weight: bold;
    font-size: 16px;
    padding: 12px 30px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 87, 183, 0.3);
    text-decoration: none;
    display: inline-block;
    position: relative;
    overflow: hidden;
}

.btn::before, button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before, button:hover::before {
    width: 300px;
    height: 300px;
}

.btn:hover, button:hover {
    background: linear-gradient(135deg, #008CFF 0%, #00A8FF 100%);
    box-shadow: 0 6px 25px rgba(0, 140, 255, 0.5);
    transform: translateY(-2px);
}

.btn:active, button:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(0, 87, 183, 0.3);
}

/* 📊 Gráficos */
#chart-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    align-items: center;
    gap: 20px;
    width: 100%;
    padding: 20px;
}

.chart-box {
    flex: 1;
    max-width: 45%;
    min-width: 300px;
}

/* 🔹 Mejora del Tag Cloud */
#tags-container {
    text-align: center;
    padding: 20px;
    background: #0A1931; /* Azul oscuro corporativo */
    border-radius: 10px;
    margin: 20px;
}

#tags {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px; /* 🔹 Aumenta el espacio entre etiquetas */
    max-width: 90%;
    margin: auto;
}

.tag {
    background-color: transparent; /* 🔹 Sin fondo para que se vea más elegante */
    color: white;
    padding: 5px 15px;
    border-radius: 5px;
    transition: transform 0.3s, font-size 0.3s;
    font-weight: bold;
}

.tag:hover {
    transform: scale(1.1);
    color: #FFD700; /* 🔥 Cambia a dorado en hover */
}

/* 🔹 Asegurar que las etiquetas no se desborden en móviles */
@media (max-width: 768px) {
    #tags {
        flex-direction: row;
        flex-wrap: wrap;
    }
    .tag {
        font-size: 16px !important;
    }
}

/* 💬 Chat */
#chat-container {
    width: 50%;
    margin: 20px auto;
    text-align: center;
    padding: 20px;
    background: white;
    border-radius: 10px;
    color: #0A1931;
}

#chat-box {
    height: 300px;
    overflow-y: auto;
    padding: 10px;
    border: 1px solid #ccc;
    background: #F5F5F5;
    color: #0A1931;
}

.user {
    background: #0057B7;
    color: white;
    text-align: right;
}

.assistant {
    background: #008CFF;
    text-align: left;
}

/* 📩 Formulario de Contacto Mejorado */
form {
    max-width: 600px;
    margin: 30px auto;
    text-align: left;
}

input, textarea {
    display: block;
    width: 100%;
    margin: 15px 0;
    padding: 15px;
    border-radius: 10px;
    border: 2px solid #e0e0e0;
    font-size: 16px;
    font-family: inherit;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

input:focus, textarea:focus {
    outline: none;
    border-color: #0057B7;
    background: white;
    box-shadow: 0 0 0 3px rgba(0, 87, 183, 0.1);
}

textarea {
    min-height: 150px;
    resize: vertical;
}

form button {
    width: 100%;
    margin-top: 20px;
}

/* 📣 Sección CTA */
.cta {
    background: linear-gradient(135deg, #0057B7 0%, #008CFF 100%);
    color: white;
    padding: 60px 30px;
    border-radius: 15px;
    margin: 40px auto;
    max-width: 1200px;
    box-shadow: 0 10px 40px rgba(0, 87, 183, 0.3);
}

.cta h2 {
    font-size: 36px;
    margin-bottom: 20px;
    color: white;
}

.cta p {
    font-size: 18px;
    margin: 15px 0;
    color: rgba(255, 255, 255, 0.95);
}

.cta .btn {
    margin-top: 30px;
    background: white;
    color: #0057B7;
    font-size: 18px;
    padding: 15px 40px;
}

.cta .btn:hover {
    background: #FFD700;
    color: #0A1931;
}

.alert-success {
    background: #c6f6d5;
    color: #22543d;
    border: 1px solid #68d391;
}

.alert-error {
    background: #fed7d7;
    color: #c53030;
    border: 1px solid #fc8181;
}

/* 🌟 Banner IA */
.ai-banner-link {
    display: inline-block;
    margin-top: 15px;
    background: white;
    color: #667eea;
    padding: 10px 25px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: bold;
    transition: transform 0.3s, box-shadow 0.3s;
}

.ai-banner-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.3);
}

/* 📍 Pie de Página Mejorado */
footer {
    background: linear-gradient(135deg, #0057B7 0%, #004494 100%);
    padding: 30px 20px;
    color: white;
    margin-top: 50px;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.2);
}

footer p {
    margin: 10px 0;
    font-size: 14px;
    letter-spacing: 0.5px;
}

/* Container principal */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* ========== ESTILOS DEL DASHBOARD ========== */

/* Métricas KPI */
.dashboard-metrics {
    padding: 30px 20px;
    background: transparent;
    margin: 30px auto;
    max-width: 1400px;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.metric-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s ease;
    border-left: 5px solid #0057B7;
    animation: slideInUp 0.6s ease-out;
}

.metric-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 87, 183, 0.2);
}

.metric-icon {
    font-size: 48px;
    min-width: 60px;
    text-align: center;
}

.metric-content {
    flex: 1;
}

.metric-content h3 {
    margin: 0 0 8px 0;
    font-size: 14px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.metric-value {
    font-size: 32px;
    font-weight: bold;
    color: #0A1931;
    margin: 5px 0;
}

.metric-change {
    font-size: 13px;
    font-weight: 600;
}

.metric-change.positive {
    color: #10b981;
}

.metric-change.negative {
    color: #ef4444;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Controles del Dashboard */
.dashboard-controls {
    background: white;
    padding: 25px;
    border-radius: 15px;
    margin: 30px auto;
    max-width: 1400px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.08);
}

.controls-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.control-group label {
    font-weight: 600;
    color: #0A1931;
    white-space: nowrap;
}

.control-select {
    padding: 10px 15px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    color: #0A1931;
    cursor: pointer;
    transition: all 0.3s;
    min-width: 180px;
}

.control-select:focus {
    outline: none;
    border-color: #0057B7;
    box-shadow: 0 0 0 3px rgba(0, 87, 183, 0.1);
}

.control-btn {
    padding: 10px 20px;
    background: linear-gradient(135deg, #0057B7 0%, #0073E6 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-left: auto;
}

.control-btn:hover {
    background: linear-gradient(135deg, #008CFF 0%, #00A8FF 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 87, 183, 0.3);
}

.control-btn.spinning {
    animation: spin 0.5s linear;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Gráficos del Dashboard */
.dashboard-charts {
    max-width: 1400px;
    margin: 30px auto;
}

.charts-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 25px;
    margin-bottom: 25px;
}

.chart-container {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.08);
    animation: fadeIn 0.8s ease-out;
}

.chart-container.full-width {
    grid-column: 1 / -1;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.chart-header h3 {
    margin: 0;
    color: #0A1931;
    font-size: 18px;
}

.chart-actions {
    display: flex;
    gap: 10px;
}

.chart-type-btn {
    padding: 8px 12px;
    background: #f0f0f0;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.3s;
}

.chart-type-btn:hover {
    background: #e0e0e0;
}

.chart-type-btn.active {
    background: #0057B7;
    color: white;
}

.chart-body {
    position: relative;
    height: 350px;
}

/* Tabla del Dashboard */
.dashboard-table {
    background: white;
    border-radius: 15px;
    padding: 25px;
    margin: 30px auto;
    max-width: 1400px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.08);
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.table-header h3 {
    margin: 0;
    color: #0A1931;
}

.table-search {
    padding: 10px 15px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    width: 300px;
    transition: all 0.3s;
}

.table-search:focus {
    outline: none;
    border-color: #0057B7;
    box-shadow: 0 0 0 3px rgba(0, 87, 183, 0.1);
}

.table-responsive {
    overflow-x: auto;
}

#productsTable {
    width: 100%;
    border-collapse: collapse;
}

#productsTable thead {
    background: linear-gradient(135deg, #0057B7 0%, #0073E6 100%);
    color: white;
}

#productsTable th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.5px;
}

#productsTable tbody tr {
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.3s;
}

#productsTable tbody tr:hover {
    background: #f8f9fa;
}

#productsTable td {
    padding: 15px;
    color: #0A1931;
}

.category-badge {
    display: inline-block;
    padding: 5px 12px;
    background: #e0f2fe;
    color: #0369a1;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status-ok {
    background: #d1fae5;
    color: #065f46;
}

.status-low {
    background: #fef3c7;
    color: #92400e;
}

.status-critical {
    background: #fee2e2;
    color: #991b1b;
}

/* Nube de Tags del Dashboard */
.dashboard-tags {
    background: white;
    border-radius: 15px;
    padding: 30px;
    margin: 30px auto;
    max-width: 1400px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.08);
    text-align: center;
}

.dashboard-tags h3 {
    margin: 0 0 25px 0;
    color: #0A1931;
}

.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    padding: 20px;
}

.tag-item {
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
    padding: 5px 15px;
    border-radius: 8px;
    background: rgba(0, 87, 183, 0.05);
}

.tag-item:hover {
    transform: scale(1.15);
    background: rgba(0, 87, 183, 0.1);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Responsive Dashboard */
@media (max-width: 1024px) {
    .charts-row {
        grid-template-columns: 1fr;
    }
    
    .controls-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .control-btn {
        margin-left: 0;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .metrics-grid {
        grid-template-columns: 1fr;
    }
    
    .metric-card {
        padding: 20px;
    }
    
    .metric-value {
        font-size: 24px;
    }
    
    .chart-body {
        height: 250px;
    }
    
    .table-search {
        width: 100%;
    }
    
    #productsTable {
        font-size: 13px;
    }
    
    #productsTable th,
    #productsTable td {
        padding: 10px 8px;
    }
}

/* ========== ESTILOS DEL BLOG ========== */

/* Filtros del Blog */
.blog-filters {
    background: white;
    padding: 25px;
    border-radius: 15px;
    margin: 30px auto;
    max-width: 1200px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.08);
}

.filters-container {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.search-input,
.filter-select {
    flex: 1;
    min-width: 250px;
    padding: 12px 20px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.3s;
}

.search-input:focus,
.filter-select:focus {
    outline: none;
    border-color: #0057B7;
    box-shadow: 0 0 0 3px rgba(0, 87, 183, 0.1);
}

/* Grid de Posts */
.blog-grid {
    max-width: 1200px;
    margin: 30px auto;
    padding: 20px;
}

.posts-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.post-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    animation: fadeInUp 0.6s ease-out;
}

.post-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 30px rgba(0, 87, 183, 0.2);
}

.post-card-image {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.post-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.post-card:hover .post-card-image img {
    transform: scale(1.1);
}

.post-card-image-placeholder {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0057B7 0%, #00A8FF 100%);
    position: relative;
}

.category-icon {
    font-size: 64px;
}

.post-card-category {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(255, 255, 255, 0.95);
    color: #0A1931;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    z-index: 1;
}

.post-card-content {
    padding: 25px;
}

.post-card-meta {
    display: flex;
    gap: 15px;
    font-size: 13px;
    color: #666;
    margin-bottom: 15px;
}

.post-card-title {
    font-size: 22px;
    color: #0A1931;
    margin: 0 0 12px 0;
    line-height: 1.4;
}

.post-card-excerpt {
    color: #555;
    line-height: 1.6;
    margin-bottom: 15px;
}

.post-card-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.tag-small {
    background: #f0f0f0;
    color: #0057B7;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.post-card-link {
    display: inline-block;
    color: #0057B7;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
}

.post-card-link:hover {
    color: #008CFF;
    transform: translateX(5px);
}

.no-posts {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
}

.empty-state {
    text-align: center;
    color: #666;
}

.empty-state h3 {
    color: #0A1931;
    margin: 20px 0 10px 0;
}

/* Post Individual */
.post-single {
    max-width: 900px;
    margin: 30px auto;
    background: white;
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.08);
}

.post-header {
    margin-bottom: 40px;
}

.post-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    font-size: 14px;
}

.post-category {
    background: #0057B7;
    color: white;
    padding: 6px 15px;
    border-radius: 20px;
    font-weight: 600;
}

.post-title {
    font-size: 42px;
    color: #0A1931;
    margin: 20px 0;
    line-height: 1.3;
}

.post-excerpt {
    font-size: 20px;
    color: #555;
    line-height: 1.6;
    font-style: italic;
}

.post-image {
    margin: 30px 0;
    border-radius: 15px;
    overflow: hidden;
}

.post-image img {
    width: 100%;
    height: auto;
}

.post-content {
    font-size: 18px;
    line-height: 1.8;
    color: #333;
}

.post-content h2 {
    font-size: 32px;
    color: #0A1931;
    margin: 40px 0 20px 0;
}

.post-content h3 {
    font-size: 24px;
    color: #0A1931;
    margin: 30px 0 15px 0;
}

.post-content p {
    margin-bottom: 20px;
}

.post-content code {
    background: #f5f5f5;
    padding: 2px 8px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    color: #e83e8c;
}

.post-content pre {
    background: #2d2d2d;
    color: #f8f8f2;
    padding: 20px;
    border-radius: 10px;
    overflow-x: auto;
    margin: 20px 0;
}

.post-share {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 15px;
    margin: 40px 0;
    text-align: center;
}

.post-share h3 {
    margin: 0 0 20px 0;
    color: #0A1931;
}

.share-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.share-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    text-decoration: none;
    color: white;
    cursor: pointer;
    transition: all 0.3s;
}

.share-btn.linkedin {
    background: #0077B5;
}

.share-btn.threads {
    background: #000000;
}

.share-btn.facebook {
    background: #1877F2;
}

.share-btn.copy {
    background: #6c757d;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.post-tags {
    margin: 30px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
}

.post-navigation {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.post-navigation a {
    flex: 1;
    padding: 15px 20px;
    background: #f8f9fa;
    border-radius: 10px;
    text-decoration: none;
    color: #0A1931;
    font-weight: 600;
    transition: all 0.3s;
    text-align: center;
    min-width: 150px;
}

.post-navigation a:hover {
    background: #0057B7;
    color: white;
}

/* Panel de Administración */
.admin-hero-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 10;
}

.admin-user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.admin-username {
    color: #FFD700;
    font-weight: 600;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 16px;
    border-radius: 50px;
}

.btn-change-password {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 193, 7, 0.3);
    color: #fff;
    padding: 10px 18px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    z-index: 100;
}

.btn-change-password svg {
    width: 18px;
    height: 18px;
}

.btn-change-password:hover {
    background: #ffc107;
    color: #000;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 193, 7, 0.4);
}

.btn-logout {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 77, 77, 0.3);
    color: #fff;
    padding: 10px 18px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    z-index: 100;
}

.btn-logout svg {
    width: 18px;
    height: 18px;
}

.btn-logout:hover {
    background: #ff4d4d;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 77, 77, 0.3);
}

.admin-panel {
    max-width: 1200px;
    margin: 30px auto;
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.08);
}

.admin-tabs {
    display: flex;
    gap: 10px;
    border-bottom: 2px solid #f0f0f0;
    margin-bottom: 30px;
}

.tab-btn {
    padding: 12px 24px;
    background: none;
    border: none;
    font-size: 16px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
}

.tab-btn:hover {
    color: #0057B7;
}

.tab-btn.active {
    color: #0057B7;
    border-bottom-color: #0057B7;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.4s ease-out;
}

.admin-form {
    max-width: 800px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #0A1931;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #0057B7;
    box-shadow: 0 0 0 3px rgba(0, 87, 183, 0.1);
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 13px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 30px;
}

.btn-primary,
.btn-secondary {
    padding: 12px 30px;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, #0057B7 0%, #0073E6 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #008CFF 0%, #00A8FF 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 87, 183, 0.3);
}

.btn-secondary {
    background: #f0f0f0;
    color: #0A1931;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

.form-response {
    margin-top: 20px;
    padding: 15px;
    border-radius: 10px;
    display: none;
}

.form-response.success {
    background: #d1fae5;
    color: #065f46;
    border: 2px solid #10b981;
}

.form-response.error {
    background: #fee2e2;
    color: #991b1b;
    border: 2px solid #ef4444;
}

/* Lista de Posts en Admin */
.admin-post-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    margin-bottom: 15px;
    transition: all 0.3s;
}

.admin-post-item:hover {
    background: #e9ecef;
}

.admin-post-info h3 {
    margin: 0 0 10px 0;
    color: #0A1931;
}

.admin-post-meta {
    display: flex;
    gap: 15px;
    font-size: 13px;
    color: #666;
}

.badge-category {
    background: #0057B7;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-weight: 600;
}

.admin-post-actions {
    display: flex;
    gap: 10px;
}

.btn-action {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-action.view {
    background: #0057B7;
    color: white;
}

.btn-action.edit {
    background: #FFD700;
    color: #0A1931;
}

.btn-action.delete {
    background: #ef4444;
    color: white;
}

.btn-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

/* Estadísticas Admin */
.admin-stats {
    max-width: 1000px;
    margin: 0 auto;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    gap: 15px;
}

.stat-icon {
    font-size: 40px;
}

.stat-info h3 {
    margin: 0 0 5px 0;
    font-size: 14px;
    color: #666;
}

.stat-value {
    font-size: 28px;
    font-weight: bold;
    color: #0A1931;
    margin: 0;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    padding: 40px;
    border-radius: 15px;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 30px;
    font-weight: bold;
    color: #666;
    cursor: pointer;
    transition: color 0.3s;
}

.modal-close:hover {
    color: #0A1931;
}

/* Botones de Compartir */
.share-notification {
    text-align: center;
}

.share-buttons-inline {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 15px;
}

.btn-share {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    color: white;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-share.linkedin {
    background: #0077B5;
}

.btn-share.threads {
    background: #000000;
}

.btn-share.copy {
    background: #6c757d;
}

/* Responsive Blog */
@media (max-width: 768px) {
    .posts-container {
        grid-template-columns: 1fr;
    }
    
    .post-single {
        padding: 25px;
    }
    
    .post-title {
        font-size: 32px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .admin-post-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .admin-post-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    .post-navigation {
        flex-direction: column;
    }
}

/* 📱 Mejoras Responsive Globales */
@media (max-width: 1024px) {
    .container {
        padding: 15px;
    }
}

@media (max-width: 768px) {
    body {
        font-size: 14px;
    }
    
    .container {
        padding: 10px;
    }
    
    .cta {
        padding: 40px 20px;
    }
    
    .cta h2 {
        font-size: 28px;
    }
    
    .cta p {
        font-size: 16px;
    }
    
    form {
        padding: 0 10px;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 28px;
    }
    
    .hero p {
        font-size: 14px;
    }
    
    .about h2, .skills h2, .projects h2, .experience h2, .highlights h2, .contact-form h2 {
        font-size: 24px;
    }
    
    .card {
        padding: 20px;
    }
    
    .card h3 {
        font-size: 18px;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 14px;
    }

    /* Admin responsive */
    .admin-hero-content {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .admin-user-info {
        justify-content: center;
        width: 100%;
    }

    .btn-change-password,
    .btn-logout {
        font-size: 0.85rem;
        padding: 8px 14px;
    }
}

/* Animaciones para notificaciones */
@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}
