/* ============================================
   HEADER - Cabecera principal
   ============================================ */

.header {
    background: var(--bg-card);
    color: var(--gray-800);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid var(--gray-200);
    padding: 15px 20px;
    overflow: visible !important;
}

.header-top {
    text-align: center;
    margin-bottom: 15px;
}

.header-content {
    text-align: center;
}

.header h1 {
    color: var(--accent);
    font-weight: 700;
    margin: 0;
    font-size: 28px;
    text-align: center;
}

.header p {
    color: var(--gray-600);
    margin: 5px 0 0 0;
    font-size: 14px;
    text-align: center;
}

/* Badge de layout activo */
.layout-badge {
    display: inline-block;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
    animation: badgePulse 2s ease-in-out infinite;
}

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

/* Barra de progreso del proyecto */
.project-progress {
    max-width: 400px;
    margin: 0 auto;
}

.progress-bar-container {
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6 0%, #10b981 100%);
    border-radius: 4px;
    transition: width 0.5s ease-out;
    position: relative;
}

.progress-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.3) 50%,
        transparent 100%
    );
    animation: progressShine 2s ease-in-out infinite;
}

@keyframes progressShine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-text {
    display: block;
    text-align: center;
    margin-top: 6px;
    color: #64748b;
    font-size: 11px;
    font-weight: 600;
}

/* Botones del header */
.header-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    align-items: center;
    width: 100%;
    overflow: visible !important;
    position: relative;
}

.header-btn, .config-button {
    display: inline-block;
    padding: 7px 11px;
    margin: 0;
    cursor: pointer;
    pointer-events: all;
    z-index: 1001;
    position: relative;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 500;
    text-decoration: none;
    outline: none;
    transition: all 0.2s ease;
}

.header-btn {
    background: var(--gray-100);
    color: var(--gray-700);
    border: 1px solid var(--gray-300);
}

.header-btn:hover, .header-btn:focus {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: none;
    box-shadow: 0 2px 8px rgba(0, 102, 255, 0.3);
}

.config-button {
    background: var(--accent);
    color: white;
    border: 1px solid var(--accent);
}

.config-button:hover, .config-button:focus {
    background: var(--gray-800);
    border-color: var(--gray-800);
    transform: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.header-btn:active, .config-button:active {
    transform: translateY(1px);
}

/* Responsive - Landscape */
@media (orientation: landscape) {
    .header-btn, .config-button {
        font-size: 13px;
        padding: 8px 14px;
    }
}

/* Responsive - Portrait */
@media (max-width: 768px) and (orientation: portrait) {
    .header h1 {
        font-size: 20px;
    }

    .header p {
        font-size: 12px;
    }

    .header-buttons {
        flex-direction: column;
        gap: 4px;
        align-items: flex-end;
        position: absolute;
        right: 15px;
        top: 15px;
    }

    .header-btn, .config-button {
        padding: 5px 8px;
        font-size: 11px;
        min-width: 70px;
    }

    .header-btn span, .config-button span {
        display: none;
    }
}
